rails-angularjs2 2.0.0.pre.alpha.32 → 2.0.0.pre.beta.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/rails-angularjs2/version.rb +1 -1
  4. data/vendor/assets/javascripts/Rx.js +11615 -0
  5. data/vendor/assets/javascripts/Rx.min.js +417 -0
  6. data/vendor/assets/javascripts/Rx.min.js.map +1 -0
  7. data/vendor/assets/javascripts/Rx.umd.js +10274 -0
  8. data/vendor/assets/javascripts/Rx.umd.min.js +748 -0
  9. data/vendor/assets/javascripts/Rx.umd.min.js.map +8 -0
  10. data/vendor/assets/javascripts/angular2-all-testing.umd.dev.js +39335 -0
  11. data/vendor/assets/javascripts/angular2-all.umd.dev.js +37160 -0
  12. data/vendor/assets/javascripts/angular2-all.umd.js +37159 -0
  13. data/vendor/assets/javascripts/angular2-all.umd.min.js +19 -0
  14. data/vendor/assets/javascripts/angular2-polyfills.js +3324 -0
  15. data/vendor/assets/javascripts/angular2-polyfills.min.js +1 -0
  16. data/vendor/assets/javascripts/angular2.dev.js +23937 -29580
  17. data/vendor/assets/javascripts/angular2.js +24021 -29105
  18. data/vendor/assets/javascripts/angular2.min.js +18 -24
  19. data/vendor/assets/javascripts/http.dev.js +1091 -0
  20. data/vendor/assets/javascripts/http.js +1091 -0
  21. data/vendor/assets/javascripts/http.min.js +1 -0
  22. data/vendor/assets/javascripts/router.dev.js +2946 -1894
  23. data/vendor/assets/javascripts/router.js +3107 -0
  24. data/vendor/assets/javascripts/router.min.js +3 -0
  25. data/vendor/assets/javascripts/testing.dev.js +2105 -0
  26. data/vendor/assets/javascripts/testing.dev.js.map +1 -0
  27. data/vendor/assets/javascripts/upgrade.dev.js +777 -0
  28. data/vendor/assets/javascripts/upgrade.js +777 -0
  29. data/vendor/assets/javascripts/upgrade.min.js +1 -0
  30. metadata +25 -9
  31. data/vendor/assets/javascripts/angular2.sfx.dev.js +0 -36368
  32. data/vendor/assets/javascripts/mock.dev.js +0 -337
  33. data/vendor/assets/javascripts/mock.dev.js.map +0 -1
  34. data/vendor/assets/javascripts/router.dev.js.map +0 -1
  35. data/vendor/assets/javascripts/test_lib.dev.js +0 -1510
  36. data/vendor/assets/javascripts/test_lib.dev.js.map +0 -1
@@ -1,24 +1,18 @@
1
- !function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){(function(t){"use strict";var n=e("../core"),r=e("../microtask"),i=e("../patch/browser"),o=e("es6-promise");t.Zone&&console.warn("Zone already exported on window the object!"),t.Zone=r.addMicrotaskSupport(n.Zone),t.zone=new t.Zone,t.Promise=o.Promise,i.apply()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../core":2,"../microtask":3,"../patch/browser":4,"es6-promise":15}],2:[function(e,t,n){(function(n){"use strict";function r(e,t){var n=arguments.length?Object.create(e):this;return n.parent=e||null,Object.keys(t||{}).forEach(function(r){var i=r.substr(1);"$"===r[0]?n[i]=t[r](e[i]||function(){}):"+"===r[0]?n[i]=e[i]?function(){var n=e[i].apply(this,arguments);return t[r].apply(this,arguments),n}:t[r]:"-"===r[0]?n[i]=e[i]?function(){return t[r].apply(this,arguments),e[i].apply(this,arguments)}:t[r]:n[r]="object"==typeof t[r]?JSON.parse(JSON.stringify(t[r])):t[r]}),n.$id=r.nextId++,n}r.prototype={constructor:r,fork:function(e){return this.onZoneCreated(),new r(this,e)},bind:function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);t||this.enqueueTask(e);var n=this.isRootZone()?this:this.fork();return function(){return n.run(e,this,arguments)}},bindOnce:function(e){var t=this;return this.bind(function(){var n=e.apply(this,arguments);return t.dequeueTask(e),n})},isRootZone:function(){return null===this.parent},run:function(e,t,r){r=r||[];var i=n.zone;n.zone=this;try{return this.beforeTask(),e.apply(t,r)}catch(o){if(!this.onError)throw o;this.onError(o)}finally{this.afterTask(),n.zone=i}},onError:null,beforeTask:function(){},onZoneCreated:function(){},afterTask:function(){},enqueueTask:function(){},dequeueTask:function(){}},r.nextId=1,r.bindPromiseFn=e("./patch/promise").bindPromiseFn,t.exports={Zone:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./patch/promise":10}],3:[function(e,t,n){(function(n){"use strict";function r(e){o._asap(this.bind(e))}function i(e){return e.prototype.scheduleMicrotask=r,e}var o=e("es6-promise").Promise;o._setAsap(function(e,t){n.zone.scheduleMicrotask(function(){e(t)})}),t.exports={addMicrotaskSupport:i};var s="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]"),a=n.navigator&&n.navigator.userAgent.toLowerCase().indexOf("firefox")>-1;if(s&&!a){var c=Promise.resolve();o._setScheduler(function(e){c.then(e)})}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"es6-promise":15}],4:[function(e,t,n){(function(n){"use strict";function r(){i.patchSetClearFunction(n,["timeout","interval","immediate"]),i.patchSetFunction(n,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame"]),i.patchFunction(n,["alert","prompt"]),u.apply(),l.apply(),o.apply(),s.patchClass("MutationObserver"),s.patchClass("WebKitMutationObserver"),a.apply(),c.apply(),f.apply()}var i=e("./functions"),o=e("./promise"),s=e("./mutation-observer"),a=e("./define-property"),c=e("./register-element"),u=(e("./websocket"),e("./event-target")),l=e("./property-descriptor"),f=e("./geolocation");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./define-property":5,"./event-target":6,"./functions":7,"./geolocation":8,"./mutation-observer":9,"./promise":10,"./property-descriptor":11,"./register-element":12,"./websocket":13}],5:[function(e,t,n){"use strict";function r(){Object.defineProperty=function(e,t,n){if(o(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);return"prototype"!==t&&(n=s(e,t,n)),a(e,t,n)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"==typeof t&&Object.keys(t).forEach(function(n){t[n]=s(e,n,t[n])}),u(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=c(e,t);return o(e,t)&&(n.configurable=!1),n}}function i(e,t,n){return n=s(e,t,n),a(e,t,n)}function o(e,t){return e&&e.__unconfigurables&&e.__unconfigurables[t]}function s(e,t,n){return n.configurable=!0,n.configurable||(e.__unconfigurables||a(e,"__unconfigurables",{writable:!0,value:{}}),e.__unconfigurables[t]=!0),n}var a=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u=Object.create;t.exports={apply:r,_redefineProperty:i}},{}],6:[function(e,t,n){(function(n){"use strict";function r(){if(n.EventTarget)i.patchEventTargetMethods(n.EventTarget.prototype);else{var e=["ApplicationCache","EventSource","FileReader","InputMethodContext","MediaController","MessagePort","Node","Performance","SVGElementInstance","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebKitNamedFlow","Window","Worker","WorkerGlobalScope","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];e.forEach(function(e){n[e]&&i.patchEventTargetMethods(n[e].prototype)})}}var i=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":14}],7:[function(e,t,n){(function(n){"use strict";function r(e,t){t.map(function(e){return e[0].toUpperCase()+e.substr(1)}).forEach(function(t){var r="set"+t,i=e[r];if(i){var o="clear"+t,a={},c="setInterval"===r?s.bindArguments:s.bindArgumentsOnce;n.zone[r]=function(t){var n,r=t;arguments[0]=function(){return delete a[n],r.apply(this,arguments)};var o=c(arguments);return n=i.apply(e,o),a[n]=!0,n},e[r]=function(){return n.zone[r].apply(this,arguments)};var u=e[o];n.zone[o]=function(e){return a[e]&&(delete a[e],n.zone.dequeueTask()),u.apply(this,arguments)},e[o]=function(){return n.zone[o].apply(this,arguments)}}})}function i(e,t){t.forEach(function(t){var r=e[t];r&&(n.zone[t]=function(t){var n=t;arguments[0]=function(){return n.apply(this,arguments)};var i=s.bindArgumentsOnce(arguments);return r.apply(e,i)},e[t]=function(){return zone[t].apply(this,arguments)})})}function o(e,t){t.forEach(function(t){var r=e[t];n.zone[t]=function(){return r.apply(e,arguments)},e[t]=function(){return n.zone[t].apply(this,arguments)}})}var s=e("../utils");t.exports={patchSetClearFunction:r,patchSetFunction:i,patchFunction:o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":14}],8:[function(e,t,n){(function(n){"use strict";function r(){n.navigator&&n.navigator.geolocation&&i.patchPrototype(n.navigator.geolocation,["getCurrentPosition","watchPosition"])}var i=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":14}],9:[function(e,t,n){(function(e){"use strict";function n(t){var n=e[t];if(n){e[t]=function(t){this._o=new n(e.zone.bind(t,!0)),this._creationZone=e.zone};var r=new n(function(){});e[t].prototype.disconnect=function(){var e=this._o.disconnect.apply(this._o,arguments);return this._active&&(this._creationZone.dequeueTask(),this._active=!1),e},e[t].prototype.observe=function(){return this._active||(this._creationZone.enqueueTask(),this._active=!0),this._o.observe.apply(this._o,arguments)};var i;for(i in r)!function(n){void 0===typeof e[t].prototype&&("function"==typeof r[n]?e[t].prototype[n]=function(){return this._o[n].apply(this._o,arguments)}:Object.defineProperty(e[t].prototype,n,{set:function(t){this._o[n]="function"==typeof t?e.zone.bind(t):t},get:function(){return this._o[n]}}))}(i)}}t.exports={patchClass:n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],10:[function(e,t,n){(function(n){"use strict";function r(e,t){var r=n,i=e.every(function(e){return r=r[e]});i&&t.forEach(function(e){var t=r[e];t&&(r[e]=s(t))})}function i(e){var t=e.then;e.then=function(){var n=a.bindArguments(arguments),r=t.apply(e,n);return i(r)};var n=e["catch"];return e["catch"]=function(){var t=a.bindArguments(arguments),r=n.apply(e,t);return i(r)},e}function o(){if(n.Promise){a.patchPrototype(Promise.prototype,["then","catch"]);var e=[[[],["fetch"]],[["Response","prototype"],["arrayBuffer","blob","json","text"]]];e.forEach(function(e){r(e[0],e[1])})}}var s,a=e("../utils");s=n.Promise?function(e){return function(){var t=e.apply(this,arguments);return t instanceof Promise?t:new Promise(function(e,n){t.then(e,n)})}}:function(e){return function(){return i(e.apply(this,arguments))}},t.exports={apply:o,bindPromiseFn:s}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":14}],11:[function(e,t,n){(function(n){"use strict";function r(){if(i()){var e=c.map(function(e){return"on"+e});a.patchProperties(HTMLElement.prototype,e),a.patchProperties(XMLHttpRequest.prototype),"undefined"!=typeof WebSocket&&a.patchProperties(WebSocket.prototype)}else o(),a.patchClass("XMLHttpRequest"),s.apply()}function i(){if(!Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var e=Object.getOwnPropertyDescriptor(Element.prototype,"onclick");if(e&&!e.configurable)return!1}Object.defineProperty(HTMLElement.prototype,"onclick",{get:function(){return!0}});var t=document.createElement("div"),n=!!t.onclick;return Object.defineProperty(HTMLElement.prototype,"onclick",{}),n}function o(){c.forEach(function(e){var t="on"+e;document.addEventListener(e,function(e){for(var r,i=e.target;i;)i[t]&&!i[t]._unbound&&(r=n.zone.bind(i[t]),r._unbound=i[t],i[t]=r),i=i.parentElement},!0)})}var s=e("./websocket"),a=e("../utils"),c="copy cut paste abort blur focus canplay canplaythrough change click contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop durationchange emptied ended input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart message mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing progress ratechange reset scroll seeked seeking select show stalled submit suspend timeupdate volumechange waiting mozfullscreenchange mozfullscreenerror mozpointerlockchange mozpointerlockerror error webglcontextrestored webglcontextlost webglcontextcreationerror".split(" ");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":14,"./websocket":13}],12:[function(e,t,n){(function(n){"use strict";function r(){if("registerElement"in n.document){var e=document.registerElement,t=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"];document.registerElement=function(r,o){return o&&o.prototype&&t.forEach(function(e){if(o.prototype.hasOwnProperty(e)){var t=Object.getOwnPropertyDescriptor(o.prototype,e);t.value?(t.value=n.zone.bind(t.value),i(o.prototype,e,t)):o.prototype[e]=n.zone.bind(o.prototype[e])}else o.prototype[e]&&(o.prototype[e]=n.zone.bind(o.prototype[e]))}),e.apply(document,[r,o])}}}var i=e("./define-property")._redefineProperty;t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./define-property":5}],13:[function(e,t,n){(function(n){"use strict";function r(){var e=n.WebSocket;i.patchEventTargetMethods(e.prototype),n.WebSocket=function(t,n){var r,o=arguments.length>1?new e(t,n):new e(t),s=Object.getOwnPropertyDescriptor(o,"onmessage");return s&&s.configurable===!1?(r=Object.create(o),["addEventListener","removeEventListener","send","close"].forEach(function(e){r[e]=function(){return o[e].apply(o,arguments)}})):r=o,i.patchProperties(r,["onclose","onerror","onmessage","onopen"]),r}}var i=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":14}],14:[function(e,t,n){(function(e){"use strict";function n(t){for(var n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=e.zone.bind(t[n]));return t}function r(t){for(var n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=e.zone.bindOnce(t[n]));return t}function i(e,t){t.forEach(function(t){var r=e[t];r&&(e[t]=function(){return r.apply(this,n(arguments))})})}function o(e,t){var n=Object.getOwnPropertyDescriptor(e,t)||{enumerable:!0,configurable:!0};delete n.writable,delete n.value;var r=t.substr(2),i="_"+t;n.set=function(e){this[i]&&this.removeEventListener(r,this[i]),"function"==typeof e?(this[i]=e,this.addEventListener(r,e,!1)):this[i]=null},n.get=function(){return this[i]},Object.defineProperty(e,t,n)}function s(e,t){(t||function(){var t=[];for(var n in e)t.push(n);return t}().filter(function(e){return"on"===e.substr(0,2)})).forEach(function(t){o(e,t)})}function a(t){var n=t.addEventListener;t.addEventListener=function(e,t){return t._bound=t._bound||{},arguments[1]=t._bound[e]=zone.bind(t),n.apply(this,arguments)};var r=t.removeEventListener;t.removeEventListener=function(t,n){if(arguments[1]._bound&&arguments[1]._bound[t]){var i=arguments[1]._bound;arguments[1]=i[t],delete i[t]}var o=r.apply(this,arguments);return e.zone.dequeueTask(n),o}}function c(t){var r=e[t];if(r){e[t]=function(){var e=n(arguments);switch(e.length){case 0:this._o=new r;break;case 1:this._o=new r(e[0]);break;case 2:this._o=new r(e[0],e[1]);break;case 3:this._o=new r(e[0],e[1],e[2]);break;case 4:this._o=new r(e[0],e[1],e[2],e[3]);break;default:throw new Error("what are you even doing?")}};var i,o=new r;for(i in o)!function(n){"function"==typeof o[n]?e[t].prototype[n]=function(){return this._o[n].apply(this._o,arguments)}:Object.defineProperty(e[t].prototype,n,{set:function(t){this._o[n]="function"==typeof t?e.zone.bind(t):t},get:function(){return this._o[n]}})}(i);for(i in r)"prototype"!==i&&r.hasOwnProperty(i)&&(e[t][i]=r[i])}}t.exports={bindArguments:n,bindArgumentsOnce:r,patchPrototype:i,patchProperty:o,patchProperties:s,patchEventTargetMethods:a,patchClass:c}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],15:[function(e,t,n){(function(n,r){(function(){"use strict";function i(e){return"function"==typeof e||"object"==typeof e&&null!==e}function o(e){return"function"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){U=e}function c(e){Q=e}function u(){var e=n.nextTick,t=n.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(t)&&"0"===t[1]&&"10"===t[2]&&(e=setImmediate),function(){e(p)}}function l(){return function(){q(p)}}function f(){var e=0,t=new X(p),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function h(){var e=new MessageChannel;return e.port1.onmessage=p,function(){e.port2.postMessage(0)}}function d(){return function(){setTimeout(p,1)}}function p(){for(var e=0;G>e;e+=2){var t=te[e],n=te[e+1];t(n),te[e]=void 0,te[e+1]=void 0}G=0}function g(){try{var t=e,n=t("vertx");return q=n.runOnLoop||n.runOnContext,l()}catch(r){return d()}}function m(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function _(){return new TypeError("A promises callback cannot return that same promise.")}function y(e){try{return e.then}catch(t){return oe.error=t,oe}}function b(e,t,n,r){try{e.call(t,n,r)}catch(i){return i}}function w(e,t,n){Q(function(e){var r=!1,i=b(n,t,function(n){r||(r=!0,t!==n?E(e,n):S(e,n))},function(t){r||(r=!0,O(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&i&&(r=!0,O(e,i))},e)}function C(e,t){t._state===re?S(e,t._result):t._state===ie?O(e,t._result):D(t,void 0,function(t){E(e,t)},function(t){O(e,t)})}function R(e,t){if(t.constructor===e.constructor)C(e,t);else{var n=y(t);n===oe?O(e,oe.error):void 0===n?S(e,t):o(n)?w(e,t,n):S(e,t)}}function E(e,t){e===t?O(e,v()):i(t)?R(e,t):S(e,t)}function x(e){e._onerror&&e._onerror(e._result),A(e)}function S(e,t){e._state===ne&&(e._result=t,e._state=re,0!==e._subscribers.length&&Q(A,e))}function O(e,t){e._state===ne&&(e._state=ie,e._result=t,Q(x,e))}function D(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+re]=n,i[o+ie]=r,0===o&&e._state&&Q(A,e)}function A(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,i,o=e._result,s=0;s<t.length;s+=3)r=t[s],i=t[s+n],r?j(n,r,i,o):i(o);e._subscribers.length=0}}function I(){this.error=null}function P(e,t){try{return e(t)}catch(n){return se.error=n,se}}function j(e,t,n,r){var i,s,a,c,u=o(n);if(u){if(i=P(n,r),i===se?(c=!0,s=i.error,i=null):a=!0,t===i)return void O(t,_())}else i=r,a=!0;t._state!==ne||(u&&a?E(t,i):c?O(t,s):e===re?S(t,i):e===ie&&O(t,i))}function T(e,t){try{t(function(t){E(e,t)},function(t){O(e,t)})}catch(n){O(e,n)}}function N(e,t){var n=this;n._instanceConstructor=e,n.promise=new e(m),n._validateInput(t)?(n._input=t,n.length=t.length,n._remaining=t.length,n._init(),0===n.length?S(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&S(n.promise,n._result))):O(n.promise,n._validationError())}function V(e){return new ae(this,e).promise}function k(e){function t(e){E(i,e)}function n(e){O(i,e)}var r=this,i=new r(m);if(!z(e))return O(i,new TypeError("You must pass an array to race.")),i;for(var o=e.length,s=0;i._state===ne&&o>s;s++)D(r.resolve(e[s]),void 0,t,n);return i}function M(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(m);return E(n,e),n}function B(e){var t=this,n=new t(m);return O(n,e),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function $(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function F(e){this._id=he++,this._state=void 0,this._result=void 0,this._subscribers=[],m!==e&&(o(e)||L(),this instanceof F||$(),T(this,e))}function H(){var e;if("undefined"!=typeof r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(e.Promise=de)}var W;W=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var q,U,K,z=W,G=0,Q=({}.toString,function(e,t){te[G]=e,te[G+1]=t,G+=2,2===G&&(U?U(p):K())}),Y="undefined"!=typeof window?window:void 0,J=Y||{},X=J.MutationObserver||J.WebKitMutationObserver,Z="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),ee="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3);K=Z?u():X?f():ee?h():void 0===Y&&"function"==typeof e?g():d();var ne=void 0,re=1,ie=2,oe=new I,se=new I;N.prototype._validateInput=function(e){return z(e)},N.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},N.prototype._init=function(){this._result=new Array(this.length)};var ae=N;N.prototype._enumerate=function(){for(var e=this,t=e.length,n=e.promise,r=e._input,i=0;n._state===ne&&t>i;i++)e._eachEntry(r[i],i)},N.prototype._eachEntry=function(e,t){var n=this,r=n._instanceConstructor;s(e)?e.constructor===r&&e._state!==ne?(e._onerror=null,n._settledAt(e._state,t,e._result)):n._willSettleAt(r.resolve(e),t):(n._remaining--,n._result[t]=e)},N.prototype._settledAt=function(e,t,n){var r=this,i=r.promise;i._state===ne&&(r._remaining--,e===ie?O(i,n):r._result[t]=n),0===r._remaining&&S(i,r._result)},N.prototype._willSettleAt=function(e,t){var n=this;D(e,void 0,function(e){n._settledAt(re,t,e)},function(e){n._settledAt(ie,t,e)})};var ce=V,ue=k,le=M,fe=B,he=0,de=F;F.all=ce,F.race=ue,F.resolve=le,F.reject=fe,F._setScheduler=a,F._setAsap=c,F._asap=Q,F.prototype={constructor:F,then:function(e,t){var n=this,r=n._state;if(r===re&&!e||r===ie&&!t)return this;var i=new this.constructor(m),o=n._result;if(r){var s=arguments[r-1];Q(function(){j(r,i,s,o)})}else D(n,i,e,t);return i},"catch":function(e){return this.then(null,e)}};var pe=H,ge={Promise:de,polyfill:pe};"function"==typeof define&&define.amd?define(function(){return ge}):"undefined"!=typeof t&&t.exports?t.exports=ge:"undefined"!=typeof this&&(this.ES6Promise=ge),pe()}).call(this)}).call(this,{},"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);var Reflect;!function(e){function t(e,t,n,r){if(C(r)){if(C(n)){if(!R(e))throw new TypeError;if(!x(t))throw new TypeError;return f(e,t)}if(!R(e))throw new TypeError;if(!E(t))throw new TypeError;return n=O(n),d(e,t,n)}if(!R(e))throw new TypeError;if(!E(t))throw new TypeError;if(C(n))throw new TypeError;if(!E(r))throw new TypeError;return n=O(n),h(e,t,n,r)}function n(e,t){function n(n,r){if(C(r)){if(!x(n))throw new TypeError;y(e,t,n,void 0)}else{if(!E(n))throw new TypeError;r=O(r),y(e,t,n,r)}}return n}function r(e,t,n,r){if(!E(n))throw new TypeError;return C(r)||(r=O(r)),y(e,t,n,r)}function i(e,t,n){if(!E(t))throw new TypeError;return C(n)||(n=O(n)),g(e,t,n)}function o(e,t,n){if(!E(t))throw new TypeError;return C(n)||(n=O(n)),m(e,t,n)}function s(e,t,n){if(!E(t))throw new TypeError;return C(n)||(n=O(n)),v(e,t,n)}function a(e,t,n){if(!E(t))throw new TypeError;return C(n)||(n=O(n)),_(e,t,n)}function c(e,t){if(!E(e))throw new TypeError;return C(t)||(t=O(t)),b(e,t)}function u(e,t){if(!E(e))throw new TypeError;return C(t)||(t=O(t)),w(e,t)}function l(e,t,n){if(!E(t))throw new TypeError;C(n)||(n=O(n));var r=p(t,n,!1);if(C(r))return!1;if(!r["delete"](e))return!1;if(r.size>0)return!0;var i=k.get(t);return i["delete"](n),i.size>0?!0:(k["delete"](t),!0)}function f(e,t){for(var n=e.length-1;n>=0;--n){var r=e[n],i=r(t);if(!C(i)){if(!x(i))throw new TypeError;t=i}}return t}function h(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=e[i],s=o(t,n,r);if(!C(s)){if(!E(s))throw new TypeError;r=s}}return r}function d(e,t,n){for(var r=e.length-1;r>=0;--r){var i=e[r];i(t,n)}}function p(e,t,n){var r=k.get(e);if(!r){if(!n)return void 0;r=new T,k.set(e,r)}var i=r.get(t);if(!i){if(!n)return void 0;i=new T,r.set(t,i)}return i}function g(e,t,n){var r=m(e,t,n);if(r)return!0;var i=D(t);return null!==i?g(e,i,n):!1}function m(e,t,n){var r=p(t,n,!1);return void 0===r?!1:Boolean(r.has(e))}function v(e,t,n){var r=m(e,t,n);if(r)return _(e,t,n);var i=D(t);return null!==i?v(e,i,n):void 0}function _(e,t,n){var r=p(t,n,!1);return void 0===r?void 0:r.get(e)}function y(e,t,n,r){var i=p(n,r,!0);i.set(e,t)}function b(e,t){var n=w(e,t),r=D(e);if(null===r)return n;var i=b(r,t);if(i.length<=0)return n;if(n.length<=0)return i;for(var o=new N,s=[],a=0;a<n.length;a++){var c=n[a],u=o.has(c);u||(o.add(c),s.push(c))}for(var l=0;l<i.length;l++){var c=i[l],u=o.has(c);u||(o.add(c),s.push(c))}return s}function w(e,t){var n=p(e,t,!1),r=[];return n&&n.forEach(function(e,t){return r.push(t)}),r}function C(e){return void 0===e}function R(e){return Array.isArray(e)}function E(e){return"object"==typeof e?null!==e:"function"==typeof e}function x(e){return"function"==typeof e}function S(e){return"symbol"==typeof e}function O(e){return S(e)?e:String(e)}function D(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===j)return t;if(t!==j)return t;var n=e.prototype,r=Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return t;var i=r.constructor;return"function"!=typeof i?t:i===e?t:i}function A(){function e(){this._keys=[],this._values=[],this._cache=t}var t={};return e.prototype={get size(){return this._keys.length},has:function(e){return e===this._cache?!0:this._find(e)>=0?(this._cache=e,!0):!1},get:function(e){var t=this._find(e);return t>=0?(this._cache=e,this._values[t]):void 0},set:function(e,t){return this["delete"](e),this._keys.push(e),this._values.push(t),this._cache=e,this},"delete":function(e){var n=this._find(e);return n>=0?(this._keys.splice(n,1),this._values.splice(n,1),this._cache=t,!0):!1},clear:function(){this._keys.length=0,this._values.length=0,this._cache=t},forEach:function(e,t){for(var n=this.size,r=0;n>r;++r){var i=this._keys[r],o=this._values[r];this._cache=i,e.call(this,o,i,this)}},_find:function(e){for(var t=this._keys,n=t.length,r=0;n>r;++r)if(t[r]===e)return r;return-1}},e}function I(){function e(){this._map=new T}return e.prototype={get size(){return this._map.length},has:function(e){return this._map.has(e)},add:function(e){return this._map.set(e,e),this},"delete":function(e){return this._map["delete"](e)},clear:function(){this._map.clear()},forEach:function(e,t){this._map.forEach(e,t)}},e}function P(){function e(){this._key=i()}function t(e,t){for(var n=0;t>n;++n)e[n]=255*Math.random()|0}function n(e){if(c){var n=c.randomBytes(e);return n}if("function"==typeof Uint8Array){var n=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(n):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(n):t(n,e),n}var n=new Array(e);return t(n,e),n}function r(){var e=n(s);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var t="",r=0;s>r;++r){var i=e[r];(4===r||6===r||8===r)&&(t+="-"),16>i&&(t+="0"),t+=i.toString(16).toLowerCase()}return t}function i(){var e;do e="@@WeakMap@@"+r();while(u.call(l,e));return l[e]=!0,e}function o(e,t){if(!u.call(e,f)){if(!t)return void 0;Object.defineProperty(e,f,{value:Object.create(null)})}return e[f]}var s=16,a="undefined"!=typeof global&&"object"==typeof module&&"object"==typeof module.exports&&"function"==typeof require,c=a&&require("crypto"),u=Object.prototype.hasOwnProperty,l={},f=i();return e.prototype={has:function(e){var t=o(e,!1);return t?this._key in t:!1},get:function(e){var t=o(e,!1);return t?t[this._key]:void 0},set:function(e,t){var n=o(e,!0);return n[this._key]=t,this},"delete":function(e){var t=o(e,!1);return t&&this._key in t?delete t[this._key]:!1},clear:function(){this._key=i()}},e}var j=Object.getPrototypeOf(Function),T="function"==typeof Map?Map:A(),N="function"==typeof Set?Set:I(),V="function"==typeof WeakMap?WeakMap:P(),k=new V;e.decorate=t,e.metadata=n,e.defineMetadata=r,e.hasMetadata=i,e.hasOwnMetadata=o,e.getMetadata=s,e.getOwnMetadata=a,e.getMetadataKeys=c,e.getOwnMetadataKeys=u,e.deleteMetadata=l,function(t){if("undefined"!=typeof t.Reflect){if(t.Reflect!==e)for(var n in e)t.Reflect[n]=e[n]}else t.Reflect=e}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:"undefined"!=typeof global?global:Function("return this;")())}(Reflect||(Reflect={})),System.register("rx",[],!0,function(e,t,n){var r=System.global,i=r.define;return r.define=void 0,function(e){function i(e){for(var t=[],n=0,r=e.length;r>n;n++)t.push(e[n]);return t}function o(e,t){if(ae&&t.stack&&"object"==typeof e&&null!==e&&e.stack&&-1===e.stack.indexOf(fe)){for(var n=[],r=t;r;r=r.source)r.stack&&n.unshift(r.stack);n.unshift(e.stack);var i=n.join("\n"+fe+"\n");e.stack=a(i)}}function a(e){for(var t=e.split("\n"),n=[],r=0,i=t.length;i>r;r++){var o=t[r];c(o)||u(o)||!o||n.push(o)}return n.join("\n")}function c(e){var t=f(e);if(!t)return!1;var n=t[0],r=t[1];return n===ue&&r>=le&&wn>=r}function u(e){return-1!==e.indexOf("(module.js:")||-1!==e.indexOf("(node.js:")}function l(){if(ae)try{throw new Error}catch(e){var t=e.stack.split("\n"),n=t[0].indexOf("@")>0?t[1]:t[2],r=f(n);if(!r)return;return ue=r[0],r[1]}}function f(e){var t=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(e);if(t)return[t[1],Number(t[2])];var n=/at ([^ ]+):(\d+):(?:\d+)$/.exec(e);if(n)return[n[1],Number(n[2])];var r=/.*@(.+):(\d+)$/.exec(e);return r?[r[1],Number(r[2])]:void 0}function h(e){var t=[];if(!Ke(e))return t;Ue.nonEnumArgs&&e.length&&ze(e)&&(e=Ye.call(e));var n=Ue.enumPrototypes&&"function"==typeof e,r=Ue.enumErrorProps&&(e===$e||e instanceof Error);for(var i in e)n&&"prototype"==i||r&&("message"==i||"name"==i)||t.push(i);if(Ue.nonEnumShadows&&e!==Fe){var o=e.constructor,s=-1,a=Se;if(e===(o&&o.prototype))var c=e===He?ke:e===$e?Pe:Me.call(e),u=qe[c];for(;++s<a;)i=xe[s],u&&u[i]||!Be.call(e,i)||t.push(i)}return t}function d(e,t,n){for(var r=-1,i=n(e),o=i.length;++r<o;){var s=i[r];if(t(e[s],s,e)===!1)break}return e}function p(e,t){return d(e,t,h)}function g(e){return"function"!=typeof e.toString&&"string"==typeof(e+"")}function m(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;var i=typeof e,o=typeof t;if(e===e&&(null==e||null==t||"function"!=i&&"object"!=i&&"function"!=o&&"object"!=o))return!1;var s=Me.call(e),a=Me.call(t);if(s==Oe&&(s=Ne),a==Oe&&(a=Ne),s!=a)return!1;switch(s){case Ae:case Ie:return+e==+t;case Te:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case Ve:case ke:return e==String(t)}var c=s==De;if(!c){if(s!=Ne||!Ue.nodeClass&&(g(e)||g(t)))return!1;var u=!Ue.argsObject&&ze(e)?Object:e.constructor,l=!Ue.argsObject&&ze(t)?Object:t.constructor;if(!(u==l||Be.call(e,"constructor")&&Be.call(t,"constructor")||se(u)&&u instanceof u&&se(l)&&l instanceof l)&&("constructor"in e&&"constructor"in t))return!1}n||(n=[]),r||(r=[]);for(var f=n.length;f--;)if(n[f]==e)return r[f]==t;var h=0,d=!0;if(n.push(e),r.push(t),c){if(f=e.length,h=t.length,d=h==f)for(;h--;){var v=t[h];if(!(d=m(e[h],v,n,r)))break}}else p(t,function(t,i,o){return Be.call(o,i)?(h++,d=Be.call(e,i)&&m(e[i],t,n,r)):void 0}),d&&p(e,function(e,t,n){return Be.call(n,t)?d=--h>-1:void 0});return n.pop(),r.pop(),d}function v(e,t){for(var n=new Array(e),r=0;e>r;r++)n[r]=t();return n}function _(){try{return Ge.apply(this,arguments)}catch(e){return et.e=e,et}}function y(e){if(!se(e))throw new TypeError("fn must be a function");return Ge=e,_}function b(e){throw e}function w(e,t){this.id=e,this.value=t}function C(e,t){this.scheduler=e,this.disposable=t,this.isDisposed=!1}function R(e,t){t.isDisposed||(t.isDisposed=!0,t.disposable.dispose())}function E(e){this.observer=e,this.a=[],this.isStopped=!1}function x(e){this._s=s}function S(e){this._s=s,this._l=s.length,this._i=0}function O(e){this._a=e}function D(e){this._a=e,this._l=j(e),this._i=0}function A(e){return"number"==typeof e&&K.isFinite(e)}function I(t){var n,r=t[ye];if(!r&&"string"==typeof t)return n=new x(t),n[ye]();if(!r&&t.length!==e)return n=new O(t),n[ye]();if(!r)throw new TypeError("Object is not iterable");return t[ye]()}function P(e){var t=+e;return 0===t?t:isNaN(t)?t:0>t?-1:1}function j(e){var t=+e.length;return isNaN(t)?0:0!==t&&A(t)?(t=P(t)*Math.floor(Math.abs(t)),0>=t?0:t>Gt?Gt:t):t}function T(e,t){this.observer=e,this.parent=t}function N(e,t){return Z(e)||(e=yt),new Yt(t,e)}function V(e,t){return new mn(function(n){var r=new lt,i=new ft;return i.setDisposable(r),r.setDisposable(e.subscribe(function(e){n.onNext(e)},function(e){try{var r=t(e)}catch(o){return n.onError(o)}oe(r)&&(r=Ht(r));var s=new lt;i.setDisposable(s),s.setDisposable(r.subscribe(n))},function(e){n.onCompleted(e)})),i},e)}function k(e,t){var n=this;return new mn(function(r){var i=0,o=e.length;return n.subscribe(function(n){if(o>i){var s,a=e[i++];try{s=t(n,a)}catch(c){return r.onError(c)}r.onNext(s)}else r.onCompleted()},function(e){r.onError(e)},function(){r.onCompleted()})},n)}function M(){return!1}function B(){return[]}function L(e,t,n){var r=Ee(t,n,3);return e.map(function(t,n){var i=r(t,n,e);return oe(i)&&(i=Ht(i)),(Ce(i)||we(i))&&(i=Qt(i)),i}).concatAll()}function $(e,t,n){for(var r=0,i=e.length;i>r;r++)if(n(e[r],t))return r;return-1}function F(e){this.comparer=e,this.set=[]}function H(e,t,n){this.observer=e,this.selector=t,this.source=n,this.i=0,this.isStopped=!1}function W(e,t,n){var r=Ee(t,n,3);return e.map(function(t,n){var i=r(t,n,e);return oe(i)&&(i=Ht(i)),(Ce(i)||we(i))&&(i=Qt(i)),i}).mergeAll()}function q(e,t,n){this.observer=e,this.predicate=t,this.source=n,this.i=0,this.isStopped=!1;
2
-
3
- }var U={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},K=U[typeof window]&&window||this,z=U[typeof t]&&t&&!t.nodeType&&t,G=U[typeof n]&&n&&!n.nodeType&&n,Q=G&&G.exports===z&&z,Y=U[typeof r]&&r;!Y||Y.global!==Y&&Y.window!==Y||(K=Y);var J={internals:{},config:{Promise:K.Promise},helpers:{}},X=J.helpers.noop=function(){},Z=(J.helpers.notDefined=function(e){return"undefined"==typeof e},J.helpers.isScheduler=function(e){return e instanceof J.Scheduler}),ee=J.helpers.identity=function(e){return e},te=(J.helpers.pluck=function(e){return function(t){return t[e]}},J.helpers.just=function(e){return function(){return e}},J.helpers.defaultNow=Date.now),ne=J.helpers.defaultComparer=function(e,t){return Qe(e,t)},re=J.helpers.defaultSubComparer=function(e,t){return e>t?1:t>e?-1:0},ie=(J.helpers.defaultKeySerializer=function(e){return e.toString()},J.helpers.defaultError=function(e){throw e}),oe=J.helpers.isPromise=function(e){return!!e&&"function"==typeof e.then},se=(J.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},J.helpers.not=function(e){return!e},J.helpers.isFunction=function(){var e=function(e){return"function"==typeof e||!1};return e(/x/)&&(e=function(e){return"function"==typeof e&&"[object Function]"==Me.call(e)}),e}());J.config.longStackSupport=!1;var ae=!1;try{throw new Error}catch(ce){ae=!!ce.stack}var ue,le=l(),fe="From previous event:",he=J.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};he.prototype=Error.prototype;var de=J.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};de.prototype=Error.prototype;var pe=J.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};pe.prototype=Error.prototype;var ge=J.NotSupportedError=function(e){this.message=e||"This operation is not supported",Error.call(this)};ge.prototype=Error.prototype;var me=J.NotImplementedError=function(e){this.message=e||"This operation is not implemented",Error.call(this)};me.prototype=Error.prototype;var ve=J.helpers.notImplemented=function(){throw new me},_e=J.helpers.notSupported=function(){throw new ge},ye="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";K.Set&&"function"==typeof(new K.Set)["@@iterator"]&&(ye="@@iterator");var be=J.doneEnumerator={done:!0,value:e},we=J.helpers.isIterable=function(t){return t[ye]!==e},Ce=J.helpers.isArrayLike=function(t){return t&&t.length!==e};J.helpers.iterator=ye;var Re,Ee=J.internals.bindCallback=function(e,t,n){if("undefined"==typeof t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},xe=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Se=xe.length,Oe="[object Arguments]",De="[object Array]",Ae="[object Boolean]",Ie="[object Date]",Pe="[object Error]",je="[object Function]",Te="[object Number]",Ne="[object Object]",Ve="[object RegExp]",ke="[object String]",Me=Object.prototype.toString,Be=Object.prototype.hasOwnProperty,Le=Me.call(arguments)==Oe,$e=Error.prototype,Fe=Object.prototype,He=String.prototype,We=Fe.propertyIsEnumerable;try{Re=!(Me.call(document)==Ne&&!({toString:0}+""))}catch(ce){Re=!0}var qe={};qe[De]=qe[Ie]=qe[Te]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},qe[Ae]=qe[ke]={constructor:!0,toString:!0,valueOf:!0},qe[Pe]=qe[je]=qe[Ve]={constructor:!0,toString:!0},qe[Ne]={constructor:!0};var Ue={};!function(){var e=function(){this.x=1},t=[];e.prototype={valueOf:1,y:1};for(var n in new e)t.push(n);for(n in arguments);Ue.enumErrorProps=We.call($e,"message")||We.call($e,"name"),Ue.enumPrototypes=We.call(e,"prototype"),Ue.nonEnumArgs=0!=n,Ue.nonEnumShadows=!/valueOf/.test(t)}(1);var Ke=J.internals.isObject=function(e){var t=typeof e;return e&&("function"==t||"object"==t)||!1},ze=function(e){return e&&"object"==typeof e?Me.call(e)==Oe:!1};Le||(ze=function(e){return e&&"object"==typeof e?Be.call(e,"callee"):!1});var Ge,Qe=J.internals.isEqual=function(e,t){return m(e,t,[],[])},Ye=({}.hasOwnProperty,Array.prototype.slice),Je=this.inherits=J.internals.inherits=function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n},Xe=J.internals.addProperties=function(e){for(var t=[],n=1,r=arguments.length;r>n;n++)t.push(arguments[n]);for(var i=0,o=t.length;o>i;i++){var s=t[i];for(var a in s)e[a]=s[a]}},Ze=J.internals.addRef=function(e,t){return new mn(function(n){return new rt(t.getDisposable(),e.subscribe(n))})},et={e:{}};w.prototype.compareTo=function(e){var t=this.value.compareTo(e.value);return 0===t&&(t=this.id-e.id),t};var tt=J.internals.PriorityQueue=function(e){this.items=new Array(e),this.length=0},nt=tt.prototype;nt.isHigherPriority=function(e,t){return this.items[e].compareTo(this.items[t])<0},nt.percolate=function(e){if(!(e>=this.length||0>e)){var t=e-1>>1;if(!(0>t||t===e)&&this.isHigherPriority(e,t)){var n=this.items[e];this.items[e]=this.items[t],this.items[t]=n,this.percolate(t)}}},nt.heapify=function(e){if(+e||(e=0),!(e>=this.length||0>e)){var t=2*e+1,n=2*e+2,r=e;if(t<this.length&&this.isHigherPriority(t,r)&&(r=t),n<this.length&&this.isHigherPriority(n,r)&&(r=n),r!==e){var i=this.items[e];this.items[e]=this.items[r],this.items[r]=i,this.heapify(r)}}},nt.peek=function(){return this.items[0].value},nt.removeAt=function(t){this.items[t]=this.items[--this.length],this.items[this.length]=e,this.heapify()},nt.dequeue=function(){var e=this.peek();return this.removeAt(0),e},nt.enqueue=function(e){var t=this.length++;this.items[t]=new w(tt.count++,e),this.percolate(t)},nt.remove=function(e){for(var t=0;t<this.length;t++)if(this.items[t].value===e)return this.removeAt(t),!0;return!1},tt.count=0;var rt=J.CompositeDisposable=function(){var e,t,n=[];if(Array.isArray(arguments[0]))n=arguments[0],t=n.length;else for(t=arguments.length,n=new Array(t),e=0;t>e;e++)n[e]=arguments[e];for(e=0;t>e;e++)if(!ct(n[e]))throw new TypeError("Not a disposable");this.disposables=n,this.isDisposed=!1,this.length=n.length},it=rt.prototype;it.add=function(e){this.isDisposed?e.dispose():(this.disposables.push(e),this.length++)},it.remove=function(e){var t=!1;if(!this.isDisposed){var n=this.disposables.indexOf(e);-1!==n&&(t=!0,this.disposables.splice(n,1),this.length--,e.dispose())}return t},it.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var e=this.disposables.length,t=new Array(e),n=0;e>n;n++)t[n]=this.disposables[n];for(this.disposables=[],this.length=0,n=0;e>n;n++)t[n].dispose()}};var ot=J.Disposable=function(e){this.isDisposed=!1,this.action=e||X};ot.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var st=ot.create=function(e){return new ot(e)},at=ot.empty={dispose:X},ct=ot.isDisposable=function(e){return e&&se(e.dispose)},ut=ot.checkDisposed=function(e){if(e.isDisposed)throw new de},lt=J.SingleAssignmentDisposable=function(){function e(){this.isDisposed=!1,this.current=null}var t=e.prototype;return t.getDisposable=function(){return this.current},t.setDisposable=function(e){var t=this.isDisposed;if(!t){var n=this.current;this.current=e}n&&n.dispose(),t&&e&&e.dispose()},t.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var e=this.current;this.current=null}e&&e.dispose()},e}(),ft=J.SerialDisposable=lt,ht=J.RefCountDisposable=function(){function e(e){this.disposable=e,this.disposable.count++,this.isInnerDisposed=!1}function t(e){this.underlyingDisposable=e,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return e.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},t.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},t.prototype.getDisposable=function(){return this.isDisposed?at:new e(this)},t}();C.prototype.dispose=function(){this.scheduler.scheduleWithState(this,R)};var dt=J.internals.ScheduledItem=function(e,t,n,r,i){this.scheduler=e,this.state=t,this.action=n,this.dueTime=r,this.comparer=i||re,this.disposable=new lt};dt.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},dt.prototype.compareTo=function(e){return this.comparer(this.dueTime,e.dueTime)},dt.prototype.isCancelled=function(){return this.disposable.isDisposed},dt.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var pt=J.Scheduler=function(){function e(e,t,n,r){this.now=e,this._schedule=t,this._scheduleRelative=n,this._scheduleAbsolute=r}function t(e,t){return t(),at}var n=e.prototype;return n.schedule=function(e){return this._schedule(e,t)},n.scheduleWithState=function(e,t){return this._schedule(e,t)},n.scheduleWithRelative=function(e,n){return this._scheduleRelative(n,e,t)},n.scheduleWithRelativeAndState=function(e,t,n){return this._scheduleRelative(e,t,n)},n.scheduleWithAbsolute=function(e,n){return this._scheduleAbsolute(n,e,t)},n.scheduleWithAbsoluteAndState=function(e,t,n){return this._scheduleAbsolute(e,t,n)},e.now=te,e.normalize=function(e){return 0>e&&(e=0),e},e}(),gt=pt.normalize;!function(e){function t(e,t){function n(t){i(t,function(t){var r=!1,i=!1,s=e.scheduleWithState(t,function(e,t){return r?o.remove(s):i=!0,n(t),at});i||(o.add(s),r=!0)})}var r=t[0],i=t[1],o=new rt;return n(r),o}function n(e,t,n){function r(t){o(t,function(t,i){var o=!1,a=!1,c=e[n](t,i,function(e,t){return o?s.remove(c):a=!0,r(t),at});a||(s.add(c),o=!0)})}var i=t[0],o=t[1],s=new rt;return r(i),s}function r(e,t){e(function(n){t(e,n)})}e.scheduleRecursive=function(e){return this.scheduleRecursiveWithState(e,function(e,t){e(function(){t(e)})})},e.scheduleRecursiveWithState=function(e,n){return this.scheduleWithState([e,n],t)},e.scheduleRecursiveWithRelative=function(e,t){return this.scheduleRecursiveWithRelativeAndState(t,e,r)},e.scheduleRecursiveWithRelativeAndState=function(e,t,r){return this._scheduleRelative([e,r],t,function(e,t){return n(e,t,"scheduleWithRelativeAndState")})},e.scheduleRecursiveWithAbsolute=function(e,t){return this.scheduleRecursiveWithAbsoluteAndState(t,e,r)},e.scheduleRecursiveWithAbsoluteAndState=function(e,t,r){return this._scheduleAbsolute([e,r],t,function(e,t){return n(e,t,"scheduleWithAbsoluteAndState")})}}(pt.prototype),function(e){pt.prototype.schedulePeriodic=function(e,t){return this.schedulePeriodicWithState(null,e,t)},pt.prototype.schedulePeriodicWithState=function(e,t,n){if("undefined"==typeof K.setInterval)throw new ge;t=gt(t);var r=e,i=K.setInterval(function(){r=n(r)},t);return st(function(){K.clearInterval(i)})}}(pt.prototype),function(e){e.catchError=e["catch"]=function(e){return new Rt(this,e)}}(pt.prototype);var mt,vt,_t=(J.internals.SchedulePeriodicRecursive=function(){function e(e,t){t(0,this._period);try{this._state=this._action(this._state)}catch(n){throw this._cancel.dispose(),n}}function t(e,t,n,r){this._scheduler=e,this._state=t,this._period=n,this._action=r}return t.prototype.start=function(){var t=new lt;return this._cancel=t,t.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,e.bind(this))),t},t}(),pt.immediate=function(){function e(e,t){return t(this,e)}return new pt(te,e,_e,_e)}()),yt=pt.currentThread=function(){function e(){for(;n.length>0;){var e=n.dequeue();!e.isCancelled()&&e.invoke()}}function t(t,r){var i=new dt(this,t,r,this.now());if(n)n.enqueue(i);else{n=new tt(4),n.enqueue(i);var o=y(e)();if(n=null,o===et)return b(o.e)}return i.disposable}var n,r=new pt(te,t,_e,_e);return r.scheduleRequired=function(){return!n},r}(),bt=function(){var e,t=X;if(K.WScript)e=function(e,t){K.WScript.Sleep(t),e()};else{if(!K.setTimeout)throw new ge;e=K.setTimeout,t=K.clearTimeout}return{setTimeout:e,clearTimeout:t}}(),wt=bt.setTimeout,Ct=bt.clearTimeout;!function(){function e(t){if(o)wt(function(){e(t)},0);else{var n=i[t];if(n){o=!0;var r=y(n)();if(vt(t),o=!1,r===et)return b(r.e)}}}function t(){if(!K.postMessage||K.importScripts)return!1;var e=!1,t=K.onmessage;return K.onmessage=function(){e=!0},K.postMessage("","*"),K.onmessage=t,e}function n(t){"string"==typeof t.data&&t.data.substring(0,c.length)===c&&e(t.data.substring(c.length))}var r=1,i={},o=!1;vt=function(e){delete i[e]};var s=RegExp("^"+String(Me).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),a="function"==typeof(a=Y&&Q&&Y.setImmediate)&&!s.test(a)&&a;if(se(a))mt=function(t){var n=r++;return i[n]=t,a(function(){e(n)}),n};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))mt=function(t){var n=r++;return i[n]=t,process.nextTick(function(){e(n)}),n};else if(t()){var c="ms.rx.schedule"+Math.random();K.addEventListener?K.addEventListener("message",n,!1):K.attachEvent("onmessage",n,!1),mt=function(e){var t=r++;return i[t]=e,K.postMessage(c+currentId,"*"),t}}else if(K.MessageChannel){var u=new K.MessageChannel;u.port1.onmessage=function(t){e(t.data)},mt=function(e){var t=r++;return i[t]=e,u.port2.postMessage(t),t}}else mt="document"in K&&"onreadystatechange"in K.document.createElement("script")?function(t){var n=K.document.createElement("script"),o=r++;return i[o]=t,n.onreadystatechange=function(){e(o),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},K.document.documentElement.appendChild(n),o}:function(t){var n=r++;return i[n]=t,wt(function(){e(n)},0),n}}();var Rt=(pt.timeout=pt["default"]=function(){function e(e,t){var n=this,r=new lt,i=mt(function(){r.isDisposed||r.setDisposable(t(n,e))});return new rt(r,st(function(){vt(i)}))}function t(e,t,n){var r=this,i=pt.normalize(t);if(0===i)return r.scheduleWithState(e,n);var o=new lt,s=wt(function(){o.isDisposed||o.setDisposable(n(r,e))},i);return new rt(o,st(function(){Ct(s)}))}function n(e,t,n){return this.scheduleWithRelativeAndState(e,t-this.now(),n)}return new pt(te,e,t,n)}(),function(e){function t(e,t){return this._scheduler.scheduleWithState(e,this._wrap(t))}function n(e,t,n){return this._scheduler.scheduleWithRelativeAndState(e,t,this._wrap(n))}function r(e,t,n){return this._scheduler.scheduleWithAbsoluteAndState(e,t,this._wrap(n))}function i(i,o){this._scheduler=i,this._handler=o,this._recursiveOriginal=null,this._recursiveWrapper=null,e.call(this,this._scheduler.now.bind(this._scheduler),t,n,r)}return Je(i,e),i.prototype._clone=function(e){return new i(e,this._handler)},i.prototype._wrap=function(e){var t=this;return function(n,r){try{return e(t._getRecursiveWrapper(n),r)}catch(i){if(!t._handler(i))throw i;return at}}},i.prototype._getRecursiveWrapper=function(e){if(this._recursiveOriginal!==e){this._recursiveOriginal=e;var t=this._clone(e);t._recursiveOriginal=e,t._recursiveWrapper=t,this._recursiveWrapper=t}return this._recursiveWrapper},i.prototype.schedulePeriodicWithState=function(e,t,n){var r=this,i=!1,o=new lt;return o.setDisposable(this._scheduler.schedulePeriodicWithState(e,t,function(e){if(i)return null;try{return n(e)}catch(t){if(i=!0,!r._handler(t))throw t;return o.dispose(),null}})),o},i}(pt)),Et=J.Notification=function(){function e(e,t,n,r,i,o){this.kind=e,this.value=t,this.exception=n,this._accept=r,this._acceptObservable=i,this.toString=o}return e.prototype.accept=function(e,t,n){return e&&"object"==typeof e?this._acceptObservable(e):this._accept(e,t,n)},e.prototype.toObservable=function(e){var t=this;return Z(e)||(e=_t),new mn(function(n){return e.scheduleWithState(t,function(e,t){t._acceptObservable(n),"N"===t.kind&&n.onCompleted()})})},e}(),xt=Et.createOnNext=function(){function e(e){return e(this.value)}function t(e){return e.onNext(this.value)}function n(){return"OnNext("+this.value+")"}return function(r){return new Et("N",r,null,e,t,n)}}(),St=Et.createOnError=function(){function e(e,t){return t(this.exception)}function t(e){return e.onError(this.exception)}function n(){return"OnError("+this.exception+")"}return function(r){return new Et("E",null,r,e,t,n)}}(),Ot=Et.createOnCompleted=function(){function e(e,t,n){return n()}function t(e){return e.onCompleted()}function n(){return"OnCompleted()"}return function(){return new Et("C",null,null,e,t,n)}}(),Dt=J.internals.Enumerator=function(e){this._next=e};Dt.prototype.next=function(){return this._next()},Dt.prototype[ye]=function(){return this};var At=J.internals.Enumerable=function(e){this._iterator=e};At.prototype[ye]=function(){return this._iterator()},At.prototype.concat=function(){var e=this;return new mn(function(t){var n,r=e[ye](),i=new ft,o=_t.scheduleRecursive(function(e){if(!n){try{var o=r.next()}catch(s){return t.onError(s)}if(o.done)return t.onCompleted();var a=o.value;oe(a)&&(a=Ht(a));var c=new lt;i.setDisposable(c),c.setDisposable(a.subscribe(function(e){t.onNext(e)},function(e){t.onError(e)},e))}});return new rt(i,o,st(function(){n=!0}))})},At.prototype.catchError=function(){var e=this;return new mn(function(t){var n,r=e[ye](),i=new ft,o=_t.scheduleRecursiveWithState(null,function(e,o){if(!n){try{var s=r.next()}catch(a){return observer.onError(a)}if(s.done)return void(null!==e?t.onError(e):t.onCompleted());var c=s.value;oe(c)&&(c=Ht(c));var u=new lt;i.setDisposable(u),u.setDisposable(c.subscribe(function(e){t.onNext(e)},o,function(){t.onCompleted()}))}});return new rt(i,o,st(function(){n=!0}))})},At.prototype.catchErrorWhen=function(e){var t=this;return new mn(function(n){var r,i,o=new yn,s=new yn,a=e(o),c=a.subscribe(s),u=t[ye](),l=new ft,f=_t.scheduleRecursive(function(e){if(!r){try{var t=u.next()}catch(a){return n.onError(a)}if(t.done)return void(i?n.onError(i):n.onCompleted());var c=t.value;oe(c)&&(c=Ht(c));var f=new lt,h=new lt;l.setDisposable(new rt(h,f)),f.setDisposable(c.subscribe(function(e){n.onNext(e)},function(t){h.setDisposable(s.subscribe(e,function(e){n.onError(e)},function(){n.onCompleted()})),o.onNext(t)},function(){n.onCompleted()}))}});return new rt(c,l,f,st(function(){r=!0}))})};var It=At.repeat=function(e,t){return null==t&&(t=-1),new At(function(){var n=t;return new Dt(function(){return 0===n?be:(n>0&&n--,{done:!1,value:e})})})},Pt=At.of=function(e,t,n){if(t)var r=Ee(t,n,3);return new At(function(){var n=-1;return new Dt(function(){return++n<e.length?{done:!1,value:t?r(e[n],n,e):e[n]}:be})})},jt=J.Observer=function(){};jt.prototype.toNotifier=function(){var e=this;return function(t){return t.accept(e)}},jt.prototype.asObserver=function(){return new kt(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},jt.prototype.checked=function(){return new Mt(this)};var Tt=jt.create=function(e,t,n){return e||(e=X),t||(t=ie),n||(n=X),new kt(e,t,n)};jt.fromNotifier=function(e,t){return new kt(function(n){return e.call(t,xt(n))},function(n){return e.call(t,St(n))},function(){return e.call(t,Ot())})},jt.prototype.notifyOn=function(e){return new Lt(e,this)},jt.prototype.makeSafe=function(e){return new AnonymousSafeObserver(this._onNext,this._onError,this._onCompleted,e)};var Nt,Vt=J.internals.AbstractObserver=function(e){function t(){this.isStopped=!1,e.call(this)}return Je(t,e),t.prototype.next=ve,t.prototype.error=ve,t.prototype.completed=ve,t.prototype.onNext=function(e){this.isStopped||this.next(e)},t.prototype.onError=function(e){this.isStopped||(this.isStopped=!0,this.error(e))},t.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},t.prototype.dispose=function(){this.isStopped=!0},t.prototype.fail=function(e){return this.isStopped?!1:(this.isStopped=!0,this.error(e),!0)},t}(jt),kt=J.AnonymousObserver=function(e){function t(t,n,r){e.call(this),this._onNext=t,this._onError=n,this._onCompleted=r}return Je(t,e),t.prototype.next=function(e){this._onNext(e)},t.prototype.error=function(e){this._onError(e)},t.prototype.completed=function(){this._onCompleted()},t}(Vt),Mt=function(e){function t(t){e.call(this),this._observer=t,this._state=0}Je(t,e);var n=t.prototype;return n.onNext=function(e){this.checkAccess();var t=y(this._observer.onNext).call(this._observer,e);this._state=0,t===et&&b(t.e)},n.onError=function(e){this.checkAccess();var t=y(this._observer.onError).call(this._observer,e);this._state=2,t===et&&b(t.e)},n.onCompleted=function(){this.checkAccess();var e=y(this._observer.onCompleted).call(this._observer);this._state=2,e===et&&b(e.e)},n.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},t}(jt),Bt=J.internals.ScheduledObserver=function(e){function t(t,n){e.call(this),this.scheduler=t,this.observer=n,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new ft}return Je(t,e),t.prototype.next=function(e){var t=this;this.queue.push(function(){t.observer.onNext(e)})},t.prototype.error=function(e){var t=this;this.queue.push(function(){t.observer.onError(e)})},t.prototype.completed=function(){var e=this;this.queue.push(function(){e.observer.onCompleted()})},t.prototype.ensureActive=function(){var e=!1,t=this;!this.hasFaulted&&this.queue.length>0&&(e=!this.isAcquired,this.isAcquired=!0),e&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(e){var n;if(!(t.queue.length>0))return void(t.isAcquired=!1);n=t.queue.shift();try{n()}catch(r){throw t.queue=[],t.hasFaulted=!0,r}e()}))},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposable.dispose()},t}(Vt),Lt=function(e){function t(t,n,r){e.call(this,t,n),this._cancel=r}return Je(t,e),t.prototype.next=function(t){e.prototype.next.call(this,t),this.ensureActive()},t.prototype.error=function(t){e.prototype.error.call(this,t),this.ensureActive()},t.prototype.completed=function(){e.prototype.completed.call(this),this.ensureActive()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},t}(Bt),$t=J.Observable=function(){function e(e){if(J.config.longStackSupport&&ae){try{throw new Error}catch(t){this.stack=t.stack.substring(t.stack.indexOf("\n")+1)}var n=this;this._subscribe=function(t){var r=t.onError.bind(t);return t.onError=function(e){o(e,n),r(e)},e.call(n,t)}}else this._subscribe=e}return Nt=e.prototype,Nt.subscribe=Nt.forEach=function(e,t,n){return this._subscribe("object"==typeof e?e:Tt(e,t,n))},Nt.subscribeOnNext=function(e,t){return this._subscribe(Tt("undefined"!=typeof t?function(n){e.call(t,n)}:e))},Nt.subscribeOnError=function(e,t){return this._subscribe(Tt(null,"undefined"!=typeof t?function(n){e.call(t,n)}:e))},Nt.subscribeOnCompleted=function(e,t){return this._subscribe(Tt(null,null,"undefined"!=typeof t?function(){e.call(t)}:e))},e}(),Ft=J.ObservableBase=function(e){function t(e){return e&&se(e.dispose)?e:se(e)?st(e):at}function n(e,n){var r=n[0],i=n[1],o=y(i.subscribeCore).call(i,r);return o!==et||r.fail(et.e)?void r.setDisposable(t(o)):b(et.e)}function r(e){var t=new vn(e),r=[t,this];return yt.scheduleRequired()?yt.scheduleWithState(r,n):n(null,r),t}function i(){e.call(this,r)}return Je(i,e),i.prototype.subscribeCore=ve,i}($t);Nt.observeOn=function(e){var t=this;return new mn(function(n){return t.subscribe(new Lt(e,n))},t)},Nt.subscribeOn=function(e){var t=this;return new mn(function(n){var r=new lt,i=new ft;return i.setDisposable(r),r.setDisposable(e.schedule(function(){i.setDisposable(new C(e,t.subscribe(n)))})),i},t)};var Ht=$t.fromPromise=function(e){return qt(function(){var t=new J.AsyncSubject;return e.then(function(e){t.onNext(e),t.onCompleted()},t.onError.bind(t)),t})};Nt.toPromise=function(e){if(e||(e=J.config.Promise),!e)throw new ge("Promise type not provided nor in Rx.config.Promise");var t=this;return new e(function(e,n){var r,i=!1;t.subscribe(function(e){r=e,i=!0},n,function(){i&&e(r)})})};var Wt=function(e){function t(t){this.source=t,e.call(this)}return Je(t,e),t.prototype.subscribeCore=function(e){return this.source.subscribe(new E(e))},t}(Ft);E.prototype.onNext=function(e){this.isStopped||this.a.push(e)},E.prototype.onError=function(e){this.isStopped||(this.isStopped=!0,this.observer.onError(e))},E.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onNext(this.a),this.observer.onCompleted())},E.prototype.dispose=function(){this.isStopped=!0},E.prototype.fail=function(e){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(e),!0)},Nt.toArray=function(){return new Wt(this)},$t.create=$t.createWithDisposable=function(e,t){return new mn(e,t)};var qt=$t.defer=function(e){return new mn(function(t){var n;try{n=e()}catch(r){return nn(r).subscribe(t)}return oe(n)&&(n=Ht(n)),n.subscribe(t)})},Ut=$t.empty=function(e){return Z(e)||(e=_t),new mn(function(t){return e.scheduleWithState(null,function(){t.onCompleted()})})},Kt=function(e){function t(t,n,r){this.iterable=t,this.mapper=n,this.scheduler=r,e.call(this)}return Je(t,e),t.prototype.subscribeCore=function(e){var t=new zt(e,this);return t.run()},t}(Ft),zt=function(){function e(e,t){this.observer=e,this.parent=t}return e.prototype.run=function(){function e(e,t){try{var o=n.next()}catch(s){return r.onError(s)}if(o.done)return r.onCompleted();var a=o.value;if(i)try{a=i(a,e)}catch(s){return r.onError(s)}r.onNext(a),t(e+1)}var t=Object(this.parent.iterable),n=I(t),r=this.observer,i=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,e)},e}(),Gt=Math.pow(2,53)-1;x.prototype[ye]=function(){return new S(this._s)},S.prototype[ye]=function(){return this},S.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:be},O.prototype[ye]=function(){return new D(this._a)},D.prototype[ye]=function(){return this},D.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:be};var Qt=$t.from=function(e,t,n,r){if(null==e)throw new Error("iterable cannot be null.");if(t&&!se(t))throw new Error("mapFn when provided must be a function");if(t)var i=Ee(t,n,2);return Z(r)||(r=yt),new Kt(e,i,r)},Yt=function(e){function t(t,n){this.args=t,this.scheduler=n,e.call(this)}return Je(t,e),t.prototype.subscribeCore=function(e){var t=new T(e,this);return t.run()},t}(Ft);T.prototype.run=function(){function e(e,i){r>e?(t.onNext(n[e]),i(e+1)):t.onCompleted()}var t=this.observer,n=this.parent.args,r=n.length;return this.parent.scheduler.scheduleRecursiveWithState(0,e)};var Jt=$t.fromArray=function(e,t){return Z(t)||(t=yt),new Yt(e,t)};$t.generate=function(e,t,n,r,i){return Z(i)||(i=yt),new mn(function(o){var s=!0;return i.scheduleRecursiveWithState(e,function(e,i){var a,c;try{s?s=!1:e=n(e),a=t(e),a&&(c=r(e))}catch(u){return o.onError(u)}a?(o.onNext(c),i(e)):o.onCompleted()})})};var Xt=$t.never=function(){return new mn(function(){return at})};$t.of=function(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];return new Yt(t,yt)},$t.ofWithScheduler=function(e){for(var t=arguments.length,n=new Array(t-1),r=1;t>r;r++)n[r-1]=arguments[r];return new Yt(n,e)},$t.pairs=function(e,t){return t||(t=J.Scheduler.currentThread),new mn(function(n){var r=Object.keys(e),i=r.length;return t.scheduleRecursiveWithState(0,function(t,o){if(i>t){var s=r[t];n.onNext([s,e[s]]),o(t+1)}else n.onCompleted()})})};var Zt=function(e){function t(t,n,r){this.start=t,this.count=n,this.scheduler=r,e.call(this)}return Je(t,e),t.prototype.subscribeCore=function(e){var t=new en(e,this);return t.run()},t}(Ft),en=function(){function e(e,t){this.observer=e,this.parent=t}return e.prototype.run=function(){function e(e,i){n>e?(r.onNext(t+e),i(e+1)):r.onCompleted()}var t=this.parent.start,n=this.parent.count,r=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,e)},e}();$t.range=function(e,t,n){return Z(n)||(n=yt),new Zt(e,t,n)},$t.repeat=function(e,t,n){return Z(n)||(n=yt),tn(e,n).repeat(null==t?-1:t)};var tn=$t["return"]=$t.just=$t.returnValue=function(e,t){return Z(t)||(t=_t),new mn(function(n){return t.scheduleWithState(e,function(e,t){n.onNext(t),n.onCompleted()})})},nn=$t["throw"]=$t.throwError=function(e,t){return Z(t)||(t=_t),new mn(function(n){return t.schedule(function(){n.onError(e)})})};$t.throwException=function(){return $t.throwError.apply(null,arguments)},$t.using=function(e,t){return new mn(function(n){var r,i,o=at;try{r=e(),r&&(o=r),i=t(r)}catch(s){return new rt(nn(s).subscribe(n),o)}return new rt(i.subscribe(n),o)})},Nt.amb=function(e){var t=this;return new mn(function(n){function r(){o||(o=s,u.dispose())}function i(){o||(o=a,c.dispose())}var o,s="L",a="R",c=new lt,u=new lt;return oe(e)&&(e=Ht(e)),c.setDisposable(t.subscribe(function(e){r(),o===s&&n.onNext(e)},function(e){r(),o===s&&n.onError(e)},function(){r(),o===s&&n.onCompleted()})),u.setDisposable(e.subscribe(function(e){i(),o===a&&n.onNext(e)},function(e){i(),o===a&&n.onError(e)},function(){i(),o===a&&n.onCompleted()})),new rt(c,u)})},$t.amb=function(){function e(e,t){return e.amb(t)}var t=Xt(),n=[];if(Array.isArray(arguments[0]))n=arguments[0];else for(var r=0,i=arguments.length;i>r;r++)n.push(arguments[r]);for(var r=0,i=n.length;i>r;r++)t=e(t,n[r]);return t},Nt["catch"]=Nt.catchError=Nt.catchException=function(e){return"function"==typeof e?V(this,e):rn([this,e])};var rn=$t.catchError=$t["catch"]=$t.catchException=function(){var e=[];if(Array.isArray(arguments[0]))e=arguments[0];else for(var t=0,n=arguments.length;n>t;t++)e.push(arguments[t]);return Pt(e).catchError()};Nt.combineLatest=function(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];return Array.isArray(t[0])?t[0].unshift(this):t.unshift(this),on.apply(this,t)};var on=$t.combineLatest=function(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];var r=t.pop();return Array.isArray(t[0])&&(t=t[0]),new mn(function(e){function n(t){if(a[t]=!0,c||(c=a.every(ee))){try{var n=r.apply(null,l)}catch(i){return e.onError(i)}e.onNext(n)}else u.filter(function(e,n){return n!==t}).every(ee)&&e.onCompleted()}function i(t){u[t]=!0,u.every(ee)&&e.onCompleted()}for(var o=t.length,s=function(){return!1},a=v(o,s),c=!1,u=v(o,s),l=new Array(o),f=new Array(o),h=0;o>h;h++)!function(r){var o=t[r],s=new lt;oe(o)&&(o=Ht(o)),s.setDisposable(o.subscribe(function(e){l[r]=e,n(r)},function(t){e.onError(t)},function(){i(r)})),f[r]=s}(h);return new rt(f)},this)};Nt.concat=function(){for(var e=[],t=0,n=arguments.length;n>t;t++)e.push(arguments[t]);return e.unshift(this),sn.apply(null,e)};var sn=$t.concat=function(){var e;if(Array.isArray(arguments[0]))e=arguments[0];else{e=new Array(arguments.length);for(var t=0,n=arguments.length;n>t;t++)e[t]=arguments[t]}return Pt(e).concat()};Nt.concatAll=Nt.concatObservable=function(){return this.merge(1)};var an=function(e){function t(t,n){this.source=t,this.maxConcurrent=n,e.call(this)}return Je(t,e),t.prototype.subscribeCore=function(e){var t=new rt;return t.add(this.source.subscribe(new cn(e,this.maxConcurrent,t))),t},t}(Ft),cn=function(){function e(e,t,n){this.o=e,this.max=t,this.g=n,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function t(e,t){this.parent=e,this.sad=t,this.isStopped=!1}return e.prototype.handleSubscribe=function(e){var n=new lt;this.g.add(n),oe(e)&&(e=Ht(e)),n.setDisposable(e.subscribe(new t(this,n)))},e.prototype.onNext=function(e){this.isStopped||(this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(e)):this.q.push(e))},e.prototype.onError=function(e){this.isStopped||(this.isStopped=!0,this.o.onError(e))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,0===this.activeCount&&this.o.onCompleted())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(e){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(e),!0)},t.prototype.onNext=function(e){this.isStopped||this.parent.o.onNext(e)},t.prototype.onError=function(e){this.isStopped||(this.isStopped=!0,this.parent.o.onError(e))},t.prototype.onCompleted=function(){
4
- if(!this.isStopped){this.isStopped=!0;var e=this.parent;e.g.remove(this.sad),e.q.length>0?e.handleSubscribe(e.q.shift()):(e.activeCount--,e.done&&0===e.activeCount&&e.o.onCompleted())}},t.prototype.dispose=function(){this.isStopped=!0},t.prototype.fail=function(e){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(e),!0)},e}();Nt.merge=function(e){return"number"!=typeof e?un(this,e):new an(this,e)};var un=$t.merge=function(){var e,t,n=[],r=arguments.length;if(arguments[0])if(Z(arguments[0]))for(e=arguments[0],t=1;r>t;t++)n.push(arguments[t]);else for(e=_t,t=0;r>t;t++)n.push(arguments[t]);else for(e=_t,t=1;r>t;t++)n.push(arguments[t]);return Array.isArray(n[0])&&(n=n[0]),N(e,n).mergeAll()},ln=J.CompositeError=function(e){this.name="NotImplementedError",this.innerErrors=e,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};ln.prototype=Error.prototype,$t.mergeDelayError=function(){var e;if(Array.isArray(arguments[0]))e=arguments[0];else{var t=arguments.length;e=new Array(t);for(var n=0;t>n;n++)e[n]=arguments[n]}var r=N(null,e);return new mn(function(e){function t(){0===s.length?e.onCompleted():e.onError(1===s.length?s[0]:new ln(s))}var n=new rt,i=new lt,o=!1,s=[];return n.add(i),i.setDisposable(r.subscribe(function(r){var i=new lt;n.add(i),oe(r)&&(r=Ht(r)),i.setDisposable(r.subscribe(function(t){e.onNext(t)},function(e){s.push(e),n.remove(i),o&&1===n.length&&t()},function(){n.remove(i),o&&1===n.length&&t()}))},function(e){s.push(e),o=!0,1===n.length&&t()},function(){o=!0,1===n.length&&t()})),n})};var fn=function(e){function t(t){this.source=t,e.call(this)}return Je(t,e),t.prototype.subscribeCore=function(e){var t=new rt,n=new lt;return t.add(n),n.setDisposable(this.source.subscribe(new hn(e,t))),t},t}(Ft),hn=function(){function e(e,t){this.o=e,this.g=t,this.isStopped=!1,this.done=!1}function t(e,t,n){this.parent=e,this.g=t,this.sad=n,this.isStopped=!1}return e.prototype.onNext=function(e){if(!this.isStopped){var n=new lt;this.g.add(n),oe(e)&&(e=Ht(e)),n.setDisposable(e.subscribe(new t(this,this.g,n)))}},e.prototype.onError=function(e){this.isStopped||(this.isStopped=!0,this.o.onError(e))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,1===this.g.length&&this.o.onCompleted())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(e){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(e),!0)},t.prototype.onNext=function(e){this.isStopped||this.parent.o.onNext(e)},t.prototype.onError=function(e){this.isStopped||(this.isStopped=!0,this.parent.o.onError(e))},t.prototype.onCompleted=function(){if(!this.isStopped){var e=this.parent;this.isStopped=!0,e.g.remove(this.sad),e.done&&1===e.g.length&&e.o.onCompleted()}},t.prototype.dispose=function(){this.isStopped=!0},t.prototype.fail=function(e){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(e),!0)},e}();Nt.mergeAll=Nt.mergeObservable=function(){return new fn(this)},Nt.onErrorResumeNext=function(e){if(!e)throw new Error("Second observable is required");return dn([this,e])};var dn=$t.onErrorResumeNext=function(){var e=[];if(Array.isArray(arguments[0]))e=arguments[0];else for(var t=0,n=arguments.length;n>t;t++)e.push(arguments[t]);return new mn(function(t){var n=0,r=new ft,i=_t.scheduleRecursive(function(i){var o,s;n<e.length?(o=e[n++],oe(o)&&(o=Ht(o)),s=new lt,r.setDisposable(s),s.setDisposable(o.subscribe(t.onNext.bind(t),i,i))):t.onCompleted()});return new rt(r,i)})};Nt.skipUntil=function(e){var t=this;return new mn(function(n){var r=!1,i=new rt(t.subscribe(function(e){r&&n.onNext(e)},function(e){n.onError(e)},function(){r&&n.onCompleted()}));oe(e)&&(e=Ht(e));var o=new lt;return i.add(o),o.setDisposable(e.subscribe(function(){r=!0,o.dispose()},function(e){n.onError(e)},function(){o.dispose()})),i},t)},Nt["switch"]=Nt.switchLatest=function(){var e=this;return new mn(function(t){var n=!1,r=new ft,i=!1,o=0,s=e.subscribe(function(e){var s=new lt,a=++o;n=!0,r.setDisposable(s),oe(e)&&(e=Ht(e)),s.setDisposable(e.subscribe(function(e){o===a&&t.onNext(e)},function(e){o===a&&t.onError(e)},function(){o===a&&(n=!1,i&&t.onCompleted())}))},function(e){t.onError(e)},function(){i=!0,!n&&t.onCompleted()});return new rt(s,r)},e)},Nt.takeUntil=function(e){var t=this;return new mn(function(n){return oe(e)&&(e=Ht(e)),new rt(t.subscribe(n),e.subscribe(function(){n.onCompleted()},function(e){n.onError(e)},X))},t)},Nt.withLatestFrom=function(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];var r=t.pop(),i=this;if("undefined"==typeof i)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof r)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(t[0])&&(t=t[0]),new mn(function(e){for(var n=function(){return!1},o=t.length,s=v(o,n),a=!1,c=new Array(o),u=new Array(o+1),l=0;o>l;l++)!function(n){var r=t[n],i=new lt;oe(r)&&(r=Ht(r)),i.setDisposable(r.subscribe(function(e){c[n]=e,s[n]=!0,a=s.every(ee)},e.onError.bind(e),function(){})),u[n]=i}(l);var f=new lt;return f.setDisposable(i.subscribe(function(t){var n,i=[t].concat(c);if(a){try{n=r.apply(null,i)}catch(o){return void e.onError(o)}e.onNext(n)}},e.onError.bind(e),function(){e.onCompleted()})),u[o]=f,new rt(u)},this)},Nt.zip=function(){if(Array.isArray(arguments[0]))return k.apply(this,arguments);for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];var r=this,i=t.pop();return t.unshift(r),new mn(function(e){function n(t){var n,o;if(a.every(function(e){return e.length>0})){try{o=a.map(function(e){return e.shift()}),n=i.apply(r,o)}catch(s){return void e.onError(s)}e.onNext(n)}else c.filter(function(e,n){return n!==t}).every(ee)&&e.onCompleted()}function o(t){c[t]=!0,c.every(function(e){return e})&&e.onCompleted()}for(var s=t.length,a=v(s,B),c=v(s,M),u=new Array(s),l=0;s>l;l++)!function(r){var i=t[r],s=new lt;oe(i)&&(i=Ht(i)),s.setDisposable(i.subscribe(function(e){a[r].push(e),n(r)},function(t){e.onError(t)},function(){o(r)})),u[r]=s}(l);return new rt(u)},r)},$t.zip=function(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];var r=t.shift();return r.zip.apply(r,t)},$t.zipArray=function(){var e;if(Array.isArray(arguments[0]))e=arguments[0];else{var t=arguments.length;e=new Array(t);for(var n=0;t>n;n++)e[n]=arguments[n]}return new mn(function(t){function n(e){if(o.every(function(e){return e.length>0})){var n=o.map(function(e){return e.shift()});t.onNext(n)}else if(s.filter(function(t,n){return n!==e}).every(ee))return void t.onCompleted()}function r(e){return s[e]=!0,s.every(ee)?void t.onCompleted():void 0}for(var i=e.length,o=v(i,function(){return[]}),s=v(i,function(){return!1}),a=new Array(i),c=0;i>c;c++)!function(i){a[i]=new lt,a[i].setDisposable(e[i].subscribe(function(e){o[i].push(e),n(i)},function(e){t.onError(e)},function(){r(i)}))}(c);return new rt(a)})},Nt.asObservable=function(){var e=this;return new mn(function(t){return e.subscribe(t)},this)},Nt.bufferWithCount=function(e,t){return"number"!=typeof t&&(t=e),this.windowWithCount(e,t).selectMany(function(e){return e.toArray()}).where(function(e){return e.length>0})},Nt.dematerialize=function(){var e=this;return new mn(function(t){return e.subscribe(function(e){return e.accept(t)},function(e){t.onError(e)},function(){t.onCompleted()})},this)},Nt.distinctUntilChanged=function(e,t){var n=this;return t||(t=ne),new mn(function(r){var i,o=!1;return n.subscribe(function(n){var s=n;if(e)try{s=e(n)}catch(a){return void r.onError(a)}if(o)try{var c=t(i,s)}catch(a){return void r.onError(a)}o&&c||(o=!0,i=s,r.onNext(n))},function(e){r.onError(e)},function(){r.onCompleted()})},this)},Nt["do"]=Nt.tap=Nt.doAction=function(e,t,n){var r=this;return new mn(function(i){var o=!e||se(e)?Tt(e||X,t||X,n||X):e;return r.subscribe(function(e){try{o.onNext(e)}catch(t){i.onError(t)}i.onNext(e)},function(e){try{o.onError(e)}catch(t){i.onError(t)}i.onError(e)},function(){try{o.onCompleted()}catch(e){i.onError(e)}i.onCompleted()})},this)},Nt.doOnNext=Nt.tapOnNext=function(e,t){return this.tap("undefined"!=typeof t?function(n){e.call(t,n)}:e)},Nt.doOnError=Nt.tapOnError=function(e,t){return this.tap(X,"undefined"!=typeof t?function(n){e.call(t,n)}:e)},Nt.doOnCompleted=Nt.tapOnCompleted=function(e,t){return this.tap(X,null,"undefined"!=typeof t?function(){e.call(t)}:e)},Nt["finally"]=Nt.ensure=function(e){var t=this;return new mn(function(n){var r;try{r=t.subscribe(n)}catch(i){throw e(),i}return st(function(){try{r.dispose()}catch(t){throw t}finally{e()}})},this)},Nt.finallyAction=function(e){return this.ensure(e)},Nt.ignoreElements=function(){var e=this;return new mn(function(t){return e.subscribe(X,function(e){t.onError(e)},function(){t.onCompleted()})},e)},Nt.materialize=function(){var e=this;return new mn(function(t){return e.subscribe(function(e){t.onNext(xt(e))},function(e){t.onNext(St(e)),t.onCompleted()},function(){t.onNext(Ot()),t.onCompleted()})},e)},Nt.repeat=function(e){return It(this,e).concat()},Nt.retry=function(e){return It(this,e).catchError()},Nt.retryWhen=function(e){return It(this).catchErrorWhen(e)},Nt.scan=function(){var e,t,n=!1,r=this;return 2===arguments.length?(n=!0,e=arguments[0],t=arguments[1]):t=arguments[0],new mn(function(i){var o,s,a;return r.subscribe(function(r){!a&&(a=!0);try{o?s=t(s,r):(s=n?t(e,r):r,o=!0)}catch(c){return void i.onError(c)}i.onNext(s)},function(e){i.onError(e)},function(){!a&&n&&i.onNext(e),i.onCompleted()})},r)},Nt.skipLast=function(e){if(0>e)throw new pe;var t=this;return new mn(function(n){var r=[];return t.subscribe(function(t){r.push(t),r.length>e&&n.onNext(r.shift())},function(e){n.onError(e)},function(){n.onCompleted()})},t)},Nt.startWith=function(){var e,t=0;arguments.length&&Z(arguments[0])?(e=arguments[0],t=1):e=_t;for(var n=[],r=t,i=arguments.length;i>r;r++)n.push(arguments[r]);return Pt([Jt(n,e),this]).concat()},Nt.takeLast=function(e){if(0>e)throw new pe;var t=this;return new mn(function(n){var r=[];return t.subscribe(function(t){r.push(t),r.length>e&&r.shift()},function(e){n.onError(e)},function(){for(;r.length>0;)n.onNext(r.shift());n.onCompleted()})},t)},Nt.takeLastBuffer=function(e){var t=this;return new mn(function(n){var r=[];return t.subscribe(function(t){r.push(t),r.length>e&&r.shift()},function(e){n.onError(e)},function(){n.onNext(r),n.onCompleted()})},t)},Nt.windowWithCount=function(e,t){var n=this;if(+e||(e=0),Math.abs(e)===1/0&&(e=0),0>=e)throw new pe;if(null==t&&(t=e),+t||(t=0),Math.abs(t)===1/0&&(t=0),0>=t)throw new pe;return new mn(function(r){function i(){var e=new yn;c.push(e),r.onNext(Ze(e,s))}var o=new lt,s=new ht(o),a=0,c=[];return i(),o.setDisposable(n.subscribe(function(n){for(var r=0,o=c.length;o>r;r++)c[r].onNext(n);var s=a-e+1;s>=0&&s%t===0&&c.shift().onCompleted(),++a%t===0&&i()},function(e){for(;c.length>0;)c.shift().onError(e);r.onError(e)},function(){for(;c.length>0;)c.shift().onCompleted();r.onCompleted()})),s},n)},Nt.selectConcat=Nt.concatMap=function(e,t,n){return se(e)&&se(t)?this.concatMap(function(n,r){var i=e(n,r);return oe(i)&&(i=Ht(i)),(Ce(i)||we(i))&&(i=Qt(i)),i.map(function(e,i){return t(n,e,r,i)})}):se(e)?L(this,e,n):L(this,function(){return e})},Nt.concatMapObserver=Nt.selectConcatObserver=function(e,t,n,r){var i=this,o=Ee(e,r,2),s=Ee(t,r,1),a=Ee(n,r,0);return new mn(function(e){var t=0;return i.subscribe(function(n){var r;try{r=o(n,t++)}catch(i){return void e.onError(i)}oe(r)&&(r=Ht(r)),e.onNext(r)},function(t){var n;try{n=s(t)}catch(r){return void e.onError(r)}oe(n)&&(n=Ht(n)),e.onNext(n),e.onCompleted()},function(){var t;try{t=a()}catch(n){return void e.onError(n)}oe(t)&&(t=Ht(t)),e.onNext(t),e.onCompleted()})},this).concatAll()},Nt.defaultIfEmpty=function(t){var n=this;return t===e&&(t=null),new mn(function(e){var r=!1;return n.subscribe(function(t){r=!0,e.onNext(t)},function(t){e.onError(t)},function(){!r&&e.onNext(t),e.onCompleted()})},n)},F.prototype.push=function(e){var t=-1===$(this.set,e,this.comparer);return t&&this.set.push(e),t},Nt.distinct=function(e,t){var n=this;return t||(t=ne),new mn(function(r){var i=new F(t);return n.subscribe(function(t){var n=t;if(e)try{n=e(t)}catch(o){return void r.onError(o)}i.push(n)&&r.onNext(t)},function(e){r.onError(e)},function(){r.onCompleted()})},this)};var pn=function(e){function t(t,n,r){this.source=t,this.selector=Ee(n,r,3),e.call(this)}return Je(t,e),t.prototype.internalMap=function(e,n){var r=this;return new t(this.source,function(t,n,i){return e.call(this,r.selector(t,n,i),n,i)},n)},t.prototype.subscribeCore=function(e){return this.source.subscribe(new H(e,this.selector,this))},t}(Ft);H.prototype.onNext=function(e){if(!this.isStopped){var t=y(this.selector).call(this,e,this.i++,this.source);return t===et?this.observer.onError(t.e):void this.observer.onNext(t)}},H.prototype.onError=function(e){this.isStopped||(this.isStopped=!0,this.observer.onError(e))},H.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},H.prototype.dispose=function(){this.isStopped=!0},H.prototype.fail=function(e){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(e),!0)},Nt.map=Nt.select=function(e,t){var n="function"==typeof e?e:function(){return e};return this instanceof pn?this.internalMap(n,t):new pn(this,n,t)},Nt.pluck=function(){var t=arguments,n=arguments.length;if(0===n)throw new Error("List of properties cannot be empty.");return this.map(function(r){for(var i=r,o=0;n>o;o++){var s=i[t[o]];if("undefined"==typeof s)return e;i=s}return i})},Nt.flatMapObserver=Nt.selectManyObserver=function(e,t,n,r){var i=this;return new mn(function(o){var s=0;return i.subscribe(function(t){var n;try{n=e.call(r,t,s++)}catch(i){return void o.onError(i)}oe(n)&&(n=Ht(n)),o.onNext(n)},function(e){var n;try{n=t.call(r,e)}catch(i){return void o.onError(i)}oe(n)&&(n=Ht(n)),o.onNext(n),o.onCompleted()},function(){var e;try{e=n.call(r)}catch(t){return void o.onError(t)}oe(e)&&(e=Ht(e)),o.onNext(e),o.onCompleted()})},i).mergeAll()},Nt.selectMany=Nt.flatMap=function(e,t,n){return se(e)&&se(t)?this.flatMap(function(n,r){var i=e(n,r);return oe(i)&&(i=Ht(i)),(Ce(i)||we(i))&&(i=Qt(i)),i.map(function(e,i){return t(n,e,r,i)})},n):se(e)?W(this,e,n):W(this,function(){return e})},Nt.selectSwitch=Nt.flatMapLatest=Nt.switchMap=function(e,t){return this.select(e,t).switchLatest()},Nt.skip=function(e){if(0>e)throw new pe;var t=this;return new mn(function(n){var r=e;return t.subscribe(function(e){0>=r?n.onNext(e):r--},function(e){n.onError(e)},function(){n.onCompleted()})},t)},Nt.skipWhile=function(e,t){var n=this,r=Ee(e,t,3);return new mn(function(e){var t=0,i=!1;return n.subscribe(function(o){if(!i)try{i=!r(o,t++,n)}catch(s){return void e.onError(s)}i&&e.onNext(o)},function(t){e.onError(t)},function(){e.onCompleted()})},n)},Nt.take=function(e,t){if(0>e)throw new pe;if(0===e)return Ut(t);var n=this;return new mn(function(t){var r=e;return n.subscribe(function(e){r-->0&&(t.onNext(e),0===r&&t.onCompleted())},function(e){t.onError(e)},function(){t.onCompleted()})},n)},Nt.takeWhile=function(e,t){var n=this,r=Ee(e,t,3);return new mn(function(e){var t=0,i=!0;return n.subscribe(function(o){if(i){try{i=r(o,t++,n)}catch(s){return void e.onError(s)}i?e.onNext(o):e.onCompleted()}},function(t){e.onError(t)},function(){e.onCompleted()})},n)};var gn=function(e){function t(t,n,r){this.source=t,this.predicate=Ee(n,r,3),e.call(this)}return Je(t,e),t.prototype.subscribeCore=function(e){return this.source.subscribe(new q(e,this.predicate,this))},t.prototype.internalFilter=function(e,n){var r=this;return new t(this.source,function(t,n,i){return r.predicate(t,n,i)&&e.call(this,t,n,i)},n)},t}(Ft);q.prototype.onNext=function(e){if(!this.isStopped){var t=y(this.predicate).call(this,e,this.i++,this.source);return t===et?this.observer.onError(t.e):void(t&&this.observer.onNext(e))}},q.prototype.onError=function(e){this.isStopped||(this.isStopped=!0,this.observer.onError(e))},q.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},q.prototype.dispose=function(){this.isStopped=!0},q.prototype.fail=function(e){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(e),!0)},Nt.filter=Nt.where=function(e,t){return this instanceof gn?this.internalFilter(e,t):new gn(this,e,t)},Nt.transduce=function(e){function t(e){return{"@@transducer/init":function(){return e},"@@transducer/step":function(e,t){return e.onNext(t)},"@@transducer/result":function(e){return e.onCompleted()}}}var n=this;return new mn(function(r){var i=e(t(r));return n.subscribe(function(e){try{i["@@transducer/step"](r,e)}catch(t){r.onError(t)}},function(e){r.onError(e)},function(){i["@@transducer/result"](r)})},n)};var mn=J.AnonymousObservable=function(e){function t(e){return e&&se(e.dispose)?e:se(e)?st(e):at}function n(e,n){var r=n[0],i=n[1],o=y(i)(r);return o!==et||r.fail(et.e)?void r.setDisposable(t(o)):b(et.e)}function r(t,r){function i(e){var r=new vn(e),i=[r,t];return yt.scheduleRequired()?yt.scheduleWithState(i,n):n(null,i),r}this.source=r,e.call(this,i)}return Je(r,e),r}($t),vn=function(e){function t(t){e.call(this),this.observer=t,this.m=new lt}Je(t,e);var n=t.prototype;return n.next=function(e){var t=y(this.observer.onNext).call(this.observer,e);t===et&&(this.dispose(),b(t.e))},n.error=function(e){var t=y(this.observer.onError).call(this.observer,e);this.dispose(),t===et&&b(t.e)},n.completed=function(){var e=y(this.observer.onCompleted).call(this.observer);this.dispose(),e===et&&b(e.e)},n.setDisposable=function(e){this.m.setDisposable(e)},n.getDisposable=function(){return this.m.getDisposable()},n.dispose=function(){e.prototype.dispose.call(this),this.m.dispose()},t}(Vt),_n=function(e,t){this.subject=e,this.observer=t};_n.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var e=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(e,1),this.observer=null}};var yn=J.Subject=function(e){function t(e){return ut(this),this.isStopped?this.hasError?(e.onError(this.error),at):(e.onCompleted(),at):(this.observers.push(e),new _n(this,e))}function n(){e.call(this,t),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Je(n,e),Xe(n.prototype,jt.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(ut(this),!this.isStopped){this.isStopped=!0;for(var e=0,t=i(this.observers),n=t.length;n>e;e++)t[e].onCompleted();this.observers.length=0}},onError:function(e){if(ut(this),!this.isStopped){this.isStopped=!0,this.error=e,this.hasError=!0;for(var t=0,n=i(this.observers),r=n.length;r>t;t++)n[t].onError(e);this.observers.length=0}},onNext:function(e){if(ut(this),!this.isStopped)for(var t=0,n=i(this.observers),r=n.length;r>t;t++)n[t].onNext(e)},dispose:function(){this.isDisposed=!0,this.observers=null}}),n.create=function(e,t){return new bn(e,t)},n}($t),bn=(J.AsyncSubject=function(e){function t(e){return ut(this),this.isStopped?(this.hasError?e.onError(this.error):this.hasValue?(e.onNext(this.value),e.onCompleted()):e.onCompleted(),at):(this.observers.push(e),new _n(this,e))}function n(){e.call(this,t),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Je(n,e),Xe(n.prototype,jt,{hasObservers:function(){return ut(this),this.observers.length>0},onCompleted:function(){var e,t;if(ut(this),!this.isStopped){this.isStopped=!0;var n=i(this.observers),t=n.length;if(this.hasValue)for(e=0;t>e;e++){var r=n[e];r.onNext(this.value),r.onCompleted()}else for(e=0;t>e;e++)n[e].onCompleted();this.observers.length=0}},onError:function(e){if(ut(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=e;for(var t=0,n=i(this.observers),r=n.length;r>t;t++)n[t].onError(e);this.observers.length=0}},onNext:function(e){ut(this),this.isStopped||(this.value=e,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),n}($t),J.AnonymousSubject=function(e){function t(e){return this.observable.subscribe(e)}function n(n,r){this.observer=n,this.observable=r,e.call(this,t)}return Je(n,e),Xe(n.prototype,jt.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(e){this.observer.onError(e)},onNext:function(e){this.observer.onNext(e)}}),n}($t));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(K.Rx=J,define(function(){return J})):z&&G?Q?(G.exports=J).Rx=J:z.Rx=J:K.Rx=J;var wn=l()}.call(this),r.define=i,n.exports}),System.register("angular2/src/facade/lang",[],function(e){"use strict";function t(e){return e.name}function n(e){return new TypeError(e)}function r(){return P}function i(e){return e}function o(e){return e}function s(){return function(e){return e}}function a(){return function(e){return e}}function c(e){return function(e){return e}}function u(e){return void 0!==e&&null!==e}function l(e){return void 0===e||null===e}function f(e){return"string"==typeof e}function h(e){return"function"==typeof e}function d(e){return h(e)}function p(e){return"object"==typeof e&&null!==e}function g(e){return e instanceof S.Promise}function m(e){return Array.isArray(e)}function v(e){return"number"==typeof e}function _(e){return e instanceof I&&!isNaN(e.valueOf())}function y(e){return"string"==typeof e?e:void 0===e||null===e?""+e:e.name?e.name:e.toString()}function b(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function w(e){return e}function C(e){return l(e)?null:e}function R(e){return l(e)?!1:e}function E(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function x(e){console.log(e instanceof D?e.stack:e)}var S,O,D,A,I,P,j,T,N,V,k,M,B,L,$,F;return e("getTypeNameForDebugging",t),e("makeTypeError",n),e("assertionsEnabled",r),e("ENUM_INDEX",i),e("CONST_EXPR",o),e("CONST",s),e("ABSTRACT",a),e("IMPLEMENTS",c),e("isPresent",u),e("isBlank",l),e("isString",f),e("isFunction",h),e("isType",d),e("isStringMap",p),e("isPromise",g),e("isArray",m),e("isNumber",v),e("isDate",_),e("stringify",y),e("looseIdentical",b),e("getMapKey",w),e("normalizeBlank",C),e("normalizeBool",R),e("isJsObject",E),e("print",x),{setters:[],execute:function(){S="undefined"==typeof window?global:window,e("global",S),O=Function,e("Type",O),D=function(e){function t(e,n,r){$traceurRuntime.superConstructor(t).call(this,e),this.message=e,this.originalException=n,this.originalStack=r,this.stack=new Error(e).stack}return $traceurRuntime.createClass(t,{toString:function(){return this.message}},{},e)}(Error),e("BaseException",D),A=S.Math,e("Math",A),I=S.Date,e("Date",I),P="undefined"!=typeof S.assert,S.assert=function(e){P&&S.assert.call(e)},j=function(){function e(){}return $traceurRuntime.createClass(e,{},{fromCharCode:function(e){return String.fromCharCode(e)},charCodeAt:function(e,t){return e.charCodeAt(t)},split:function(e,t){return e.split(t)},equals:function(e,t){return e===t},replace:function(e,t,n){return e.replace(t,n)},replaceAll:function(e,t,n){return e.replace(t,n)},toUpperCase:function(e){return e.toUpperCase()},toLowerCase:function(e){return e.toLowerCase()},startsWith:function(e,t){return e.startsWith(t)},substring:function(e,t){var n=void 0!==arguments[2]?arguments[2]:null;return e.substring(t,null===n?void 0:n)},replaceAllMapped:function(e,t,n){return e.replace(t,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.splice(-2,2),n(e)})},contains:function(e,t){return-1!=e.indexOf(t)},compare:function(e,t){return t>e?-1:e>t?1:0}})}(),e("StringWrapper",j),T=function(){function e(){var e=void 0!==arguments[0]?arguments[0]:[];this.parts=e}return $traceurRuntime.createClass(e,{add:function(e){this.parts.push(e)},toString:function(){return this.parts.join("")}},{})}(),e("StringJoiner",T),N=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this.message=e}return $traceurRuntime.createClass(t,{toString:function(){return this.message}},{},e)}(D),e("NumberParseError",N),V=function(){function e(){}return $traceurRuntime.createClass(e,{},{toFixed:function(e,t){return e.toFixed(t)},equal:function(e,t){return e===t},parseIntAutoRadix:function(e){var t=parseInt(e);if(isNaN(t))throw new N("Invalid integer literal when parsing "+e);return t},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 n=parseInt(e,t);if(!isNaN(n))return n}throw new N("Invalid integer literal when parsing "+e+" in base "+t)},parseFloat:function(e){return parseFloat(e)},get NaN(){return 0/0},isNaN:function(e){return isNaN(e)},isInteger:function(e){return Number.isInteger(e)}})}(),e("NumberWrapper",V),k=S.RegExp,e("RegExp",k),M=function(){function e(){}return $traceurRuntime.createClass(e,{},{create:function(e){var t=void 0!==arguments[1]?arguments[1]:"";return t=t.replace(/g/g,""),new S.RegExp(e,t+"g")},firstMatch:function(e,t){return e.lastIndex=0,e.exec(t)},test:function(e,t){return e.test(t)},matcher:function(e,t){return e.lastIndex=0,{re:e,input:t}}})}(),e("RegExpWrapper",M),B=function(){function e(){}return $traceurRuntime.createClass(e,{},{next:function(e){return e.re.exec(e.input)}})}(),e("RegExpMatcherWrapper",B),L=function(){function e(){}return $traceurRuntime.createClass(e,{},{apply:function(e,t){return e.apply(null,t)}})}(),e("FunctionWrapper",L),$=function(){function e(){}return $traceurRuntime.createClass(e,{},{parse:function(e){return S.JSON.parse(e)},stringify:function(e){return S.JSON.stringify(e,null,2)}})}(),e("Json",$),F=function(){function e(){}return $traceurRuntime.createClass(e,{},{create:function(e){var t=void 0!==arguments[1]?arguments[1]:1,n=void 0!==arguments[2]?arguments[2]:1,r=void 0!==arguments[3]?arguments[3]:0,i=void 0!==arguments[4]?arguments[4]:0,o=void 0!==arguments[5]?arguments[5]:0,s=void 0!==arguments[6]?arguments[6]:0;return new I(e,t-1,n,r,i,o,s)},fromMillis:function(e){return new I(e)},toMillis:function(e){return e.getTime()},now:function(){return new I},toJson:function(e){return e.toJSON()}})}(),e("DateWrapper",F)}}}),System.register("angular2/src/di/metadata",["angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g;return{setters:[function(e){r=e.CONST,i=e.CONST_EXPR,o=e.stringify,s=e.isBlank}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},a=$traceurRuntime.createClass(function(e){this.token=e},{toString:function(){return"@Inject("+o(this.token)+")"}},{}),e("InjectMetadata",a),e("InjectMetadata",a=t([r(),n("design:paramtypes",[Object])],a)),c=$traceurRuntime.createClass(function(){},{toString:function(){return"@Optional()"}},{}),e("OptionalMetadata",c),e("OptionalMetadata",c=t([r(),n("design:paramtypes",[])],c)),u=$traceurRuntime.createClass(function(){},{get token(){return null}},{}),e("DependencyMetadata",u),e("DependencyMetadata",u=t([r(),n("design:paramtypes",[])],u)),l=$traceurRuntime.createClass(function(){},{},{}),e("InjectableMetadata",l),e("InjectableMetadata",l=t([r(),n("design:paramtypes",[])],l)),f=$traceurRuntime.createClass(function(e,t){this.crossBoundaries=e,this._includeSelf=t},{get includeSelf(){return s(this._includeSelf)?!1:this._includeSelf},toString:function(){return"@Visibility(crossBoundaries: "+this.crossBoundaries+", includeSelf: "+this.includeSelf+"})"}},{}),e("VisibilityMetadata",f),e("VisibilityMetadata",f=t([r(),n("design:paramtypes",[Boolean,Boolean])],f)),h=function(e){function t(){$traceurRuntime.superConstructor(t).call(this,!1,!0)}return $traceurRuntime.createClass(t,{toString:function(){return"@Self()"}},{},e)}(f),e("SelfMetadata",h),e("SelfMetadata",h=t([r(),n("design:paramtypes",[])],h)),d=function(e){function t(){var e=(void 0!==arguments[0]?arguments[0]:{}).self;$traceurRuntime.superConstructor(t).call(this,!1,e)}return $traceurRuntime.createClass(t,{toString:function(){return"@Ancestor(self: "+this.includeSelf+"})"}},{},e)}(f),e("AncestorMetadata",d),e("AncestorMetadata",d=t([r(),n("design:paramtypes",[Object])],d)),p=function(e){function t(){var e=(void 0!==arguments[0]?arguments[0]:{}).self;$traceurRuntime.superConstructor(t).call(this,!0,e)}return $traceurRuntime.createClass(t,{toString:function(){return"@Unbounded(self: "+this.includeSelf+"})"}},{},e)}(f),e("UnboundedMetadata",p),e("UnboundedMetadata",p=t([r(),n("design:paramtypes",[Object])],p)),g=i(new p({self:!0})),e("DEFAULT_VISIBILITY",g)}}}),System.register("angular2/src/facade/collection",["angular2/src/facade/lang"],function(e){"use strict";function t(e){return r(e)?s(e)||!(e instanceof c)&&Symbol.iterator in e:!1}function n(e,t){if(s(e))for(var n=0;n<e.length;n++)t(e[n]);else for(var r,i=e[Symbol.iterator]();!(r=i.next()).done;)t(r.value)}var r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_;return e("isListLikeIterable",t),e("iterateListLike",n),{setters:[function(e){r=e.isJsObject,i=e.global,o=e.isPresent,s=e.isArray}],execute:function(){a=i.Array,e("List",a),c=i.Map,e("Map",c),u=i.Set,e("Set",u),l=i.Object,e("StringMap",l),f=function(){try{if(2===new c([1,2]).size)return function(e){return new c(e)}}catch(e){}return function(e){for(var t=new c,n=0;n<e.length;n++){var r=e[n];t.set(r[0],r[1])}return t}}(),h=function(){try{if(new c(new c))return function(e){return new c(e)}}catch(e){}return function(e){var t=new c;return e.forEach(function(e,n){t.set(n,e)}),t}}(),d=function(){return(new c).keys().next?function(e){for(var t,n=e.keys();!(t=n.next()).done;)e.set(t.value,null)}:function(e){e.forEach(function(t,n){e.set(n,null)})}}(),p=function(){function e(){}return $traceurRuntime.createClass(e,{},{clone:function(e){return h(e)},createFromStringMap:function(e){var t=new c;for(var n in e)t.set(n,e[n]);return t},createFromPairs:function(e){return f(e)},forEach:function(e,t){e.forEach(t)},get:function(e,t){return e.get(t)},size:function(e){return e.size},"delete":function(e,t){e["delete"](t)},clearValues:function(e){d(e)},iterable:function(e){return e},keys:function(e){return Array.from(e.keys())},values:function(e){return Array.from(e.values())}})}(),e("MapWrapper",p),g=function(){function e(){}return $traceurRuntime.createClass(e,{},{create:function(){return{}},contains:function(e,t){return e.hasOwnProperty(t)},get:function(e,t){return e.hasOwnProperty(t)?e[t]:void 0},set:function(e,t,n){e[t]=n},keys:function(e){return Object.keys(e)},isEmpty:function(e){for(var t in e)return!1;return!0},"delete":function(e,t){delete e[t]},forEach:function(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},merge:function(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n},equals:function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(var i,o=0;o<n.length;o++)if(i=n[o],e[i]!==t[i])return!1;return!0}})}(),e("StringMapWrapper",g),m=function(){function e(){}return $traceurRuntime.createClass(e,{},{createFixedSize:function(e){return new a(e)},createGrowableSize:function(e){return new a(e)},get:function(e,t){return e[t]},set:function(e,t,n){e[t]=n},clone:function(e){return e.slice(0)},map:function(e,t){return e.map(t)},forEach:function(e,t){for(var n=0;n<e.length;n++)t(e[n])},first:function(e){return e?e[0]:null},last:function(e){return e&&0!=e.length?e[e.length-1]:null},find:function(e,t){for(var n=0;n<e.length;++n)if(t(e[n]))return e[n];return null},indexOf:function(e,t){var n=void 0!==arguments[2]?arguments[2]:0;return e.indexOf(t,n)},reduce:function(e,t,n){return e.reduce(t,n)},filter:function(e,t){return e.filter(t)},any:function(e,t){for(var n=0;n<e.length;++n)if(t(e[n]))return!0;
5
-
6
- return!1},contains:function(e,t){return-1!==e.indexOf(t)},reversed:function(t){var n=e.clone(t);return n.reverse()},concat:function(e,t){return e.concat(t)},insert:function(e,t,n){e.splice(t,0,n)},removeAt:function(e,t){var n=e[t];return e.splice(t,1),n},removeAll:function(e,t){for(var n=0;n<t.length;++n){var r=e.indexOf(t[n]);e.splice(r,1)}},removeLast:function(e){return e.pop()},remove:function(e,t){var n=e.indexOf(t);return n>-1?(e.splice(n,1),!0):!1},clear:function(e){e.splice(0,e.length)},join:function(e,t){return e.join(t)},isEmpty:function(e){return 0==e.length},fill:function(e,t){var n=void 0!==arguments[2]?arguments[2]:0,r=void 0!==arguments[3]?arguments[3]:null;e.fill(t,n,null===r?void 0:r)},equals:function(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0},slice:function(e){var t=void 0!==arguments[1]?arguments[1]:0,n=void 0!==arguments[2]?arguments[2]:null;return e.slice(t,null===n?void 0:n)},splice:function(e,t,n){return e.splice(t,n)},sort:function(e,t){o(t)?e.sort(t):e.sort()},toString:function(e){return e.toString()},toJSON:function(e){return JSON.stringify(e)}})}(),e("ListWrapper",m),v=function(){var e=new u([1,2,3]);return 3===e.size?function(e){return new u(e)}:function(e){var t=new u(e);if(t.size!==e.length)for(var n=0;n<e.length;n++)t.add(e[n]);return t}}(),_=function(){function e(){}return $traceurRuntime.createClass(e,{},{createFromList:function(e){return v(e)},has:function(e,t){return e.has(t)}})}(),e("SetWrapper",_)}}}),System.register("angular2/src/util/decorators",["angular2/src/facade/lang"],function(e){"use strict";function t(e){return a(e)&&e.hasOwnProperty("annotation")&&(e=e.annotation),e}function n(e,n){if(e===Object||e===String||e===Function||e===Number||e===Array)throw new Error("Can not use native "+c(e)+" as constructor");if(a(e))return e;if(e instanceof Array){var r=e,i=e[e.length-1];if(!a(i))throw new Error("Last position of Class method array must be Function in key "+n+" was '"+c(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: "+c(i));for(var s=[],l=0,f=r.length-1;f>l;l++){var h=[];s.push(h);var d=r[l];if(d instanceof Array)for(var p=0;p<d.length;p++)h.push(t(d[p]));else h.push(a(d)?t(d):d)}return u.defineMetadata("parameters",s,i),i}throw new Error("Only Function or Array is supported in Class definition for key '"+n+"' is '"+c(e)+"'")}function r(e){var t=n(e.hasOwnProperty("constructor")?e.constructor:void 0,"constructor"),r=t.prototype;if(e.hasOwnProperty("extends")){if(!a(e["extends"]))throw new Error("Class definition 'extends' property must be a constructor function was: "+c(e["extends"]));t.prototype=r=Object.create(e["extends"].prototype)}for(var i in e)"extends"!=i&&"prototype"!=i&&e.hasOwnProperty(i)&&(r[i]=n(e[i],i));return this&&this.annotations instanceof Array&&u.defineMetadata("annotations",this.annotations,t),t}function i(e){function t(t){var i=new e(t);if(this instanceof e)return i;var o=a(this)&&this.annotations instanceof Array?this.annotations:[];o.push(i);var s=function(e){var t=u.getMetadata("annotations",e);return t=t||[],t.push(i),u.defineMetadata("annotations",t,e),e};return s.annotations=o,s.Class=r,n&&n(s),s}var n=void 0!==arguments[1]?arguments[1]:null;return t.prototype=Object.create(e.prototype),t}function o(e){function t(){function t(e,t,n){var r=u.getMetadata("parameters",e);for(r=r||[];r.length<=n;)r.push(null);r[n]=r[n]||[];var o=r[n];return o.push(i),u.defineMetadata("parameters",r,e),e}for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=Object.create(e.prototype);return e.apply(i,n),this instanceof e?i:(t.annotation=i,t)}return t.prototype=Object.create(e.prototype),t}var s,a,c,u;return e("Class",r),e("makeDecorator",i),e("makeParamDecorator",o),{setters:[function(e){s=e.global,a=e.isFunction,c=e.stringify}],execute:function(){if(u=s.Reflect,!u||!u.getMetadata)throw"reflect-metadata shim is required when using class decorators"}}}),System.register("angular2/src/reflection/reflector",["angular2/src/facade/lang","angular2/src/facade/collection"],function(e){"use strict";function t(e,t){i.forEach(t,function(t,n){return e.set(n,t)})}var n,r,i,o;return{setters:[function(e){n=e.isPresent},function(e){r=e.Map,i=e.StringMapWrapper}],execute:function(){o=function(){function e(e){this._injectableInfo=new r,this._getters=new r,this._setters=new r,this._methods=new r,this.reflectionCapabilities=e}return $traceurRuntime.createClass(e,{isReflectionEnabled:function(){return this.reflectionCapabilities.isReflectionEnabled()},registerFunction:function(e,t){this._injectableInfo.set(e,t)},registerType:function(e,t){this._injectableInfo.set(e,t)},registerGetters:function(e){t(this._getters,e)},registerSetters:function(e){t(this._setters,e)},registerMethods:function(e){t(this._methods,e)},factory:function(e){return this._containsTypeInfo(e)?this._getTypeInfoField(e,"factory",null):this.reflectionCapabilities.factory(e)},parameters:function(e){return this._injectableInfo.has(e)?this._getTypeInfoField(e,"parameters",[]):this.reflectionCapabilities.parameters(e)},annotations:function(e){return this._injectableInfo.has(e)?this._getTypeInfoField(e,"annotations",[]):this.reflectionCapabilities.annotations(e)},interfaces:function(e){return this._injectableInfo.has(e)?this._getTypeInfoField(e,"interfaces",[]):this.reflectionCapabilities.interfaces(e)},getter:function(e){return this._getters.has(e)?this._getters.get(e):this.reflectionCapabilities.getter(e)},setter:function(e){return this._setters.has(e)?this._setters.get(e):this.reflectionCapabilities.setter(e)},method:function(e){return this._methods.has(e)?this._methods.get(e):this.reflectionCapabilities.method(e)},_getTypeInfoField:function(e,t,r){var i=this._injectableInfo.get(e)[t];return n(i)?i:r},_containsTypeInfo:function(e){return this._injectableInfo.has(e)}},{})}(),e("Reflector",o)}}}),System.register("angular2/src/reflection/reflection_capabilities",["angular2/src/facade/lang","angular2/src/facade/collection"],function(e){"use strict";var t,n,r,i,o,s,a;return{setters:[function(e){t=e.isPresent,n=e.isFunction,r=e.global,i=e.stringify,o=e.BaseException},function(e){s=e.ListWrapper}],execute:function(){a=function(){function e(e){this._reflect=t(e)?e:r.Reflect}return $traceurRuntime.createClass(e,{isReflectionEnabled:function(){return!0},factory:function(e){switch(e.length){case 0:return function(){return new e};case 1:return function(t){return new e(t)};case 2:return function(t,n){return new e(t,n)};case 3:return function(t,n,r){return new e(t,n,r)};case 4:return function(t,n,r,i){return new e(t,n,r,i)};case 5:return function(t,n,r,i,o){return new e(t,n,r,i,o)};case 6:return function(t,n,r,i,o,s){return new e(t,n,r,i,o,s)};case 7:return function(t,n,r,i,o,s,a){return new e(t,n,r,i,o,s,a)};case 8:return function(t,n,r,i,o,s,a,c){return new e(t,n,r,i,o,s,a,c)};case 9:return function(t,n,r,i,o,s,a,c,u){return new e(t,n,r,i,o,s,a,c,u)};case 10:return function(t,n,r,i,o,s,a,c,u,l){return new e(t,n,r,i,o,s,a,c,u,l)};case 11:return function(t,n,r,i,o,s,a,c,u,l,f){return new e(t,n,r,i,o,s,a,c,u,l,f)};case 12:return function(t,n,r,i,o,s,a,c,u,l,f,h){return new e(t,n,r,i,o,s,a,c,u,l,f,h)};case 13:return function(t,n,r,i,o,s,a,c,u,l,f,h,d){return new e(t,n,r,i,o,s,a,c,u,l,f,h,d)};case 14:return function(t,n,r,i,o,s,a,c,u,l,f,h,d,p){return new e(t,n,r,i,o,s,a,c,u,l,f,h,d,p)};case 15:return function(t,n,r,i,o,s,a,c,u,l,f,h,d,p,g){return new e(t,n,r,i,o,s,a,c,u,l,f,h,d,p,g)};case 16:return function(t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m){return new e(t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m)};case 17:return function(t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v){return new e(t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v)};case 18:return function(t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_){return new e(t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_)};case 19:return function(t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y){return new e(t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y)};case 20:return function(t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b){return new e(t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b)}}throw new Error("Cannot create a factory for '"+i(e)+"' because its constructor has more than 20 arguments")},_zipTypesAndAnnotaions:function(e,n){var r;r=s.createFixedSize("undefined"==typeof e?n.length:e.length);for(var i=0;i<r.length;i++)r[i]="undefined"==typeof e?[]:e[i]!=Object?[e[i]]:[],t(n)&&t(n[i])&&(r[i]=r[i].concat(n[i]));return r},parameters:function(e){if(t(e.parameters))return e.parameters;if(t(this._reflect)&&t(this._reflect.getMetadata)){var n=this._reflect.getMetadata("parameters",e),r=this._reflect.getMetadata("design:paramtypes",e);if(t(r)||t(n))return this._zipTypesAndAnnotaions(r,n)}return s.createFixedSize(e.length)},annotations:function(e){if(t(e.annotations)){var r=e.annotations;return n(r)&&r.annotations&&(r=r.annotations),r}if(t(this._reflect)&&t(this._reflect.getMetadata)){var r=this._reflect.getMetadata("annotations",e);if(t(r))return r}return[]},interfaces:function(e){throw new o("JavaScript does not support interfaces")},getter:function(e){return new Function("o","return o."+e+";")},setter:function(e){return new Function("o","v","return o."+e+" = v;")},method:function(e){var t="if (!o."+e+") throw new Error('\""+e+"\" is undefined');\n return o."+e+".apply(o, args);";return new Function("o","args",t)}},{})}(),e("ReflectionCapabilities",a)}}}),System.register("angular2/src/change_detection/parser/locals",["angular2/src/facade/lang","angular2/src/facade/collection"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){t=e.isPresent,n=e.BaseException},function(e){r=e.MapWrapper}],execute:function(){i=function(){function e(e,t){this.parent=e,this.current=t}return $traceurRuntime.createClass(e,{contains:function(e){return this.current.has(e)?!0:t(this.parent)?this.parent.contains(e):!1},get:function(e){if(this.current.has(e))return this.current.get(e);if(t(this.parent))return this.parent.get(e);throw new n("Cannot find '"+e+"'")},set:function(e,t){if(!this.current.has(e))throw new n("Setting of new keys post-construction is not supported. Key: "+e+".");this.current.set(e,t)},clearValues:function(){r.clearValues(this.current)}},{})}(),e("Locals",i)}}}),System.register("angular2/src/change_detection/exceptions",["angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){t=e.BaseException}],execute:function(){n=function(e){function t(e,n){$traceurRuntime.superConstructor(t).call(this,"Expression '"+e.expressionAsString+"' has changed after it was checked. "+("Previous value: '"+n.previousValue+"'. Current value: '"+n.currentValue+"'"))}return $traceurRuntime.createClass(t,{},{},e)}(t),e("ExpressionChangedAfterItHasBeenChecked",n),r=function(e){function t(e,n,r){$traceurRuntime.superConstructor(t).call(this,n+" in ["+e.expressionAsString+"]",n,r),this.location=e.expressionAsString}return $traceurRuntime.createClass(t,{},{},e)}(t),e("ChangeDetectionError",r),i=function(e){function t(){$traceurRuntime.superConstructor(t).call(this,"Attempt to detect changes on a dehydrated detector.")}return $traceurRuntime.createClass(t,{},{},e)}(t),e("DehydratedException",i)}}}),System.register("angular2/src/change_detection/interfaces",["angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o;return{setters:[function(e){r=e.CONST}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},i=$traceurRuntime.createClass(function(){},{createProtoChangeDetector:function(e){return null}},{}),e("ChangeDetection",i),e("ChangeDetection",i=t([r(),n("design:paramtypes",[])],i)),o=function(){function e(e,t,n,r,i){this.id=e,this.strategy=t,this.variableNames=n,this.bindingRecords=r,this.directiveRecords=i}return $traceurRuntime.createClass(e,{},{})}(),e("ChangeDetectorDefinition",o)}}}),System.register("angular2/src/change_detection/constants",[],function(e){"use strict";var t,n,r,i,o,s;return{setters:[],execute:function(){t="CHECK_ONCE",e("CHECK_ONCE",t),n="CHECKED",e("CHECKED",n),r="ALWAYS_CHECK",e("CHECK_ALWAYS",r),i="DETACHED",e("DETACHED",i),o="ON_PUSH",e("ON_PUSH",o),s="DEFAULT",e("DEFAULT",s)}}}),System.register("angular2/src/change_detection/pipes/pipe",["angular2/src/facade/lang"],function(e){"use strict";function t(){throw new i("This method is abstract")}var n,r,i,o,s,a,c,u;return{setters:[function(e){i=e.BaseException,o=e.CONST}],execute:function(){n=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},r=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=function(){function e(e){this.wrapped=e}return $traceurRuntime.createClass(e,{},{wrap:function(e){var t=a[c++%5];return t.wrapped=e,t}})}(),e("WrappedValue",s),a=[new s(null),new s(null),new s(null),new s(null),new s(null)],c=0,u=$traceurRuntime.createClass(function(){},{supports:function(e){return!0},onDestroy:function(){},transform:function(e,n){return t()}},{}),e("BasePipe",u),e("BasePipe",u=n([o(),r("design:paramtypes",[])],u))}}}),System.register("angular2/src/change_detection/change_detector_ref",["angular2/src/change_detection/constants"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.DETACHED,n=e.CHECK_ALWAYS}],execute:function(){r=function(){function e(e){this._cd=e}return $traceurRuntime.createClass(e,{requestCheck:function(){this._cd.markPathToRootAsCheckOnce()},detach:function(){this._cd.mode=t},reattach:function(){this._cd.mode=n,this.requestCheck()}},{})}(),e("ChangeDetectorRef",r)}}}),System.register("angular2/src/change_detection/proto_record",[],function(e){"use strict";var t,n;return{setters:[],execute:function(){e("RecordType",t),function(e){e[e.SELF=0]="SELF",e[e.CONST=1]="CONST",e[e.PRIMITIVE_OP=2]="PRIMITIVE_OP",e[e.PROPERTY=3]="PROPERTY",e[e.LOCAL=4]="LOCAL",e[e.INVOKE_METHOD=5]="INVOKE_METHOD",e[e.INVOKE_CLOSURE=6]="INVOKE_CLOSURE",e[e.KEYED_ACCESS=7]="KEYED_ACCESS",e[e.PIPE=8]="PIPE",e[e.INTERPOLATE=9]="INTERPOLATE",e[e.SAFE_PROPERTY=10]="SAFE_PROPERTY",e[e.SAFE_INVOKE_METHOD=11]="SAFE_INVOKE_METHOD",e[e.DIRECTIVE_LIFECYCLE=12]="DIRECTIVE_LIFECYCLE"}(t||e("RecordType",t={})),n=function(){function e(e,t,n,r,i,o,s,a,c,u,l,f){this.mode=e,this.name=t,this.funcOrValue=n,this.args=r,this.fixedArgs=i,this.contextIndex=o,this.directiveIndex=s,this.selfIndex=a,this.bindingRecord=c,this.expressionAsString=u,this.lastInBinding=l,this.lastInDirective=f}return $traceurRuntime.createClass(e,{isPureFunction:function(){return this.mode===t.INTERPOLATE||this.mode===t.PRIMITIVE_OP},isPipeRecord:function(){return this.mode===t.PIPE},isLifeCycleRecord:function(){return this.mode===t.DIRECTIVE_LIFECYCLE}},{})}(),e("ProtoRecord",n)}}}),System.register("angular2/src/change_detection/directive_record",["angular2/src/change_detection/constants","angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o;return{setters:[function(e){t=e.ON_PUSH},function(e){n=e.StringWrapper,r=e.normalizeBool}],execute:function(){i=function(){function e(e,t){this.elementIndex=e,this.directiveIndex=t}return $traceurRuntime.createClass(e,{get name(){return this.elementIndex+"_"+this.directiveIndex}},{})}(),e("DirectiveIndex",i),o=function(){function e(){var e=void 0!==arguments[0]?arguments[0]:{},t=e.directiveIndex,n=e.callOnAllChangesDone,i=e.callOnChange,o=e.callOnCheck,s=e.callOnInit,a=e.changeDetection;this.directiveIndex=t,this.callOnAllChangesDone=r(n),this.callOnChange=r(i),this.callOnCheck=r(o),this.callOnInit=r(s),this.changeDetection=a}return $traceurRuntime.createClass(e,{isOnPushChangeDetection:function(){return n.equals(this.changeDetection,t)}},{})}(),e("DirectiveRecord",o)}}}),System.register("angular2/src/change_detection/coalesce",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/change_detection/proto_record"],function(e){"use strict";function t(e){for(var t=[],i=new f,s=0;s<e.length;++s){var c=e[s],u=o(c,t.length+1,i),l=r(u,t);a(l)&&u.lastInBinding?(t.push(n(u,l.selfIndex,t.length+1)),i.set(c.selfIndex,l.selfIndex)):a(l)&&!u.lastInBinding?i.set(c.selfIndex,l.selfIndex):(t.push(u),i.set(c.selfIndex,u.selfIndex))}return t}function n(e,t,n){return new d(h.SELF,"self",null,[],e.fixedArgs,t,e.directiveIndex,n,e.bindingRecord,e.expressionAsString,e.lastInBinding,e.lastInDirective)}function r(e,t){return l.find(t,function(t){return t.mode!==h.DIRECTIVE_LIFECYCLE&&i(t,e)&&t.mode===e.mode&&u(t.funcOrValue,e.funcOrValue)&&t.contextIndex===e.contextIndex&&u(t.name,e.name)&&l.equals(t.args,e.args)})}function i(e,t){var n=c(e.directiveIndex)?null:e.directiveIndex.directiveIndex,r=c(e.directiveIndex)?null:e.directiveIndex.elementIndex,i=c(t.directiveIndex)?null:t.directiveIndex.directiveIndex,o=c(t.directiveIndex)?null:t.directiveIndex.elementIndex;return n===i&&r===o}function o(e,t,n){var r=l.map(e.args,function(e){return s(n,e)}),i=s(n,e.contextIndex);return new d(e.mode,e.name,e.funcOrValue,r,e.fixedArgs,i,e.directiveIndex,t,e.bindingRecord,e.expressionAsString,e.lastInBinding,e.lastInDirective)}function s(e,t){var n=e.get(t);return a(n)?n:t}var a,c,u,l,f,h,d;return e("coalesce",t),{setters:[function(e){a=e.isPresent,c=e.isBlank,u=e.looseIdentical},function(e){l=e.ListWrapper,f=e.Map},function(e){h=e.RecordType,d=e.ProtoRecord}],execute:function(){}}}),System.register("angular2/src/change_detection/binding_record",["angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o,s,a,c,u;return{setters:[function(e){t=e.isPresent}],execute:function(){n="directive",r="directiveLifecycle",i="elementProperty",o="elementAttribute",s="elementClass",a="elementStyle",c="textNode",u=function(){function e(e,t,n,r,i,o,s,a,c){this.mode=e,this.implicitReceiver=t,this.ast=n,this.elementIndex=r,this.propertyName=i,this.propertyUnit=o,this.setter=s,this.lifecycleEvent=a,this.directiveRecord=c}return $traceurRuntime.createClass(e,{callOnChange:function(){return t(this.directiveRecord)&&this.directiveRecord.callOnChange},isOnPushChangeDetection:function(){return t(this.directiveRecord)&&this.directiveRecord.isOnPushChangeDetection()},isDirective:function(){return this.mode===n},isDirectiveLifecycle:function(){return this.mode===r},isElementProperty:function(){return this.mode===i},isElementAttribute:function(){return this.mode===o},isElementClass:function(){return this.mode===s},isElementStyle:function(){return this.mode===a},isTextNode:function(){return this.mode===c}},{createForDirective:function(t,r,i,o){return new e(n,0,t,0,r,null,i,null,o)},createDirectiveOnCheck:function(t){return new e(r,0,null,0,null,null,null,"onCheck",t)},createDirectiveOnInit:function(t){return new e(r,0,null,0,null,null,null,"onInit",t)},createDirectiveOnChange:function(t){return new e(r,0,null,0,null,null,null,"onChange",t)},createForElementProperty:function(t,n,r){return new e(i,0,t,n,r,null,null,null,null)},createForElementAttribute:function(t,n,r){return new e(o,0,t,n,r,null,null,null,null)},createForElementClass:function(t,n,r){return new e(s,0,t,n,r,null,null,null,null)},createForElementStyle:function(t,n,r,i){return new e(a,0,t,n,r,i,null,null,null)},createForHostProperty:function(t,n,r){return new e(i,t,n,t.elementIndex,r,null,null,null,null)},createForHostAttribute:function(t,n,r){return new e(o,t,n,t.elementIndex,r,null,null,null,null)},createForHostClass:function(t,n,r){return new e(s,t,n,t.elementIndex,r,null,null,null,null)},createForHostStyle:function(t,n,r,i){return new e(a,t,n,t.elementIndex,r,i,null,null,null)},createForTextNode:function(t,n){return new e(c,0,t,n,null,null,null,null,null)}})}(),e("BindingRecord",u)}}}),System.register("angular2/src/di/forward_ref",["angular2/src/facade/lang"],function(e){"use strict";function t(e){return e.__forward_ref__=t,e.toString=function(){return r(this())},e}function n(e){return i(e)&&e.hasOwnProperty("__forward_ref__")&&e.__forward_ref__===t?e():e}var r,i;return e("forwardRef",t),e("resolveForwardRef",n),{setters:[function(e){r=e.stringify,i=e.isFunction}],execute:function(){}}}),System.register("angular2/src/di/type_literal",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(){}return $traceurRuntime.createClass(e,{get type(){throw new Error("Type literals are only supported in Dart")}},{})}(),e("TypeLiteral",t)}}}),System.register("angular2/src/di/exceptions",["angular2/src/facade/collection","angular2/src/facade/lang"],function(e){"use strict";function t(e){for(var t=[],n=0;n<e.length;++n){if(r.contains(t,e[n]))return t.push(e[n]),t;t.push(e[n])}return t}function n(e){if(e.length>1){var n=t(r.reversed(e)),o=r.map(n,function(e){return i(e.token)});return" ("+o.join(" -> ")+")"}return""}var r,i,o,s,a,c,u,l,f,h,d,p;return{setters:[function(e){r=e.ListWrapper},function(e){i=e.stringify,o=e.BaseException,s=e.isBlank}],execute:function(){a=function(e){function t(e,n,r,i){$traceurRuntime.superConstructor(t).call(this,null,r,i),this.keys=[e],this.constructResolvingMessage=n,this.message=this.constructResolvingMessage(this.keys)}return $traceurRuntime.createClass(t,{addKey:function(e){this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)},toString:function(){return this.message}},{},e)}(o),e("AbstractBindingError",a),c=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this,e,function(e){var t=i(r.first(e).token);return"No provider for "+t+"!"+n(e)})}return $traceurRuntime.createClass(t,{},{},e)}(a),e("NoBindingError",c),u=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this,e,function(e){var t=i(r.first(e).token);return"Cannot instantiate "+t+" synchronously. It is provided as a promise!"+n(e)})}return $traceurRuntime.createClass(t,{},{},e)}(a),e("AsyncBindingError",u),l=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this,e,function(e){return"Cannot instantiate cyclic dependency!"+n(e)})}return $traceurRuntime.createClass(t,{},{},e)}(a),e("CyclicDependencyError",l),f=function(e){function t(e,o,s){$traceurRuntime.superConstructor(t).call(this,s,function(t){var s=i(r.first(t).token);return"Error during instantiation of "+s+"!"+n(t)+". ORIGINAL ERROR: "+e+("\n\n ORIGINAL STACK: "+o)},e,o),this.causeKey=s}return $traceurRuntime.createClass(t,{},{},e)}(a),e("InstantiationError",f),h=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this.message="Invalid binding - only instances of Binding and Type are allowed, got: "+e.toString()}return $traceurRuntime.createClass(t,{toString:function(){return this.message}},{},e)}(o),e("InvalidBindingError",h),d=function(e){function t(e,n){$traceurRuntime.superConstructor(t).call(this);for(var o=[],a=0,c=n.length;c>a;a++){var u=n[a];o.push(s(u)||0==u.length?"?":r.map(u,i).join(" "))}this.message="Cannot resolve all parameters for "+i(e)+"("+o.join(", ")+"). Make sure they all have valid type or annotations."}return $traceurRuntime.createClass(t,{toString:function(){return this.message}},{},e)}(o),e("NoAnnotationError",d),p=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this.message="Index "+e+" is out-of-bounds."}return $traceurRuntime.createClass(t,{toString:function(){return this.message}},{},e)}(o),e("OutOfBoundsError",p)}}}),System.register("angular2/src/di/opaque_token",["angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){r=e.CONST}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},i=$traceurRuntime.createClass(function(e){this._desc="Token("+e+")"},{toString:function(){return this._desc}},{}),e("OpaqueToken",i),e("OpaqueToken",i=t([r(),n("design:paramtypes",[String])],i))}}}),System.register("angular2/src/change_detection/pipes/null_pipe",["angular2/src/facade/lang","angular2/src/change_detection/pipes/pipe"],function(e){"use strict";var t,n,r,i,o,s,a,c;return{setters:[function(e){r=e.isBlank,i=e.CONST},function(e){o=e.BasePipe,s=e.WrappedValue}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},a=$traceurRuntime.createClass(function(){},{supports:function(e){return c.supportsObj(e)},create:function(e){return new c}},{}),e("NullPipeFactory",a),e("NullPipeFactory",a=t([i(),n("design:paramtypes",[])],a)),c=function(e){function t(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];(e=$traceurRuntime.superConstructor(t)).call.apply(e,$traceurRuntime.spread([this],n)),this.called=!1}return $traceurRuntime.createClass(t,{supports:function(e){return t.supportsObj(e)},transform:function(e){return void 0!==arguments[1]?arguments[1]:null,this.called?null:(this.called=!0,s.wrap(null))}},{supportsObj:function(e){return r(e)}},e)}(o),e("NullPipe",c)}}}),System.register("angular2/src/change_detection/change_detection_jit_generator",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/change_detection/abstract_change_detector","angular2/src/change_detection/change_detection_util","angular2/src/change_detection/proto_record"],function(e){"use strict";function t(e){return e.replace(new RegExp("\\W","g"),"")}var n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b;return{setters:[function(e){n=e.BaseException},function(e){r=e.ListWrapper},function(e){i=e.AbstractChangeDetector},function(e){o=e.ChangeDetectionUtil},function(e){s=e.RecordType}],execute:function(){a="AbstractChangeDetector",c="ChangeDetectionUtil",u="this.dispatcher",l="this.pipes",f="this.protos",h="this.directiveRecords",d="this.context",p="isChanged",g="changes",m="this.locals",v="this.mode",_="this.currentProto",y="this.alreadyChecked",b=function(){function e(e,t,n,r){this.id=e,this.changeDetectionStrategy=t,this.records=n,this.directiveRecords=r,this._localNames=this._getLocalNames(n),this._changeNames=this._getChangeNames(this._localNames),this._fieldNames=this._getFieldNames(this._localNames),this._pipeNames=this._getPipeNames(this._localNames)}return $traceurRuntime.createClass(e,{_getLocalNames:function(e){var n=0,r=e.map(function(e){return t(""+e.name+n++)});return["context"].concat(r)},_getChangeNames:function(e){return e.map(function(e){return"change_"+e})},_getFieldNames:function(e){return e.map(function(e){return"this."+e})},_getPipeNames:function(e){return e.map(function(e){return"this."+e+"_pipe"})},generate:function(){var e=this,n=t("ChangeDetector_"+this.id),r="\n var "+n+" = function "+n+"(dispatcher, protos, directiveRecords) {\n "+a+".call(this, "+JSON.stringify(this.id)+");\n "+u+" = dispatcher;\n "+f+" = protos;\n "+h+" = directiveRecords;\n "+m+" = null;\n "+_+" = null;\n "+l+" = null;\n "+y+" = false;\n "+this._genFieldDefinitions()+"\n }\n\n "+n+".prototype = Object.create("+a+".prototype);\n\n "+n+".prototype.detectChangesInRecords = function(throwOnChange) {\n if (!this.hydrated()) {\n "+c+".throwDehydrated();\n }\n try {\n this.__detectChangesInRecords(throwOnChange);\n } catch (e) {\n this.throwError("+_+", e, e.stack);\n }\n }\n\n "+n+".prototype.__detectChangesInRecords = function(throwOnChange) {\n "+_+" = null;\n\n "+this._genLocalDefinitions()+"\n "+this._genChangeDefinitions()+"\n var "+p+" = false;\n var "+g+" = null;\n\n context = "+d+";\n\n "+this.records.map(function(t){return e._genRecord(t)}).join("\n")+"\n\n "+y+" = true;\n }\n\n "+n+".prototype.callOnAllChangesDone = function() {\n "+this._genCallOnAllChangesDoneBody()+"\n }\n\n "+n+".prototype.hydrate = function(context, locals, directives, pipes) {\n "+v+' = "'+o.changeDetectionMode(this.changeDetectionStrategy)+'";\n '+d+" = context;\n "+m+" = locals;\n "+this._genHydrateDirectives()+"\n "+this._genHydrateDetectors()+"\n "+l+" = pipes;\n "+y+" = false;\n }\n\n "+n+".prototype.dehydrate = function() {\n "+this._genPipeOnDestroy()+"\n "+this._genFieldDefinitions()+"\n "+m+" = null;\n "+l+" = null;\n }\n\n "+n+".prototype.hydrated = function() {\n return "+d+" !== null;\n }\n\n return function(dispatcher) {\n return new "+n+"(dispatcher, protos, directiveRecords);\n }\n ";return new Function("AbstractChangeDetector","ChangeDetectionUtil","protos","directiveRecords",r)(i,o,this.records,this.directiveRecords)},_genGetDirectiveFieldNames:function(){var e=this;return this.directiveRecords.map(function(t){return e._genGetDirective(t.directiveIndex)})},_genGetDetectorFieldNames:function(){var e=this;return this.directiveRecords.filter(function(e){return e.isOnPushChangeDetection()}).map(function(t){return e._genGetDetector(t.directiveIndex)})},_genGetDirective:function(e){return"this.directive_"+e.name},_genGetDetector:function(e){return"this.detector_"+e.name},_getNonNullPipeNames:function(){var e=this,t=[];return this.records.forEach(function(n){n.isPipeRecord()&&t.push(e._pipeNames[n.selfIndex])}),t},_genFieldDefinitions:function(){var e=[];return e=e.concat(this._fieldNames),e=e.concat(this._getNonNullPipeNames()),e=e.concat(this._genGetDirectiveFieldNames()),e=e.concat(this._genGetDetectorFieldNames()),e.map(function(e){return e==d?e+" = null;":e+" = "+c+".uninitialized();"}).join("\n")},_genHydrateDirectives:function(){for(var e=this._genGetDirectiveFieldNames(),t=r.createFixedSize(e.length),n=0,i=e.length;i>n;++n)t[n]=e[n]+" = directives.getDirectiveFor("+h+"["+n+"].directiveIndex);";return t.join("\n")},_genHydrateDetectors:function(){for(var e=this._genGetDetectorFieldNames(),t=r.createFixedSize(e.length),n=0,i=e.length;i>n;++n)t[n]=e[n]+" =\n directives.getDetectorFor("+h+"["+n+"].directiveIndex);";return t.join("\n")},_genPipeOnDestroy:function(){return this._getNonNullPipeNames().map(function(e){return e+".onDestroy();"}).join("\n")},_genCallOnAllChangesDoneBody:function(){for(var e=[],t=this.directiveRecords,n=t.length-1;n>=0;--n){var r=t[n];r.callOnAllChangesDone&&e.push(this._genGetDirective(r.directiveIndex)+".onAllChangesDone();")}var i=e.join("\n");return"\n this.dispatcher.notifyOnAllChangesDone();\n "+i+"\n "},_genLocalDefinitions:function(){return this._localNames.map(function(e){return"var "+e+";"}).join("\n")},_genChangeDefinitions:function(){
7
- return this._changeNames.map(function(e){return"var "+e+" = false;"}).join("\n")},_genRecord:function(e){var t;return t=e.isLifeCycleRecord()?this._genDirectiveLifecycle(e):e.isPipeRecord()?this._genPipeCheck(e):this._genReferenceCheck(e),""+t+this._maybeGenLastInDirective(e)},_genDirectiveLifecycle:function(e){if("onCheck"===e.name)return this._genOnCheck(e);if("onInit"===e.name)return this._genOnInit(e);if("onChange"===e.name)return this._genOnChange(e);throw new n("Unknown lifecycle event '"+e.name+"'")},_genPipeCheck:function(e){var t=this,n=this._localNames[e.contextIndex],r=e.args.map(function(e){return t._localNames[e]}).join(", "),i=this._fieldNames[e.selfIndex],o=this._localNames[e.selfIndex],s=this._changeNames[e.selfIndex],a=this._pipeNames[e.selfIndex],u="this.ref",h=e.selfIndex-1,d=e.name;return"\n "+_+" = "+f+"["+h+"];\n if ("+a+" === "+c+".uninitialized()) {\n "+a+" = "+l+".get('"+d+"', "+n+", "+u+");\n } else if (!"+a+".supports("+n+")) {\n "+a+".onDestroy();\n "+a+" = "+l+".get('"+d+"', "+n+", "+u+");\n }\n\n "+o+" = "+a+".transform("+n+", ["+r+"]);\n if ("+i+" !== "+o+") {\n "+o+" = "+c+".unwrapValue("+o+");\n "+s+" = true;\n "+this._genUpdateDirectiveOrElement(e)+"\n "+this._genAddToChanges(e)+"\n "+i+" = "+o+";\n }\n "},_genReferenceCheck:function(e){var t=this,n=this._fieldNames[e.selfIndex],r=this._localNames[e.selfIndex],i=e.selfIndex-1,o="\n "+_+" = "+f+"["+i+"];\n "+this._genUpdateCurrentValue(e)+"\n if ("+r+" !== "+n+") {\n "+this._changeNames[e.selfIndex]+" = true;\n "+this._genUpdateDirectiveOrElement(e)+"\n "+this._genAddToChanges(e)+"\n "+n+" = "+r+";\n }\n ";if(e.isPureFunction()){var s=e.args.map(function(e){return t._changeNames[e]}).join(" || ");return"if ("+s+") { "+o+" } else { "+r+" = "+n+"; }"}return o},_genUpdateCurrentValue:function(e){var t,r=this,i=-1==e.contextIndex?this._genGetDirective(e.directiveIndex):this._localNames[e.contextIndex],o=this._localNames[e.selfIndex],a=e.args.map(function(e){return r._localNames[e]}).join(", ");switch(e.mode){case s.SELF:t=i;break;case s.CONST:t=JSON.stringify(e.funcOrValue);break;case s.PROPERTY:t=i+"."+e.name;break;case s.SAFE_PROPERTY:t=c+".isValueBlank("+i+") ? null : "+i+"."+e.name;break;case s.LOCAL:t=m+".get('"+e.name+"')";break;case s.INVOKE_METHOD:t=i+"."+e.name+"("+a+")";break;case s.SAFE_INVOKE_METHOD:t=c+".isValueBlank("+i+") ? null : "+i+"."+e.name+"("+a+")";break;case s.INVOKE_CLOSURE:t=i+"("+a+")";break;case s.PRIMITIVE_OP:t=c+"."+e.name+"("+a+")";break;case s.INTERPOLATE:t=this._genInterpolation(e);break;case s.KEYED_ACCESS:t=i+"["+this._localNames[e.args[0]]+"]";break;default:throw new n("Unknown operation "+e.mode)}return o+" = "+t},_genInterpolation:function(e){for(var t="",n=0;n<e.args.length;++n)t+=JSON.stringify(e.fixedArgs[n]),t+=" + ",t+=this._localNames[e.args[n]],t+=" + ";return t+=JSON.stringify(e.fixedArgs[e.args.length])},_genUpdateDirectiveOrElement:function(e){if(!e.lastInBinding)return"";var t=this._localNames[e.selfIndex],n=this._fieldNames[e.selfIndex],r=e.bindingRecord;if(r.isDirective()){var i=this._genGetDirective(r.directiveRecord.directiveIndex)+"."+r.propertyName;return"\n "+this._genThrowOnChangeCheck(n,t)+"\n "+i+" = "+t+";\n "+p+" = true;\n "}return"\n "+this._genThrowOnChangeCheck(n,t)+"\n "+u+".notifyOnBinding("+_+".bindingRecord, "+t+");\n "},_genThrowOnChangeCheck:function(e,t){return"\n if(throwOnChange) {\n "+c+".throwOnChange("+_+", "+c+".simpleChange("+e+", "+t+"));\n }\n "},_genAddToChanges:function(e){var t=this._localNames[e.selfIndex],n=this._fieldNames[e.selfIndex];return e.bindingRecord.callOnChange()?"\n "+g+" = "+c+".addChange(\n "+g+", "+_+".bindingRecord.propertyName,\n "+c+".simpleChange("+n+", "+t+"));\n ":""},_maybeGenLastInDirective:function(e){return e.lastInDirective?"\n "+g+" = null;\n "+this._genNotifyOnPushDetectors(e)+"\n "+p+" = false;\n ":""},_genOnCheck:function(e){var t=e.bindingRecord;return"if (!throwOnChange) "+this._genGetDirective(t.directiveRecord.directiveIndex)+".onCheck();"},_genOnInit:function(e){var t=e.bindingRecord;return"if (!throwOnChange && !"+y+") "+this._genGetDirective(t.directiveRecord.directiveIndex)+".onInit();"},_genOnChange:function(e){var t=e.bindingRecord;return"if (!throwOnChange && "+g+") "+this._genGetDirective(t.directiveRecord.directiveIndex)+".onChange("+g+");"},_genNotifyOnPushDetectors:function(e){var t=e.bindingRecord;if(!e.lastInDirective||!t.isOnPushChangeDetection())return"";var n="\n if("+p+") {\n "+this._genGetDetector(t.directiveRecord.directiveIndex)+".markAsCheckOnce();\n }\n ";return n}},{})}(),e("ChangeDetectorJITGenerator",b)}}}),System.register("angular2/src/change_detection/pregen_proto_change_detector",["angular2/src/facade/lang"],function(e){"use strict";var t,n;return{setters:[function(e){t=e.BaseException}],execute:function(){e("PregenProtoChangeDetectorFactory",Function),n=function(){function e(){}return $traceurRuntime.createClass(e,{instantiate:function(e){throw new t("Pregen change detection not supported in Js")}},{isSupported:function(){return!1}})}(),e("PregenProtoChangeDetector",n)}}}),System.register("angular2/src/change_detection/pipes/iterable_changes",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/change_detection/pipes/pipe"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y;return{setters:[function(e){r=e.CONST,a=e.isBlank,c=e.isPresent,u=e.stringify,l=e.getMapKey,f=e.looseIdentical,h=e.isArray},function(e){i=e.isListLikeIterable,o=e.iterateListLike,s=e.MapWrapper},function(e){d=e.WrappedValue,p=e.BasePipe}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},g=$traceurRuntime.createClass(function(){},{supports:function(e){return m.supportsObj(e)},create:function(e){return new m}},{}),e("IterableChangesFactory",g),e("IterableChangesFactory",g=t([r(),n("design:paramtypes",[])],g)),m=function(e){function t(){$traceurRuntime.superConstructor(t).call(this),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 $traceurRuntime.createClass(t,{supports:function(e){return t.supportsObj(e)},get collection(){return this._collection},get length(){return this._length},forEachItem:function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)},forEachPreviousItem:function(e){var t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)},forEachAddedItem:function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},forEachMovedItem:function(e){var t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)},forEachRemovedItem:function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},transform:function(e){return void 0!==arguments[1]?arguments[1]:null,this.check(e)?d.wrap(this):null},check:function(e){var t=this;this._reset();var n,r,i=this._itHead,s=!1;if(h(e)){var a=e;for(this._length=e.length,n=0;n<this._length;n++)r=a[n],null!==i&&f(i.item,r)?s&&(i=this._verifyReinsertion(i,r,n)):(i=this._mismatch(i,r,n),s=!0),i=i._next}else n=0,o(e,function(e){null!==i&&f(i.item,e)?s&&(i=t._verifyReinsertion(i,e,n)):(i=t._mismatch(i,e,n),s=!0),i=i._next,n++}),this._length=n;return this._truncate(i),this._collection=e,this.isDirty},get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead},_reset:function(){if(this.isDirty){var e,t;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=t)e.previousIndex=e.currentIndex,t=e._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null}},_mismatch:function(e,t,n){var r;return null===e?r=this._itTail:(r=e._prev,this._remove(e)),e=null===this._linkedRecords?null:this._linkedRecords.get(t,n),null!==e?this._moveAfter(e,r,n):(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(t),null!==e?this._reinsertAfter(e,r,n):e=this._addAfter(new v(t),r,n)),e},_verifyReinsertion:function(e,t,n){var r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(t);return null!==r?e=this._reinsertAfter(r,e._prev,n):e.currentIndex!=n&&(e.currentIndex=n,this._addToMoves(e,n)),e},_truncate:function(e){for(;null!==e;){var t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null)},_reinsertAfter:function(e,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);var r=e._prevRemoved,i=e._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removalsTail=r:i._prevRemoved=r,this._insertAfter(e,t,n),this._addToMoves(e,n),e},_moveAfter:function(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e},_addAfter:function(e,t,n){return this._insertAfter(e,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e},_insertAfter:function(e,t,n){var r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new y),this._linkedRecords.put(e),e.currentIndex=n,e},_remove:function(e){return this._addToRemovals(this._unlink(e))},_unlink:function(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);var t=e._prev,n=e._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,e},_addToMoves:function(e,t){return e.previousIndex===t?e:(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e,e)},_addToRemovals:function(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new y),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e},toString:function(){var e,t=[];for(e=this._itHead;null!==e;e=e._next)t.push(e);var n=[];for(e=this._previousItHead;null!==e;e=e._nextPrevious)n.push(e);var r=[];for(e=this._additionsHead;null!==e;e=e._nextAdded)r.push(e);var i=[];for(e=this._movesHead;null!==e;e=e._nextMoved)i.push(e);var o=[];for(e=this._removalsHead;null!==e;e=e._nextRemoved)o.push(e);return"collection: "+t.join(", ")+"\nprevious: "+n.join(", ")+"\nadditions: "+r.join(", ")+"\nmoves: "+i.join(", ")+"\nremovals: "+o.join(", ")+"\n"}},{supportsObj:function(e){return i(e)}},e)}(p),e("IterableChanges",m),v=function(){function e(e){this.item=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null}return $traceurRuntime.createClass(e,{toString:function(){return this.previousIndex===this.currentIndex?u(this.item):u(this.item)+"["+u(this.previousIndex)+"->"+u(this.currentIndex)+"]"}},{})}(),e("CollectionChangeRecord",v),_=function(){function e(){this._head=null,this._tail=null}return $traceurRuntime.createClass(e,{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)},get:function(e,t){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<n.currentIndex)&&f(n.item,e))return n;return null},remove:function(e){var t=e._prevDup,n=e._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head}},{})}(),y=function(){function e(){this.map=new Map}return $traceurRuntime.createClass(e,{put:function(e){var t=l(e.item),n=this.map.get(t);c(n)||(n=new _,this.map.set(t,n)),n.add(e)},get:function(e){var t=void 0!==arguments[1]?arguments[1]:null,n=l(e),r=this.map.get(n);return a(r)?null:r.get(e,t)},remove:function(e){var t=l(e.item),n=this.map.get(t);return n.remove(e)&&s["delete"](this.map,t),e},get isEmpty(){return 0===s.size(this.map)},clear:function(){this.map.clear()},toString:function(){return"_DuplicateMap("+u(this.map)+")"}},{})}()}}}),System.register("angular2/src/change_detection/pipes/keyvalue_changes",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/change_detection/pipes/pipe"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d;return{setters:[function(e){r=e.MapWrapper,i=e.StringMapWrapper},function(e){o=e.stringify,s=e.looseIdentical,a=e.isJsObject,c=e.CONST},function(e){u=e.WrappedValue,l=e.BasePipe}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},f=$traceurRuntime.createClass(function(){},{supports:function(e){return h.supportsObj(e)},create:function(e){return new h}},{}),e("KeyValueChangesFactory",f),e("KeyValueChangesFactory",f=t([c(),n("design:paramtypes",[])],f)),h=function(e){function t(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];(e=$traceurRuntime.superConstructor(t)).call.apply(e,$traceurRuntime.spread([this],n)),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 $traceurRuntime.createClass(t,{supports:function(e){return t.supportsObj(e)},transform:function(e){return void 0!==arguments[1]?arguments[1]:null,this.check(e)?u.wrap(this):null},get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},forEachItem:function(e){var t;for(t=this._mapHead;null!==t;t=t._next)e(t)},forEachPreviousItem:function(e){var t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)},forEachChangedItem:function(e){var t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)},forEachAddedItem:function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},forEachRemovedItem:function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},check:function(e){var t=this;this._reset();var n=this._records,r=this._mapHead,i=null,o=null,a=!1;return this._forEach(e,function(e,c){var u;null!==r&&c===r.key?(u=r,s(e,r.currentValue)||(r.previousValue=r.currentValue,r.currentValue=e,t._addToChanges(r))):(a=!0,null!==r&&(r._next=null,t._removeFromSeq(i,r),t._addToRemovals(r)),n.has(c)?u=n.get(c):(u=new d(c),n.set(c,u),u.currentValue=e,t._addToAdditions(u))),a&&(t._isInRemovals(u)&&t._removeFromRemovals(u),null==o?t._mapHead=u:o._next=u),i=r,o=u,r=null===r?null:r._next}),this._truncate(i,r),this.isDirty},_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}},_truncate:function(e,t){for(;null!==t;){null===e?this._mapHead=null:e._next=null;var n=t._next;this._addToRemovals(t),e=t,t=n}for(var i=this._removalsHead;null!==i;i=i._nextRemoved)i.previousValue=i.currentValue,i.currentValue=null,r["delete"](this._records,i.key)},_isInRemovals:function(e){return e===this._removalsHead||null!==e._nextRemoved||null!==e._prevRemoved},_addToRemovals:function(e){null===this._removalsHead?this._removalsHead=this._removalsTail=e:(this._removalsTail._nextRemoved=e,e._prevRemoved=this._removalsTail,this._removalsTail=e)},_removeFromSeq:function(e,t){var n=t._next;null===e?this._mapHead=n:e._next=n},_removeFromRemovals:function(e){var t=e._prevRemoved,n=e._nextRemoved;null===t?this._removalsHead=n:t._nextRemoved=n,null===n?this._removalsTail=t:n._prevRemoved=t,e._prevRemoved=e._nextRemoved=null},_addToAdditions:function(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)},_addToChanges:function(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)},toString:function(){var e,t=[],n=[],r=[],i=[],s=[];for(e=this._mapHead;null!==e;e=e._next)t.push(o(e));for(e=this._previousMapHead;null!==e;e=e._nextPrevious)n.push(o(e));for(e=this._changesHead;null!==e;e=e._nextChanged)r.push(o(e));for(e=this._additionsHead;null!==e;e=e._nextAdded)i.push(o(e));for(e=this._removalsHead;null!==e;e=e._nextRemoved)s.push(o(e));return"map: "+t.join(", ")+"\nprevious: "+n.join(", ")+"\nadditions: "+i.join(", ")+"\nchanges: "+r.join(", ")+"\nremovals: "+s.join(", ")+"\n"},_forEach:function(e,t){e instanceof Map?r.forEach(e,t):i.forEach(e,t)}},{supportsObj:function(e){return e instanceof Map||a(e)}},e)}(l),e("KeyValueChanges",h),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 $traceurRuntime.createClass(e,{toString:function(){return s(this.previousValue,this.currentValue)?o(this.key):o(this.key)+"["+o(this.previousValue)+"->"+o(this.currentValue)+"]"}},{})}(),e("KVChangeRecord",d)}}}),System.register("angular2/src/change_detection/pipes/promise_pipe",["angular2/src/facade/lang","angular2/src/change_detection/pipes/pipe"],function(e){"use strict";var t,n,r,i,o,s,a,c,u;return{setters:[function(e){r=e.isBlank,i=e.isPresent,o=e.isPromise,s=e.CONST},function(e){a=e.WrappedValue}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=function(){function e(e){this._ref=e,this._latestValue=null,this._latestReturnedValue=null}return $traceurRuntime.createClass(e,{supports:function(e){return o(e)},onDestroy:function(){i(this._sourcePromise)&&(this._latestValue=null,this._latestReturnedValue=null,this._sourcePromise=null)},transform:function(e){var t=(void 0!==arguments[1]?arguments[1]:null,this);return r(this._sourcePromise)?(this._sourcePromise=e,e.then(function(n){t._sourcePromise===e&&t._updateLatestValue(n)}),null):e!==this._sourcePromise?(this._sourcePromise=null,this.transform(e)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,a.wrap(this._latestValue))},_updateLatestValue:function(e){this._latestValue=e,this._ref.requestCheck()}},{})}(),e("PromisePipe",c),u=$traceurRuntime.createClass(function(){},{supports:function(e){return o(e)},create:function(e){return new c(e)}},{}),e("PromisePipeFactory",u),e("PromisePipeFactory",u=t([s(),n("design:paramtypes",[])],u))}}}),System.register("angular2/src/change_detection/pipes/uppercase_pipe",["angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o,s,a;return{setters:[function(e){r=e.isString,i=e.StringWrapper,o=e.CONST}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=function(){function e(){this._latestValue=null}return $traceurRuntime.createClass(e,{supports:function(e){return r(e)},onDestroy:function(){this._latestValue=null},transform:function(e){return void 0!==arguments[1]?arguments[1]:null,this._latestValue!==e?(this._latestValue=e,i.toUpperCase(e)):this._latestValue}},{})}(),e("UpperCasePipe",s),a=$traceurRuntime.createClass(function(){},{supports:function(e){return r(e)},create:function(e){return new s}},{}),e("UpperCaseFactory",a),e("UpperCaseFactory",a=t([o(),n("design:paramtypes",[])],a))}}}),System.register("angular2/src/change_detection/pipes/lowercase_pipe",["angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o,s,a;return{setters:[function(e){r=e.isString,i=e.StringWrapper,o=e.CONST}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=function(){function e(){this._latestValue=null}return $traceurRuntime.createClass(e,{supports:function(e){return r(e)},onDestroy:function(){this._latestValue=null},transform:function(e){return void 0!==arguments[1]?arguments[1]:null,this._latestValue!==e?(this._latestValue=e,i.toLowerCase(e)):this._latestValue}},{})}(),e("LowerCasePipe",s),a=$traceurRuntime.createClass(function(){},{supports:function(e){return r(e)},create:function(e){return new s}},{}),e("LowerCaseFactory",a),e("LowerCaseFactory",a=t([o(),n("design:paramtypes",[])],a))}}}),System.register("angular2/src/change_detection/pipes/json_pipe",["angular2/src/facade/lang","angular2/src/change_detection/pipes/pipe"],function(e){"use strict";var t,n,r,i,o,s;return{setters:[function(e){r=e.Json,i=e.CONST},function(e){o=e.BasePipe}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{transform:function(e){return void 0!==arguments[1]?arguments[1]:null,r.stringify(e)},create:function(e){return this}},{},e)}(o),e("JsonPipe",s),e("JsonPipe",s=t([i(),n("design:paramtypes",[])],s))}}}),System.register("angular2/src/facade/math",["angular2/src/facade/lang"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.global}],execute:function(){n=t.Math,e("Math",n),r=typeof r,e("NaN",r)}}}),System.register("angular2/src/facade/intl",[],function(e){"use strict";function t(e){return 2==e?"2-digit":"numeric"}function n(e){return 4>e?"short":"long"}function r(e){for(var r,i={},o=0;o<e.length;){for(r=o;r<e.length&&e[r]==e[o];)r++;var s=r-o;switch(e[o]){case"G":i.era=n(s);break;case"y":i.year=t(s);break;case"M":i.month=s>=3?n(s):t(s);break;case"d":i.day=t(s);break;case"E":i.weekday=n(s);break;case"j":i.hour=t(s);break;case"h":i.hour=t(s),i.hour12=!0;break;case"H":i.hour=t(s),i.hour12=!1;break;case"m":i.minute=t(s);break;case"s":i.second=t(s);break;case"z":i.timeZoneName="long";break;case"Z":i.timeZoneName="short"}o=r}return i}var i,o,s,a;return{setters:[],execute:function(){e("NumberFormatStyle",i),function(e){e[e.DECIMAL=0]="DECIMAL",e[e.PERCENT=1]="PERCENT",e[e.CURRENCY=2]="CURRENCY"}(i||e("NumberFormatStyle",i={})),o=function(){function e(){}return $traceurRuntime.createClass(e,{},{format:function(e,t,n){var r,o,s,a,c=void 0!==arguments[3]?arguments[3]:{},u=void 0===(r=c.minimumIntegerDigits)?1:r,l=void 0===(o=c.minimumFractionDigits)?0:o,f=void 0===(s=c.maximumFractionDigits)?3:s,h=c.currency,d=void 0===(a=c.currencyAsSymbol)?!1:a,p={minimumIntegerDigits:u,minimumFractionDigits:l,maximumFractionDigits:f};return p.style=i[n].toLowerCase(),n==i.CURRENCY&&(p.currency=h,p.currencyDisplay=d?"symbol":"code"),new Intl.NumberFormat(t,p).format(e)}})}(),e("NumberFormatter",o),s=new Map,a=function(){function e(){}return $traceurRuntime.createClass(e,{},{format:function(e,t,n){var i=t+n;if(s.has(i))return s.get(i).format(e);var o=new Intl.DateTimeFormat(t,r(n));return s.set(i,o),o.format(e)}})}(),e("DateFormatter",a)}}}),System.register("angular2/src/change_detection/pipes/number_pipe",["angular2/src/facade/lang","angular2/src/facade/intl","angular2/src/facade/collection","angular2/src/change_detection/pipes/pipe"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y;return{setters:[function(e){r=e.isNumber,i=e.isPresent,o=e.isBlank,s=e.NumberWrapper,a=e.RegExpWrapper,c=e.BaseException,u=e.CONST},function(e){l=e.NumberFormatter,f=e.NumberFormatStyle},function(e){h=e.ListWrapper},function(e){d=e.BasePipe}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},p="en-US",g=a.create("^(\\d+)?\\.((\\d+)(\\-(\\d+))?)?$"),m=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{supports:function(e){return r(e)},create:function(e){return this}},{_format:function(e,t,n){var r=void 0!==arguments[3]?arguments[3]:null,u=void 0!==arguments[4]?arguments[4]:!1,f=1,h=0,d=3;if(i(n)){var m=a.firstMatch(g,n);if(o(m))throw new c(n+" is not a valid digit info for number pipes");i(m[1])&&(f=s.parseIntAutoRadix(m[1])),i(m[3])&&(h=s.parseIntAutoRadix(m[3])),i(m[5])&&(d=s.parseIntAutoRadix(m[5]))}return l.format(e,p,t,{minimumIntegerDigits:f,minimumFractionDigits:h,maximumFractionDigits:d,currency:r,currencyAsSymbol:u})}},e)}(d),e("NumberPipe",m),e("NumberPipe",m=t([u(),n("design:paramtypes",[])],m)),v=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{transform:function(e,t){var n=h.first(t);return m._format(e,f.DECIMAL,n)}},{},e)}(m),e("DecimalPipe",v),e("DecimalPipe",v=t([u(),n("design:paramtypes",[])],v)),_=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{transform:function(e,t){var n=h.first(t);return m._format(e,f.PERCENT,n)}},{},e)}(m),e("PercentPipe",_),e("PercentPipe",_=t([u(),n("design:paramtypes",[])],_)),y=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{transform:function(e,t){var n=i(t)&&t.length>0?t[0]:"USD",r=i(t)&&t.length>1?t[1]:!1,o=i(t)&&t.length>2?t[2]:null;return m._format(e,f.CURRENCY,o,n,r)}},{},e)}(m),e("CurrencyPipe",y),e("CurrencyPipe",y=t([u(),n("design:paramtypes",[])],y))}}}),System.register("angular2/src/core/annotations_impl/view",["angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){r=e.CONST}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},i=$traceurRuntime.createClass(function(){var e=void 0!==arguments[0]?arguments[0]:{},t=e.templateUrl,n=e.template,r=e.directives,i=e.renderer,o=e.styles,s=e.styleUrls;this.templateUrl=t,this.template=n,this.styleUrls=s,this.styles=o,this.directives=r,this.renderer=i},{},{}),e("View",i),e("View",i=t([r(),n("design:paramtypes",[Object])],i))}}}),System.register("angular2/src/core/annotations_impl/di",["angular2/src/facade/lang","angular2/src/di/metadata","angular2/di"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f;return{setters:[function(e){r=e.CONST,i=e.stringify,o=e.StringWrapper,s=e.isString},function(e){a=e.DependencyMetadata},function(e){c=e.resolveForwardRef}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},u=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this.attributeName=e}return $traceurRuntime.createClass(t,{get token(){return this},toString:function(){return"@Attribute("+i(this.attributeName)+")"}},{},e)}(a),e("Attribute",u),e("Attribute",u=t([r(),n("design:paramtypes",[String])],u)),l=function(e){function t(e){var n,r=void 0!==arguments[1]?arguments[1]:{},i=void 0===(n=r.descendants)?!1:n;$traceurRuntime.superConstructor(t).call(this),this._selector=e,this.descendants=i}return $traceurRuntime.createClass(t,{get isViewQuery(){return!1},get selector(){return c(this._selector)},get isVarBindingQuery(){return s(this.selector)},get varBindings(){return o.split(this.selector,new RegExp(","))},toString:function(){return"@Query("+i(this.selector)+")"}},{},e)}(a),e("Query",l),e("Query",l=t([r(),n("design:paramtypes",[Object,Object])],l)),f=function(e){function t(e){var n,r=void 0!==arguments[1]?arguments[1]:{},i=void 0===(n=r.descendants)?!1:n;$traceurRuntime.superConstructor(t).call(this,e,{descendants:i})}return $traceurRuntime.createClass(t,{get isViewQuery(){return!0},toString:function(){return"@ViewQuery("+i(this.selector)+")";
8
-
9
- }},{},e)}(l),e("ViewQuery",f),e("ViewQuery",f=t([r(),n("design:paramtypes",[Object,Object])],f))}}}),System.register("angular2/src/core/annotations/decorators",["angular2/src/core/annotations/annotations","angular2/src/core/annotations/view","angular2/src/core/annotations/di","angular2/src/util/decorators"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p;return{setters:[function(e){t=e.ComponentAnnotation,n=e.DirectiveAnnotation},function(e){r=e.ViewAnnotation},function(e){i=e.AttributeAnnotation,o=e.QueryAnnotation,s=e.ViewQueryAnnotation},function(e){a=e.makeDecorator,c=e.makeParamDecorator}],execute:function(){u=a(t,function(e){return e.View=f}),e("Component",u),l=a(n),e("Directive",l),f=a(r,function(e){return e.View=f}),e("View",f),h=c(i),e("Attribute",h),d=c(o),e("Query",d),p=c(s),e("ViewQuery",p)}}}),System.register("angular2/src/dom/dom_adapter",["angular2/src/facade/lang"],function(e){"use strict";function t(t){i(o)&&e("DOM",o=t)}function n(){return new r("This method is abstract")}var r,i,o,s;return e("setRootDomAdapter",t),{setters:[function(e){r=e.BaseException,i=e.isBlank}],execute:function(){e("DOM",o),s=function(){function e(){}return $traceurRuntime.createClass(e,{hasProperty:function(e,t){throw n()},setProperty:function(e,t,r){throw n()},getProperty:function(e,t){throw n()},invoke:function(e,t,r){throw n()},logError:function(e){throw n()},get attrToPropMap(){throw n()},parse:function(e){throw n()},query:function(e){throw n()},querySelector:function(e,t){throw n()},querySelectorAll:function(e,t){throw n()},on:function(e,t,r){throw n()},onAndCancel:function(e,t,r){throw n()},dispatchEvent:function(e,t){throw n()},createMouseEvent:function(e){throw n()},createEvent:function(e){throw n()},preventDefault:function(e){throw n()},getInnerHTML:function(e){throw n()},getOuterHTML:function(e){throw n()},nodeName:function(e){throw n()},nodeValue:function(e){throw n()},type:function(e){throw n()},content:function(e){throw n()},firstChild:function(e){throw n()},nextSibling:function(e){throw n()},parentElement:function(e){throw n()},childNodes:function(e){throw n()},childNodesAsList:function(e){throw n()},clearNodes:function(e){throw n()},appendChild:function(e,t){throw n()},removeChild:function(e,t){throw n()},replaceChild:function(e,t,r){throw n()},remove:function(e){throw n()},insertBefore:function(e,t){throw n()},insertAllBefore:function(e,t){throw n()},insertAfter:function(e,t){throw n()},setInnerHTML:function(e,t){throw n()},getText:function(e){throw n()},setText:function(e,t){throw n()},getValue:function(e){throw n()},setValue:function(e,t){throw n()},getChecked:function(e){throw n()},setChecked:function(e,t){throw n()},createTemplate:function(e){throw n()},createElement:function(e){throw void 0!==arguments[1]?arguments[1]:null,n()},createTextNode:function(e){throw void 0!==arguments[1]?arguments[1]:null,n()},createScriptTag:function(e,t){throw void 0!==arguments[2]?arguments[2]:null,n()},createStyleElement:function(e){throw void 0!==arguments[1]?arguments[1]:null,n()},createShadowRoot:function(e){throw n()},getShadowRoot:function(e){throw n()},getHost:function(e){throw n()},getDistributedNodes:function(e){throw n()},clone:function(e){throw n()},getElementsByClassName:function(e,t){throw n()},getElementsByTagName:function(e,t){throw n()},classList:function(e){throw n()},addClass:function(e,t){throw n()},removeClass:function(e,t){throw n()},hasClass:function(e,t){throw n()},setStyle:function(e,t,r){throw n()},removeStyle:function(e,t){throw n()},getStyle:function(e,t){throw n()},tagName:function(e){throw n()},attributeMap:function(e){throw n()},hasAttribute:function(e,t){throw n()},getAttribute:function(e,t){throw n()},setAttribute:function(e,t,r){throw n()},removeAttribute:function(e,t){throw n()},templateAwareRoot:function(e){throw n()},createHtmlDocument:function(){throw n()},defaultDoc:function(){throw n()},getBoundingClientRect:function(e){throw n()},getTitle:function(){throw n()},setTitle:function(e){throw n()},elementMatches:function(e,t){throw n()},isTemplateElement:function(e){throw n()},isTextNode:function(e){throw n()},isCommentNode:function(e){throw n()},isElementNode:function(e){throw n()},hasShadowRoot:function(e){throw n()},isShadowRoot:function(e){throw n()},importIntoDoc:function(e){throw n()},isPageRule:function(e){throw n()},isStyleRule:function(e){throw n()},isMediaRule:function(e){throw n()},isKeyframesRule:function(e){throw n()},getHref:function(e){throw n()},getEventKey:function(e){throw n()},resolveAndSetHref:function(e,t,r){throw n()},cssToRules:function(e){throw n()},supportsDOMEvents:function(){throw n()},supportsNativeShadowDOM:function(){throw n()},getGlobalEventTarget:function(e){throw n()},getHistory:function(){throw n()},getLocation:function(){throw n()},getBaseHref:function(){throw n()},getUserAgent:function(){throw n()},setData:function(e,t,r){throw n()},getData:function(e,t){throw n()},setGlobalVar:function(e,t){throw n()}},{})}(),e("DomAdapter",s)}}}),System.register("angular2/src/dom/generic_browser_adapter",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/dom/dom_adapter"],function(e){"use strict";var t,n,r,i,o;return{setters:[function(e){t=e.ListWrapper},function(e){n=e.isPresent,r=e.isFunction},function(e){i=e.DomAdapter}],execute:function(){o=function(e){function i(){$traceurRuntime.superConstructor(i).apply(this,arguments)}return $traceurRuntime.createClass(i,{getDistributedNodes:function(e){return e.getDistributedNodes()},resolveAndSetHref:function(e,t,n){e.href=null==n?t:t+"/../"+n},cssToRules:function(e){var r=this.createStyleElement(e);this.appendChild(this.defaultDoc().head,r);var i=[];if(n(r.sheet))try{var o=r.sheet.cssRules;i=t.createFixedSize(o.length);for(var s=0;s<o.length;s++)i[s]=o[s]}catch(a){}return this.remove(r),i},supportsDOMEvents:function(){return!0},supportsNativeShadowDOM:function(){return r(this.defaultDoc().body.createShadowRoot)}},{},e)}(i),e("GenericBrowserDomAdapter",o)}}}),System.register("angular2/src/core/compiler/directive_resolver",["angular2/di","angular2/src/facade/lang","angular2/src/core/annotations_impl/annotations","angular2/src/reflection/reflection"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l;return{setters:[function(e){r=e.resolveForwardRef,i=e.Injectable},function(e){o=e.isPresent,s=e.BaseException,a=e.stringify},function(e){c=e.Directive},function(e){u=e.reflector}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},l=$traceurRuntime.createClass(function(){},{resolve:function(e){var t=u.annotations(r(e));if(o(t))for(var n=0;n<t.length;n++){var i=t[n];if(i instanceof c)return i}throw new s("No Directive annotation found on "+a(e))}},{}),e("DirectiveResolver",l),e("DirectiveResolver",l=t([i(),n("design:paramtypes",[])],l))}}}),System.register("angular2/src/core/compiler/element_binder",["angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){t=e.isBlank,n=e.isPresent,r=e.BaseException}],execute:function(){i=function(){function e(e,n,i,o,s){if(this.index=e,this.parent=n,this.distanceToParent=i,this.protoElementInjector=o,this.componentDirective=s,this.nestedProtoView=null,this.hostListeners=null,t(e))throw new r("null index not allowed.")}return $traceurRuntime.createClass(e,{hasStaticComponent:function(){return n(this.componentDirective)&&n(this.nestedProtoView)},hasEmbeddedProtoView:function(){return!n(this.componentDirective)&&n(this.nestedProtoView)}},{})}(),e("ElementBinder",i)}}}),System.register("angular2/src/core/compiler/view_ref",["angular2/src/facade/lang"],function(e){"use strict";function t(e){return e._view}function n(e){return r(e)?e._protoView:null}var r,i,o;return e("internalView",t),e("internalProtoView",n),{setters:[function(e){r=e.isPresent}],execute:function(){i=function(){function e(e){this._view=e}return $traceurRuntime.createClass(e,{get render(){return this._view.render},get renderFragment(){return this._view.renderFragment},setLocal:function(e,t){this._view.setLocal(e,t)}},{})}(),e("ViewRef",i),o=function(){function e(e){this._protoView=e}return $traceurRuntime.createClass(e,{},{})}(),e("ProtoViewRef",o)}}}),System.register("angular2/src/render/api",["angular2/src/facade/lang","angular2/src/facade/collection"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b,w;return{setters:[function(e){t=e.isPresent,n=e.isBlank,r=e.RegExpWrapper},function(e){i=e.Map,o=e.MapWrapper}],execute:function(){s=function(){function e(e,t){this.fullName=e,this.source=t}return $traceurRuntime.createClass(e,{},{})}(),e("EventBinding",s),e("PropertyBindingType",a),function(e){e[e.PROPERTY=0]="PROPERTY",e[e.ATTRIBUTE=1]="ATTRIBUTE",e[e.CLASS=2]="CLASS",e[e.STYLE=3]="STYLE"}(a||e("PropertyBindingType",a={})),c=function(){function e(e,t,n){var r=void 0!==arguments[3]?arguments[3]:null;this.type=e,this.astWithSource=t,this.property=n,this.unit=r}return $traceurRuntime.createClass(e,{},{})}(),e("ElementPropertyBinding",c),u=function(){function e(){var e=void 0!==arguments[0]?arguments[0]:{},t=e.index,n=e.parentIndex,r=e.distanceToParent,i=e.directives,o=e.nestedProtoView,s=e.propertyBindings,a=e.variableBindings,c=e.eventBindings,u=e.readAttributes;this.index=t,this.parentIndex=n,this.distanceToParent=r,this.directives=i,this.nestedProtoView=o,this.propertyBindings=s,this.variableBindings=a,this.eventBindings=c,this.readAttributes=u}return $traceurRuntime.createClass(e,{},{})}(),e("ElementBinder",u),l=function(){function e(e){var t=e,n=t.directiveIndex,r=t.propertyBindings,i=t.eventBindings,o=t.hostPropertyBindings;this.directiveIndex=n,this.propertyBindings=r,this.eventBindings=i,this.hostPropertyBindings=o}return $traceurRuntime.createClass(e,{},{})}(),e("DirectiveBinder",l),e("ViewType",f),function(e){e[e.HOST=0]="HOST",e[e.COMPONENT=1]="COMPONENT",e[e.EMBEDDED=2]="EMBEDDED"}(f||e("ViewType",f={})),h=function(){function e(e){var t=e,n=t.render,r=t.elementBinders,i=t.variableBindings,o=t.type,s=t.textBindings,a=t.transitiveNgContentCount;this.render=n,this.elementBinders=r,this.variableBindings=i,this.type=o,this.textBindings=s,this.transitiveNgContentCount=a}return $traceurRuntime.createClass(e,{},{})}(),e("ProtoViewDto",h),d=function(){function e(e){var n=e,r=n.id,i=n.selector,o=n.compileChildren,s=n.events,a=n.hostListeners,c=n.hostProperties,u=n.hostAttributes,l=n.hostActions,f=n.properties,h=n.readAttributes,d=n.type,p=n.callOnDestroy,g=n.callOnChange,m=n.callOnCheck,v=n.callOnInit,_=n.callOnAllChangesDone,y=n.changeDetection,b=n.exportAs;this.id=r,this.selector=i,this.compileChildren=t(o)?o:!0,this.events=s,this.hostListeners=a,this.hostAttributes=u,this.hostProperties=c,this.hostActions=l,this.properties=f,this.readAttributes=h,this.type=d,this.callOnDestroy=p,this.callOnChange=g,this.callOnCheck=m,this.callOnInit=v,this.callOnAllChangesDone=_,this.changeDetection=y,this.exportAs=b}return $traceurRuntime.createClass(e,{},{get DIRECTIVE_TYPE(){return 0},get COMPONENT_TYPE(){return 1},create:function(s){var a=s,c=a.id,u=a.selector,l=a.compileChildren,f=a.events,h=a.host,d=a.properties,p=a.readAttributes,g=a.type,m=a.callOnDestroy,v=a.callOnChange,_=a.callOnCheck,y=a.callOnInit,b=a.callOnAllChangesDone,w=a.changeDetection,C=a.exportAs,R=new i,E=new i,x=new i,S=new i;return t(h)&&o.forEach(h,function(i,o){var s=r.firstMatch(e._hostRegExp,o);n(s)?x.set(o,i):t(s[1])?E.set(s[1],i):t(s[2])?R.set(s[2],i):t(s[3])&&S.set(s[3],i)}),new e({id:c,selector:u,compileChildren:l,events:f,hostListeners:R,hostProperties:E,hostAttributes:x,hostActions:S,properties:d,readAttributes:p,type:g,callOnDestroy:m,callOnChange:v,callOnCheck:_,callOnInit:y,callOnAllChangesDone:b,changeDetection:w,exportAs:C})}})}(),e("DirectiveMetadata",d),d._hostRegExp=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\))|(?:@(.+)))$/g,p=function(){function e(){}return $traceurRuntime.createClass(e,{},{})}(),e("RenderProtoViewRef",p),g=function(){function e(){}return $traceurRuntime.createClass(e,{},{})}(),e("RenderFragmentRef",g),m=function(){function e(){}return $traceurRuntime.createClass(e,{},{})}(),e("RenderViewRef",m),v=function(){function e(e){var t=e,n=t.componentId,r=t.templateAbsUrl,i=t.template,o=t.styleAbsUrls,s=t.styles,a=t.directives;this.componentId=n,this.templateAbsUrl=r,this.template=i,this.styleAbsUrls=o,this.styles=s,this.directives=a}return $traceurRuntime.createClass(e,{},{})}(),e("ViewDefinition",v),_=function(){function e(e,t,n,r,i,o){this.mergedProtoViewRef=e,this.fragmentCount=t,this.mappedElementIndices=n,this.mappedTextIndices=r,this.hostElementIndicesByViewIndex=i,this.nestedViewCountByViewIndex=o}return $traceurRuntime.createClass(e,{},{})}(),e("RenderProtoViewMergeMapping",_),y=function(){function e(){}return $traceurRuntime.createClass(e,{compileHost:function(e){return null},compile:function(e){return null},mergeProtoViewsRecursively:function(e){return null}},{})}(),e("RenderCompiler",y),b=function(){function e(e,t){this.viewRef=e,this.fragmentRefs=t}return $traceurRuntime.createClass(e,{},{})}(),e("RenderViewWithFragments",b),w=function(){function e(){}return $traceurRuntime.createClass(e,{createRootHostView:function(e,t,n){return null},createView:function(e,t){return null},destroyView:function(e){},attachFragmentAfterFragment:function(e,t){},attachFragmentAfterElement:function(e,t){},detachFragment:function(e){},hydrateView:function(e){},dehydrateView:function(e){},getNativeElementSync:function(e){return null},setElementProperty:function(e,t,n){},setElementAttribute:function(e,t,n){},setElementClass:function(e,t,n){},setElementStyle:function(e,t,n){},invokeElementMethod:function(e,t,n){},setText:function(e,t,n){},setEventDispatcher:function(e,t){}},{})}(),e("Renderer",w)}}}),System.register("angular2/src/core/compiler/element_ref",["angular2/src/facade/lang"],function(e){"use strict";var t,n;return{setters:[function(e){t=e.BaseException}],execute:function(){n=function(){function e(e,t,n,r){this._renderer=r,this.parentView=e,this.boundElementIndex=t,this.renderBoundElementIndex=n}return $traceurRuntime.createClass(e,{get renderView(){return this.parentView.render},set renderView(e){throw new t("Abstract setter")},get nativeElement(){return this._renderer.getNativeElementSync(this)}},{})}(),e("ElementRef",n)}}}),System.register("angular2/src/core/compiler/template_ref",["angular2/src/core/compiler/view_ref"],function(e){"use strict";var t,n;return{setters:[function(e){t=e.internalView}],execute:function(){n=function(){function e(e){this.elementRef=e}return $traceurRuntime.createClass(e,{_getProtoView:function(){var e=t(this.elementRef.parentView);return e.proto.elementBinders[this.elementRef.boundElementIndex-e.elementOffset].nestedProtoView},get protoViewRef(){return this._getProtoView().ref},hasLocal:function(e){return this._getProtoView().protoLocals.has(e)}},{})}(),e("TemplateRef",n)}}}),System.register("angular2/src/core/compiler/view_pool",["angular2/di","angular2/src/facade/collection","angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d;return{setters:[function(e){i=e.Inject,o=e.Injectable,s=e.OpaqueToken},function(e){a=e.ListWrapper,c=e.Map},function(e){u=e.isPresent,l=e.isBlank,f=e.CONST_EXPR}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},r=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},h=f(new s("AppViewPool.viewPoolCapacity")),e("APP_VIEW_POOL_CAPACITY",h),d=$traceurRuntime.createClass(function(e){this._pooledViewsPerProtoView=new c,this._poolCapacityPerProtoView=e},{getView:function(e){var t=this._pooledViewsPerProtoView.get(e);return u(t)&&t.length>0?a.removeLast(t):null},returnView:function(e){var t=e.proto,n=this._pooledViewsPerProtoView.get(t);l(n)&&(n=[],this._pooledViewsPerProtoView.set(t,n));var r=n.length<this._poolCapacityPerProtoView;return r&&n.push(e),r}},{}),e("AppViewPool",d),e("AppViewPool",d=t([o(),r(0,i(h)),n("design:paramtypes",[Object])],d))}}}),System.register("angular2/src/core/compiler/view_listener",["angular2/di"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){r=e.Injectable}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},i=$traceurRuntime.createClass(function(){},{viewCreated:function(e){},viewDestroyed:function(e){}},{}),e("AppViewListener",i),e("AppViewListener",i=t([r(),n("design:paramtypes",[])],i))}}}),System.register("angular2/src/core/compiler/view_container_ref",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/core/compiler/view_ref"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){t=e.ListWrapper},function(e){n=e.isPresent},function(e){r=e.internalView}],execute:function(){i=function(){function e(e,t){this.viewManager=e,this.element=t}return $traceurRuntime.createClass(e,{_getViews:function(){var e=r(this.element.parentView).viewContainers[this.element.boundElementIndex];return n(e)?e.views:[]},clear:function(){for(var e=this.length-1;e>=0;e--)this.remove(e)},get:function(e){return this._getViews()[e].ref},get length(){return this._getViews().length},createEmbeddedView:function(e){var t=void 0!==arguments[1]?arguments[1]:-1;return-1==t&&(t=this.length),this.viewManager.createEmbeddedViewInContainer(this.element,t,e)},createHostView:function(){var e=void 0!==arguments[0]?arguments[0]:null,t=void 0!==arguments[1]?arguments[1]:-1,n=void 0!==arguments[2]?arguments[2]:null;return-1==t&&(t=this.length),this.viewManager.createHostViewInContainer(this.element,t,e,n)},insert:function(e){var t=void 0!==arguments[1]?arguments[1]:-1;return-1==t&&(t=this.length),this.viewManager.attachViewInContainer(this.element,t,e)},indexOf:function(e){return t.indexOf(this._getViews(),r(e))},remove:function(){var e=void 0!==arguments[0]?arguments[0]:-1;-1==e&&(e=this.length-1),this.viewManager.destroyViewInContainer(this.element,e)},detach:function(){var e=void 0!==arguments[0]?arguments[0]:-1;return-1==e&&(e=this.length-1),this.viewManager.detachViewInContainer(this.element,e)}},{})}(),e("ViewContainerRef",i)}}}),System.register("angular2/src/core/compiler/directive_lifecycle_reflector",["angular2/src/facade/lang","angular2/src/core/annotations_impl/annotations"],function(e){"use strict";function t(e,t,o){if(r(o.lifecycle))return-1!==o.lifecycle.indexOf(e);if(!(t instanceof n))return!1;var s=t.prototype;switch(e){case i.onAllChangesDone:return!!s.onAllChangesDone;case i.onChange:return!!s.onChange;case i.onCheck:return!!s.onCheck;case i.onDestroy:return!!s.onDestroy;case i.onInit:return!!s.onInit;default:return!1}}var n,r,i;return e("hasLifecycleHook",t),{setters:[function(e){n=e.Type,r=e.isPresent},function(e){i=e.LifecycleEvent}],execute:function(){}}}),System.register("angular2/src/core/compiler/query_list",["angular2/src/facade/collection"],function(e){"use strict";var t,n;return{setters:[function(e){t=e.ListWrapper}],execute:function(){n=function(){function e(){this._results=[],this._callbacks=[],this._dirty=!1}var n;return $traceurRuntime.createClass(e,(n={},Object.defineProperty(n,"reset",{value:function(e){this._results=e,this._dirty=!0},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"add",{value:function(e){this._results.push(e),this._dirty=!0},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"fireCallbacks",{value:function(){this._dirty&&(t.forEach(this._callbacks,function(e){return e()}),this._dirty=!1)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"onChange",{value:function(e){this._callbacks.push(e)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"removeCallback",{value:function(e){t.remove(this._callbacks,e)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"length",{get:function(){return this._results.length},configurable:!0,enumerable:!0}),Object.defineProperty(n,"first",{get:function(){return t.first(this._results)},configurable:!0,enumerable:!0}),Object.defineProperty(n,"last",{get:function(){return t.last(this._results)},configurable:!0,enumerable:!0}),Object.defineProperty(n,"map",{value:function(e){return this._results.map(e)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,Symbol.iterator,{value:function(){return this._results[Symbol.iterator]()},configurable:!0,enumerable:!0,writable:!0}),n),{})}(),e("QueryList",n)}}}),System.register("angular2/src/core/compiler/view_resolver",["angular2/di","angular2/src/core/annotations_impl/view","angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/reflection/reflection"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l;return{setters:[function(e){r=e.Injectable},function(e){i=e.View},function(e){o=e.stringify,s=e.isBlank,a=e.BaseException},function(e){c=e.Map},function(e){u=e.reflector}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},l=$traceurRuntime.createClass(function(){this._cache=new c},{resolve:function(e){var t=this._cache.get(e);return s(t)&&(t=this._resolve(e),this._cache.set(e,t)),t},_resolve:function(e){for(var t=u.annotations(e),n=0;n<t.length;n++){var r=t[n];if(r instanceof i)return r}throw new a("No View annotation found on component "+o(e))}},{}),e("ViewResolver",l),e("ViewResolver",l=t([r(),n("design:paramtypes",[])],l))}}}),System.register("angular2/src/core/compiler/component_url_mapper",["angular2/di","angular2/src/facade/lang","angular2/src/facade/collection"],function(e){"use strict";var t,n,r,i,o,s,a;return{setters:[function(e){r=e.Injectable},function(e){i=e.isPresent},function(e){o=e.Map}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=$traceurRuntime.createClass(function(){},{getUrl:function(e){return"./"}},{}),e("ComponentUrlMapper",s),e("ComponentUrlMapper",s=t([r(),n("design:paramtypes",[])],s)),a=function(e){function t(){$traceurRuntime.superConstructor(t).call(this),this._componentUrls=new o}return $traceurRuntime.createClass(t,{setComponentUrl:function(e,t){this._componentUrls.set(e,t)},getUrl:function(e){var n=this._componentUrls.get(e);return i(n)?n:$traceurRuntime.superGet(this,t.prototype,"getUrl").call(this,e)}},{},e)}(s),e("RuntimeComponentUrlMapper",a)}}}),System.register("angular2/src/core/compiler/proto_view_factory",["angular2/di","angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/reflection/reflection","angular2/change_detection","angular2/src/render/api","angular2/src/core/compiler/view","angular2/src/core/compiler/element_injector"],function(e){"use strict";function t(e,t,i){var o=n(t),s=a(o);return r(e,o,s,i)}function n(e){var t=void 0!==arguments[1]?arguments[1]:null,r=void 0!==arguments[2]?arguments[2]:null,i=void 0!==arguments[3]?arguments[3]:null;E(i)&&(i=[]),i.push(new B(e,i.length,t,r));var o=i.length-1,s=0;return w.forEach(e.elementBinders,function(e){R(e.nestedProtoView)&&n(e.nestedProtoView,o,s,i),s++}),i}function r(e,t,n,r){return w.map(t,function(t){var i,o=t.renderProtoView.elementBinders,s=new k,a=s.getBindingRecords(t.renderProtoView.textBindings,o,r),c=s.getDirectiveRecords(o,r),u=P;t.renderProtoView.type===T.ViewType.COMPONENT?(u=e.changeDetection,i="comp"):i=t.renderProtoView.type===T.ViewType.HOST?"host":"embedded";var l=e.id+"_"+i+"_"+t.index,f=n[t.index];return new j(l,u,f,a,c)})}function i(e,t,n,r){var i=e.elementBinders,o=new N(e.type,e.transitiveNgContentCount>0,e.render,t,n,u(i),e.textBindings.length);return l(o,i,r),v(o,i),o}function o(e){return w.map(e,function(e){return s(e.renderProtoView)})}function s(e){var t=new Map;return C.forEach(e.variableBindings,function(e,n){t.set(n,e)}),t}function a(e){var t=w.createFixedSize(e.length);return w.forEach(e,function(e){var n=R(e.parentIndex)?t[e.parentIndex]:null;t[e.index]=c(n,e.renderProtoView)}),t}function c(e,t){var n=E(e)?[]:w.clone(e);return C.forEach(t.variableBindings,function(e,t){n.push(e)}),w.forEach(t.elementBinders,function(e){C.forEach(e.variableBindings,function(e,t){n.push(e)})}),n}function u(e){for(var t=new Map,n=0;n<e.length;n++){var r=e[n];C.forEach(r.variableBindings,function(e,r){t.set(e,n)})}return t}function l(e,t,n){for(var r=0;r<t.length;r++){var i=t[r],o=t[r].directives,s=f(r,e.elementBinders,t),a=w.map(o,function(e){return n[e.directiveIndex]}),c=null;a.length>0&&a[0].metadata.type===T.DirectiveMetadata.COMPONENT_TYPE&&(c=a[0]);var u=h(r,s,i,c,a);d(e,r,i,u,c,a)}}function f(e,t,n){var r=0;do{var i=n[e];if(e=i.parentIndex,-1!==e){r+=i.distanceToParent;var o=t[e];if(R(o.protoElementInjector))return new L(o.protoElementInjector,r)}}while(-1!==e);return new L(null,0)}function h(e,t,n,r,i){var o=null,s=C.size(n.variableBindings)>0;if(i.length>0||s){var a=p(n,i);o=V.create(t.protoElementInjector,e,i,R(r),t.distance,a),o.attributes=n.readAttributes}return o}function d(e,t,n,r,i,o){var s=null;-1!==n.parentIndex&&(s=e.elementBinders[n.parentIndex]);var a=e.bindElement(s,n.distanceToParent,r,i);return e.bindEvent(n.eventBindings,t,-1),C.forEach(n.variableBindings,function(t,n){e.protoLocals.set(t,null)}),a}function p(e,t){var n=new Map;return C.forEach(e.variableBindings,function(r,i){var o=g(e,t,i);n.set(r,o)}),n}function g(e,t,n){for(var r,i=null,o=0;o<t.length;++o){var s=t[o];if(m(s)==n){if(R(r))throw new x("More than one directive have exportAs = '"+n+"'. Directives: ["+r.displayName+", "+s.displayName+"]");i=o,r=s}}if(E(r)&&"$implicit"!==n)throw new x("Cannot find directive with exportAs = '"+n+"'");return i}function m(e){var t=e.metadata.exportAs;return E(t)&&e.metadata.type===T.DirectiveMetadata.COMPONENT_TYPE?"$implicit":t}function v(e,t){for(var n=0;n<t.length;++n)for(var r=t[n].directives,i=0;i<r.length;i++){var o=r[i];e.bindEvent(o.eventBindings,n,i)}}var _,y,b,w,C,R,E,x,S,O,D,A,I,P,j,T,N,V,k,M,B,L;return e("getChangeDetectorDefinitions",t),e("createVariableLocations",u),e("createDirectiveVariableBindings",p),{setters:[function(e){b=e.Injectable},function(e){w=e.ListWrapper,C=e.MapWrapper},function(e){R=e.isPresent,E=e.isBlank,x=e.BaseException},function(e){S=e.reflector},function(e){O=e.ChangeDetection,D=e.DirectiveIndex,A=e.BindingRecord,I=e.DirectiveRecord,P=e.DEFAULT,j=e.ChangeDetectorDefinition},function(e){T=e},function(e){N=e.AppProtoView},function(e){V=e.ProtoElementInjector}],execute:function(){_=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},y=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},k=function(){function e(){this._directiveRecordsMap=new Map}return $traceurRuntime.createClass(e,{getBindingRecords:function(e,t,n){var r=[];this._createTextNodeRecords(r,e);for(var i=0;i<t.length;i++){var o=t[i];this._createElementPropertyRecords(r,i,o),this._createDirectiveRecords(r,i,o.directives,n)}return r},getDirectiveRecords:function(e,t){for(var n=[],r=0;r<e.length;++r)for(var i=e[r].directives,o=0;o<i.length;++o)n.push(this._getDirectiveRecord(r,o,t[i[o].directiveIndex]));return n},_createTextNodeRecords:function(e,t){for(var n=0;n<t.length;n++)e.push(A.createForTextNode(t[n],n))},_createElementPropertyRecords:function(e,t,n){w.forEach(n.propertyBindings,function(n){n.type===T.PropertyBindingType.PROPERTY?e.push(A.createForElementProperty(n.astWithSource,t,n.property)):n.type===T.PropertyBindingType.ATTRIBUTE?e.push(A.createForElementAttribute(n.astWithSource,t,n.property)):n.type===T.PropertyBindingType.CLASS?e.push(A.createForElementClass(n.astWithSource,t,n.property)):n.type===T.PropertyBindingType.STYLE&&e.push(A.createForElementStyle(n.astWithSource,t,n.property,n.unit))})},_createDirectiveRecords:function(e,t,n,r){for(var i=0;i<n.length;i++){var o=n[i],s=r[o.directiveIndex],a=this._getDirectiveRecord(t,i,s);C.forEach(o.propertyBindings,function(t,n){var r=S.setter(n);e.push(A.createForDirective(t,n,r,a))}),a.callOnChange&&e.push(A.createDirectiveOnChange(a)),a.callOnInit&&e.push(A.createDirectiveOnInit(a)),a.callOnCheck&&e.push(A.createDirectiveOnCheck(a))}for(var i=0;i<n.length;i++){var o=n[i];w.forEach(o.hostPropertyBindings,function(n){var r=new D(t,i);n.type===T.PropertyBindingType.PROPERTY?e.push(A.createForHostProperty(r,n.astWithSource,n.property)):n.type===T.PropertyBindingType.ATTRIBUTE?e.push(A.createForHostAttribute(r,n.astWithSource,n.property)):n.type===T.PropertyBindingType.CLASS?e.push(A.createForHostClass(r,n.astWithSource,n.property)):n.type===T.PropertyBindingType.STYLE&&e.push(A.createForHostStyle(r,n.astWithSource,n.property,n.unit))})}},_getDirectiveRecord:function(e,t,n){var r=100*e+t;return this._directiveRecordsMap.has(r)||this._directiveRecordsMap.set(r,new I({directiveIndex:new D(e,t),callOnAllChangesDone:n.callOnAllChangesDone,callOnChange:n.callOnChange,callOnCheck:n.callOnCheck,callOnInit:n.callOnInit,changeDetection:n.changeDetection})),this._directiveRecordsMap.get(r)}},{})}(),M=$traceurRuntime.createClass(function(e){this._changeDetection=e},{createAppProtoViews:function(e,t,s){var c=this,u=w.map(s,function(e){return e.metadata}),l=n(t),f=o(l),h=a(l),d=r(e.metadata,l,h,u),p=w.map(d,function(e){return c._changeDetection.createProtoChangeDetector(e)}),g=w.createFixedSize(l.length);return w.forEach(l,function(e){var t=i(e.renderProtoView,p[e.index],f[e.index],s);if(R(e.parentIndex)){var n=g[e.parentIndex];n.elementBinders[e.boundElementIndex].nestedProtoView=t}g[e.index]=t}),g[0]}},{}),e("ProtoViewFactory",M),e("ProtoViewFactory",M=_([b(),y("design:paramtypes",[O])],M)),B=function(){function e(e,t,n,r){this.renderProtoView=e,
10
- this.index=t,this.parentIndex=n,this.boundElementIndex=r}return $traceurRuntime.createClass(e,{},{})}(),L=function(){function e(e,t){this.protoElementInjector=e,this.distance=t}return $traceurRuntime.createClass(e,{},{})}()}}}),System.register("angular2/src/services/url_resolver",["angular2/di","angular2/src/facade/lang","angular2/src/facade/collection"],function(e){"use strict";function t(e,t,n,r,i,o,s){var a=[];return u(e)&&a.push(e+":"),u(n)&&(a.push("//"),u(t)&&a.push(t+"@"),a.push(n),u(r)&&a.push(":"+r)),u(i)&&a.push(i),u(o)&&a.push("?"+o),u(s)&&a.push("#"+s),a.join("")}function n(e){return f.firstMatch(p,e)}function r(e){if("/"==e)return"/";for(var t="/"==e[0]?"/":"",n="/"===e[e.length-1]?"/":"",r=e.split("/"),i=[],o=0,s=0;s<r.length;s++){var a=r[s];switch(a){case"":case".":break;case"..":i.length>0?h.removeAt(i,i.length-1):o++;break;default:i.push(a)}}if(""==t){for(;o-->0;)h.insert(i,0,"..");0===i.length&&i.push(".")}return t+i.join("/")+n}function i(e){var n=e[g.PATH];return n=l(n)?"":r(n),e[g.PATH]=n,t(e[g.SCHEME],e[g.USER_INFO],e[g.DOMAIN],e[g.PORT],n,e[g.QUERY_DATA],e[g.FRAGMENT])}function o(e,t){var r=n(t),o=n(e);if(u(r[g.SCHEME]))return i(r);r[g.SCHEME]=o[g.SCHEME];for(var s=g.SCHEME;s<=g.PORT;s++)l(r[s])&&(r[s]=o[s]);if("/"==r[g.PATH][0])return i(r);var a=o[g.PATH];l(a)&&(a="/");var c=a.lastIndexOf("/");return a=a.substring(0,c+1)+r[g.PATH],r[g.PATH]=a,i(r)}var s,a,c,u,l,f,h,d,p,g;return{setters:[function(e){c=e.Injectable},function(e){u=e.isPresent,l=e.isBlank,f=e.RegExpWrapper},function(e){h=e.ListWrapper}],execute:function(){s=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},d=$traceurRuntime.createClass(function(){},{resolve:function(e,t){return o(e,t)}},{}),e("UrlResolver",d),e("UrlResolver",d=s([c(),a("design:paramtypes",[])],d)),p=f.create("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),function(e){e[e.SCHEME=1]="SCHEME",e[e.USER_INFO=2]="USER_INFO",e[e.DOMAIN=3]="DOMAIN",e[e.PORT=4]="PORT",e[e.PATH=5]="PATH",e[e.QUERY_DATA=6]="QUERY_DATA",e[e.FRAGMENT=7]="FRAGMENT"}(g||(g={}))}}}),System.register("angular2/src/services/app_root_url",["angular2/di","angular2/src/facade/lang","angular2/src/dom/dom_adapter"],function(e){"use strict";var t,n,r,i,o,s;return{setters:[function(e){r=e.Injectable},function(e){i=e.isBlank},function(e){o=e.DOM}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=$traceurRuntime.createClass(function(){},{get value(){if(i(this._value)){var e=o.createElement("a");o.resolveAndSetHref(e,"./",null),this._value=o.getHref(e)}return this._value}},{}),e("AppRootUrl",s),e("AppRootUrl",s=t([r(),n("design:paramtypes",[])],s))}}}),System.register("angular2/src/core/exception_handler",["angular2/di","angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/dom/dom_adapter"],function(e){"use strict";var t,n,r,i,o,s,a,c;return{setters:[function(e){r=e.Injectable},function(e){i=e.isPresent},function(e){o=e.ListWrapper,s=e.isListLikeIterable},function(e){a=e.DOM}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=$traceurRuntime.createClass(function(){},{call:function(e){var t=void 0!==arguments[1]?arguments[1]:null,n=void 0!==arguments[2]?arguments[2]:null,r=s(t)?o.join(t,"\n\n"):t,c=i(n)?"\n"+n:"";a.logError(""+e+c+"\nSTACKTRACE:\n"+r)}},{}),e("ExceptionHandler",c),e("ExceptionHandler",c=t([r(),n("design:paramtypes",[])],c))}}}),System.register("angular2/src/render/xhr",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(){}return $traceurRuntime.createClass(e,{get:function(e){return null}},{})}(),e("XHR",t)}}}),System.register("angular2/src/render/dom/compiler/style_url_resolver",["angular2/di","angular2/src/facade/lang","angular2/src/services/url_resolver"],function(e){"use strict";var t,n,r,i,o,s,a,c,u;return{setters:[function(e){r=e.Injectable},function(e){i=e.StringWrapper},function(e){o=e.UrlResolver}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=$traceurRuntime.createClass(function(e){this._resolver=e},{resolveUrls:function(e,t){return e=this._replaceUrls(e,a,t),e=this._replaceUrls(e,c,t)},_replaceUrls:function(e,t,n){var r=this;return i.replaceAllMapped(e,t,function(e){var t=e[1],o=i.replaceAll(e[2],u,""),s=e[3],a=r._resolver.resolve(n,o);return t+"'"+a+"'"+s})}},{}),e("StyleUrlResolver",s),e("StyleUrlResolver",s=t([r(),n("design:paramtypes",[o])],s)),a=/(url\()([^)]*)(\))/g,c=/(@import[\s]+(?!url\())['"]([^'"]*)['"](.*;)/g,u=/['"]/g}}}),System.register("angular2/src/core/zone/ng_zone",["angular2/src/facade/collection","angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o;return{setters:[function(e){t=e.StringMapWrapper},function(e){n=e.normalizeBlank,r=e.isPresent,i=e.global}],execute:function(){o=function(){function e(e){var t=e.enableLongStackTrace;this._inVmTurnDone=!1,this._onTurnStart=null,this._onTurnDone=null,this._onEventDone=null,this._onErrorHandler=null,this._pendingMicrotasks=0,this._hasExecutedCodeInInnerZone=!1,this._nestedRun=0,i.zone?(this._disabled=!1,this._mountZone=i.zone,this._innerZone=this._createInnerZone(this._mountZone,t)):(this._disabled=!0,this._mountZone=null)}return $traceurRuntime.createClass(e,{overrideOnTurnStart:function(e){this._onTurnStart=n(e)},overrideOnTurnDone:function(e){this._onTurnDone=n(e)},overrideOnEventDone:function(e){this._onEventDone=n(e)},overrideOnErrorHandler:function(e){this._onErrorHandler=n(e)},run:function(e){return this._disabled?e():this._innerZone.run(e)},runOutsideAngular:function(e){return this._disabled?e():this._mountZone.run(e)},_createInnerZone:function(e,n){var i,o=this;return i=n?t.merge(Zone.longStackTraceZone,{onError:function(e){o._onError(this,e)}}):{onError:function(e){o._onError(this,e)}},e.fork(i).fork({$run:function(e){return function(){try{return o._nestedRun++,o._hasExecutedCodeInInnerZone||(o._hasExecutedCodeInInnerZone=!0,o._onTurnStart&&e.call(o._innerZone,o._onTurnStart)),e.apply(this,arguments)}finally{if(o._nestedRun--,0==o._pendingMicrotasks&&0==o._nestedRun&&!this._inVmTurnDone&&o._onTurnDone&&o._hasExecutedCodeInInnerZone)try{this._inVmTurnDone=!0,e.call(o._innerZone,o._onTurnDone),0===o._pendingMicrotasks&&r(o._onEventDone)&&o.runOutsideAngular(o._onEventDone)}finally{this._inVmTurnDone=!1,o._hasExecutedCodeInInnerZone=!1}}}},$scheduleMicrotask:function(e){return function(t){o._pendingMicrotasks++;var n=function(){try{t()}finally{o._pendingMicrotasks--}};e.call(this,n)}},_innerZone:!0})},_onError:function(e,t){if(!r(this._onErrorHandler))throw console.log("## _onError ##"),console.log(t.stack),t;for(var i=[n(t.stack)];e&&e.constructedAtException;)i.push(e.constructedAtException.get()),e=e.parent;this._onErrorHandler(t,i)}},{})}(),e("NgZone",o)}}}),System.register("angular2/src/core/life_cycle/life_cycle",["angular2/di","angular2/src/core/exception_handler","angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o,s,a;return{setters:[function(e){r=e.Injectable},function(e){i=e.ExceptionHandler},function(e){o=e.isPresent,s=e.BaseException}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},a=$traceurRuntime.createClass(function(e){var t=void 0!==arguments[1]?arguments[1]:null,n=void 0!==arguments[2]?arguments[2]:!1;this._runningTick=!1,this._errorHandler=function(t,n){throw e.call(t,n),t},this._changeDetector=t,this._enforceNoNewChanges=n},{registerWith:function(e){var t=void 0!==arguments[1]?arguments[1]:null,n=this;o(t)&&(this._changeDetector=t),e.overrideOnErrorHandler(this._errorHandler),e.overrideOnTurnDone(function(){return n.tick()})},tick:function(){if(this._runningTick)throw new s("LifeCycle.tick is called recursively");try{this._runningTick=!0,this._changeDetector.detectChanges(),this._enforceNoNewChanges&&this._changeDetector.checkNoChanges()}finally{this._runningTick=!1}}},{}),e("LifeCycle",a),e("LifeCycle",a=t([r(),n("design:paramtypes",[i,Object,Boolean])],a))}}}),System.register("angular2/src/render/dom/shadow_dom/shadow_dom_strategy",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(){}return $traceurRuntime.createClass(e,{hasNativeContentElement:function(){return!0},processStyleElement:function(e,t,n){},processElement:function(e,t,n){}},{})}(),e("ShadowDomStrategy",t)}}}),System.register("angular2/src/render/dom/shadow_dom/shadow_css",["angular2/src/dom/dom_adapter","angular2/src/facade/collection","angular2/src/facade/lang"],function(e){"use strict";function t(e){return r.cssToRules(e)}function n(e,n){if(!u(n)){var r=t(e);n(r)}}var r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b,w,C,R,E;return{setters:[function(e){r=e.DOM},function(e){i=e.ListWrapper},function(e){o=e.StringWrapper,s=e.RegExpWrapper,a=e.RegExpMatcherWrapper,c=e.isPresent,u=e.isBlank}],execute:function(){l=function(){function e(){this.strictStyling=!0}return $traceurRuntime.createClass(e,{shimStyle:function(e,t){var n=void 0!==arguments[2]?arguments[2]:"",i=r.getText(e);return this.shimCssText(i,t,n)},shimCssText:function(e,t){var n=void 0!==arguments[2]?arguments[2]:"";return e=this._insertDirectives(e),this._scopeCssText(e,t,n)},_insertDirectives:function(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)},_insertPolyfillDirectivesInCssText:function(e){return o.replaceAllMapped(e,f,function(e){return e[1]+"{"})},_insertPolyfillRulesInCssText:function(e){return o.replaceAllMapped(e,h,function(e){var t=e[0];return t=o.replace(t,e[1],""),t=o.replace(t,e[2],""),e[3]+t})},_scopeCssText:function(e,t,r){var i=this,o=this._extractUnscopedRulesFromCssText(e);return e=this._insertPolyfillHostInCssText(e),e=this._convertColonHost(e),e=this._convertColonHostContext(e),e=this._convertShadowDOMSelectors(e),c(t)&&n(e,function(n){e=i._scopeRules(n,t,r)}),e=e+"\n"+o,e.trim()},_extractUnscopedRulesFromCssText:function(e){for(var t,n="",r=s.matcher(d,e);c(t=a.next(r));){var i=t[0];i=o.replace(i,t[2],""),i=o.replace(i,t[1],t[3]),n+=i+"\n\n"}return n},_convertColonHost:function(e){return this._convertColonRule(e,v,this._colonHostPartReplacer)},_convertColonHostContext:function(e){return this._convertColonRule(e,_,this._colonHostContextPartReplacer)},_convertColonRule:function(e,t,n){return o.replaceAllMapped(e,t,function(e){if(c(e[2])){for(var t=e[2].split(","),r=[],i=0;i<t.length;i++){var o=t[i];if(u(o))break;o=o.trim(),r.push(n(y,o,e[3]))}return r.join(",")}return y+e[3]})},_colonHostContextPartReplacer:function(e,t,n){return o.contains(t,p)?this._colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n},_colonHostPartReplacer:function(e,t,n){return e+o.replace(t,p,"")+n},_convertShadowDOMSelectors:function(e){for(var t=0;t<b.length;t++)e=o.replaceAll(e,b[t]," ");return e},_scopeRules:function(e,t,n){var i="";if(c(e))for(var o=0;o<e.length;o++){var s=e[o];if(r.isStyleRule(s)||r.isPageRule(s))i+=this._scopeSelector(s.selectorText,t,n,this.strictStyling)+" {\n",i+=this._propertiesFromRule(s)+"\n}\n\n";else if(r.isMediaRule(s))i+="@media "+s.media.mediaText+" {\n",i+=this._scopeRules(s.cssRules,t,n),i+="\n}\n\n";else try{c(s.cssText)&&(i+=s.cssText+"\n\n")}catch(a){r.isKeyframesRule(s)&&c(s.cssRules)&&(i+=this._ieSafeCssTextFromKeyFrameRule(s))}}return i},_ieSafeCssTextFromKeyFrameRule:function(e){for(var t="@keyframes "+e.name+" {",n=0;n<e.cssRules.length;n++){var r=e.cssRules[n];t+=" "+r.keyText+" {"+r.style.cssText+"}"}return t+=" }"},_scopeSelector:function(e,t,n,r){for(var i=[],s=e.split(","),a=0;a<s.length;a++){var c=s[a];c=c.trim(),this._selectorNeedsScoping(c,t)&&(c=r&&!o.contains(c,y)?this._applyStrictSelectorScope(c,t):this._applySelectorScope(c,t,n)),i.push(c)}return i.join(", ")},_selectorNeedsScoping:function(e,t){var n=this._makeScopeMatcher(t);return!c(s.firstMatch(n,e))},_makeScopeMatcher:function(e){var t=/\[/g,n=/\]/g;return e=o.replaceAll(e,t,"\\["),e=o.replaceAll(e,n,"\\]"),s.create("^("+e+")"+w,"m")},_applySelectorScope:function(e,t,n){return this._applySimpleSelectorScope(e,t,n)},_applySimpleSelectorScope:function(e,t,n){if(c(s.firstMatch(C,e))){var r=this.strictStyling?"["+n+"]":t;return e=o.replace(e,y,r),o.replaceAll(e,C,r+" ")}return t+" "+e},_applyStrictSelectorScope:function(e,t){var n=/\[is=([^\]]*)\]/g;t=o.replaceAllMapped(t,n,function(e){return e[1]});for(var r=[" ",">","+","~"],a=e,u="["+t+"]",l=0;l<r.length;l++){var f=r[l],h=a.split(f);a=i.map(h,function(e){var t=o.replaceAll(e.trim(),C,"");if(t.length>0&&!i.contains(r,t)&&!o.contains(t,u)){var n=/([^:]*)(:*)(.*)/g,a=s.firstMatch(n,t);c(a)&&(e=a[1]+u+a[2]+a[3])}return e}).join(f)}return a},_insertPolyfillHostInCssText:function(e){return e=o.replaceAll(e,E,g),e=o.replaceAll(e,R,p)},_propertiesFromRule:function(e){var t=e.style.cssText,n=/['"]+|attr/g;if(e.style.content.length>0&&!c(s.firstMatch(n,e.style.content))){var r=/content:[^;]*;/g;t=o.replaceAll(t,r,"content: '"+e.style.content+"';")}return t}},{})}(),e("ShadowCss",l),f=/polyfill-next-selector[^}]*content:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,h=/(polyfill-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,d=/(polyfill-unscoped-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,p="-shadowcsshost",g="-shadowcsscontext",m=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",v=s.create("("+p+m,"im"),_=s.create("("+g+m,"im"),y=p+"-no-combinator",b=[/>>>/g,/::shadow/g,/::content/g,/\/deep\//g,/\/shadow-deep\//g,/\/shadow\//g],w="([>\\s~+[.,{:][\\s\\S]*)?$",C=s.create(p,"im"),R=/:host/gim,E=/:host-context/gim}}}),System.register("angular2/src/render/xhr_impl",["angular2/di","angular2/src/facade/async","angular2/src/render/xhr"],function(e){"use strict";var t,n,r,i,o,s;return{setters:[function(e){r=e.Injectable},function(e){i=e.PromiseWrapper},function(e){o=e.XHR}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{get:function(e){var t=i.completer(),n=new XMLHttpRequest;return n.open("GET",e,!0),n.responseType="text",n.onload=function(){var r="response"in n?n.response:n.responseText,i=1223===n.status?204:n.status;0===i&&(i=r?200:0),i>=200&&300>=i?t.resolve(r):t.reject("Failed to load "+e,null)},n.onerror=function(){t.reject("Failed to load "+e,null)},n.send(),t.promise}},{},e)}(o),e("XHRImpl",s),e("XHRImpl",s=t([r(),n("design:paramtypes",[])],s))}}}),System.register("angular2/src/render/dom/events/event_manager",["angular2/src/facade/lang","angular2/src/dom/dom_adapter"],function(e){"use strict";var t,n,r,i,o,s,a;return{setters:[function(e){t=e.BaseException,n=e.StringWrapper},function(e){r=e.DOM}],execute:function(){i="^",o=function(){function e(e,t){this._plugins=e,this._zone=t;for(var n=0;n<e.length;n++)e[n].manager=this}return $traceurRuntime.createClass(e,{addEventListener:function(e,t,n){var r=this._removeBubbleSymbol(t),i=this._findPluginFor(r);i.addEventListener(e,r,n,r!=t)},addGlobalEventListener:function(e,t,n){var r=this._removeBubbleSymbol(t),i=this._findPluginFor(r);return i.addGlobalEventListener(e,r,n,r!=t)},getZone:function(){return this._zone},_findPluginFor:function(e){for(var n=this._plugins,r=0;r<n.length;r++){var i=n[r];if(i.supports(e))return i}throw new t("No event manager plugin found for event "+e)},_removeBubbleSymbol:function(e){return e[0]==i?n.substring(e,1):e}},{})}(),e("EventManager",o),s=function(){function e(){}return $traceurRuntime.createClass(e,{supports:function(e){return!1},addEventListener:function(e,t,n,r){throw"not implemented"},addGlobalEventListener:function(e,t,n,r){throw"not implemented"}},{})}(),e("EventManagerPlugin",s),a=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{supports:function(e){return!0},addEventListener:function(e,t,n,i){var o=this._getOutsideHandler(i,e,n,this.manager._zone);this.manager._zone.runOutsideAngular(function(){r.on(e,t,o)})},addGlobalEventListener:function(e,t,n,i){var o=r.getGlobalEventTarget(e),s=this._getOutsideHandler(i,o,n,this.manager._zone);return this.manager._zone.runOutsideAngular(function(){return r.onAndCancel(o,t,s)})},_getOutsideHandler:function(e,n,r,i){return e?t.bubbleCallback(n,r,i):t.sameElementCallback(n,r,i)}},{sameElementCallback:function(e,t,n){return function(r){r.target===e&&n.run(function(){return t(r)})}},bubbleCallback:function(e,t,n){return function(e){return n.run(function(){return t(e)})}}},e)}(s),e("DomEventsPlugin",a)}}}),System.register("angular2/src/render/dom/events/key_events",["angular2/src/dom/dom_adapter","angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/render/dom/events/event_manager"],function(e){"use strict";var t,n,r,i,o,s,a,c,u;return{setters:[function(e){t=e.DOM},function(e){n=e.isPresent,r=e.StringWrapper},function(e){i=e.StringMapWrapper,o=e.ListWrapper},function(e){s=e.EventManagerPlugin}],execute:function(){a=["alt","control","meta","shift"],c={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},u=function(e){function s(){$traceurRuntime.superConstructor(s).call(this)}return $traceurRuntime.createClass(s,{supports:function(e){return n(s.parseEventName(e))},addEventListener:function(e,n,r,o){var a=s.parseEventName(n),c=s.eventCallback(e,o,i.get(a,"fullKey"),r,this.manager.getZone());this.manager.getZone().runOutsideAngular(function(){t.on(e,i.get(a,"domEventName"),c)})}},{parseEventName:function(e){var t=e.toLowerCase().split("."),n=o.removeAt(t,0);if(0===t.length||!r.equals(n,"keydown")&&!r.equals(n,"keyup"))return null;var c=s._normalizeKey(o.removeLast(t)),u="";if(o.forEach(a,function(e){o.contains(t,e)&&(o.remove(t,e),u+=e+".")}),u+=c,0!=t.length||0===c.length)return null;var l=i.create();return i.set(l,"domEventName",n),i.set(l,"fullKey",u),l},getEventFullKey:function(e){var n="",s=t.getEventKey(e);return s=s.toLowerCase(),r.equals(s," ")?s="space":r.equals(s,".")&&(s="dot"),o.forEach(a,function(t){if(t!=s){var r=i.get(c,t);r(e)&&(n+=t+".")}}),n+=s},eventCallback:function(e,t,n,i,o){return function(a){var c=t||a.target===e;c&&r.equals(s.getEventFullKey(a),n)&&o.run(function(){return i(a)})}},_normalizeKey:function(e){switch(e){case"esc":return"escape";default:return e}}},e)}(s),e("KeyEventsPlugin",u)}}}),System.register("angular2/src/render/dom/events/hammer_common",["angular2/src/render/dom/events/event_manager","angular2/src/facade/collection"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){t=e.EventManagerPlugin},function(e){n=e.StringMapWrapper}],execute:function(){r={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},i=function(e){function t(){$traceurRuntime.superConstructor(t).call(this)}return $traceurRuntime.createClass(t,{supports:function(e){return e=e.toLowerCase(),n.contains(r,e)}},{},e)}(t),e("HammerGesturesPluginCommon",i)}}}),System.register("angular2/src/core/compiler/dynamic_component_loader",["angular2/di","angular2/src/core/compiler/compiler","angular2/src/core/compiler/view_manager"],function(e){"use strict";var t,n,r,i,o,s,a;return{setters:[function(e){r=e.Injectable},function(e){i=e.Compiler},function(e){o=e.AppViewManager}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=function(){function e(e,t,n){this.location=e,this.instance=t,this.dispose=n}return $traceurRuntime.createClass(e,{get hostView(){return this.location.parentView}},{})}(),e("ComponentRef",s),a=$traceurRuntime.createClass(function(e,t){this._compiler=e,this._viewManager=t},{loadAsRoot:function(e,t,n){var r=this;return this._compiler.compileInHost(e).then(function(e){var i=r._viewManager.createRootHostView(e,t,n),o=r._viewManager.getHostElement(i),a=r._viewManager.getComponent(o),c=function(){r._viewManager.destroyRootHostView(i)};return new s(o,a,c)})},loadIntoLocation:function(e,t,n){var r=void 0!==arguments[3]?arguments[3]:null;return this.loadNextToLocation(e,this._viewManager.getNamedElementInComponentView(t,n),r)},loadNextToLocation:function(e,t){var n=void 0!==arguments[2]?arguments[2]:null,r=this;return this._compiler.compileInHost(e).then(function(e){var i=r._viewManager.getViewContainer(t),o=i.createHostView(e,i.length,n),a=r._viewManager.getHostElement(o),c=r._viewManager.getComponent(a),u=function(){var e=i.indexOf(o);-1!==e&&i.remove(e)};return new s(a,c,u)})}},{}),e("DynamicComponentLoader",a),e("DynamicComponentLoader",a=t([r(),n("design:paramtypes",[i,o])],a))}}}),System.register("angular2/src/core/testability/get_testability",["angular2/src/facade/lang"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.global}],execute:function(){n=function(){function e(e){this._testability=e}return $traceurRuntime.createClass(e,{whenStable:function(e){this._testability.whenStable(e)},findBindings:function(e,t,n){return this._testability.findBindings(e,t,n)}},{})}(),r=function(){function e(){}return $traceurRuntime.createClass(e,{},{addToWindow:function(e){t.getAngularTestability=function(t){var r=e.findTestabilityInTree(t);if(null==r)throw new Error("Could not find testability for element.");return new n(r)}}})}(),e("GetTestability",r)}}}),System.register("angular2/src/render/dom/view/proto_view",["angular2/src/render/api","angular2/src/dom/dom_adapter"],function(e){"use strict";function t(e){return e._protoView}var n,r,i,o;return e("resolveInternalDomProtoView",t),{setters:[function(e){n=e.RenderProtoViewRef},function(e){r=e.DOM}],execute:function(){i=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this._protoView=e}return $traceurRuntime.createClass(t,{},{},e)}(n),e("DomProtoViewRef",i),o=function(){function e(e,t,n,r,i,o,s){this.type=e,this.rootElement=t,this.elementBinders=n,this.rootTextNodeIndices=r,this.boundTextNodeCount=i,this.fragmentsRootNodeCount=o,this.isSingleElementFragment=s}return $traceurRuntime.createClass(e,{},{create:function(t,n,i,o,s){for(var a=o.length,c=0;c<s.length;c++)a+=s[c].textNodeIndices.length;var u=1===i.length&&1===i[0]&&r.isElementNode(r.firstChild(r.content(n)));return new e(t,n,s,o,a,i,u)}})}(),e("DomProtoView",o)}}}),System.register("angular2/src/render/dom/util",["angular2/src/facade/lang","angular2/src/dom/dom_adapter","angular2/src/facade/collection"],function(e){"use strict";function t(e){return u.replaceAllMapped(e,v,function(e){return"-"+e[1].toLowerCase()})}function n(e){return u.replaceAllMapped(e,_,function(e){return e[1].toUpperCase()})}function r(e,t){var n,r,i=0;if(t){var o=l.firstChild(e),s=l.hasClass(o,d);r=l.getElementsByClassName(o,d),n=f.createFixedSize(r.length+(s?1:0)),s&&(n[i++]=o)}else r=l.querySelectorAll(e,h),n=f.createFixedSize(r.length);for(var a=0;a<r.length;a++)n[i++]=r[a];return n}function i(e,t){var n=t?l.importIntoDoc(l.content(e.rootElement)):l.clone(l.content(e.rootElement)),i=r(n,e.isSingleElementFragment),a=s(n,e.rootTextNodeIndices,i,e.elementBinders,e.boundTextNodeCount),c=o(n,e.fragmentsRootNodeCount);return new y(e,c,i,a)}function o(e,t){for(var n=f.createGrowableSize(t.length),r=l.firstChild(e),i=0;i<n.length;i++){var o=f.createFixedSize(t[i]);n[i]=o;for(var s=0;s<o.length;s++)o[s]=r,r=l.nextSibling(r)}return n}function s(e,t,n,r,i){var o=f.createFixedSize(i),s=0;if(t.length>0)for(var a=l.childNodes(e),c=0;c<t.length;c++)o[s++]=a[t[c]];for(var c=0;c<r.length;c++){var u=r[c],h=n[c];if(u.textNodeIndices.length>0)for(var d=l.childNodes(h),p=0;p<u.textNodeIndices.length;p++)o[s++]=d[u.textNodeIndices[p]]}return o}function a(e,t){return l.isElementNode(e)&&l.tagName(e).toLowerCase()==t.toLowerCase()}function c(e,t,n){for(var r=l.childNodes(e),i=0;i<r.length;i++){var o=r[i];t.has(o)&&n(o,i,t.get(o))}}var u,l,f,h,d,p,g,m,v,_,y;return e("camelCaseToDashCase",t),e("dashCaseToCamelCase",n),e("queryBoundElements",r),e("cloneAndQueryProtoView",i),e("isElementWithTag",a),e("queryBoundTextNodeIndices",c),{setters:[function(e){u=e.StringWrapper},function(e){l=e.DOM},function(e){f=e.ListWrapper}],execute:function(){h=".ng-binding",e("NG_BINDING_CLASS_SELECTOR",h),d="ng-binding",e("NG_BINDING_CLASS",d),p=":",e("EVENT_TARGET_SEPARATOR",p),g="ng-content",e("NG_CONTENT_ELEMENT_NAME",g),m="shadow-root",e("NG_SHADOW_ROOT_ELEMENT_NAME",m),v=/([A-Z])/g,_=/-([a-z])/g,y=function(){function e(e,t,n,r){this.original=e,this.fragments=t,this.boundElements=n,this.boundTextNodes=r}return $traceurRuntime.createClass(e,{},{})}(),e("ClonedProtoView",y)}}}),System.register("angular2/src/render/dom/view/fragment",["angular2/src/render/api"],function(e){"use strict";function t(e){return e._nodes}var n,r;return e("resolveInternalDomFragment",t),{setters:[function(e){n=e.RenderFragmentRef}],execute:function(){r=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this._nodes=e}return $traceurRuntime.createClass(t,{},{},e)}(n),e("DomFragmentRef",r)}}}),System.register("angular2/src/render/dom/compiler/compile_element",["angular2/src/facade/collection","angular2/src/dom/dom_adapter","angular2/src/facade/lang"],function(e){"use strict";function t(e){var t=new a,o=i.attributeMap(e);return t.add("<"),t.add(i.tagName(e).toLowerCase()),n(t,"id",o.get("id")),n(t,"class",o.get("class")),r.forEach(o,function(e,r){"id"!==r&&"class"!==r&&n(t,r,e)}),t.add(">"),t.toString()}function n(e,t,n){s(n)&&e.add(0===n.length?" "+t:" "+t+'="'+n+'"')}var r,i,o,s,a,c,u;return{setters:[function(e){r=e.MapWrapper},function(e){i=e.DOM},function(e){o=e.isBlank,s=e.isPresent,a=e.StringJoiner,c=e.assertionsEnabled}],execute:function(){u=function(){function e(e){var n=void 0!==arguments[1]?arguments[1]:"";this.element=e,this._attrs=null,this._classList=null,this.isViewRoot=!1,this.inheritedProtoView=null,this.distanceToInheritedBinder=0,this.inheritedElementBinder=null,this.compileChildren=!0;var r=c()?t(e):null;""!==n?(this.elementDescription=n,s(r)&&(this.elementDescription+=": "+r)):this.elementDescription=r}return $traceurRuntime.createClass(e,{isBound:function(){return s(this.inheritedElementBinder)&&0===this.distanceToInheritedBinder},bindElement:function(){if(!this.isBound()){var e=this.inheritedElementBinder;this.inheritedElementBinder=this.inheritedProtoView.bindElement(this.element,this.elementDescription),s(e)&&this.inheritedElementBinder.setParent(e,this.distanceToInheritedBinder),this.distanceToInheritedBinder=0}return this.inheritedElementBinder},refreshAttrs:function(){this._attrs=null},attrs:function(){return o(this._attrs)&&(this._attrs=i.attributeMap(this.element)),this._attrs},refreshClassList:function(){this._classList=null},classList:function(){if(o(this._classList)){this._classList=[];for(var e=i.classList(this.element),t=0;t<e.length;t++)this._classList.push(e[t])}return this._classList}},{})}(),e("CompileElement",u)}}}),System.register("angular2/src/render/dom/compiler/compile_control",["angular2/src/facade/lang"],function(e){"use strict";var t,n;return{setters:[function(e){t=e.isBlank}],execute:function(){n=function(){function e(e){this._steps=e,this._currentStepIndex=0,this._parent=null,this._results=null,this._additionalChildren=null}return $traceurRuntime.createClass(e,{internalProcess:function(e,t,n,r){this._results=e;var i=this._currentStepIndex,o=this._parent;this._ignoreCurrentElement=!1;for(var s=t;s<this._steps.length&&!this._ignoreCurrentElement;s++){var a=this._steps[s];this._parent=n,this._currentStepIndex=s,a.process(n,r,this),n=this._parent}this._ignoreCurrentElement||e.push(r),this._currentStepIndex=i,this._parent=o;var c=this._additionalChildren;return this._additionalChildren=null,c},addParent:function(e){this.internalProcess(this._results,this._currentStepIndex+1,this._parent,e),this._parent=e},addChild:function(e){t(this._additionalChildren)&&(this._additionalChildren=[]),this._additionalChildren.push(e)},ignoreCurrentElement:function(){this._ignoreCurrentElement=!0}},{})}(),e("CompileControl",n)}}}),System.register("angular2/src/render/dom/view/element_binder",[],function(e){"use strict";var t,n,r;return{setters:[],execute:function(){t=function(){function e(){var e=void 0!==arguments[0]?arguments[0]:{},t=e.textNodeIndices,n=e.hasNestedProtoView,r=e.eventLocals,i=e.localEvents,o=e.globalEvents,s=e.hasNativeShadowRoot;this.textNodeIndices=t,this.hasNestedProtoView=n,this.eventLocals=r,this.localEvents=i,this.globalEvents=o,this.hasNativeShadowRoot=s}return $traceurRuntime.createClass(e,{},{})}(),e("DomElementBinder",t),n=function(){function e(e,t,n){this.name=e,this.target=t,this.fullName=n}return $traceurRuntime.createClass(e,{},{});
11
-
12
- }(),e("Event",n),r=function(){function e(e,t,n){this.actionName=e,this.actionExpression=t,this.expression=n}return $traceurRuntime.createClass(e,{},{})}(),e("HostAction",r)}}}),System.register("angular2/src/render/dom/compiler/property_binding_parser",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/render/dom/util"],function(e){"use strict";var t,n,r,i,o,s,a;return{setters:[function(e){t=e.isPresent,n=e.RegExpWrapper,r=e.StringWrapper},function(e){i=e.MapWrapper},function(e){o=e.dashCaseToCamelCase}],execute:function(){s=/^(?:(?:(?:(bind-)|(var-|#)|(on-)|(bindon-))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/g,a=function(){function e(e){this._parser=e}return $traceurRuntime.createClass(e,{process:function(e,r,o){var a=this,c=r.attrs(),u=new Map;i.forEach(c,function(e,i){i=a._normalizeAttributeName(i);var o=n.firstMatch(s,i);if(t(o))if(t(o[1]))a._bindProperty(o[5],e,r,u);else if(t(o[2])){var c=o[5],l=""==e?"$implicit":e;a._bindVariable(c,l,r,u)}else t(o[3])?a._bindEvent(o[5],e,r,u):t(o[4])?(a._bindProperty(o[5],e,r,u),a._bindAssignmentEvent(o[5],e,r,u)):t(o[6])?(a._bindProperty(o[6],e,r,u),a._bindAssignmentEvent(o[6],e,r,u)):t(o[7])?a._bindProperty(o[7],e,r,u):t(o[8])&&a._bindEvent(o[8],e,r,u);else{var f=a._parser.parseInterpolation(e,r.elementDescription);t(f)&&a._bindPropertyAst(i,f,r,u)}}),i.forEach(u,function(e,t){c.set(t,e)})},_normalizeAttributeName:function(e){return r.startsWith(e,"data-")?r.substring(e,5):e},_bindVariable:function(e,t,n,r){n.bindElement().bindVariable(o(e),t),r.set(e,t)},_bindProperty:function(e,t,n,r){this._bindPropertyAst(e,this._parser.parseBinding(t,n.elementDescription),n,r)},_bindPropertyAst:function(e,t,n,r){var i=n.bindElement();i.bindProperty(o(e),t),r.set(e,t.source)},_bindAssignmentEvent:function(e,t,n,r){this._bindEvent(e,t+"=$event",n,r)},_bindEvent:function(e,t,n,r){n.bindElement().bindEvent(o(e),this._parser.parseAction(t,n.elementDescription))}},{})}(),e("PropertyBindingParser",a)}}}),System.register("angular2/src/render/dom/compiler/text_interpolation_parser",["angular2/src/facade/lang","angular2/src/dom/dom_adapter"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.isPresent},function(e){n=e.DOM}],execute:function(){r=function(){function e(e){this._parser=e}return $traceurRuntime.createClass(e,{process:function(e,r,i){if(r.compileChildren)for(var o=r.element,s=n.childNodes(n.templateAwareRoot(o)),a=0;a<s.length;a++){var c=s[a];if(n.isTextNode(c)){var u=c,l=n.nodeValue(u),f=this._parser.parseInterpolation(l,r.elementDescription);t(f)&&(n.setText(u," "),r.element===r.inheritedProtoView.rootElement?r.inheritedProtoView.bindRootText(u,f):r.bindElement().bindText(u,f))}}}},{})}(),e("TextInterpolationParser",r)}}}),System.register("angular2/src/render/dom/compiler/selector",["angular2/src/facade/collection","angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p;return{setters:[function(e){t=e.Map,n=e.ListWrapper},function(e){r=e.isPresent,i=e.isBlank,o=e.RegExpWrapper,s=e.RegExpMatcherWrapper,a=e.StringWrapper,c=e.BaseException}],execute:function(){u="",l=o.create("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-\\w*]+)(?:=([^\\]]*))?\\])|(\\))|(\\s*,\\s*)"),f=function(){function e(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return $traceurRuntime.createClass(e,{isElementSelector:function(){return r(this.element)&&n.isEmpty(this.classNames)&&n.isEmpty(this.attrs)&&0===this.notSelectors.length},setElement:function(){var e=void 0!==arguments[0]?arguments[0]:null;r(e)&&(e=e.toLowerCase()),this.element=e},addAttribute:function(e){var t=void 0!==arguments[1]?arguments[1]:u;this.attrs.push(e.toLowerCase()),t=r(t)?t.toLowerCase():u,this.attrs.push(t)},addClassName:function(e){this.classNames.push(e.toLowerCase())},toString:function(){var e="";if(r(this.element)&&(e+=this.element),r(this.classNames))for(var t=0;t<this.classNames.length;t++)e+="."+this.classNames[t];if(r(this.attrs))for(var t=0;t<this.attrs.length;){var i=this.attrs[t++],o=this.attrs[t++];e+="["+i,o.length>0&&(e+="="+o),e+="]"}return n.forEach(this.notSelectors,function(t){e+=":not("+t.toString()+")"}),e}},{parse:function(t){for(var a,u=[],f=function(e,t){t.notSelectors.length>0&&i(t.element)&&n.isEmpty(t.classNames)&&n.isEmpty(t.attrs)&&(t.element="*"),e.push(t)},h=new e,d=o.matcher(l,t),p=h,g=!1;r(a=s.next(d));){if(r(a[1])){if(g)throw new c("Nesting :not is not allowed in a selector");g=!0,p=new e,h.notSelectors.push(p)}if(r(a[2])&&p.setElement(a[2]),r(a[3])&&p.addClassName(a[3]),r(a[4])&&p.addAttribute(a[4],a[5]),r(a[6])&&(g=!1,p=h),r(a[7])){if(g)throw new c("Multiple selectors in :not are not supported");f(u,h),h=p=new e}}return f(u,h),u}})}(),e("CssSelector",f),h=function(){function e(){this._elementMap=new t,this._elementPartialMap=new t,this._classMap=new t,this._classPartialMap=new t,this._attrValueMap=new t,this._attrValuePartialMap=new t,this._listContexts=[]}return $traceurRuntime.createClass(e,{addSelectables:function(e,t){var n=null;e.length>1&&(n=new d(e),this._listContexts.push(n));for(var r=0;r<e.length;r++)this._addSelectable(e[r],t,n)},_addSelectable:function(e,n,o){var s=this,a=e.element,c=e.classNames,u=e.attrs,l=new p(e,n,o);if(r(a)){var f=0===u.length&&0===c.length;f?this._addTerminal(s._elementMap,a,l):s=this._addPartial(s._elementPartialMap,a)}if(r(c))for(var h=0;h<c.length;h++){var f=0===u.length&&h===c.length-1,d=c[h];f?this._addTerminal(s._classMap,d,l):s=this._addPartial(s._classPartialMap,d)}if(r(u))for(var h=0;h<u.length;){var f=h===u.length-2,g=u[h++],m=u[h++];if(f){var v=s._attrValueMap,_=v.get(g);i(_)&&(_=new t,v.set(g,_)),this._addTerminal(_,m,l)}else{var y=s._attrValuePartialMap,b=y.get(g);i(b)&&(b=new t,y.set(g,b)),s=this._addPartial(b,m)}}},_addTerminal:function(e,t,n){var r=e.get(t);i(r)&&(r=[],e.set(t,r)),r.push(n)},_addPartial:function(t,n){var r=t.get(n);return i(r)&&(r=new e,t.set(n,r)),r},match:function(e,t){for(var n=!1,i=e.element,o=e.classNames,s=e.attrs,c=0;c<this._listContexts.length;c++)this._listContexts[c].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,i,e,t)||n,n=this._matchPartial(this._elementPartialMap,i,e,t)||n,r(o))for(var l=0;l<o.length;l++){var f=o[l];n=this._matchTerminal(this._classMap,f,e,t)||n,n=this._matchPartial(this._classPartialMap,f,e,t)||n}if(r(s))for(var l=0;l<s.length;){var h=s[l++],d=s[l++],p=this._attrValueMap.get(h);a.equals(d,u)||(n=this._matchTerminal(p,u,e,t)||n),n=this._matchTerminal(p,d,e,t)||n;var g=this._attrValuePartialMap.get(h);a.equals(d,u)||(n=this._matchPartial(g,u,e,t)||n),n=this._matchPartial(g,d,e,t)||n}return n},_matchTerminal:function(e,t,o,s){if(i(e)||i(t))return!1;var a=e.get(t),c=e.get("*");if(r(c)&&(a=n.concat(a,c)),i(a))return!1;for(var u,l=!1,f=0;f<a.length;f++)u=a[f],l=u.finalize(o,s)||l;return l},_matchPartial:function(e,t,n,r){if(i(e)||i(t))return!1;var o=e.get(t);return i(o)?!1:o.match(n,r)}},{createNotMatcher:function(t){var n=new e;return n.addSelectables(t,null),n}})}(),e("SelectorMatcher",h),d=function(){function e(e){this.selectors=e,this.alreadyMatched=!1}return $traceurRuntime.createClass(e,{},{})}(),e("SelectorListContext",d),p=function(){function e(e,t,n){this.selector=e,this.cbContext=t,this.listContext=n,this.notSelectors=e.notSelectors}return $traceurRuntime.createClass(e,{finalize:function(e,t){var n=!0;if(this.notSelectors.length>0&&(i(this.listContext)||!this.listContext.alreadyMatched)){var o=h.createNotMatcher(this.notSelectors);n=!o.match(e,null)}return n&&r(t)&&(i(this.listContext)||!this.listContext.alreadyMatched)&&(r(this.listContext)&&(this.listContext.alreadyMatched=!0),t(this.selector,this.cbContext)),n}},{})}(),e("SelectorContext",p)}}}),System.register("angular2/src/render/dom/compiler/view_splitter",["angular2/src/facade/lang","angular2/src/dom/dom_adapter","angular2/src/facade/collection","angular2/src/render/dom/compiler/compile_element","angular2/src/render/dom/util"],function(e){"use strict";var t,n,r,i,o,s,a,c;return{setters:[function(e){t=e.isPresent,n=e.BaseException,r=e.StringWrapper},function(e){i=e.DOM},function(e){o=e.MapWrapper},function(e){s=e.CompileElement},function(e){a=e.dashCaseToCamelCase}],execute:function(){c=function(){function e(e){this._parser=e}return $traceurRuntime.createClass(e,{process:function(e,a,c){var u=a.attrs(),l=u.get("template"),f=t(l);if(o.forEach(u,function(e,t){if(r.startsWith(t,"*")){var i=r.substring(t,1);if(f)throw new n("Only one template directive per element is allowed: "+(l+" and "+i+" cannot be used simultaneously ")+("in "+a.elementDescription));l=0==e.length?i:i+" "+e,f=!0}}),t(e)){if(i.isTemplateElement(a.element)&&!a.isViewRoot){var h=new s(i.createTemplate(""));h.inheritedProtoView=a.bindElement().bindNestedProtoView(h.element),h.elementDescription=a.elementDescription,h.isViewRoot=!0,this._moveChildNodes(i.content(a.element),i.content(h.element)),c.addChild(h)}if(f){var d=new s(i.createTemplate(""));d.inheritedProtoView=a.inheritedProtoView,d.inheritedElementBinder=a.inheritedElementBinder,d.distanceToInheritedBinder=a.distanceToInheritedBinder,d.elementDescription=a.elementDescription;var h=new s(i.createTemplate(""));h.inheritedProtoView=d.bindElement().bindNestedProtoView(h.element),h.elementDescription=a.elementDescription,h.isViewRoot=!0,a.inheritedProtoView=h.inheritedProtoView,a.inheritedElementBinder=null,a.distanceToInheritedBinder=0,this._parseTemplateBindings(l,d),i.insertBefore(a.element,d.element),c.addParent(d),i.appendChild(i.content(h.element),a.element),c.addParent(h)}}},_moveChildNodes:function(e,n){for(var r=i.firstChild(e);t(r);)i.appendChild(n,r),r=i.firstChild(e)},_parseTemplateBindings:function(e,n){for(var r=this._parser.parseTemplateBindings(e,n.elementDescription),o=0;o<r.length;o++){var s=r[o];s.keyIsVar?(n.bindElement().bindVariable(a(s.key),s.name),n.attrs().set(s.key,s.name)):t(s.expression)?(n.bindElement().bindProperty(a(s.key),s.expression),n.attrs().set(s.key,s.expression.source)):i.setAttribute(n.element,s.key,"")}}},{})}(),e("ViewSplitter",c)}}}),System.register("angular2/src/render/dom/shadow_dom/shadow_dom_compile_step",["angular2/src/render/dom/util"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.NG_CONTENT_ELEMENT_NAME,n=e.isElementWithTag}],execute:function(){r=function(){function e(e,t){this._shadowDomStrategy=e,this._view=t}return $traceurRuntime.createClass(e,{process:function(e,r,i){if(n(r.element,t))r.inheritedProtoView.bindNgContent();else if(n(r.element,"style"))this._processStyleElement(r,i);else{var o=r.isBound()?r.inheritedElementBinder.componentId:null;this._shadowDomStrategy.processElement(this._view.componentId,o,r.element)}},_processStyleElement:function(e,t){this._shadowDomStrategy.processStyleElement(this._view.componentId,this._view.templateAbsUrl,e.element),t.ignoreCurrentElement()}},{})}(),e("ShadowDomCompileStep",r)}}}),System.register("angular2/src/render/dom/view/proto_view_merger",["angular2/src/dom/dom_adapter","angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/render/dom/view/proto_view","angular2/src/render/dom/view/element_binder","angular2/src/render/api","angular2/src/render/dom/util"],function(e){"use strict";function t(e){var t=[],s=[];n(e,t,s);var c=t[0];o(t,s);var u=[];a(t,s,u),r(t);var l=m(u),f=u.map(function(e){return e.length}),h=S.content(l),d=$(h,!1),p=new Map,g=i(t),y=v(h,g,p),b=_(t,d,g,p),x=w(t,d),O=C(t,p),D=R(t,s),A=E(s),I=P.create(c.original.type,l,f,y,b);return new V(new j(I),f.length,x,O,D,A)}function n(e,t,r){var i=T(e[0]),o=t.length;t.push(L(i,!1)),0===r.length&&r.push([null,null]);for(var s=1,a=0;a<i.elementBinders.length;a++){var c=i.elementBinders[a];if(c.hasNestedProtoView){var u=e[s++];O(u)&&(r.push([o,a]),A(u)?n(u,t,r):t.push(L(T(u),!1)))}}}function r(e){e.forEach(function(e){e.boundTextNodes.forEach(function(e){var t=e.parentNode;O(t)&&S.isElementNode(t)&&S.addClass(t,M)})})}function i(e){for(var t=new Map,n=0;n<e.length;n++){var r=e[n];r.boundTextNodes.forEach(function(e){t.set(e,null)})}return t}function o(e,t){for(var n=s(e,t),r=1;r<e.length;r++){var i=e[r];if(i.original.type===k.EMBEDDED){var o=n[r],a=e[o];i.fragments.forEach(function(e){return a.fragments.push(e)})}}}function s(e,t){var n=I.createFixedSize(e.length);n[0]=null;for(var r=1;r<t.length;r++){var i=t[r][0],o=e[i];n[r]=0===i||o.original.type===k.COMPONENT?i:n[i]}return n}function a(e,t,n){var r=e[0];r.fragments.forEach(function(e){return n.push(e)});for(var i=1;i<e.length;i++){var o=t[i][0],s=t[i][1],r=e[o],a=e[i];a.original.type===k.COMPONENT&&c(r,s,a,n)}}function c(e,t,n,r){for(var i=e.boundElements[t],o=u(n.fragments),s=f(o),a=S.childNodesAsList(i),c=0;c<s.length;c++){var p=s[c],g=S.getAttribute(p,"select");a=d(g,p,a)}var m=l(o);h(e,t,m[0]);for(var c=1;c<m.length;c++)r.push(m[c])}function u(e){return e.map(function(e){var t=S.createTemplate("");return e.forEach(function(e){return S.appendChild(S.content(t),e)}),t})}function l(e){return e.map(function(e){return S.childNodesAsList(S.content(e))})}function f(e){var t=[];return e.forEach(function(e){for(var n=S.querySelectorAll(S.content(e),B),r=0;r<n.length;r++)t.push(n[r])}),g(t)}function h(e,t,n){var r=e.boundElements[t],i=e.original.elementBinders[t];if(i.hasNativeShadowRoot){for(var o=S.createElement(H),s=0;s<n.length;s++)S.appendChild(o,n[s]);var a=S.firstChild(r);O(a)?S.insertBefore(a,o):S.appendChild(r,o)}else{S.clearNodes(r);for(var s=0;s<n.length;s++)S.appendChild(r,n[s])}}function d(e,t,n){for(var r=[],i=0;i<n.length;i++){var o=n[i],s=!1;p(e)?s=!0:S.isElementNode(o)&&S.elementMatches(o,e)&&(s=!0),s?S.insertBefore(t,o):r.push(o)}return S.remove(t),r}function p(e){return D(e)||0===e.length||"*"==e}function g(e){var t=null,n=[];return e.forEach(function(e){var r=S.getAttribute(e,"select");p(r)?D(t)&&(t=e):n.push(e)}),O(t)&&n.push(t),n}function m(e){var t=S.createTemplate(""),n=S.content(t);return e.forEach(function(e){e.forEach(function(e){S.appendChild(n,e)})}),t}function v(e,t,n){var r=[];return F(e,t,function(e,t,i){r.push(t),n.set(e,n.size)}),r}function _(e,t,n,r){for(var i=y(e),o=[],s=0;s<t.length;s++){var a=t[s],c=[];F(a,n,function(e,t,n){c.push(t),r.set(e,r.size)}),o.push(b(i.get(a),c))}return o}function y(e){var t=new Map;return e.forEach(function(e){for(var n=0;n<e.boundElements.length;n++){var r=e.boundElements[n];O(r)&&t.set(r,e.original.elementBinders[n])}}),t}function b(e,t){var n;return n=new N(D(e)?{textNodeIndices:t,hasNestedProtoView:!1,eventLocals:null,localEvents:[],globalEvents:[],hasNativeShadowRoot:null}:{textNodeIndices:t,hasNestedProtoView:!1,eventLocals:e.eventLocals,localEvents:e.localEvents,globalEvents:e.globalEvents,hasNativeShadowRoot:e.hasNativeShadowRoot})}function w(e,t){var n=x(t),r=[];return e.forEach(function(e){e.boundElements.forEach(function(e){var t=n.get(e);r.push(t)})}),r}function C(e,t){var n=[];return e.forEach(function(e){e.boundTextNodes.forEach(function(e){var r=t.get(e);n.push(r)})}),n}function R(e,t){for(var n=[null],r=[0],i=e[0].original.elementBinders.length,o=1;o<t.length;o++){r.push(i),i+=e[o].original.elementBinders.length;var s=t[o][0],a=t[o][1];n.push(r[s]+a)}return n}function E(e){var t=I.createFixedSize(e.length);I.fill(t,0);for(var n=e.length-1;n>=1;n--){var r=e[n];O(r)&&(t[r[0]]+=t[n]+1)}return t}function x(e){for(var t=new Map,n=0;n<e.length;n++)t.set(e[n],n);return t}var S,O,D,A,I,P,j,T,N,V,k,M,B,L,$,F,H;return e("mergeProtoViewsRecursively",t),{setters:[function(e){S=e.DOM},function(e){O=e.isPresent,D=e.isBlank,A=e.isArray},function(e){I=e.ListWrapper},function(e){P=e.DomProtoView,j=e.DomProtoViewRef,T=e.resolveInternalDomProtoView},function(e){N=e.DomElementBinder},function(e){V=e.RenderProtoViewMergeMapping,k=e.ViewType},function(e){M=e.NG_BINDING_CLASS,B=e.NG_CONTENT_ELEMENT_NAME,L=e.cloneAndQueryProtoView,$=e.queryBoundElements,F=e.queryBoundTextNodeIndices,H=e.NG_SHADOW_ROOT_ELEMENT_NAME}],execute:function(){}}}),System.register("angular2/src/core/application_tokens",["angular2/di","angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){t=e.OpaqueToken},function(e){n=e.CONST_EXPR}],execute:function(){r=n(new t("Promise<ComponentRef>")),e("appComponentRefPromiseToken",r),i=n(new t("RootComponent")),e("appComponentTypeToken",i)}}}),System.register("angular2/src/forms/validators",["angular2/src/facade/lang","angular2/src/facade/collection"],function(e){"use strict";var t,n,r,i,o;return{setters:[function(e){t=e.isBlank,n=e.isPresent},function(e){r=e.ListWrapper,i=e.StringMapWrapper}],execute:function(){o=function(){function e(){}return $traceurRuntime.createClass(e,{},{required:function(e){return t(e.value)||""==e.value?{required:!0}:null},nullValidator:function(e){return null},compose:function(e){return function(t){var o=r.reduce(e,function(e,r){var o=r(t);return n(o)?i.merge(e,o):e},{});return i.isEmpty(o)?null:o}},group:function(t){var r={};return i.forEach(t.controls,function(i,o){t.contains(o)&&n(i.errors)&&e._mergeErrors(i,r)}),i.isEmpty(r)?null:r},array:function(t){var o={};return r.forEach(t.controls,function(t){n(t.errors)&&e._mergeErrors(t,o)}),i.isEmpty(o)?null:o},_mergeErrors:function(e,t){i.forEach(e.errors,function(n,r){i.contains(t,r)||(t[r]=[]);var o=t[r];o.push(e)})}})}(),e("Validators",o)}}}),System.register("angular2/src/forms/directives/abstract_control_directive",[],function(e){"use strict";var t;return{setters:[],execute:function(){t=function(){function e(){}return $traceurRuntime.createClass(e,{get control(){return null},get value(){return this.control.value},get valid(){return this.control.valid},get errors(){return this.control.errors},get pristine(){return this.control.pristine},get dirty(){return this.control.dirty},get touched(){return this.control.touched},get untouched(){return this.control.untouched}},{})}(),e("AbstractControlDirective",t)}}}),System.register("angular2/src/forms/directives/control_container",["angular2/src/forms/directives/abstract_control_directive"],function(e){"use strict";var t,n;return{setters:[function(e){t=e.AbstractControlDirective}],execute:function(){n=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{get formDirective(){return null},get path(){return null}},{},e)}(t),e("ControlContainer",n)}}}),System.register("angular2/src/forms/directives/ng_control",["angular2/src/forms/directives/abstract_control_directive"],function(e){"use strict";var t,n;return{setters:[function(e){t=e.AbstractControlDirective}],execute:function(){n=function(e){function t(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];(e=$traceurRuntime.superConstructor(t)).call.apply(e,$traceurRuntime.spread([this],n)),this.name=null,this.valueAccessor=null}return $traceurRuntime.createClass(t,{get validator(){return null},get path(){return null},viewToModelUpdate:function(e){}},{},e)}(t),e("NgControl",n)}}}),System.register("angular2/src/forms/directives/validators",["angular2/di","angular2/src/facade/lang","angular2/annotations","angular2/src/forms/validators"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l;return{setters:[function(e){r=e.forwardRef,i=e.Binding},function(e){o=e.CONST_EXPR},function(e){s=e.Directive},function(e){a=e.Validators}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=function(){function e(){}return $traceurRuntime.createClass(e,{get validator(){throw"Is not implemented"}},{})}(),e("NgValidator",c),u=o(new i(c,{toAlias:r(function(){return l})})),l=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{get validator(){return a.required}},{},e)}(c),e("NgRequiredValidator",l),e("NgRequiredValidator",l=t([s({selector:"[required][ng-control],[required][ng-form-control],[required][ng-model]",hostInjector:[u]}),n("design:paramtypes",[])],l))}}}),System.register("angular2/src/forms/directives/shared",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/forms/validators"],function(e){"use strict";function t(e,t){var n=a.clone(t.path);return n.push(e),n}function n(e,t){u(e)&&i(t,"Cannot find control"),u(t.valueAccessor)&&i(t,"No value accessor for"),e.validator=h.compose([e.validator,t.validator]),t.valueAccessor.writeValue(e.value),t.valueAccessor.registerOnChange(function(n){t.viewToModelUpdate(n),e.updateValue(n,{emitModelToViewChange:!1}),e.markAsDirty()}),e.registerOnChange(function(e){return t.valueAccessor.writeValue(e)}),t.valueAccessor.registerOnTouched(function(){return e.markAsTouched()})}function r(e){return u(e)?h.nullValidator:h.compose(e.map(function(e){return e.validator}))}function i(e,t){var n=a.join(e.path," -> ");throw new l(t+" '"+n+"'")}function o(e,t,n,r){e.setElementProperty(t,n,r)}function s(e,t){if(!c.contains(e,"model"))return!1;var n=e.model;return n.isFirstChange()?!0:!f(t,n.currentValue)}var a,c,u,l,f,h;return e("controlPath",t),e("setUpControl",n),e("composeNgValidator",r),e("setProperty",o),e("isPropertyUpdated",s),{setters:[function(e){a=e.ListWrapper,c=e.StringMapWrapper},function(e){u=e.isBlank,l=e.BaseException,f=e.looseIdentical},function(e){h=e.Validators}],execute:function(){}}}),System.register("angular2/src/forms/directives/ng_form_control",["angular2/src/facade/lang","angular2/src/facade/async","angular2/angular2","angular2/di","angular2/src/forms/directives/ng_control","angular2/src/forms/directives/validators","angular2/src/forms/directives/shared"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y;return{setters:[function(e){i=e.CONST_EXPR},function(e){o=e.EventEmitter,s=e.ObservableWrapper},function(e){a=e.Directive,c=e.LifecycleEvent,u=e.Query,l=e.QueryList},function(e){f=e.forwardRef,h=e.Binding},function(e){d=e.NgControl},function(e){p=e.NgValidator},function(e){g=e.setUpControl,m=e.composeNgValidator,v=e.isPropertyUpdated}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},r=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},_=i(new h(d,{toAlias:f(function(){return y})})),y=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this.update=new o,this._added=!1,this.ngValidators=e}return $traceurRuntime.createClass(t,{onChange:function(e){this._added||(g(this.form,this),this.form.updateValidity(),this._added=!0),v(e,this.viewModel)&&this.form.updateValue(this.model)},get path(){return[]},get control(){return this.form},get validator(){return m(this.ngValidators)},viewToModelUpdate:function(e){this.viewModel=e,s.callNext(this.update,e)}},{},e)}(d),e("NgFormControl",y),e("NgFormControl",y=t([a({selector:"[ng-form-control]",hostInjector:[_],properties:["form: ngFormControl","model: ngModel"],events:["update: ngModel"],lifecycle:[c.onChange],exportAs:"form"}),r(0,u(p)),n("design:paramtypes",[l])],y))}}}),System.register("angular2/src/forms/directives/ng_model",["angular2/src/facade/lang","angular2/src/facade/async","angular2/angular2","angular2/di","angular2/src/forms/directives/ng_control","angular2/src/forms/model","angular2/src/forms/directives/validators","angular2/src/forms/directives/shared"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b;return{setters:[function(e){i=e.CONST_EXPR},function(e){o=e.EventEmitter,s=e.ObservableWrapper},function(e){a=e.Directive,c=e.LifecycleEvent,u=e.QueryList,l=e.Query},function(e){f=e.forwardRef,h=e.Binding},function(e){d=e.NgControl},function(e){p=e.Control},function(e){g=e.NgValidator},function(e){m=e.setUpControl,v=e.composeNgValidator,_=e.isPropertyUpdated}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},r=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},y=i(new h(d,{toAlias:f(function(){return b})})),b=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this._control=new p,this._added=!1,this.update=new o,this.ngValidators=e}return $traceurRuntime.createClass(t,{onChange:function(e){this._added||(m(this._control,this),this._control.updateValidity(),this._added=!0),_(e,this.viewModel)&&this._control.updateValue(this.model)},get control(){return this._control},get path(){return[]},get validator(){return v(this.ngValidators)},viewToModelUpdate:function(e){this.viewModel=e,s.callNext(this.update,e)}},{},e)}(d),e("NgModel",b),e("NgModel",b=t([a({selector:"[ng-model]:not([ng-control]):not([ng-form-control])",hostInjector:[y],properties:["model: ngModel"],events:["update: ngModel"],lifecycle:[c.onChange],exportAs:"form"}),r(0,l(g)),n("design:paramtypes",[u])],b))}}}),System.register("angular2/src/forms/directives/ng_control_group",["angular2/angular2","angular2/di","angular2/src/facade/lang","angular2/src/forms/directives/control_container","angular2/src/forms/directives/shared"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d;return{setters:[function(e){i=e.Directive,o=e.LifecycleEvent},function(e){s=e.Ancestor,a=e.forwardRef,c=e.Binding},function(e){u=e.CONST_EXPR},function(e){l=e.ControlContainer},function(e){f=e.controlPath}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},r=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},h=u(new c(l,{toAlias:a(function(){return d})})),d=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this._parent=e}return $traceurRuntime.createClass(t,{onInit:function(){this.formDirective.addControlGroup(this)},onDestroy:function(){this.formDirective.removeControlGroup(this)},get control(){return this.formDirective.getControlGroup(this)},get path(){return f(this.name,this._parent)},get formDirective(){return this._parent.formDirective}},{},e)}(l),e("NgControlGroup",d),e("NgControlGroup",d=t([i({selector:"[ng-control-group]",hostInjector:[h],properties:["name: ng-control-group"],lifecycle:[o.onInit,o.onDestroy],exportAs:"form"}),r(0,s()),n("design:paramtypes",[l])],d))}}}),System.register("angular2/src/forms/directives/ng_form_model",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/facade/async","angular2/angular2","angular2/di","angular2/src/forms/directives/control_container","angular2/src/forms/directives/shared"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p;return{setters:[function(e){r=e.CONST_EXPR},function(e){i=e.ListWrapper},function(e){o=e.ObservableWrapper,s=e.EventEmitter},function(e){a=e.Directive,c=e.LifecycleEvent},function(e){u=e.forwardRef,l=e.Binding},function(e){f=e.ControlContainer},function(e){h=e.setUpControl}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},d=r(new l(f,{toAlias:u(function(){return p})})),p=function(e){function t(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];(e=$traceurRuntime.superConstructor(t)).call.apply(e,$traceurRuntime.spread([this],n)),this.form=null,this.directives=[],this.ngSubmit=new s}return $traceurRuntime.createClass(t,{onChange:function(e){this._updateDomValue()},get formDirective(){return this},get control(){return this.form},get path(){return[]},addControl:function(e){var t=this.form.find(e.path);h(t,e),t.updateValidity(),this.directives.push(e)},getControl:function(e){return this.form.find(e.path)},removeControl:function(e){i.remove(this.directives,e)},addControlGroup:function(e){},removeControlGroup:function(e){},getControlGroup:function(e){return this.form.find(e.path)},updateModel:function(e,t){var n=this.form.find(e.path);n.updateValue(t)},onSubmit:function(){return o.callNext(this.ngSubmit,null),!1},_updateDomValue:function(){var e=this;i.forEach(this.directives,function(t){var n=e.form.find(t.path);t.valueAccessor.writeValue(n.value)})}},{},e)}(f),e("NgFormModel",p),e("NgFormModel",p=t([a({selector:"[ng-form-model]",hostInjector:[d],properties:["form: ng-form-model"],lifecycle:[c.onChange],host:{"(submit)":"onSubmit()"},events:["ngSubmit"],exportAs:"form"}),n("design:paramtypes",[])],p))}}}),System.register("angular2/src/forms/directives/ng_form",["angular2/src/facade/async","angular2/src/facade/collection","angular2/src/facade/lang","angular2/annotations","angular2/di","angular2/src/forms/directives/control_container","angular2/src/forms/model","angular2/src/forms/directives/shared"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v;return{setters:[function(e){r=e.PromiseWrapper,i=e.ObservableWrapper,o=e.EventEmitter},function(e){s=e.ListWrapper},function(e){a=e.isPresent,c=e.CONST_EXPR},function(e){u=e.Directive},function(e){l=e.forwardRef,f=e.Binding},function(e){h=e.ControlContainer},function(e){d=e.ControlGroup,p=e.Control},function(e){g=e.setUpControl}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},m=c(new f(h,{toAlias:l(function(){return v})})),v=function(e){function t(){$traceurRuntime.superConstructor(t).call(this),this.ngSubmit=new o,this.form=new d({})}return $traceurRuntime.createClass(t,{get formDirective(){return this},get control(){return this.form},get path(){return[]},get controls(){return this.form.controls},addControl:function(e){var t=this;this._later(function(n){var r=t._findContainer(e.path),i=new p;g(i,e),r.addControl(e.name,i),i.updateValidity()})},getControl:function(e){return this.form.find(e.path)},removeControl:function(e){var t=this;this._later(function(n){var r=t._findContainer(e.path);
13
-
14
- a(r)&&(r.removeControl(e.name),r.updateValidity())})},addControlGroup:function(e){var t=this;this._later(function(n){var r=t._findContainer(e.path),i=new d({});r.addControl(e.name,i),i.updateValidity()})},removeControlGroup:function(e){var t=this;this._later(function(n){var r=t._findContainer(e.path);a(r)&&(r.removeControl(e.name),r.updateValidity())})},getControlGroup:function(e){return this.form.find(e.path)},updateModel:function(e,t){var n=this;this._later(function(r){var i=n.form.find(e.path);i.updateValue(t)})},onSubmit:function(){return i.callNext(this.ngSubmit,null),!1},_findContainer:function(e){return s.removeLast(e),s.isEmpty(e)?this.form:this.form.find(e)},_later:function(e){var t=r.completer();r.then(t.promise,e,function(e){}),t.resolve(null)}},{},e)}(h),e("NgForm",v),e("NgForm",v=t([u({selector:"form:not([ng-no-form]):not([ng-form-model]),ng-form,[ng-form]",hostInjector:[m],host:{"(submit)":"onSubmit()"},events:["ngSubmit"],exportAs:"form"}),n("design:paramtypes",[])],v))}}}),System.register("angular2/src/render/dom/shadow_dom/native_shadow_dom_strategy",["angular2/di","angular2/src/render/dom/shadow_dom/shadow_dom_strategy"],function(e){"use strict";var t,n,r,i,o;return{setters:[function(e){r=e.Injectable},function(e){i=e.ShadowDomStrategy}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{hasNativeContentElement:function(){return!0}},{},e)}(i),e("NativeShadowDomStrategy",o),e("NativeShadowDomStrategy",o=t([r(),n("design:paramtypes",[])],o))}}}),System.register("angular2/src/render/dom/shadow_dom/emulated_scoped_shadow_dom_strategy",["angular2/src/facade/lang","angular2/src/dom/dom_adapter","angular2/src/render/dom/shadow_dom/emulated_unscoped_shadow_dom_strategy","angular2/src/render/dom/shadow_dom/util"],function(e){"use strict";var t,n,r,i,o,s,a,c,u;return{setters:[function(e){t=e.isPresent},function(e){n=e.DOM},function(e){r=e.EmulatedUnscopedShadowDomStrategy},function(e){i=e.getContentAttribute,o=e.getHostAttribute,s=e.getComponentId,a=e.shimCssForComponent,c=e.insertStyleElement}],execute:function(){u=function(e){function r(e){$traceurRuntime.superConstructor(r).call(this,e)}return $traceurRuntime.createClass(r,{processStyleElement:function(e,t,r){var i=n.getText(r);i=a(i,e),n.setText(r,i),this._moveToStyleHost(r)},_moveToStyleHost:function(e){n.remove(e),c(this.styleHost,e)},processElement:function(e,r,a){if(t(e)){var c=i(s(e));n.setAttribute(a,c,"")}if(t(r)){var u=o(s(r));n.setAttribute(a,u,"")}}},{},e)}(r),e("EmulatedScopedShadowDomStrategy",u)}}}),System.register("angular2/src/forms/directives/checkbox_value_accessor",["angular2/render","angular2/annotations","angular2/core","angular2/src/forms/directives/ng_control","angular2/src/facade/lang","angular2/src/forms/directives/shared"],function(e){"use strict";var t,n,r,i,o,s,a,c,u;return{setters:[function(e){r=e.Renderer},function(e){i=e.Directive},function(e){o=e.ElementRef},function(e){s=e.NgControl},function(e){a=e.isPresent},function(e){c=e.setProperty}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},u=$traceurRuntime.createClass(function(e,t,n){this.cd=e,this.renderer=t,this.elementRef=n,this.onChange=function(e){},this.onTouched=function(){},e.valueAccessor=this},{writeValue:function(e){c(this.renderer,this.elementRef,"checked",e)},get ngClassUntouched(){return a(this.cd.control)?this.cd.control.untouched:!1},get ngClassTouched(){return a(this.cd.control)?this.cd.control.touched:!1},get ngClassPristine(){return a(this.cd.control)?this.cd.control.pristine:!1},get ngClassDirty(){return a(this.cd.control)?this.cd.control.dirty:!1},get ngClassValid(){return a(this.cd.control)?this.cd.control.valid:!1},get ngClassInvalid(){return a(this.cd.control)?!this.cd.control.valid:!1},registerOnChange:function(e){this.onChange=e},registerOnTouched:function(e){this.onTouched=e}},{}),e("CheckboxControlValueAccessor",u),e("CheckboxControlValueAccessor",u=t([i({selector:"input[type=checkbox][ng-control],input[type=checkbox][ng-form-control],input[type=checkbox][ng-model]",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()","[class.ng-untouched]":"ngClassUntouched","[class.ng-touched]":"ngClassTouched","[class.ng-pristine]":"ngClassPristine","[class.ng-dirty]":"ngClassDirty","[class.ng-valid]":"ngClassValid","[class.ng-invalid]":"ngClassInvalid"}}),n("design:paramtypes",[s,r,o])],u))}}}),System.register("angular2/src/forms/directives/select_control_value_accessor",["angular2/render","angular2/angular2","angular2/src/forms/directives/ng_control","angular2/src/facade/lang","angular2/src/forms/directives/shared"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d;return{setters:[function(e){i=e.Renderer},function(e){o=e.ElementRef,s=e.QueryList,a=e.Directive,c=e.Query},function(e){u=e.NgControl},function(e){l=e.isPresent},function(e){f=e.setProperty}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},r=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},h=$traceurRuntime.createClass(function(){},{},{}),e("NgSelectOption",h),e("NgSelectOption",h=t([a({selector:"option"}),n("design:paramtypes",[])],h)),d=$traceurRuntime.createClass(function(e,t,n,r){this.cd=e,this.renderer=t,this.elementRef=n,this.onChange=function(e){},this.onTouched=function(){},e.valueAccessor=this,this._updateValueWhenListOfOptionsChanges(r)},{writeValue:function(e){this.value=e,f(this.renderer,this.elementRef,"value",e)},get ngClassUntouched(){return l(this.cd.control)?this.cd.control.untouched:!1},get ngClassTouched(){return l(this.cd.control)?this.cd.control.touched:!1},get ngClassPristine(){return l(this.cd.control)?this.cd.control.pristine:!1},get ngClassDirty(){return l(this.cd.control)?this.cd.control.dirty:!1},get ngClassValid(){return l(this.cd.control)?this.cd.control.valid:!1},get ngClassInvalid(){return l(this.cd.control)?!this.cd.control.valid:!1},registerOnChange:function(e){this.onChange=e},registerOnTouched:function(e){this.onTouched=e},_updateValueWhenListOfOptionsChanges:function(e){var t=this;e.onChange(function(){return t.writeValue(t.value)})}},{}),e("SelectControlValueAccessor",d),e("SelectControlValueAccessor",d=t([a({selector:"select[ng-control],select[ng-form-control],select[ng-model]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()","[class.ng-untouched]":"ngClassUntouched","[class.ng-touched]":"ngClassTouched","[class.ng-pristine]":"ngClassPristine","[class.ng-dirty]":"ngClassDirty","[class.ng-valid]":"ngClassValid","[class.ng-invalid]":"ngClassInvalid"}}),r(3,c(h,{descendants:!0})),n("design:paramtypes",[u,i,o,s])],d))}}}),System.register("angular2/src/forms/directives",["angular2/src/facade/lang","angular2/src/forms/directives/ng_control_name","angular2/src/forms/directives/ng_form_control","angular2/src/forms/directives/ng_model","angular2/src/forms/directives/ng_control_group","angular2/src/forms/directives/ng_form_model","angular2/src/forms/directives/ng_form","angular2/src/forms/directives/default_value_accessor","angular2/src/forms/directives/checkbox_value_accessor","angular2/src/forms/directives/select_control_value_accessor","angular2/src/forms/directives/validators","angular2/src/forms/directives/ng_control"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d;return{setters:[function(e){t=e.CONST_EXPR},function(t){n=t.NgControlName,e("NgControlName",t.NgControlName)},function(t){r=t.NgFormControl,e("NgFormControl",t.NgFormControl)},function(t){i=t.NgModel,e("NgModel",t.NgModel)},function(t){o=t.NgControlGroup,e("NgControlGroup",t.NgControlGroup)},function(t){s=t.NgFormModel,e("NgFormModel",t.NgFormModel)},function(t){a=t.NgForm,e("NgForm",t.NgForm)},function(t){c=t.DefaultValueAccessor,e("DefaultValueAccessor",t.DefaultValueAccessor)},function(t){u=t.CheckboxControlValueAccessor,e("CheckboxControlValueAccessor",t.CheckboxControlValueAccessor)},function(t){l=t.SelectControlValueAccessor,f=t.NgSelectOption,e("SelectControlValueAccessor",t.SelectControlValueAccessor),e("NgSelectOption",t.NgSelectOption)},function(t){h=t.NgRequiredValidator,e("NgValidator",t.NgValidator),e("NgRequiredValidator",t.NgRequiredValidator)},function(t){e("NgControl",t.NgControl)}],execute:function(){d=t([n,o,r,i,s,a,f,c,u,l,h]),e("formDirectives",d)}}}),System.register("angular2/src/forms/form_builder",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/forms/model"],function(e){"use strict";var t,n,r,i,o,s;return{setters:[function(e){t=e.StringMapWrapper,n=e.ListWrapper},function(e){r=e.isPresent,i=e.isArray},function(e){o=e}],execute:function(){s=function(){function e(){}return $traceurRuntime.createClass(e,{group:function(e){var n=void 0!==arguments[1]?arguments[1]:null,i=this._reduceControls(e),s=r(n)?t.get(n,"optionals"):null,a=r(n)?t.get(n,"validator"):null;return r(a)?new o.ControlGroup(i,s,a):new o.ControlGroup(i,s)},control:function(e){var t=void 0!==arguments[1]?arguments[1]:null;return r(t)?new o.Control(e,t):new o.Control(e)},array:function(e){var t=void 0!==arguments[1]?arguments[1]:null,i=this,s=n.map(e,function(e){return i._createControl(e)});return r(t)?new o.ControlArray(s,t):new o.ControlArray(s)},_reduceControls:function(e){var n=this,r={};return t.forEach(e,function(e,t){r[t]=n._createControl(e)}),r},_createControl:function(e){if(e instanceof o.Control||e instanceof o.ControlGroup||e instanceof o.ControlArray)return e;if(i(e)){var t=n.get(e,0),r=e.length>1?e[1]:null;return this.control(t,r)}return this.control(e)}},{})}(),e("FormBuilder",s)}}}),System.register("angular2/src/directives/ng_for",["angular2/annotations","angular2/angular2","angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h;return{setters:[function(e){r=e.Directive},function(e){i=e.ViewContainerRef,o=e.TemplateRef,s=e.Pipes,a=e.LifecycleEvent,c=e.ChangeDetectorRef},function(e){u=e.isPresent,l=e.isBlank}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},f=$traceurRuntime.createClass(function(e,t,n,r){this.viewContainer=e,this.templateRef=t,this.pipes=n,this.cdr=r},{set ngForOf(e){this._ngForOf=e,this._pipe=this.pipes.get("iterableDiff",e,this.cdr,this._pipe)},onCheck:function(){var e=this._pipe.transform(this._ngForOf,null);u(e)&&this._applyChanges(e.wrapped)},_applyChanges:function(e){if(l(e))return void this.viewContainer.clear();var t=[];e.forEachRemovedItem(function(e){return t.push(new h(e,null))}),e.forEachMovedItem(function(e){return t.push(new h(e,null))});var n=f.bulkRemove(t,this.viewContainer);e.forEachAddedItem(function(e){return n.push(new h(e,null))}),f.bulkInsert(n,this.viewContainer,this.templateRef);for(var r=0;r<n.length;r++)this._perViewChange(n[r].view,n[r].record)},_perViewChange:function(e,t){e.setLocal("$implicit",t.item),e.setLocal("index",t.currentIndex)}},{bulkRemove:function(e,t){e.sort(function(e,t){return e.record.previousIndex-t.record.previousIndex});for(var n=[],r=e.length-1;r>=0;r--){var i=e[r];u(i.record.currentIndex)?(i.view=t.detach(i.record.previousIndex),n.push(i)):t.remove(i.record.previousIndex)}return n},bulkInsert:function(e,t,n){e.sort(function(e,t){return e.record.currentIndex-t.record.currentIndex});for(var r=0;r<e.length;r++){var i=e[r];u(i.view)?t.insert(i.view,i.record.currentIndex):i.view=t.createEmbeddedView(n,i.record.currentIndex)}return e}}),e("NgFor",f),e("NgFor",f=t([r({selector:"[ng-for][ng-for-of]",properties:["ngForOf"],lifecycle:[a.onCheck]}),n("design:paramtypes",[i,o,s,c])],f)),h=function(){function e(e,t){this.record=e,this.view=t}return $traceurRuntime.createClass(e,{},{})}(),e("RecordViewTuple",h)}}}),System.register("angular2/src/directives/ng_if",["angular2/annotations","angular2/core","angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o,s,a;return{setters:[function(e){r=e.Directive},function(e){i=e.ViewContainerRef,o=e.TemplateRef},function(e){s=e.isBlank}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},a=$traceurRuntime.createClass(function(e,t){this.viewContainer=e,this.prevCondition=null,this.templateRef=t},{set ngIf(e){!e||!s(this.prevCondition)&&this.prevCondition?e||!s(this.prevCondition)&&!this.prevCondition||(this.prevCondition=!1,this.viewContainer.clear()):(this.prevCondition=!0,this.viewContainer.createEmbeddedView(this.templateRef))}},{}),e("NgIf",a),e("NgIf",a=t([r({selector:"[ng-if]",properties:["ngIf"]}),n("design:paramtypes",[i,o])],a))}}}),System.register("angular2/src/directives/ng_non_bindable",["angular2/annotations"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){r=e.Directive}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},i=$traceurRuntime.createClass(function(){},{},{}),e("NgNonBindable",i),e("NgNonBindable",i=t([r({selector:"[ng-non-bindable]",compileChildren:!1}),n("design:paramtypes",[])],i))}}}),System.register("angular2/src/directives/ng_switch",["angular2/annotations","angular2/di","angular2/core","angular2/src/facade/lang","angular2/src/facade/collection"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_;return{setters:[function(e){i=e.Directive},function(e){o=e.Ancestor},function(e){s=e.ViewContainerRef,a=e.TemplateRef},function(e){c=e.isPresent,u=e.isBlank,l=e.normalizeBlank},function(e){f=e.ListWrapper,h=e.MapWrapper,d=e.Map}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},r=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},p=function(){function e(e,t){this._templateRef=t,this._viewContainerRef=e}return $traceurRuntime.createClass(e,{create:function(){this._viewContainerRef.createEmbeddedView(this._templateRef)},destroy:function(){this._viewContainerRef.clear()}},{})}(),e("SwitchView",p),g=$traceurRuntime.createClass(function(){this._valueViews=new d,this._activeViews=[],this._useDefault=!1},{set ngSwitch(e){this._emptyAllActiveViews(),this._useDefault=!1;var t=this._valueViews.get(e);u(t)&&(this._useDefault=!0,t=l(this._valueViews.get(_))),this._activateViews(t),this._switchValue=e},_onWhenValueChanged:function(e,t,n){this._deregisterView(e,n),this._registerView(t,n),e===this._switchValue?(n.destroy(),f.remove(this._activeViews,n)):t===this._switchValue&&(this._useDefault&&(this._useDefault=!1,this._emptyAllActiveViews()),n.create(),this._activeViews.push(n)),0!==this._activeViews.length||this._useDefault||(this._useDefault=!0,this._activateViews(this._valueViews.get(_)))},_emptyAllActiveViews:function(){for(var e=this._activeViews,t=0;t<e.length;t++)e[t].destroy();this._activeViews=[]},_activateViews:function(e){if(c(e)){for(var t=0;t<e.length;t++)e[t].create();this._activeViews=e}},_registerView:function(e,t){var n=this._valueViews.get(e);u(n)&&(n=[],this._valueViews.set(e,n)),n.push(t)},_deregisterView:function(e,t){if(e!=_){var n=this._valueViews.get(e);1==n.length?h["delete"](this._valueViews,e):f.remove(n,t)}}},{}),e("NgSwitch",g),e("NgSwitch",g=t([i({selector:"[ng-switch]",properties:["ngSwitch"]}),n("design:paramtypes",[])],g)),m=$traceurRuntime.createClass(function(e,t,n){this._value=_,this._switch=n,this._view=new p(e,t)},{onDestroy:function(){this._switch},set ngSwitchWhen(e){this._switch._onWhenValueChanged(this._value,e,this._view),this._value=e}},{}),e("NgSwitchWhen",m),e("NgSwitchWhen",m=t([i({selector:"[ng-switch-when]",properties:["ngSwitchWhen"]}),r(2,o()),n("design:paramtypes",[s,a,g])],m)),v=$traceurRuntime.createClass(function(e,t,n){n._registerView(_,new p(e,t))},{},{}),e("NgSwitchDefault",v),e("NgSwitchDefault",v=t([i({selector:"[ng-switch-default]"}),r(2,o()),n("design:paramtypes",[s,a,g])],v)),_=new Object}}}),System.register("angular2/src/directives/class",["angular2/annotations","angular2/core","angular2/src/change_detection/pipes/pipes","angular2/src/render/api","angular2/src/change_detection/pipes/iterable_changes","angular2/src/facade/lang","angular2/src/facade/collection"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p;return{setters:[function(e){r=e.Directive,i=e.LifecycleEvent},function(e){o=e.ElementRef},function(e){s=e.Pipes},function(e){a=e.Renderer},function(e){c=e.IterableChanges},function(e){u=e.isPresent,l=e.isString},function(e){f=e.ListWrapper,h=e.StringMapWrapper,d=e.isListLikeIterable}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},p=$traceurRuntime.createClass(function(e,t,n){this._pipes=e,this._ngEl=t,this._renderer=n},{set rawClass(e){this._cleanupClasses(this._rawClass),l(e)&&(e=e.split(" ")),this._rawClass=e,this._pipe=this._pipes.get(d(e)?"iterableDiff":"keyValDiff",e)},onCheck:function(){var e=this._pipe.transform(this._rawClass,null);u(e)&&u(e.wrapped)&&(e.wrapped instanceof c?this._applyArrayChanges(e.wrapped):this._applyObjectChanges(e.wrapped))},_cleanupClasses:function(e){var t=this;u(e)&&(d(e)?f.forEach(e,function(e){t._toggleClass(e,!1)}):h.forEach(e,function(e,n){e&&t._toggleClass(n,!1)}))},_applyObjectChanges: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)})},_applyArrayChanges:function(e){var t=this;e.forEachAddedItem(function(e){t._toggleClass(e.item,!0)}),e.forEachRemovedItem(function(e){t._toggleClass(e.item,!1)})},_toggleClass:function(e,t){this._renderer.setElementClass(this._ngEl,e,t)}},{}),e("CSSClass",p),e("CSSClass",p=t([r({selector:"[class]",lifecycle:[i.onCheck],properties:["rawClass: class"]}),n("design:paramtypes",[s,o,a])],p))}}}),System.register("angular2/src/directives/ng_style",["angular2/annotations","angular2/core","angular2/src/change_detection/pipes/pipes","angular2/src/facade/lang","angular2/src/render/api"],function(e){"use strict";var t,n,r,i,o,s,a,c,u;return{setters:[function(e){r=e.Directive,i=e.LifecycleEvent},function(e){o=e.ElementRef},function(e){s=e.Pipes},function(e){a=e.isPresent},function(e){c=e.Renderer}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},u=$traceurRuntime.createClass(function(e,t,n){this._pipes=e,this._ngEl=t,this._renderer=n},{set rawStyle(e){this._rawStyle=e,this._pipe=this._pipes.get("keyValDiff",this._rawStyle)},onCheck:function(){var e=this._pipe.transform(this._rawStyle,null);a(e)&&a(e.wrapped)&&this._applyChanges(e.wrapped)},_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)})},_setStyle:function(e,t){this._renderer.setElementStyle(this._ngEl,e,t)}},{}),e("NgStyle",u),e("NgStyle",u=t([r({selector:"[ng-style]",lifecycle:[i.onCheck],properties:["rawStyle: ng-style"]}),n("design:paramtypes",[s,o,c])],u))}}}),System.register("angular2/src/http/interfaces",["angular2/src/facade/lang"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.BaseException}],execute:function(){n=function(){function e(){}return $traceurRuntime.createClass(e,{createConnection:function(e){throw new t("Abstract!")}},{})}(),e("ConnectionBackend",n),r=function(){function e(){}return $traceurRuntime.createClass(e,{dispose:function(){throw new t("Abstract!")}},{})}(),e("Connection",r)}}}),System.register("angular2/src/http/headers",["angular2/src/facade/lang","angular2/src/facade/collection"],function(e){"use strict";var t,n,r,i,o,s,a,c;return{setters:[function(e){t=e.isBlank,n=e.BaseException},function(e){r=e.isListLikeIterable,i=e.Map,o=e.MapWrapper,s=e.ListWrapper,a=e.StringMap}],execute:function(){c=function(){function e(n){var s=this;return t(n)?void(this._headersMap=new i):void(n instanceof e?this._headersMap=n._headersMap:n instanceof a&&(this._headersMap=o.createFromStringMap(n),o.forEach(this._headersMap,function(e,t){if(!r(e)){var n=[];n.push(e),s._headersMap.set(t,n)}})))}return $traceurRuntime.createClass(e,{append:function(e,t){var n=this._headersMap.get(e),i=r(n)?n:[];i.push(t),this._headersMap.set(e,i)},"delete":function(e){o["delete"](this._headersMap,e)},forEach:function(e){o.forEach(this._headersMap,e)},get:function(e){return s.first(this._headersMap.get(e))},has:function(e){return this._headersMap.has(e)},keys:function(){return o.keys(this._headersMap)},set:function(e,t){var n=[];if(r(t)){var i=t.join(",");n.push(i)}else n.push(t);this._headersMap.set(e,n)},values:function(){return o.values(this._headersMap)},getAll:function(e){var t=this._headersMap.get(e);return r(t)?t:[]},entries:function(){throw new n('"entries" method is not implemented on Headers class')}},{})}(),e("Headers",c)}}}),System.register("angular2/src/http/enums",[],function(e){"use strict";var t,n,r,i,o,s,a;return{setters:[],execute:function(){e("RequestModesOpts",t),function(e){e[e.Cors=0]="Cors",e[e.NoCors=1]="NoCors",e[e.SameOrigin=2]="SameOrigin"}(t||e("RequestModesOpts",t={})),e("RequestCacheOpts",n),function(e){e[e.Default=0]="Default",e[e.NoStore=1]="NoStore",e[e.Reload=2]="Reload",e[e.NoCache=3]="NoCache",e[e.ForceCache=4]="ForceCache",e[e.OnlyIfCached=5]="OnlyIfCached"}(n||e("RequestCacheOpts",n={})),e("RequestCredentialsOpts",r),function(e){e[e.Omit=0]="Omit",e[e.SameOrigin=1]="SameOrigin",e[e.Include=2]="Include"}(r||e("RequestCredentialsOpts",r={})),e("RequestMethods",i),function(e){e[e.GET=0]="GET",e[e.POST=1]="POST",e[e.PUT=2]="PUT",e[e.DELETE=3]="DELETE",e[e.OPTIONS=4]="OPTIONS",e[e.HEAD=5]="HEAD",e[e.PATCH=6]="PATCH"}(i||e("RequestMethods",i={})),o=function(){function e(){this._methods=["GET","POST","PUT","DELETE","OPTIONS","HEAD","PATCH"]}return $traceurRuntime.createClass(e,{getMethod:function(e){return this._methods[e]}},{})}(),e("RequestMethodsMap",o),e("ReadyStates",s),function(e){e[e.UNSENT=0]="UNSENT",e[e.OPEN=1]="OPEN",e[e.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",e[e.LOADING=3]="LOADING",e[e.DONE=4]="DONE",e[e.CANCELLED=5]="CANCELLED"}(s||e("ReadyStates",s={})),e("ResponseTypes",a),function(e){e[e.Basic=0]="Basic",e[e.Cors=1]="Cors",e[e.Default=2]="Default",e[e.Error=3]="Error",e[e.Opaque=4]="Opaque"}(a||e("ResponseTypes",a={}))}}}),System.register("angular2/src/http/http_utils",["angular2/src/facade/lang"],function(e){"use strict";return{setters:[function(t){e("isJsObject",t.isJsObject)}],execute:function(){}}}),System.register("angular2/src/http/base_response_options",["angular2/di","angular2/src/facade/lang","angular2/src/http/headers","angular2/src/http/enums"],function(e){"use strict";var t,n,r,i,o,s,a,c;return{setters:[function(e){r=e.Injectable},function(e){i=e.isPresent},function(e){o=e.Headers},function(e){s=e.ResponseTypes}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},a=function(){function e(){var e=void 0!==arguments[0]?arguments[0]:{},t=e.body,n=e.status,r=e.headers,o=e.statusText,s=e.type,a=e.url;this.body=i(t)?t:null,this.status=i(n)?n:null,this.headers=i(r)?r:null,this.statusText=i(o)?o:null,this.type=i(s)?s:null,this.url=i(a)?a:null}return $traceurRuntime.createClass(e,{merge:function(t){return new e({body:i(t)&&i(t.body)?t.body:this.body,status:i(t)&&i(t.status)?t.status:this.status,headers:i(t)&&i(t.headers)?t.headers:this.headers,statusText:i(t)&&i(t.statusText)?t.statusText:this.statusText,type:i(t)&&i(t.type)?t.type:this.type,url:i(t)&&i(t.url)?t.url:this.url})}},{})}(),e("ResponseOptions",a),c=function(e){function t(){$traceurRuntime.superConstructor(t).call(this,{status:200,statusText:"Ok",type:s.Default,headers:new o})}return $traceurRuntime.createClass(t,{},{},e)}(a),e("BaseResponseOptions",c),e("BaseResponseOptions",c=t([r(),n("design:paramtypes",[])],c))}}}),System.register("angular2/src/http/backends/browser_xhr",["angular2/di"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){r=e.Injectable}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},i=$traceurRuntime.createClass(function(){},{build:function(){return new XMLHttpRequest}},{}),e("BrowserXhr",i),e("BrowserXhr",i=t([r(),n("design:paramtypes",[])],i))}}}),System.register("angular2/src/http/backends/browser_jsonp",["angular2/di","angular2/src/facade/lang"],function(e){"use strict";function t(){return null===c&&(c=o[a]={}),c}var n,r,i,o,s,a,c,u;return{setters:[function(e){i=e.Injectable},function(e){o=e.global}],execute:function(){n=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},r=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=0,a="__ng_jsonp__",e("JSONP_HOME",a),c=null,u=$traceurRuntime.createClass(function(){},{build:function(e){var t=document.createElement("script");return t.src=e,t},nextRequestID:function(){return"__req"+s++},requestCallback:function(e){return a+"."+e+".finished"},exposeConnection:function(e,n){var r=t();r[e]=n},removeConnection:function(e){var n=t();n[e]=null},send:function(e){document.body.appendChild(e)},cleanup:function(e){e.parentNode&&e.parentNode.removeChild(e)}},{}),e("BrowserJsonp",u),e("BrowserJsonp",u=n([i(),r("design:paramtypes",[])],u))}}}),System.register("angular2/src/http/backends/mock_backend",["angular2/di","angular2/src/http/static_request","angular2/src/http/enums","angular2/src/http/interfaces","angular2/src/facade/async","angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p;return{setters:[function(e){r=e.Injectable},function(e){i=e.Request},function(e){o=e.ReadyStates},function(e){s=e.Connection,a=e.ConnectionBackend},function(e){c=e.ObservableWrapper,u=e.EventEmitter},function(e){l=e.isPresent,f=e.IMPLEMENTS,h=e.BaseException}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},d=$traceurRuntime.createClass(function(e){this.response=new u,this.readyState=o.OPEN,this.request=e},{dispose:function(){this.readyState!==o.DONE&&(this.readyState=o.CANCELLED)},mockRespond:function(e){if(this.readyState===o.DONE||this.readyState===o.CANCELLED)throw new h("Connection has already been resolved");this.readyState=o.DONE,c.callNext(this.response,e),c.callReturn(this.response)},mockDownload:function(e){},mockError:function(e){
15
- this.readyState=o.DONE,c.callThrow(this.response,e),c.callReturn(this.response)}},{}),e("MockConnection",d),e("MockConnection",d=t([f(s),n("design:paramtypes",[i])],d)),p=$traceurRuntime.createClass(function(){var e=this;this.connectionsArray=[],this.connections=new u,c.subscribe(this.connections,function(t){return e.connectionsArray.push(t)}),this.pendingConnections=new u},{verifyNoPendingRequests:function(){var e=0;if(c.subscribe(this.pendingConnections,function(t){return e++}),e>0)throw new h(e+" pending connections to be resolved")},resolveAllConnections:function(){c.subscribe(this.connections,function(e){return e.readyState=4})},createConnection:function(e){if(!(l(e)&&e instanceof i))throw new h("createConnection requires an instance of Request, got "+e);var t=new d(e);return c.callNext(this.connections,t),t}},{}),e("MockBackend",p),e("MockBackend",p=t([r(),f(a),n("design:paramtypes",[])],p))}}}),System.register("angular2/src/http/url_search_params",["angular2/src/facade/lang","angular2/src/facade/collection"],function(e){"use strict";function t(e){var t=new i,o=r.split(e,new RegExp("&"));return s.forEach(o,function(e){var i=r.split(e,new RegExp("=")),o=s.get(i,0),a=s.get(i,1),c=n(t.get(o))?t.get(o):[];c.push(a),t.set(o,c)}),t}var n,r,i,o,s,a,c;return{setters:[function(e){n=e.isPresent,r=e.StringWrapper},function(e){i=e.Map,o=e.MapWrapper,s=e.ListWrapper,a=e.isListLikeIterable}],execute:function(){c=function(){function e(e){this.rawParams=e,this.paramsMap=t(e)}return $traceurRuntime.createClass(e,{has:function(e){return this.paramsMap.has(e)},get:function(e){var t=this.paramsMap.get(e);return a(t)?s.first(t):null},getAll:function(e){var t=this.paramsMap.get(e);return n(t)?t:[]},append:function(e,t){var r=this.paramsMap.get(e),i=n(r)?r:[];i.push(t),this.paramsMap.set(e,i)},toString:function(){var e=[];return o.forEach(this.paramsMap,function(t,n){s.forEach(t,function(t){e.push(n+"="+t)})}),s.join(e,"&")},"delete":function(e){o["delete"](this.paramsMap,e)}},{})}(),e("URLSearchParams",c)}}}),System.register("angular2/src/change_detection/parser/ast",["angular2/src/facade/lang","angular2/src/facade/collection"],function(e){"use strict";function t(e,t,n){var r=n.length;if(r>10)throw new o("Cannot have more than 10 argument");for(var i=P[r],s=0;r>s;s++)i[s]=n[s].eval(e,t);return i}var n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b,w,C,R,E,x,S,O,D,A,I,P;return{setters:[function(e){n=e.isBlank,r=e.isPresent,i=e.FunctionWrapper,o=e.BaseException},function(e){s=e.ListWrapper,a=e.StringMapWrapper}],execute:function(){c=function(){function e(){}return $traceurRuntime.createClass(e,{eval:function(e,t){throw new o("Not supported")},get isAssignable(){return!1},assign:function(e,t,n){throw new o("Not supported")},visit:function(e){return null},toString:function(){return"AST"}},{})}(),e("AST",c),u=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{eval:function(e,t){return null},visit:function(e){}},{},e)}(c),e("EmptyExpr",u),l=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{eval:function(e,t){return e},visit:function(e){return e.visitImplicitReceiver(this)}},{},e)}(c),e("ImplicitReceiver",l),f=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this.expressions=e}return $traceurRuntime.createClass(t,{eval:function(e,t){for(var n,i=0;i<this.expressions.length;i++){var o=this.expressions[i].eval(e,t);r(o)&&(n=o)}return n},visit:function(e){return e.visitChain(this)}},{},e)}(c),e("Chain",f),h=function(e){function t(e,n,r){$traceurRuntime.superConstructor(t).call(this),this.condition=e,this.trueExp=n,this.falseExp=r}return $traceurRuntime.createClass(t,{eval:function(e,t){return this.condition.eval(e,t)?this.trueExp.eval(e,t):this.falseExp.eval(e,t)},visit:function(e){return e.visitConditional(this)}},{},e)}(c),e("Conditional",h),d=function(e){function t(e,n,r){$traceurRuntime.superConstructor(t).call(this),this.condition=e,this.trueExp=n,this.falseExp=r}return $traceurRuntime.createClass(t,{eval:function(e,t){this.condition.eval(e,t)?this.trueExp.eval(e,t):r(this.falseExp)&&this.falseExp.eval(e,t)},visit:function(e){return e.visitIf(this)}},{},e)}(c),e("If",d),p=function(e){function t(e,n,r,i){$traceurRuntime.superConstructor(t).call(this),this.receiver=e,this.name=n,this.getter=r,this.setter=i}return $traceurRuntime.createClass(t,{eval:function(e,t){if(this.receiver instanceof l&&r(t)&&t.contains(this.name))return t.get(this.name);var n=this.receiver.eval(e,t);return this.getter(n)},get isAssignable(){return!0},assign:function(e,t,n){var i=this.receiver.eval(e,t);if(this.receiver instanceof l&&r(t)&&t.contains(this.name))throw new o("Cannot reassign a variable binding "+this.name);return this.setter(i,n)},visit:function(e){return e.visitAccessMember(this)}},{},e)}(c),e("AccessMember",p),g=function(e){function t(e,n,r,i){$traceurRuntime.superConstructor(t).call(this),this.receiver=e,this.name=n,this.getter=r,this.setter=i}return $traceurRuntime.createClass(t,{eval:function(e,t){var r=this.receiver.eval(e,t);return n(r)?null:this.getter(r)},visit:function(e){return e.visitSafeAccessMember(this)}},{},e)}(c),e("SafeAccessMember",g),m=function(e){function t(e,n){$traceurRuntime.superConstructor(t).call(this),this.obj=e,this.key=n}return $traceurRuntime.createClass(t,{eval:function(e,t){var n=this.obj.eval(e,t),r=this.key.eval(e,t);return n[r]},get isAssignable(){return!0},assign:function(e,t,n){var r=this.obj.eval(e,t),i=this.key.eval(e,t);return r[i]=n,n},visit:function(e){return e.visitKeyedAccess(this)}},{},e)}(c),e("KeyedAccess",m),v=function(e){function t(e,n,r){$traceurRuntime.superConstructor(t).call(this),this.exp=e,this.name=n,this.args=r}return $traceurRuntime.createClass(t,{visit:function(e){return e.visitPipe(this)}},{},e)}(c),e("BindingPipe",v),_=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this.value=e}return $traceurRuntime.createClass(t,{eval:function(e,t){return this.value},visit:function(e){return e.visitLiteralPrimitive(this)}},{},e)}(c),e("LiteralPrimitive",_),y=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this.expressions=e}return $traceurRuntime.createClass(t,{eval:function(e,t){return s.map(this.expressions,function(n){return n.eval(e,t)})},visit:function(e){return e.visitLiteralArray(this)}},{},e)}(c),e("LiteralArray",y),b=function(e){function t(e,n){$traceurRuntime.superConstructor(t).call(this),this.keys=e,this.values=n}return $traceurRuntime.createClass(t,{eval:function(e,t){for(var n=a.create(),r=0;r<this.keys.length;++r)a.set(n,this.keys[r],this.values[r].eval(e,t));return n},visit:function(e){return e.visitLiteralMap(this)}},{},e)}(c),e("LiteralMap",b),w=function(e){function t(e,n){$traceurRuntime.superConstructor(t).call(this),this.strings=e,this.expressions=n}return $traceurRuntime.createClass(t,{eval:function(e,t){throw new o("evaluating an Interpolation is not supported")},visit:function(e){e.visitInterpolation(this)}},{},e)}(c),e("Interpolation",w),C=function(e){function t(e,n,r){$traceurRuntime.superConstructor(t).call(this),this.operation=e,this.left=n,this.right=r}return $traceurRuntime.createClass(t,{eval:function(e,t){var n=this.left.eval(e,t);switch(this.operation){case"&&":return n&&this.right.eval(e,t);case"||":return n||this.right.eval(e,t)}var r=this.right.eval(e,t);switch(this.operation){case"+":return n+r;case"-":return n-r;case"*":return n*r;case"/":return n/r;case"%":return n%r;case"==":return n==r;case"!=":return n!=r;case"===":return n===r;case"!==":return n!==r;case"<":return r>n;case">":return n>r;case"<=":return r>=n;case">=":return n>=r;case"^":return n^r;case"&":return n&r}throw"Internal error [$operation] not handled"},visit:function(e){return e.visitBinary(this)}},{},e)}(c),e("Binary",C),R=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this.expression=e}return $traceurRuntime.createClass(t,{eval:function(e,t){return!this.expression.eval(e,t)},visit:function(e){return e.visitPrefixNot(this)}},{},e)}(c),e("PrefixNot",R),E=function(e){function t(e,n){$traceurRuntime.superConstructor(t).call(this),this.target=e,this.value=n}return $traceurRuntime.createClass(t,{eval:function(e,t){return this.target.assign(e,t,this.value.eval(e,t))},visit:function(e){return e.visitAssignment(this)}},{},e)}(c),e("Assignment",E),x=function(e){function n(e,t,r,i){$traceurRuntime.superConstructor(n).call(this),this.receiver=e,this.name=t,this.fn=r,this.args=i}return $traceurRuntime.createClass(n,{eval:function(e,n){var o=t(e,n,this.args);if(this.receiver instanceof l&&r(n)&&n.contains(this.name)){var s=n.get(this.name);return i.apply(s,o)}var a=this.receiver.eval(e,n);return this.fn(a,o)},visit:function(e){return e.visitMethodCall(this)}},{},e)}(c),e("MethodCall",x),S=function(e){function r(e,t,n,i){$traceurRuntime.superConstructor(r).call(this),this.receiver=e,this.name=t,this.fn=n,this.args=i}return $traceurRuntime.createClass(r,{eval:function(e,r){var i=this.receiver.eval(e,r);if(n(i))return null;var o=t(e,r,this.args);return this.fn(i,o)},visit:function(e){return e.visitSafeMethodCall(this)}},{},e)}(c),e("SafeMethodCall",S),O=function(e){function n(e,t){$traceurRuntime.superConstructor(n).call(this),this.target=e,this.args=t}return $traceurRuntime.createClass(n,{eval:function(e,n){var r=this.target.eval(e,n);if(!(r instanceof Function))throw new o(r+" is not a function");return i.apply(r,t(e,n,this.args))},visit:function(e){return e.visitFunctionCall(this)}},{},e)}(c),e("FunctionCall",O),D=function(e){function t(e,n,r){$traceurRuntime.superConstructor(t).call(this),this.ast=e,this.source=n,this.location=r}return $traceurRuntime.createClass(t,{eval:function(e,t){return this.ast.eval(e,t)},get isAssignable(){return this.ast.isAssignable},assign:function(e,t,n){return this.ast.assign(e,t,n)},visit:function(e){return this.ast.visit(e)},toString:function(){return this.source+" in "+this.location}},{},e)}(c),e("ASTWithSource",D),A=function(){function e(e,t,n,r){this.key=e,this.keyIsVar=t,this.name=n,this.expression=r}return $traceurRuntime.createClass(e,{},{})}(),e("TemplateBinding",A),I=function(){function e(){}return $traceurRuntime.createClass(e,{visitImplicitReceiver:function(e){return e},visitInterpolation:function(e){return new w(e.strings,this.visitAll(e.expressions))},visitLiteralPrimitive:function(e){return new _(e.value)},visitAccessMember:function(e){return new p(e.receiver.visit(this),e.name,e.getter,e.setter)},visitSafeAccessMember:function(e){return new g(e.receiver.visit(this),e.name,e.getter,e.setter)},visitMethodCall:function(e){return new x(e.receiver.visit(this),e.name,e.fn,this.visitAll(e.args))},visitSafeMethodCall:function(e){return new S(e.receiver.visit(this),e.name,e.fn,this.visitAll(e.args))},visitFunctionCall:function(e){return new O(e.target.visit(this),this.visitAll(e.args))},visitLiteralArray:function(e){return new y(this.visitAll(e.expressions))},visitLiteralMap:function(e){return new b(e.keys,this.visitAll(e.values))},visitBinary:function(e){return new C(e.operation,e.left.visit(this),e.right.visit(this))},visitPrefixNot:function(e){return new R(e.expression.visit(this))},visitConditional:function(e){return new h(e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))},visitPipe:function(e){return new v(e.exp.visit(this),e.name,this.visitAll(e.args))},visitKeyedAccess:function(e){return new m(e.obj.visit(this),e.key.visit(this))},visitAll:function(e){for(var t=s.createFixedSize(e.length),n=0;n<e.length;++n)t[n]=e[n].visit(this);return t},visitChain:function(e){return new f(this.visitAll(e.expressions))},visitAssignment:function(e){return new E(e.target.visit(this),e.value.visit(this))},visitIf:function(e){var t=r(e.falseExp)?e.falseExp.visit(this):null;return new d(e.condition.visit(this),e.trueExp.visit(this),t)}},{})}(),e("AstTransformer",I),P=[[],[0],[0,0],[0,0,0],[0,0,0,0],[0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0]]}}}),System.register("angular2/src/di/decorators",["angular2/src/di/metadata","angular2/src/util/decorators"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p;return{setters:[function(e){t=e.InjectMetadata,n=e.OptionalMetadata,r=e.InjectableMetadata,i=e.SelfMetadata,o=e.AncestorMetadata,s=e.UnboundedMetadata},function(e){a=e.makeDecorator,c=e.makeParamDecorator}],execute:function(){u=c(t),e("Inject",u),l=c(n),e("Optional",l),f=a(r),e("Injectable",f),h=c(i),e("Self",h),d=c(o),e("Ancestor",d),p=c(s),e("Unbounded",p)}}}),System.register("angular2/src/reflection/reflection",["angular2/src/reflection/reflector","angular2/src/reflection/reflection_capabilities"],function(e){"use strict";var t,n,r;return{setters:[function(n){t=n.Reflector,e("Reflector",n.Reflector)},function(e){n=e.ReflectionCapabilities}],execute:function(){r=new t(new n),e("reflector",r)}}}),System.register("angular2/src/change_detection/change_detection_util",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/change_detection/exceptions","angular2/src/change_detection/pipes/pipe","angular2/src/change_detection/constants"],function(e){"use strict";function t(e,t){var n=d++%20,r=p[n];return r.previousValue=e,r.currentValue=t,r}var n,r,i,o,s,a,c,u,l,f,h,d,p,g;return{setters:[function(e){n=e.isBlank,r=e.BaseException},function(e){i=e.StringMapWrapper},function(e){o=e.DehydratedException,s=e.ExpressionChangedAfterItHasBeenChecked},function(e){a=e.WrappedValue},function(e){c=e.CHECK_ALWAYS,u=e.CHECK_ONCE,l=e.ON_PUSH}],execute:function(){f=new Object,e("uninitialized",f),h=function(){function e(e,t){this.previousValue=e,this.currentValue=t}return $traceurRuntime.createClass(e,{isFirstChange:function(){return this.previousValue===f}},{})}(),e("SimpleChange",h),d=0,p=[new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null),new h(null,null)],g=function(){function e(){}return $traceurRuntime.createClass(e,{},{uninitialized:function(){return f},arrayFn0:function(){return[]},arrayFn1:function(e){return[e]},arrayFn2:function(e,t){return[e,t]},arrayFn3:function(e,t,n){return[e,t,n]},arrayFn4:function(e,t,n,r){return[e,t,n,r]},arrayFn5:function(e,t,n,r,i){return[e,t,n,r,i]},arrayFn6:function(e,t,n,r,i,o){return[e,t,n,r,i,o]},arrayFn7:function(e,t,n,r,i,o,s){return[e,t,n,r,i,o,s]},arrayFn8:function(e,t,n,r,i,o,s,a){return[e,t,n,r,i,o,s,a]},arrayFn9:function(e,t,n,r,i,o,s,a,c){return[e,t,n,r,i,o,s,a,c]},operation_negate:function(e){return!e},operation_add:function(e,t){return e+t},operation_subtract:function(e,t){return e-t},operation_multiply:function(e,t){return e*t},operation_divide:function(e,t){return e/t},operation_remainder:function(e,t){return e%t},operation_equals:function(e,t){return e==t},operation_not_equals:function(e,t){return e!=t},operation_identical:function(e,t){return e===t},operation_not_identical:function(e,t){return e!==t},operation_less_then:function(e,t){return t>e},operation_greater_then:function(e,t){return e>t},operation_less_or_equals_then:function(e,t){return t>=e},operation_greater_or_equals_then:function(e,t){return e>=t},operation_logical_and:function(e,t){return e&&t},operation_logical_or:function(e,t){return e||t},cond:function(e,t,n){return e?t:n},mapFn:function(e){function t(t){for(var n=i.create(),r=0;r<e.length;++r)i.set(n,e[r],t[r]);return n}switch(e.length){case 0:return function(){return[]};case 1:return function(e){return t([e])};case 2:return function(e,n){return t([e,n])};case 3:return function(e,n,r){return t([e,n,r])};case 4:return function(e,n,r,i){return t([e,n,r,i])};case 5:return function(e,n,r,i,o){return t([e,n,r,i,o])};case 6:return function(e,n,r,i,o,s){return t([e,n,r,i,o,s])};case 7:return function(e,n,r,i,o,s,a){return t([e,n,r,i,o,s,a])};case 8:return function(e,n,r,i,o,s,a,c){return t([e,n,r,i,o,s,a,c])};case 9:return function(e,n,r,i,o,s,a,c,u){return t([e,n,r,i,o,s,a,c,u])};default:throw new r("Does not support literal maps with more than 9 elements")}},keyedAccess:function(e,t){return e[t[0]]},unwrapValue:function(e){return e instanceof a?e.wrapped:e},throwOnChange:function(e,t){throw new s(e,t)},throwDehydrated:function(){throw new o},changeDetectionMode:function(e){return e==l?u:c},simpleChange:function(e,n){return t(e,n)},addChange:function(e,t,r){return n(e)&&(e={}),e[t]=r,e},isValueBlank:function(e){return n(e)}})}(),e("ChangeDetectionUtil",g)}}}),System.register("angular2/src/change_detection/abstract_change_detector",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/change_detection/change_detector_ref","angular2/src/change_detection/exceptions","angular2/src/change_detection/constants"],function(e){"use strict";var t,n,r,i,o,s,a,c;return{setters:[function(e){t=e.isPresent},function(e){n=e.ListWrapper},function(e){r=e.ChangeDetectorRef},function(e){i=e.ChangeDetectionError},function(e){o=e.CHECK_ONCE,s=e.CHECKED,a=e.DETACHED}],execute:function(){c=function(){function e(e){this.id=e,this.lightDomChildren=[],this.shadowDomChildren=[],this.mode=null,this.ref=new r(this)}return $traceurRuntime.createClass(e,{addChild:function(e){this.lightDomChildren.push(e),e.parent=this},removeChild:function(e){n.remove(this.lightDomChildren,e)},addShadowDomChild:function(e){this.shadowDomChildren.push(e),e.parent=this},removeShadowDomChild:function(e){n.remove(this.shadowDomChildren,e)},remove:function(){this.parent.removeChild(this)},detectChanges:function(){this._detectChanges(!1)},checkNoChanges:function(){this._detectChanges(!0)},_detectChanges:function(e){this.mode!==a&&this.mode!==s&&(this.detectChangesInRecords(e),this._detectChangesInLightDomChildren(e),e===!1&&this.callOnAllChangesDone(),this._detectChangesInShadowDomChildren(e),this.mode===o&&(this.mode=s))},detectChangesInRecords:function(e){},hydrate:function(e,t,n,r){},dehydrate:function(){},callOnAllChangesDone:function(){},_detectChangesInLightDomChildren:function(e){for(var t=this.lightDomChildren,n=0;n<t.length;++n)t[n]._detectChanges(e)},_detectChangesInShadowDomChildren:function(e){for(var t=this.shadowDomChildren,n=0;n<t.length;++n)t[n]._detectChanges(e)},markAsCheckOnce:function(){this.mode=o},markPathToRootAsCheckOnce:function(){for(var e=this;t(e)&&e.mode!=a;)e.mode===s&&(e.mode=o),e=e.parent},throwError:function(e,t,n){throw new i(e,t,n)}},{})}(),e("AbstractChangeDetector",c)}}}),System.register("angular2/src/di/key",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/di/type_literal","angular2/src/di/forward_ref"],function(e){"use strict";var t,n,r,i,o,s,a,c,u;return{setters:[function(e){t=e.MapWrapper},function(e){n=e.stringify,r=e.isBlank,i=e.BaseException},function(t){o=t.TypeLiteral,e("TypeLiteral",t.TypeLiteral)},function(e){s=e.resolveForwardRef}],execute:function(){a=function(){function e(e,t){if(this.token=e,this.id=t,r(e))throw new i("Token must be defined!")}return $traceurRuntime.createClass(e,{get displayName(){return n(this.token)}},{get:function(e){return u.get(s(e))},get numberOfKeys(){return u.numberOfKeys}})}(),e("Key",a),c=function(){function e(){this._allKeys=new Map}return $traceurRuntime.createClass(e,{get:function(e){if(e instanceof a)return e;var t=e;if(e instanceof o&&(t=e.type),e=t,this._allKeys.has(e))return this._allKeys.get(e);var n=new a(e,a.numberOfKeys);return this._allKeys.set(e,n),n},get numberOfKeys(){return t.size(this._allKeys)}},{})}(),e("KeyRegistry",c),u=new c}}}),System.register("angular2/src/change_detection/jit_proto_change_detector",["angular2/src/facade/collection","angular2/src/change_detection/change_detection_jit_generator","angular2/src/change_detection/coalesce","angular2/src/change_detection/proto_change_detector"],function(e){"use strict";var t,n,r,i,o;return{setters:[function(e){t=e.ListWrapper},function(e){n=e.ChangeDetectorJITGenerator},function(e){r=e.coalesce},function(e){i=e.ProtoRecordBuilder}],execute:function(){o=function(){function e(e){this.definition=e,this._factory=this._createFactory(e)}return $traceurRuntime.createClass(e,{instantiate:function(e){return this._factory(e)},_createFactory:function(e){var o=new i;t.forEach(e.bindingRecords,function(t){o.add(t,e.variableNames)});var s=r(o.records);return new n(e.id,e.strategy,s,this.definition.directiveRecords).generate()}},{isSupported:function(){return!0}})}(),e("JitProtoChangeDetector",o)}}}),System.register("angular2/src/facade/async",["angular2/src/facade/lang","rx"],function(e){"use strict";var t,n,r,i,o,s,a,c;return{setters:[function(e){t=e.global},function(e){n=e}],execute:function(){r=t.Promise,e("Promise",r),i=function(){function e(){}return $traceurRuntime.createClass(e,{},{resolve:function(e){return r.resolve(e)},reject:function(e,t){return r.reject(e)},catchError:function(e,t){return e["catch"](t)},all:function(e){return 0==e.length?r.resolve([]):r.all(e)},then:function(e,t,n){return e.then(t,n)},wrap:function(e){return new r(function(t,n){try{t(e())}catch(r){n(r)}})},completer:function(){var e,t,n=new r(function(n,r){e=n,t=r});return{promise:n,resolve:e,reject:t}}})}(),e("PromiseWrapper",i),o=function(){function e(){}return $traceurRuntime.createClass(e,{},{setTimeout:function(e,n){return t.setTimeout(e,n)},clearTimeout:function(e){t.clearTimeout(e)},setInterval:function(e,n){return t.setInterval(e,n)},clearInterval:function(e){t.clearInterval(e)}})}(),e("TimerWrapper",o),s=function(){function e(){}return $traceurRuntime.createClass(e,{},{subscribe:function(e,t){var n=void 0!==arguments[2]?arguments[2]:null,r=void 0!==arguments[3]?arguments[3]:null;return e.observer({next:t,"throw":n,"return":r})},isObservable:function(e){return e instanceof a},dispose:function(e){e.dispose()},callNext:function(e,t){e.next(t)},callThrow:function(e,t){e["throw"](t)},callReturn:function(e){e["return"](null)}})}(),e("ObservableWrapper",s),a=function(){function e(){}return $traceurRuntime.createClass(e,{observer:function(e){return null}},{})}(),e("Observable",a),c=function(e){function t(){$traceurRuntime.superConstructor(t).call(this),n.hasOwnProperty("default")?(this._subject=new n["default"].Rx.Subject,this._immediateScheduler=n["default"].Rx.Scheduler.immediate):(this._subject=new n.Subject,this._immediateScheduler=n.Scheduler.immediate)}return $traceurRuntime.createClass(t,{observer:function(e){return this._subject.observeOn(this._immediateScheduler).subscribe(function(t){setTimeout(function(){return e.next(t)})},function(t){return e["throw"]?e["throw"](t):null},function(){return e["return"]?e["return"]():null})},toRx:function(){return this._subject},next:function(e){this._subject.onNext(e)},"throw":function(e){this._subject.onError(e)},"return":function(e){this._subject.onCompleted()}},{},e)}(a),e("EventEmitter",c)}}}),System.register("angular2/src/change_detection/pipes/limit_to_pipe",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/facade/math"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h;return{setters:[function(e){r=e.isBlank,i=e.isString,o=e.isArray,s=e.StringWrapper,a=e.BaseException,c=e.CONST},function(e){u=e.ListWrapper},function(e){l=e.Math}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},f=function(){function e(){}return $traceurRuntime.createClass(e,{supports:function(t){return e.supportsObj(t)},transform:function(e){var t=void 0!==arguments[1]?arguments[1]:null;if(r(t)||0==t.length)throw new a("limitTo pipe requires one argument");var n=t[0],o=0,c=l.min(n,e.length);return 0>n&&(o=l.max(0,e.length+n),c=e.length),i(e)?s.substring(e,o,c):u.slice(e,o,c)},onDestroy:function(){}},{supportsObj:function(e){return i(e)||o(e)}})}(),e("LimitToPipe",f),h=$traceurRuntime.createClass(function(){},{supports:function(e){return f.supportsObj(e)},create:function(e){return new f}},{}),e("LimitToPipeFactory",h),e("LimitToPipeFactory",h=t([c(),n("design:paramtypes",[])],h))}}}),System.register("angular2/src/change_detection/pipes/date_pipe",["angular2/src/facade/lang","angular2/src/facade/intl","angular2/src/facade/collection","angular2/src/change_detection/pipes/pipe"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h;return{setters:[function(e){r=e.isDate,i=e.isNumber,o=e.isPresent,s=e.DateWrapper,a=e.CONST},function(e){c=e.DateFormatter},function(e){u=e.StringMapWrapper},function(e){l=e.BasePipe}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},f="en-US",h=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{transform:function(e,t){var n=o(t)&&t.length>0?t[0]:"mediumDate";return i(e)&&(e=s.fromMillis(e)),u.contains(h._ALIASES,n)&&(n=u.get(h._ALIASES,n)),c.format(e,f,n)},supports:function(e){return r(e)||i(e)},create:function(e){return this}},{},e)}(l),e("DatePipe",h),h._ALIASES={medium:"yMMMdjms","short":"yMdjm",fullDate:"yMMMMEEEEd",longDate:"yMMMMd",mediumDate:"yMMMd",shortDate:"yMd",mediumTime:"jms",shortTime:"jm"},e("DatePipe",h=t([a(),n("design:paramtypes",[])],h))}}}),System.register("angular2/src/core/annotations/view",["angular2/src/core/annotations_impl/view"],function(e){"use strict";return{setters:[function(t){e("ViewAnnotation",t.View)}],execute:function(){}}}),System.register("angular2/src/core/annotations/di",["angular2/src/core/annotations_impl/di"],function(e){"use strict";return{setters:[function(t){e("QueryAnnotation",t.Query),e("ViewQueryAnnotation",t.ViewQuery),e("AttributeAnnotation",t.Attribute)}],execute:function(){}}}),System.register("angular2/src/dom/browser_adapter",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/dom/dom_adapter","angular2/src/dom/generic_browser_adapter"],function(e){"use strict";function t(){return i(p)&&(p=document.querySelector("base"),i(p))?null:p.attr("href")}function n(e){return i(g)&&(g=document.createElement("a")),g.setAttribute("href",e),"/"===g.pathname.charAt(0)?g.pathname:"/"+g.pathname}var r,i,o,s,a,c,u,l,f,h,d,p,g;return{setters:[function(e){r=e.ListWrapper},function(e){i=e.isBlank,o=e.isPresent,s=e.global},function(e){a=e.setRootDomAdapter},function(e){c=e.GenericBrowserDomAdapter}],execute:function(){u={innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},l=3,f={"\b":"Backspace"," ":"Tab","":"Delete","":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},h={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"},d=function(e){function c(){$traceurRuntime.superConstructor(c).apply(this,arguments)}return $traceurRuntime.createClass(c,{hasProperty:function(e,t){return t in e},setProperty:function(e,t,n){e[t]=n},getProperty:function(e,t){return e[t]},invoke:function(e,t,n){e[t].apply(e,n)},logError:function(e){window.console.error(e)},get attrToPropMap(){return u},query:function(e){return document.querySelector(e)},querySelector:function(e,t){return e.querySelector(t)},querySelectorAll:function(e,t){return e.querySelectorAll(t)},on:function(e,t,n){e.addEventListener(t,n,!1)},onAndCancel:function(e,t,n){return e.addEventListener(t,n,!1),function(){e.removeEventListener(t,n,!1)}},dispatchEvent:function(e,t){e.dispatchEvent(t)},createMouseEvent:function(e){var t=document.createEvent("MouseEvent");return t.initEvent(e,!0,!0),t},createEvent:function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t},preventDefault:function(e){e.preventDefault(),e.returnValue=!1},getInnerHTML:function(e){return e.innerHTML},getOuterHTML:function(e){return e.outerHTML},nodeName:function(e){return e.nodeName},nodeValue:function(e){return e.nodeValue},type:function(e){return e.type},content:function(e){return this.hasProperty(e,"content")?e.content:e},firstChild:function(e){return e.firstChild},nextSibling:function(e){return e.nextSibling},parentElement:function(e){return e.parentElement},childNodes:function(e){return e.childNodes},childNodesAsList:function(e){for(var t=e.childNodes,n=r.createFixedSize(t.length),i=0;i<t.length;i++)n[i]=t[i];return n},clearNodes:function(e){for(;e.firstChild;)e.firstChild.remove()},appendChild:function(e,t){e.appendChild(t)},removeChild:function(e,t){e.removeChild(t)},replaceChild:function(e,t,n){e.replaceChild(t,n)},remove:function(e){return e.remove(),e},insertBefore:function(e,t){e.parentNode.insertBefore(t,e)},insertAllBefore:function(e,t){r.forEach(t,function(t){e.parentNode.insertBefore(t,e)})},insertAfter:function(e,t){e.parentNode.insertBefore(t,e.nextSibling)},setInnerHTML:function(e,t){e.innerHTML=t},getText:function(e){return e.textContent},setText:function(e,t){e.textContent=t},getValue:function(e){return e.value},setValue:function(e,t){e.value=t},getChecked:function(e){return e.checked},setChecked:function(e,t){e.checked=t},createTemplate:function(e){var t=document.createElement("template");return t.innerHTML=e,t},createElement:function(e){var t=void 0!==arguments[1]?arguments[1]:document;return t.createElement(e)},createTextNode:function(e){var t=void 0!==arguments[1]?arguments[1]:document;return t.createTextNode(e)},createScriptTag:function(e,t){var n=void 0!==arguments[2]?arguments[2]:document,r=n.createElement("SCRIPT");return r.setAttribute(e,t),r},createStyleElement:function(e){var t=void 0!==arguments[1]?arguments[1]:document,n=t.createElement("style");return this.appendChild(n,this.createTextNode(e)),n},createShadowRoot:function(e){return e.createShadowRoot()},getShadowRoot:function(e){return e.shadowRoot},getHost:function(e){return e.host},clone:function(e){return e.cloneNode(!0)},getElementsByClassName:function(e,t){return e.getElementsByClassName(t)},getElementsByTagName:function(e,t){return e.getElementsByTagName(t)},classList:function(e){return Array.prototype.slice.call(e.classList,0)},addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},setStyle:function(e,t,n){e.style[t]=n},removeStyle:function(e,t){e.style[t]=null},getStyle:function(e,t){return e.style[t]},tagName:function(e){return e.tagName},attributeMap:function(e){for(var t=new Map,n=e.attributes,r=0;r<n.length;r++){var i=n[r];t.set(i.name,i.value)}return t},hasAttribute:function(e,t){return e.hasAttribute(t)},getAttribute:function(e,t){return e.getAttribute(t)},setAttribute:function(e,t,n){e.setAttribute(t,n)},removeAttribute:function(e,t){e.removeAttribute(t)},templateAwareRoot:function(e){return this.isTemplateElement(e)?this.content(e):e},createHtmlDocument:function(){return document.implementation.createHTMLDocument("fakeTitle")},defaultDoc:function(){return document},getBoundingClientRect:function(e){try{return e.getBoundingClientRect()}catch(t){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}},getTitle:function(){
16
- return document.title},setTitle:function(e){document.title=e||""},elementMatches:function(e,t){return e instanceof HTMLElement&&e.matches?e.matches(t):e.msMatchesSelector(t)},isTemplateElement:function(e){return e instanceof HTMLElement&&"TEMPLATE"==e.nodeName},isTextNode:function(e){return e.nodeType===Node.TEXT_NODE},isCommentNode:function(e){return e.nodeType===Node.COMMENT_NODE},isElementNode:function(e){return e.nodeType===Node.ELEMENT_NODE},hasShadowRoot:function(e){return e instanceof HTMLElement&&o(e.shadowRoot)},isShadowRoot:function(e){return e instanceof DocumentFragment},importIntoDoc:function(e){var t=e;return this.isTemplateElement(e)&&(t=this.content(e)),document.importNode(t,!0)},isPageRule:function(e){return e.type===CSSRule.PAGE_RULE},isStyleRule:function(e){return e.type===CSSRule.STYLE_RULE},isMediaRule:function(e){return e.type===CSSRule.MEDIA_RULE},isKeyframesRule:function(e){return e.type===CSSRule.KEYFRAMES_RULE},getHref:function(e){return e.href},getEventKey:function(e){var t=e.key;if(i(t)){if(t=e.keyIdentifier,i(t))return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),e.location===l&&h.hasOwnProperty(t)&&(t=h[t]))}return f.hasOwnProperty(t)&&(t=f[t]),t},getGlobalEventTarget:function(e){return"window"==e?window:"document"==e?document:"body"==e?document.body:void 0},getHistory:function(){return window.history},getLocation:function(){return window.location},getBaseHref:function(){var e=t();return i(e)?null:n(e)},getUserAgent:function(){return window.navigator.userAgent},setData:function(e,t,n){e.dataset[t]=n},getData:function(e,t){return e.dataset[t]},setGlobalVar:function(e,t){s[e]=t}},{makeCurrent:function(){a(new c)}},e)}(c),e("BrowserDomAdapter",d),p=null,g=null}}}),System.register("angular2/src/core/compiler/view",["angular2/src/facade/collection","angular2/change_detection","angular2/src/core/compiler/element_binder","angular2/src/facade/lang","angular2/src/core/compiler/view_ref"],function(e){"use strict";function t(e,t){for(var r=n.createFixedSize(t),i=0;i<e.length;i++){var o=e[i];c(o)&&(r[e[i]]=i)}return r}var n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v;return{setters:[function(e){n=e.ListWrapper,r=e.MapWrapper,i=e.Map,o=e.StringMapWrapper},function(e){s=e.Locals},function(e){a=e.ElementBinder},function(e){c=e.isPresent,u=e.isBlank,l=e.BaseException},function(e){f=e.ViewRef,h=e.ProtoViewRef,d=e.internalView}],execute:function(){p=function(){function e(e){this.renderProtoViewRef=e.mergedProtoViewRef,this.renderFragmentCount=e.fragmentCount,this.renderElementIndices=e.mappedElementIndices,this.renderInverseElementIndices=t(this.renderElementIndices,this.renderElementIndices.length),this.renderTextIndices=e.mappedTextIndices,this.hostElementIndicesByViewIndex=e.hostElementIndicesByViewIndex,this.nestedViewIndicesByElementIndex=t(this.hostElementIndicesByViewIndex,this.renderElementIndices.length),this.nestedViewCountByViewIndex=e.nestedViewCountByViewIndex}return $traceurRuntime.createClass(e,{},{})}(),e("AppProtoViewMergeMapping",p),g=function(){function e(){this.views=[]}return $traceurRuntime.createClass(e,{},{})}(),e("AppViewContainer",g),m=function(){function e(e,t,n,i,o,a,c,u,l){this.renderer=e,this.proto=t,this.mainMergeMapping=n,this.viewOffset=i,this.elementOffset=o,this.textOffset=a,this.render=u,this.renderFragment=l,this.views=null,this.elementInjectors=null,this.viewContainers=null,this.preBuiltObjects=null,this.changeDetector=null,this.context=null,this.ref=new f(this),this.locals=new s(null,r.clone(c))}return $traceurRuntime.createClass(e,{init:function(e,t,n,r,i,o,s){this.changeDetector=e,this.elementInjectors=t,this.rootElementInjectors=n,this.preBuiltObjects=r,this.views=i,this.elementRefs=o,this.viewContainers=s},setLocal:function(e,t){if(!this.hydrated())throw new l("Cannot set locals on dehydrated view.");if(this.proto.variableBindings.has(e)){var n=this.proto.variableBindings.get(e);this.locals.set(n,t)}},hydrated:function(){return c(this.context)},triggerEventHandlers:function(e,t,n){var r=new i;r.set("$event",t),this.dispatchEvent(n,e,r)},notifyOnBinding:function(e,t){if(e.isTextNode())this.renderer.setText(this.render,this.mainMergeMapping.renderTextIndices[e.elementIndex+this.textOffset],t);else{var n=this.elementRefs[this.elementOffset+e.elementIndex];if(e.isElementProperty())this.renderer.setElementProperty(n,e.propertyName,t);else if(e.isElementAttribute())this.renderer.setElementAttribute(n,e.propertyName,t);else if(e.isElementClass())this.renderer.setElementClass(n,e.propertyName,t);else{if(!e.isElementStyle())throw new l("Unsupported directive record");var r=c(e.propertyUnit)?e.propertyUnit:"";this.renderer.setElementStyle(n,e.propertyName,""+t+r)}}},notifyOnAllChangesDone:function(){for(var e=this.proto.elementBinders.length,t=this.elementInjectors,n=e-1;n>=0;n--)c(t[n+this.elementOffset])&&t[n+this.elementOffset].onAllChangesDone()},getDirectiveFor:function(e){var t=this.elementInjectors[this.elementOffset+e.elementIndex];return t.getDirectiveAtIndex(e.directiveIndex)},getNestedView:function(e){var t=this.mainMergeMapping.nestedViewIndicesByElementIndex[e];return c(t)?this.views[t]:null},getDetectorFor:function(e){var t=this.getNestedView(this.elementOffset+e.elementIndex);return c(t)?t.changeDetector:null},invokeElementMethod:function(e,t,n){this.renderer.invokeElementMethod(this.elementRefs[e],t,n)},dispatchRenderEvent:function(e,t,n){var r=this.elementRefs[this.mainMergeMapping.renderInverseElementIndices[e]],i=d(r.parentView);return i.dispatchEvent(r.boundElementIndex,t,n)},dispatchEvent:function(e,t,n){var i=this,o=!0;if(this.hydrated()){var a=this.proto.elementBinders[e-this.elementOffset];if(u(a.hostListeners))return o;var l=a.hostListeners[t];if(u(l))return o;r.forEach(l,function(t,r){var a;a=-1===r?i.context:i.elementInjectors[e].getDirectiveAtIndex(r);var u=t.eval(a,new s(i.locals,n));c(u)&&(o=o&&1==u)})}return o}},{})}(),e("AppView",m),v=function(){function e(e,t,n,o,s,a,u){var l=this;this.type=e,this.isEmbeddedFragment=t,this.render=n,this.protoChangeDetector=o,this.variableBindings=s,this.variableLocations=a,this.textBindingCount=u,this.elementBinders=[],this.protoLocals=new i,this.isRecursive=null,this.ref=new h(this),c(s)&&r.forEach(s,function(e,t){l.protoLocals.set(e,null)})}return $traceurRuntime.createClass(e,{bindElement:function(e,t,n){var r=void 0!==arguments[3]?arguments[3]:null,i=new a(this.elementBinders.length,e,t,n,r);return this.elementBinders.push(i),i},bindEvent:function(e,t){var n=void 0!==arguments[2]?arguments[2]:-1,r=this.elementBinders[t],s=r.hostListeners;u(s)&&(s=o.create(),r.hostListeners=s);for(var a=0;a<e.length;a++){var c=e[a],l=c.fullName,f=o.get(s,l);u(f)&&(f=new i,o.set(s,l,f)),f.set(n,c.source)}}},{})}(),e("AppProtoView",v)}}}),System.register("angular2/src/core/compiler/view_manager_utils",["angular2/di","angular2/src/facade/collection","angular2/src/core/compiler/element_injector","angular2/src/facade/lang","angular2/src/core/compiler/view","angular2/src/core/compiler/view_ref","angular2/src/core/compiler/element_ref","angular2/src/core/compiler/template_ref","angular2/src/render/api"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g;return{setters:[function(e){r=e.Injector,i=e.Injectable},function(e){o=e.ListWrapper,s=e.MapWrapper},function(e){a=e},function(e){c=e.isPresent,u=e.isBlank},function(e){l=e},function(e){f=e.internalView},function(e){h=e.ElementRef},function(e){d=e.TemplateRef},function(e){p=e.ViewType}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},g=$traceurRuntime.createClass(function(){},{getComponentInstance:function(e,t){var n=e.elementInjectors[t];return n.getComponent()},createView:function(e,t,n,r){for(var i=t.fragmentRefs,s=t.viewRef,u=e.mergeMapping.renderElementIndices.length,g=e.mergeMapping.nestedViewCountByViewIndex[0]+1,m=o.createFixedSize(u),v=o.createFixedSize(u),_=o.createFixedSize(u),y=o.createFixedSize(u),b=o.createFixedSize(g),w=0,C=0,R=0,E=0;g>E;E++){var x=e.mergeMapping.hostElementIndicesByViewIndex[E],S=c(x)?f(m[x].parentView):null,O=c(x)?S.proto.elementBinders[x-S.elementOffset].nestedProtoView:e,D=null;(0===E||O.type===p.EMBEDDED)&&(D=i[R++]);var A=new l.AppView(r,O,e.mergeMapping,E,w,C,O.protoLocals,s,D);b[E]=A;for(var I=[],P=0;P<O.elementBinders.length;P++){var j=O.elementBinders[P],T=w+P,N=null,V=j.protoElementInjector;if(c(V))if(c(V.parent)){var k=y[w+V.parent.index];N=V.instantiate(k)}else N=V.instantiate(null),I.push(N);y[T]=N;var M=new h(A.ref,T,e.mergeMapping.renderElementIndices[T],r);if(m[M.boundElementIndex]=M,c(N)){var B=j.hasEmbeddedProtoView()?new d(M):null;_[T]=new a.PreBuiltObjects(n,A,M,B)}}A.init(O.protoChangeDetector.instantiate(A),y,I,_,b,m,v),c(S)&&O.type===p.COMPONENT&&S.changeDetector.addShadowDomChild(A.changeDetector),w+=O.elementBinders.length,C+=O.textBindingCount}return b[0]},hydrateRootHostView:function(e,t){this._hydrateView(e,t,null,new Object,null)},attachViewInContainer:function(e,t,n,r,i,s){u(n)&&(n=e,r=t),e.changeDetector.addChild(s.changeDetector);var a=e.viewContainers[t];u(a)&&(a=new l.AppViewContainer,e.viewContainers[t]=a),o.insert(a.views,i,s);var f;f=0==i?null:o.last(a.views[i-1].rootElementInjectors);for(var h=n.elementInjectors[r],d=s.rootElementInjectors.length-1;d>=0;d--)c(h.parent)?s.rootElementInjectors[d].linkAfter(h.parent,f):n.rootElementInjectors.push(s.rootElementInjectors[d])},detachViewInContainer:function(e,t,n){var r=e.viewContainers[t],i=r.views[n];i.changeDetector.remove(),o.removeAt(r.views,n);for(var s=0;s<i.rootElementInjectors.length;++s){var a=i.rootElementInjectors[s];if(c(a.parent))a.unlink();else{var u=o.indexOf(e.rootElementInjectors,a);u>=0&&o.removeAt(e.rootElementInjectors,u)}}},hydrateViewInContainer:function(e,t,n,i,o,s){u(n)&&(n=e,i=t);var a=e.viewContainers[t],l=a.views[o],f=n.elementInjectors[i],h=c(s)?r.fromResolvedBindings(s):null;this._hydrateView(l,h,f.getHost(),n.context,n.locals)},_hydrateView:function(e,t,n,r,i){for(var o=e.viewOffset,s=o+e.mainMergeMapping.nestedViewCountByViewIndex[o];s>=o;){var a=e.views[o],u=a.proto;if(a!==e&&a.proto.type===p.EMBEDDED)o+=e.mainMergeMapping.nestedViewCountByViewIndex[o]+1;else{if(a!==e){t=null,i=null;var l=e.mainMergeMapping.hostElementIndicesByViewIndex[o];n=e.elementInjectors[l],r=n.getComponent()}a.context=r,a.locals.parent=i;for(var f=u.elementBinders,h=0;h<f.length;h++){var d=h+a.elementOffset,g=e.elementInjectors[d];c(g)&&(g.hydrate(t,n,a.preBuiltObjects[d]),this._populateViewLocals(a,g,d),this._setUpEventEmitters(a,g,d),this._setUpHostActions(a,g,d))}var m=this._getPipes(t,n);a.changeDetector.hydrate(a.context,a.locals,a,m),o++}}},_getPipes:function(e,t){var n=a.StaticKeys.instance().pipesKey;return c(e)?e.getOptional(n):c(t)?t.getPipes():null},_populateViewLocals:function(e,t,n){c(t.getDirectiveVariableBindings())&&s.forEach(t.getDirectiveVariableBindings(),function(r,i){u(r)?e.locals.set(i,e.elementRefs[n].nativeElement):e.locals.set(i,t.getDirectiveAtIndex(r))})},_setUpEventEmitters:function(e,t,n){for(var r=t.getEventEmitterAccessors(),i=0;i<r.length;++i)for(var o=r[i],s=t.getDirectiveAtIndex(i),a=0;a<o.length;++a){var c=o[a];c.subscribe(e,n,s)}},_setUpHostActions:function(e,t,n){for(var r=t.getHostActionAccessors(),i=0;i<r.length;++i)for(var o=r[i],s=t.getDirectiveAtIndex(i),a=0;a<o.length;++a){var c=o[a];c.subscribe(e,n,s)}},dehydrateView:function(e){for(var t=e.viewOffset+e.mainMergeMapping.nestedViewCountByViewIndex[e.viewOffset],n=e.viewOffset;t>=n;n++){var r=e.views[n];if(r.hydrated()){c(r.locals)&&r.locals.clearValues(),r.context=null,r.changeDetector.dehydrate();for(var i=r.proto.elementBinders,o=0;o<i.length;o++){var s=e.elementInjectors[r.elementOffset+o];c(s)&&s.dehydrate()}}}}},{}),e("AppViewManagerUtils",g),e("AppViewManagerUtils",g=t([i(),n("design:paramtypes",[])],g))}}}),System.register("angular2/src/render/dom/compiler/style_inliner",["angular2/di","angular2/src/render/xhr","angular2/src/facade/collection","angular2/src/services/url_resolver","angular2/src/render/dom/compiler/style_url_resolver","angular2/src/facade/lang","angular2/src/facade/async"],function(e){"use strict";function t(e){var t=d.firstMatch(y,e);return f(t)?null:h(t[1])?t[1]:t[2]}function n(e){var t=d.firstMatch(b,e);if(f(t))return null;var n=t[1].trim();return n.length>0?n:null}function r(e,t){return f(t)?e:"@media "+t+" {\n"+e+"\n}"}var i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b;return{setters:[function(e){s=e.Injectable},function(e){a=e.XHR},function(e){c=e.ListWrapper},function(e){u=e.UrlResolver},function(e){l=e.StyleUrlResolver},function(e){f=e.isBlank,h=e.isPresent,d=e.RegExpWrapper,p=e.StringWrapper,g=e.isPromise},function(e){m=e.PromiseWrapper}],execute:function(){i=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},v=$traceurRuntime.createClass(function(e,t,n){this._xhr=e,this._styleUrlResolver=t,this._urlResolver=n},{inlineImports:function(e,t){return this._inlineImports(e,t,[])},_inlineImports:function(e,r,i){var o=this,s=0,a=p.split(e,_);if(1===a.length)return e;for(var u=[];s<a.length-1;){var l=a[s],d=a[s+1],v=t(d);h(v)&&(v=this._urlResolver.resolve(r,v));var y=n(d),b=void 0;f(v)?b=m.resolve('/* Invalid import rule: "@import '+d+';" */'):c.contains(i,v)?b=m.resolve(l):(i.push(v),b=m.then(this._xhr.get(v),function(e){var t=o._inlineImports(e,v,i);return g(t)?t.then(function(e){return l+o._transformImportedCss(e,y,v)+"\n"}):l+o._transformImportedCss(t,y,v)+"\n"},function(e){return"/* failed to import "+v+" */\n"})),u.push(b),s+=2}return m.all(u).then(function(e){var t=e.join("");return s<a.length&&(t+=a[s]),t})},_transformImportedCss:function(e,t,n){return e=this._styleUrlResolver.resolveUrls(e,n),r(e,t)}},{}),e("StyleInliner",v),e("StyleInliner",v=i([s(),o("design:paramtypes",[a,l,u])],v)),_=/@import\s+([^;]+);/g,y=d.create("url\\(\\s*?['\"]?([^'\")]+)['\"]?|['\"]([^'\")]+)['\"]"),b=/['"][^'"]+['"]\s*\)?\s*(.*)/g}}}),System.register("angular2/src/render/dom/shadow_dom/util",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/dom/dom_adapter","angular2/src/render/dom/shadow_dom/shadow_css"],function(e){"use strict";function t(e){var t=d.get(e);return c(t)&&(t=p++,d.set(e,t)),t}function n(e,t,n){g.has(e)||(g.set(e,!0),r(t,n))}function r(e,t){if(c(m)){var n=f.firstChild(e);u(n)?f.insertBefore(n,t):f.appendChild(e,t)}else f.insertAfter(m,t);m=t}function i(e){return"_nghost-"+e}function o(e){return"_ngcontent-"+e}function s(e,n){var r=t(n),s=new h;return s.shimCssText(e,o(r),i(r))}function a(){d.clear(),p=0,g.clear(),m=null}var c,u,l,f,h,d,p,g,m;return e("getComponentId",t),e("insertSharedStyleText",n),e("insertStyleElement",r),e("getHostAttribute",i),e("getContentAttribute",o),e("shimCssForComponent",s),e("resetShadowDomCache",a),{setters:[function(e){c=e.isBlank,u=e.isPresent},function(e){l=e.Map},function(e){f=e.DOM},function(e){h=e.ShadowCss}],execute:function(){d=new l,p=0,g=new l}}}),System.register("angular2/src/render/dom/events/hammer_gestures",["angular2/src/render/dom/events/hammer_common","angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){t=e.HammerGesturesPluginCommon},function(e){n=e.isPresent,r=e.BaseException}],execute:function(){i=function(e){function t(){$traceurRuntime.superConstructor(t).call(this)}return $traceurRuntime.createClass(t,{supports:function(e){if(!$traceurRuntime.superGet(this,t.prototype,"supports").call(this,e))return!1;if(!n(window.Hammer))throw new r("Hammer.js is not loaded, can not bind "+e+" event");return!0},addEventListener:function(e,t,n,i){if(i)throw new r("Hammer.js plugin does not support bubbling gestures.");var o=this.manager.getZone();t=t.toLowerCase(),o.runOutsideAngular(function(){var r=new Hammer(e);r.get("pinch").set({enable:!0}),r.get("rotate").set({enable:!0}),r.on(t,function(e){o.run(function(){n(e)})})})}},{},e)}(t),e("HammerGesturesPlugin",i)}}}),System.register("angular2/src/core/testability/testability",["angular2/di","angular2/src/dom/dom_adapter","angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/core/testability/get_testability"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l;return{setters:[function(e){r=e.Injectable},function(e){i=e.DOM},function(e){o=e.Map,s=e.ListWrapper},function(e){a=e.BaseException},function(e){c=e}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},u=$traceurRuntime.createClass(function(){this._pendingCount=0,this._callbacks=[]},{increaseCount:function(){var e=void 0!==arguments[0]?arguments[0]:1;if(this._pendingCount+=e,this._pendingCount<0)throw new a("pending async requests below zero");return 0==this._pendingCount&&this._runCallbacks(),this._pendingCount},_runCallbacks:function(){for(;0!==this._callbacks.length;)s.removeLast(this._callbacks)()},whenStable:function(e){this._callbacks.push(e),0===this._pendingCount&&this._runCallbacks()},getPendingCount:function(){return this._pendingCount},findBindings:function(e,t,n){return[]}},{}),e("Testability",u),e("Testability",u=t([r(),n("design:paramtypes",[])],u)),l=$traceurRuntime.createClass(function(){this._applications=new o,c.GetTestability.addToWindow(this)},{registerApplication:function(e,t){this._applications.set(e,t)},findTestabilityInTree:function(e){return null==e?null:this._applications.has(e)?this._applications.get(e):this.findTestabilityInTree(i.isShadowRoot(e)?i.getHost(e):i.parentElement(e))}},{}),e("TestabilityRegistry",l),e("TestabilityRegistry",l=t([r(),n("design:paramtypes",[])],l))}}}),System.register("angular2/src/render/dom/view/view",["angular2/src/dom/dom_adapter","angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/render/api","angular2/src/render/dom/util"],function(e){"use strict";function t(e){return e._view}var n,r,i,o,s,a,c,u;return e("resolveInternalDomView",t),{setters:[function(e){n=e.DOM},function(e){r=e.Map},function(e){i=e.isPresent,o=e.stringify},function(e){s=e.RenderViewRef},function(e){a=e.camelCaseToDashCase}],execute:function(){c=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this._view=e}return $traceurRuntime.createClass(t,{},{},e)}(s),e("DomViewRef",c),u=function(){function e(e,t,n){this.proto=e,this.boundTextNodes=t,this.boundElements=n,this.hydrated=!1,this.eventDispatcher=null,this.eventHandlerRemovers=[]}return $traceurRuntime.createClass(e,{setElementProperty:function(e,t,r){n.setProperty(this.boundElements[e],t,r)},setElementAttribute:function(e,t,r){var s=this.boundElements[e],c=a(t);i(r)?n.setAttribute(s,c,o(r)):n.removeAttribute(s,c)},setElementClass:function(e,t,r){var i=this.boundElements[e],o=a(t);r?n.addClass(i,o):n.removeClass(i,o)},setElementStyle:function(e,t,r){var s=this.boundElements[e],c=a(t);i(r)?n.setStyle(s,c,o(r)):n.removeStyle(s,c)},invokeElementMethod:function(e,t,r){var i=this.boundElements[e];n.invoke(i,t,r)},setText:function(e,t){n.setText(this.boundTextNodes[e],t)},dispatchEvent:function(e,t,n){var o=!0;if(i(this.eventDispatcher)){var s=new r;s.set("$event",n),o=this.eventDispatcher.dispatchRenderEvent(e,t,s),o||n.preventDefault()}return o}},{})}(),e("DomView",u)}}}),System.register("angular2/src/render/dom/view/proto_view_builder",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/dom/dom_adapter","angular2/change_detection","angular2/src/render/dom/view/proto_view","angular2/src/render/dom/view/element_binder","angular2/src/render/api","angular2/src/render/dom/util"],function(e){"use strict";function t(e,t,i,o){var a=[];return u.forEach(i,function(i,c){var u=r(i,c);if(n(e,t,u))a.push(u);else if(!f.has(o,c))throw new s("Can't bind to '"+c+"' since it isn't a known property of the '<"+d.tagName(e).toLowerCase()+">' element and there are no matching directives with a corresponding property")}),a}function n(e,t,n){if(n.type===R.PropertyBindingType.PROPERTY){var r=d.tagName(e),i=-1!==r.indexOf("-");return i&&!t?!0:d.hasProperty(e,n.property)}return!0}function r(e,t){var n=a.split(t,P);if(1===n.length){var r=n[0],o=h.get(d.attrToPropMap,r);return r=i(o)?o:r,new R.ElementPropertyBinding(R.PropertyBindingType.PROPERTY,e,r)}if(n[0]==j)return new R.ElementPropertyBinding(R.PropertyBindingType.ATTRIBUTE,e,n[1]);if(n[0]==T)return new R.ElementPropertyBinding(R.PropertyBindingType.CLASS,e,n[1]);if(n[0]==N){var c=n.length>2?n[2]:null;return new R.ElementPropertyBinding(R.PropertyBindingType.STYLE,e,n[1],c)}throw new s("Invalid property name "+t)}var i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b,w,C,R,E,x,S,O,D,A,I,P,j,T,N;return{setters:[function(e){i=e.isPresent,o=e.isBlank,s=e.BaseException,a=e.StringWrapper},function(e){c=e.ListWrapper,u=e.MapWrapper,l=e.Set,f=e.SetWrapper,h=e.StringMapWrapper},function(e){d=e.DOM},function(e){p=e.ASTWithSource,g=e.AstTransformer,m=e.AccessMember,v=e.LiteralArray,_=e.ImplicitReceiver},function(e){y=e.DomProtoView,b=e.DomProtoViewRef},function(e){w=e.DomElementBinder,C=e.Event},function(e){R=e},function(e){E=e.NG_BINDING_CLASS,x=e.EVENT_TARGET_SEPARATOR,S=e.queryBoundTextNodeIndices}],execute:function(){O=function(){function e(e,t){var n=void 0!==arguments[2]?arguments[2]:!1;this.rootElement=e,this.type=t,this.useNativeShadowDom=n,this.variableBindings=new Map,this.elements=[],this.rootTextBindings=new Map,this.ngContentCount=0}return $traceurRuntime.createClass(e,{bindElement:function(e){var t=void 0!==arguments[1]?arguments[1]:null,n=new D(this.elements.length,e,t);return this.elements.push(n),d.addClass(e,E),n},bindVariable:function(e,t){this.variableBindings.set(t,e)},bindRootText:function(e,t){this.rootTextBindings.set(e,t)},bindNgContent:function(){this.ngContentCount++},build:function(){var e=this,n=[],r=[],o=[],s=[],a=this.ngContentCount;S(d.content(this.rootElement),this.rootTextBindings,function(e,t,n){o.push(n),s.push(t)}),c.forEach(this.elements,function(s){var u=new l,f=c.map(s.directives,function(e){return s.eventBuilder.merge(e.eventBuilder),c.forEach(e.templatePropertyNames,function(e){return u.add(e)}),new R.DirectiveBinder({directiveIndex:e.directiveIndex,propertyBindings:e.propertyBindings,eventBindings:e.eventBindings,hostPropertyBindings:t(s.element,i(s.componentId),e.hostPropertyBindings,u)})}),h=i(s.nestedProtoView)?s.nestedProtoView.build():null;i(h)&&(a+=h.transitiveNgContentCount);var d=i(s.parent)?s.parent.index:-1,p=[];S(s.element,s.textBindings,function(e,t,n){o.push(n),p.push(t)}),r.push(new R.ElementBinder({index:s.index,parentIndex:d,distanceToParent:s.distanceToParent,directives:f,nestedProtoView:h,propertyBindings:t(s.element,i(s.componentId),s.propertyBindings,u),variableBindings:s.variableBindings,eventBindings:s.eventBindings,readAttributes:s.readAttributes})),n.push(new w({textNodeIndices:p,hasNestedProtoView:i(h)||i(s.componentId),hasNativeShadowRoot:i(s.componentId)&&e.useNativeShadowDom,eventLocals:new v(s.eventBuilder.buildEventLocals()),localEvents:s.eventBuilder.buildLocalEvents(),globalEvents:s.eventBuilder.buildGlobalEvents()}))});var u=d.childNodes(d.content(this.rootElement)).length;return new R.ProtoViewDto({render:new b(y.create(this.type,this.rootElement,[u],s,n)),type:this.type,elementBinders:r,variableBindings:this.variableBindings,textBindings:o,transitiveNgContentCount:a})}},{})}(),e("ProtoViewBuilder",O),D=function(){function e(e,t,n){this.index=e,this.element=t,this.parent=null,this.distanceToParent=0,this.directives=[],this.nestedProtoView=null,this.propertyBindings=new Map,this.variableBindings=new Map,this.propertyBindingsToDirectives=new l,this.eventBindings=[],this.eventBuilder=new I,this.textBindings=new Map,this.readAttributes=new Map,this.componentId=null}return $traceurRuntime.createClass(e,{setParent:function(e,t){return this.parent=e,i(e)&&(this.distanceToParent=t),this},readAttribute:function(e){o(this.readAttributes.get(e))&&this.readAttributes.set(e,d.getAttribute(this.element,e))},bindDirective:function(e){var t=new A(e);return this.directives.push(t),t},bindNestedProtoView:function(e){if(i(this.nestedProtoView))throw new s("Only one nested view per element is allowed");return this.nestedProtoView=new O(e,R.ViewType.EMBEDDED),this.nestedProtoView},bindProperty:function(e,t){this.propertyBindings.set(e,t)},bindPropertyToDirective:function(e){this.propertyBindingsToDirectives.add(e)},bindVariable:function(e,t){i(this.nestedProtoView)?this.nestedProtoView.bindVariable(e,t):this.variableBindings.set(t,e)},bindEvent:function(e,t){var n=void 0!==arguments[2]?arguments[2]:null;this.eventBindings.push(this.eventBuilder.add(e,t,n))},bindText:function(e,t){this.textBindings.set(e,t)},setComponentId:function(e){this.componentId=e}},{})}(),e("ElementBinderBuilder",D),A=function(){function e(e){this.directiveIndex=e,this.propertyBindings=new Map,this.templatePropertyNames=[],this.hostPropertyBindings=new Map,this.eventBindings=[],this.eventBuilder=new I}return $traceurRuntime.createClass(e,{bindProperty:function(e,t,n){this.propertyBindings.set(e,t),i(n)&&this.templatePropertyNames.push(n)},bindHostProperty:function(e,t){this.hostPropertyBindings.set(e,t)},bindEvent:function(e,t){var n=void 0!==arguments[2]?arguments[2]:null;this.eventBindings.push(this.eventBuilder.add(e,t,n))}},{})}(),e("DirectiveBuilder",A),I=function(e){function t(){$traceurRuntime.superConstructor(t).call(this),this.locals=[],this.localEvents=[],this.globalEvents=[],this._implicitReceiver=new _}return $traceurRuntime.createClass(t,{add:function(e,t,n){var r=t.ast,s=i(n)?n+x+e:e,a=new R.EventBinding(s,new p(r,t.source,t.location)),c=new C(e,n,s);return o(n)?this.localEvents.push(c):this.globalEvents.push(c),a},visitAccessMember:function(e){for(var t=!1,n=e;!t&&n instanceof m;){var r=n;"$event"==r.name&&(t=!0),n=r.receiver}if(t){this.locals.push(e);var i=this.locals.length-1;return new m(this._implicitReceiver,""+i,function(e){return e[i]},null)}return e},buildEventLocals:function(){return this.locals},buildLocalEvents:function(){return this.localEvents},buildGlobalEvents:function(){return this.globalEvents},merge:function(e){this._merge(this.localEvents,e.localEvents),this._merge(this.globalEvents,e.globalEvents),c.concat(this.locals,e.locals)},_merge:function(e,t){for(var n=[],r=0;r<e.length;r++)n.push(e[r].fullName);for(var i=0;i<t.length;i++)c.contains(n,t[i].fullName)||e.push(t[i])}},{},e)}(g),e("EventBuilder",I),P=new RegExp("\\."),j="attr",T="class",N="style"}}}),System.register("angular2/src/render/dom/compiler/directive_parser",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/dom/dom_adapter","angular2/src/render/dom/compiler/selector","angular2/src/render/api","angular2/src/render/dom/util"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p;return{setters:[function(e){t=e.isPresent,n=e.isBlank,r=e.BaseException,i=e.StringWrapper},function(e){o=e.MapWrapper,s=e.ListWrapper},function(e){a=e.DOM},function(e){c=e.SelectorMatcher,u=e.CssSelector},function(e){l=e.DirectiveMetadata},function(e){f=e.dashCaseToCamelCase,h=e.camelCaseToDashCase,d=e.EVENT_TARGET_SEPARATOR}],execute:function(){p=function(){function e(e,t){this._parser=e,this._directives=t,this._selectorMatcher=new c;for(var n=0;n<t.length;n++){var r=t[n],i=u.parse(r.selector);this._ensureComponentOnlyHasElementSelector(i,r),this._selectorMatcher.addSelectables(i,n)}}return $traceurRuntime.createClass(e,{_ensureComponentOnlyHasElementSelector:function(e,t){var n=1===e.length&&e[0].isElementSelector();if(!n&&t.type===l.COMPONENT_TYPE)throw new r("Component '"+t.id+"' can only have an element selector, but had '"+t.selector+"'")},process:function(e,n,r){var i=this,c=n.attrs(),f=n.classList(),h=new u,d=[],p=null;h.setElement(a.nodeName(n.element));for(var g=0;g<f.length;g++)h.addClassName(f[g]);o.forEach(c,function(e,t){h.addAttribute(t,e)}),this._selectorMatcher.match(h,function(e,t){var r=i._directives[t];p=n.bindElement(),r.type===l.COMPONENT_TYPE?(i._ensureHasOnlyOneComponent(p,n.elementDescription),s.insert(d,0,t),p.setComponentId(r.id)):d.push(t)}),s.forEach(d,function(e){var r=i._directives[e],o=p.bindDirective(e);n.compileChildren=n.compileChildren&&r.compileChildren,t(r.properties)&&s.forEach(r.properties,function(e){i._bindDirectiveProperty(e,n,o)}),t(r.hostListeners)&&i._sortedKeysForEach(r.hostListeners,function(e,t){i._bindDirectiveEvent(t,e,n,o)}),t(r.hostProperties)&&i._sortedKeysForEach(r.hostProperties,function(e,t){i._bindHostProperty(t,e,n,o)}),t(r.hostAttributes)&&i._sortedKeysForEach(r.hostAttributes,function(e,t){i._addHostAttribute(t,e,n)}),t(r.readAttributes)&&s.forEach(r.readAttributes,function(e){p.readAttribute(e)})})},_sortedKeysForEach:function(e,t){var n=o.keys(e);s.sort(n,function(e,t){var n=i.compare(e,t);return 0==n?-1:n}),s.forEach(n,function(n){t(o.get(e,n),n)})},_ensureHasOnlyOneComponent:function(e,n){if(t(e.componentId))throw new r("Only one component directive is allowed per element - check "+n)},_bindDirectiveProperty:function(e,r,o){var a,c,u,l=e.indexOf(":");l>-1?(a=i.substring(e,0,l).trim(),u=this._splitBindConfig(i.substring(e,l+1)),c=s.removeAt(u,0)):(a=e,c=e,u=[]),c=f(c);var d=r.bindElement().propertyBindings.get(c);if(n(d)){var p=r.attrs().get(h(c));t(p)&&(d=this._parser.wrapLiteralPrimitive(p,r.elementDescription))}t(d)&&o.bindProperty(a,d,c)},_bindDirectiveEvent:function(e,t,n,r){var o=this._parser.parseAction(t,n.elementDescription);if(i.contains(e,d)){var s=e.split(d);r.bindEvent(s[1],o,s[0])}else r.bindEvent(e,o)},_bindHostProperty:function(e,t,n,r){var i=this._parser.parseSimpleBinding(t,"hostProperties of "+n.elementDescription);r.bindHostProperty(e,i)},_addHostAttribute:function(e,t,n){i.equals(e,"class")?s.forEach(t.split(" "),function(e){a.addClass(n.element,e)}):a.hasAttribute(n.element,e)||a.setAttribute(n.element,e,t)},_splitBindConfig:function(e){return s.map(e.split("|"),function(e){return e.trim()})}},{})}(),e("DirectiveParser",p)}}}),System.register("angular2/src/forms/model",["angular2/src/facade/lang","angular2/src/facade/async","angular2/src/facade/collection","angular2/src/forms/validators"],function(e){"use strict";function t(e){return e instanceof p}function n(e,t){return o(t)?null:(t instanceof l||(t=r.split(t,new RegExp("/"))),t instanceof l&&u.isEmpty(t)?null:u.reduce(t,function(e,t){if(e instanceof m)return i(e.controls[t])?e.controls[t]:null;if(e instanceof v){var n=t;return i(e.at(n))?e.at(n):null}return null},e))}var r,i,o,s,a,c,u,l,f,h,d,p,g,m,v;return e("isControl",t),{setters:[function(e){r=e.StringWrapper,i=e.isPresent,o=e.isBlank},function(e){s=e.EventEmitter,a=e.ObservableWrapper},function(e){c=e.StringMapWrapper,u=e.ListWrapper,l=e.List},function(e){f=e.Validators}],execute:function(){h="VALID",e("VALID",h),d="INVALID",
17
- e("INVALID",d),p=function(){function e(e){this.validator=e,this._pristine=!0,this._touched=!1}return $traceurRuntime.createClass(e,{get value(){return this._value},get status(){return this._status},get valid(){return this._status===h},get errors(){return this._errors},get pristine(){return this._pristine},get dirty(){return!this.pristine},get touched(){return this._touched},get untouched(){return!this._touched},get valueChanges(){return this._valueChanges},markAsTouched:function(){this._touched=!0},markAsDirty:function(){var e=(void 0!==arguments[0]?arguments[0]:{}).onlySelf;e=i(e)?e:!1,this._pristine=!1,i(this._parent)&&!e&&this._parent.markAsDirty({onlySelf:e})},setParent:function(e){this._parent=e},updateValidity:function(){var e=(void 0!==arguments[0]?arguments[0]:{}).onlySelf;e=i(e)?e:!1,this._errors=this.validator(this),this._status=i(this._errors)?d:h,i(this._parent)&&!e&&this._parent.updateValidity({onlySelf:e})},updateValueAndValidity:function(){var e=void 0!==arguments[0]?arguments[0]:{},t=e.onlySelf,n=e.emitEvent;t=i(t)?t:!1,n=i(n)?n:!0,this._updateValue(),n&&a.callNext(this._valueChanges,this._value),this._errors=this.validator(this),this._status=i(this._errors)?d:h,i(this._parent)&&!t&&this._parent.updateValueAndValidity({onlySelf:t,emitEvent:n})},find:function(e){return n(this,e)},getError:function(e){var t=void 0!==arguments[1]?arguments[1]:null,n=i(t)&&!u.isEmpty(t)?this.find(t):this;return i(n)&&i(n._errors)?c.get(n._errors,e):null},hasError:function(e){var t=void 0!==arguments[1]?arguments[1]:null;return i(this.getError(e,t))},_updateValue:function(){}},{})}(),e("AbstractControl",p),g=function(e){function t(){var e=void 0!==arguments[0]?arguments[0]:null,n=void 0!==arguments[1]?arguments[1]:f.nullValidator;$traceurRuntime.superConstructor(t).call(this,n),this._value=e,this.updateValidity({onlySelf:!0}),this._valueChanges=new s}return $traceurRuntime.createClass(t,{updateValue:function(e){var t=void 0!==arguments[1]?arguments[1]:{},n=t.onlySelf,r=t.emitEvent,o=t.emitModelToViewChange;o=i(o)?o:!0,this._value=e,i(this._onChange)&&o&&this._onChange(this._value),this.updateValueAndValidity({onlySelf:n,emitEvent:r})},registerOnChange:function(e){this._onChange=e}},{},e)}(p),e("Control",g),m=function(e){function t(e){var n=void 0!==arguments[1]?arguments[1]:null,r=void 0!==arguments[2]?arguments[2]:f.group;$traceurRuntime.superConstructor(t).call(this,r),this.controls=e,this._optionals=i(n)?n:{},this._valueChanges=new s,this._setParentForControls(),this._value=this._reduceValue(),this.updateValidity({onlySelf:!0})}return $traceurRuntime.createClass(t,{addControl:function(e,t){this.controls[e]=t,t.setParent(this)},removeControl:function(e){c["delete"](this.controls,e)},include:function(e){c.set(this._optionals,e,!0),this.updateValueAndValidity()},exclude:function(e){c.set(this._optionals,e,!1),this.updateValueAndValidity()},contains:function(e){var t=c.contains(this.controls,e);return t&&this._included(e)},_setParentForControls:function(){var e=this;c.forEach(this.controls,function(t,n){t.setParent(e)})},_updateValue:function(){this._value=this._reduceValue()},_reduceValue:function(){return this._reduceChildren({},function(e,t,n){return e[n]=t.value,e})},_reduceChildren:function(e,t){var n=this,r=e;return c.forEach(this.controls,function(e,i){n._included(i)&&(r=t(r,e,i))}),r},_included:function(e){var t=c.contains(this._optionals,e);return!t||c.get(this._optionals,e)}},{},e)}(p),e("ControlGroup",m),v=function(e){function t(e){var n=void 0!==arguments[1]?arguments[1]:f.array;$traceurRuntime.superConstructor(t).call(this,n),this.controls=e,this._valueChanges=new s,this._setParentForControls(),this._updateValue(),this.updateValidity({onlySelf:!0})}return $traceurRuntime.createClass(t,{at:function(e){return this.controls[e]},push:function(e){this.controls.push(e),e.setParent(this),this.updateValueAndValidity()},insert:function(e,t){u.insert(this.controls,e,t),t.setParent(this),this.updateValueAndValidity()},removeAt:function(e){u.removeAt(this.controls,e),this.updateValueAndValidity()},get length(){return this.controls.length},_updateValue:function(){this._value=u.map(this.controls,function(e){return e.value})},_setParentForControls:function(){var e=this;u.forEach(this.controls,function(t){t.setParent(e)})}},{},e)}(p),e("ControlArray",v)}}}),System.register("angular2/src/forms/directives/ng_control_name",["angular2/src/facade/lang","angular2/src/facade/async","angular2/angular2","angular2/di","angular2/src/forms/directives/control_container","angular2/src/forms/directives/ng_control","angular2/src/forms/directives/validators","angular2/src/forms/directives/shared"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b,w;return{setters:[function(e){i=e.CONST_EXPR},function(e){o=e.EventEmitter,s=e.ObservableWrapper},function(e){a=e.Directive,c=e.LifecycleEvent,u=e.Query,l=e.QueryList},function(e){f=e.forwardRef,h=e.Ancestor,d=e.Binding},function(e){p=e.ControlContainer},function(e){g=e.NgControl},function(e){m=e.NgValidator},function(e){v=e.controlPath,_=e.composeNgValidator,y=e.isPropertyUpdated}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},r=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},b=i(new d(g,{toAlias:f(function(){return w})})),w=function(e){function t(e,n){$traceurRuntime.superConstructor(t).call(this),this.update=new o,this._added=!1,this._parent=e,this.ngValidators=n}return $traceurRuntime.createClass(t,{onChange:function(e){this._added||(this.formDirective.addControl(this),this._added=!0),y(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))},onDestroy:function(){this.formDirective.removeControl(this)},viewToModelUpdate:function(e){this.viewModel=e,s.callNext(this.update,e)},get path(){return v(this.name,this._parent)},get formDirective(){return this._parent.formDirective},get control(){return this.formDirective.getControl(this)},get validator(){return _(this.ngValidators)}},{},e)}(g),e("NgControlName",w),e("NgControlName",w=t([a({selector:"[ng-control]",hostInjector:[b],properties:["name: ngControl","model: ngModel"],events:["update: ngModel"],lifecycle:[c.onDestroy,c.onChange],exportAs:"form"}),r(0,h()),r(1,u(m)),n("design:paramtypes",[p,l])],w))}}}),System.register("angular2/render",["angular2/src/render/dom/compiler/view_loader","angular2/src/render/dom/shadow_dom/shadow_dom_strategy","angular2/src/render/dom/shadow_dom/native_shadow_dom_strategy","angular2/src/render/dom/shadow_dom/emulated_scoped_shadow_dom_strategy","angular2/src/render/dom/shadow_dom/emulated_unscoped_shadow_dom_strategy","angular2/src/render/api"],function(e){"use strict";var t={},t={},t={},t={},t={},t={};return{setters:[function(n){Object.keys(n).forEach(function(r){t[r]||e(r,n[r])})},function(n){Object.keys(n).forEach(function(r){t[r]||e(r,n[r])})},function(n){Object.keys(n).forEach(function(r){t[r]||e(r,n[r])})},function(n){Object.keys(n).forEach(function(r){t[r]||e(r,n[r])})},function(n){Object.keys(n).forEach(function(r){t[r]||e(r,n[r])})},function(n){Object.keys(n).forEach(function(r){t[r]||e(r,n[r])})}],execute:function(){}}}),System.register("angular2/directives",["angular2/src/facade/lang","angular2/src/directives/ng_for","angular2/src/directives/ng_if","angular2/src/directives/ng_non_bindable","angular2/src/directives/ng_switch","angular2/src/directives/class","angular2/src/directives/ng_style"],function(e){"use strict";var t,n,r,i,o,s,a,c,u={coreDirectives:!0},u={coreDirectives:!0},u={coreDirectives:!0},u={coreDirectives:!0},u={coreDirectives:!0},u={coreDirectives:!0};return{setters:[function(e){t=e.CONST_EXPR},function(t){n=t.NgFor,Object.keys(t).forEach(function(n){u[n]||e(n,t[n])})},function(t){r=t.NgIf,Object.keys(t).forEach(function(n){u[n]||e(n,t[n])})},function(t){i=t.NgNonBindable,Object.keys(t).forEach(function(n){u[n]||e(n,t[n])})},function(t){o=t.NgSwitch,s=t.NgSwitchWhen,a=t.NgSwitchDefault,Object.keys(t).forEach(function(n){u[n]||e(n,t[n])})},function(t){Object.keys(t).forEach(function(n){u[n]||e(n,t[n])})},function(t){Object.keys(t).forEach(function(n){u[n]||e(n,t[n])})}],execute:function(){c=t([n,r,i,o,s,a]),e("coreDirectives",c)}}}),System.register("angular2/src/http/static_request",["angular2/src/http/headers","angular2/src/facade/lang"],function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.Headers},function(e){n=e.isPresent}],execute:function(){r=function(){function e(e){this.url=e.url,this._body=e.body,this.method=e.method,this.mode=e.mode,this.credentials=e.credentials,this.headers=new t(e.headers),this.cache=e.cache}return $traceurRuntime.createClass(e,{text:function(){return n(this._body)?this._body.toString():""}},{})}(),e("Request",r)}}}),System.register("angular2/src/http/base_request_options",["angular2/src/facade/lang","angular2/src/http/headers","angular2/src/http/enums","angular2/di"],function(e){"use strict";var t,n,r,i,o,s,a,c,u;return{setters:[function(e){r=e.isPresent},function(e){i=e.Headers},function(e){o=e.RequestModesOpts,s=e.RequestMethods},function(e){a=e.Injectable}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=function(){function e(){var e=void 0!==arguments[0]?arguments[0]:{},t=e.method,n=e.headers,i=e.body,o=e.mode,s=e.credentials,a=e.cache,c=e.url;this.method=r(t)?t:null,this.headers=r(n)?n:null,this.body=r(i)?i:null,this.mode=r(o)?o:null,this.credentials=r(s)?s:null,this.cache=r(a)?a:null,this.url=r(c)?c:null}return $traceurRuntime.createClass(e,{merge:function(t){return new e({method:r(t)&&r(t.method)?t.method:this.method,headers:r(t)&&r(t.headers)?t.headers:this.headers,body:r(t)&&r(t.body)?t.body:this.body,mode:r(t)&&r(t.mode)?t.mode:this.mode,credentials:r(t)&&r(t.credentials)?t.credentials:this.credentials,cache:r(t)&&r(t.cache)?t.cache:this.cache,url:r(t)&&r(t.url)?t.url:this.url})}},{})}(),e("RequestOptions",c),u=function(e){function t(){$traceurRuntime.superConstructor(t).call(this,{method:s.GET,headers:new i,mode:o.Cors})}return $traceurRuntime.createClass(t,{},{},e)}(c),e("BaseRequestOptions",u),e("BaseRequestOptions",u=t([a(),n("design:paramtypes",[])],u))}}}),System.register("angular2/src/http/static_response",["angular2/src/facade/lang","angular2/src/http/http_utils"],function(e){"use strict";var t,n,r,i,o;return{setters:[function(e){t=e.BaseException,n=e.isString,r=e.Json},function(e){i=e.isJsObject}],execute:function(){o=function(){function e(e){this._body=e.body,this.status=e.status,this.statusText=e.statusText,this.headers=e.headers,this.type=e.type,this.url=e.url}return $traceurRuntime.createClass(e,{blob:function(){throw new t('"blob()" method not implemented on Response superclass')},json:function(){var e;return i(this._body)?e=this._body:n(this._body)&&(e=r.parse(this._body)),e},text:function(){return this._body.toString()},arrayBuffer:function(){throw new t('"arrayBuffer()" method not implemented on Response superclass')}},{})}(),e("Response",o)}}}),System.register("angular2/src/http/backends/jsonp_backend",["angular2/src/http/enums","angular2/src/http/static_response","angular2/src/http/base_response_options","angular2/di","angular2/src/http/backends/browser_jsonp","angular2/src/facade/async","angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g;return{setters:[function(e){r=e.ReadyStates,i=e.RequestMethods},function(e){o=e.Response},function(e){s=e.ResponseOptions},function(e){a=e.Injectable},function(e){c=e.BrowserJsonp},function(e){u=e.EventEmitter,l=e.ObservableWrapper},function(e){f=e.StringWrapper,h=e.isPresent,d=e.makeTypeError}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},p=function(){function e(e,t,n){var a=this;if(this._dom=t,this.baseResponseOptions=n,this._finished=!1,e.method!==i.GET)throw d("JSONP requests must use GET request method.");this.request=e,this.response=new u,this.readyState=r.LOADING,this._id=t.nextRequestID(),t.exposeConnection(this._id,this);var c=t.requestCallback(this._id),p=e.url;p.indexOf("=JSONP_CALLBACK&")>-1?p=f.replace(p,"=JSONP_CALLBACK&","="+c+"&"):p.lastIndexOf("=JSONP_CALLBACK")===p.length-"=JSONP_CALLBACK".length&&(p=f.substring(p,0,p.length-"=JSONP_CALLBACK".length)+("="+c));var g=this._script=t.build(p);g.addEventListener("load",function(e){if(a.readyState!==r.CANCELLED){if(a.readyState=r.DONE,t.cleanup(g),!a._finished)return void l.callThrow(a.response,d("JSONP injected script did not invoke callback."));var n=new s({body:a._responseData});h(a.baseResponseOptions)&&(n=a.baseResponseOptions.merge(n)),l.callNext(a.response,new o(n))}}),g.addEventListener("error",function(e){a.readyState!==r.CANCELLED&&(a.readyState=r.DONE,t.cleanup(g),l.callThrow(a.response,e))}),t.send(g)}return $traceurRuntime.createClass(e,{finished:function(e){this._finished=!0,this._dom.removeConnection(this._id),this.readyState!==r.CANCELLED&&(this._responseData=e)},dispose:function(){this.readyState=r.CANCELLED;var e=this._script;this._script=null,h(e)&&this._dom.cleanup(e),l.callReturn(this.response)}},{})}(),e("JSONPConnection",p),g=$traceurRuntime.createClass(function(e,t){this._browserJSONP=e,this._baseResponseOptions=t},{createConnection:function(e){return new p(e,this._browserJSONP,this._baseResponseOptions)}},{}),e("JSONPBackend",g),e("JSONPBackend",g=t([a(),n("design:paramtypes",[c,s])],g))}}}),System.register("angular2/src/change_detection/parser/lexer",["angular2/src/di/decorators","angular2/src/facade/collection","angular2/src/facade/lang"],function(e){"use strict";function t(e,t){return new x(e,R.CHARACTER,t,b.fromCharCode(t))}function n(e,t){return new x(e,R.IDENTIFIER,0,t)}function r(e,t){return new x(e,R.KEYWORD,0,t)}function i(e,t){return new x(e,R.OPERATOR,0,t)}function o(e,t){return new x(e,R.STRING,0,t)}function s(e,t){return new x(e,R.NUMBER,t,"")}function a(e){return e>=D&&T>=e||e==Re}function c(e){return e>=fe&&ye>=e||e>=re&&oe>=e||e==le||e==M}function u(e){return e>=fe&&ye>=e||e>=re&&oe>=e||e>=te&&ne>=e||e==le||e==M}function l(e){return e>=te&&ne>=e}function f(e){return e==he||e==ie}function h(e){return e==K||e==q}function d(e){switch(e){case pe:return A;case de:return P;case ge:return j;case me:return D;case _e:return I;default:return e}}var p,g,m,v,_,y,b,w,C,R,E,x,S,O,D,A,I,P,j,T,N,V,k,M,B,L,$,F,H,W,q,U,K,z,G,Q,Y,J,X,Z,ee,te,ne,re,ie,oe,se,ae,ce,ue,le,fe,he,de,pe,ge,me,ve,_e,ye,be,we,Ce,Re,Ee,xe,Se,Oe;return{setters:[function(e){m=e.Injectable},function(e){v=e.SetWrapper},function(e){_=e.NumberWrapper,y=e.StringJoiner,b=e.StringWrapper,w=e.BaseException,C=e.isPresent}],execute:function(){p=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},g=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},e("TokenType",R),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"}(R||e("TokenType",R={})),E=$traceurRuntime.createClass(function(){},{tokenize:function(e){for(var t=new xe(e),n=[],r=t.scanToken();null!=r;)n.push(r),r=t.scanToken();return n}},{}),e("Lexer",E),e("Lexer",E=p([m(),g("design:paramtypes",[])],E)),x=function(){function e(e,t,n,r){this.index=e,this.type=t,this.numValue=n,this.strValue=r}return $traceurRuntime.createClass(e,{isCharacter:function(e){return this.type==R.CHARACTER&&this.numValue==e},isNumber:function(){return this.type==R.NUMBER},isString:function(){return this.type==R.STRING},isOperator:function(e){return this.type==R.OPERATOR&&this.strValue==e},isIdentifier:function(){return this.type==R.IDENTIFIER},isKeyword:function(){return this.type==R.KEYWORD},isKeywordVar:function(){return this.type==R.KEYWORD&&"var"==this.strValue},isKeywordNull:function(){return this.type==R.KEYWORD&&"null"==this.strValue},isKeywordUndefined:function(){return this.type==R.KEYWORD&&"undefined"==this.strValue},isKeywordTrue:function(){return this.type==R.KEYWORD&&"true"==this.strValue},isKeywordIf:function(){return this.type==R.KEYWORD&&"if"==this.strValue},isKeywordElse:function(){return this.type==R.KEYWORD&&"else"==this.strValue},isKeywordFalse:function(){return this.type==R.KEYWORD&&"false"==this.strValue},toNumber:function(){return this.type==R.NUMBER?this.numValue:-1},toString:function(){switch(this.type){case R.CHARACTER:case R.STRING:case R.IDENTIFIER:case R.KEYWORD:return this.strValue;case R.NUMBER:return this.numValue.toString();default:return null}}},{})}(),e("Token",x),S=new x(-1,R.CHARACTER,0,""),e("EOF",S),O=0,e("$EOF",O),D=9,e("$TAB",D),A=10,e("$LF",A),I=11,e("$VTAB",I),P=12,e("$FF",P),j=13,e("$CR",j),T=32,e("$SPACE",T),N=33,e("$BANG",N),V=34,e("$DQ",V),k=35,e("$HASH",k),M=36,e("$$",M),B=37,e("$PERCENT",B),L=38,e("$AMPERSAND",L),$=39,e("$SQ",$),F=40,e("$LPAREN",F),H=41,e("$RPAREN",H),W=42,e("$STAR",W),q=43,e("$PLUS",q),U=44,e("$COMMA",U),K=45,e("$MINUS",K),z=46,e("$PERIOD",z),G=47,e("$SLASH",G),Q=58,e("$COLON",Q),Y=59,e("$SEMICOLON",Y),J=60,e("$LT",J),X=61,e("$EQ",X),Z=62,e("$GT",Z),ee=63,e("$QUESTION",ee),te=48,ne=57,re=65,ie=69,oe=90,se=91,e("$LBRACKET",se),ae=92,e("$BACKSLASH",ae),ce=93,e("$RBRACKET",ce),ue=94,le=95,fe=97,he=101,de=102,pe=110,ge=114,me=116,ve=117,_e=118,ye=122,be=123,e("$LBRACE",be),we=124,e("$BAR",we),Ce=125,e("$RBRACE",Ce),Re=160,Ee=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this.message=e}return $traceurRuntime.createClass(t,{toString:function(){return this.message}},{},e)}(w),e("ScannerError",Ee),xe=function(){function e(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}return $traceurRuntime.createClass(e,{advance:function(){this.peek=++this.index>=this.length?O:b.charCodeAt(this.input,this.index)},scanToken:function(){for(var e=this.input,n=this.length,r=this.peek,i=this.index;T>=r;){if(++i>=n){r=O;break}r=b.charCodeAt(e,i)}if(this.peek=r,this.index=i,i>=n)return null;if(c(r))return this.scanIdentifier();if(l(r))return this.scanNumber(i);var o=i;switch(r){case z:return this.advance(),l(this.peek)?this.scanNumber(o):t(o,z);case F:case H:case be:case Ce:case se:case ce:case U:case Q:case Y:return this.scanCharacter(o,r);case $:case V:return this.scanString();case k:case q:case K:case W:case G:case B:case ue:return this.scanOperator(o,b.fromCharCode(r));case ee:return this.scanComplexOperator(o,"?",z,".");case J:case Z:return this.scanComplexOperator(o,b.fromCharCode(r),X,"=");case N:case X:return this.scanComplexOperator(o,b.fromCharCode(r),X,"=",X,"=");case L:return this.scanComplexOperator(o,"&",L,"&");case we:return this.scanComplexOperator(o,"|",we,"|");case Re:for(;a(this.peek);)this.advance();return this.scanToken()}return this.error("Unexpected character ["+b.fromCharCode(r)+"]",0),null},scanCharacter:function(e,n){return assert(this.peek==n),this.advance(),t(e,n)},scanOperator:function(e,t){return assert(this.peek==b.charCodeAt(t,0)),assert(v.has(Se,t)),this.advance(),i(e,t)},scanComplexOperator:function(e,t,n,r,o,s){assert(this.peek==b.charCodeAt(t,0)),this.advance();var a=t;return this.peek==n&&(this.advance(),a+=r),C(o)&&this.peek==o&&(this.advance(),a+=s),assert(v.has(Se,a)),i(e,a)},scanIdentifier:function(){assert(c(this.peek));var e=this.index;for(this.advance();u(this.peek);)this.advance();var t=this.input.substring(e,this.index);return v.has(Oe,t)?r(e,t):n(e,t)},scanNumber:function(e){assert(l(this.peek));var t=this.index===e;for(this.advance();;){if(l(this.peek));else if(this.peek==z)t=!1;else{if(!f(this.peek))break;this.advance(),h(this.peek)&&this.advance(),l(this.peek)||this.error("Invalid exponent",-1),t=!1}this.advance()}var n=this.input.substring(e,this.index),r=t?_.parseIntAutoRadix(n):_.parseFloat(n);return s(e,r)},scanString:function(){assert(this.peek==$||this.peek==V);var e=this.index,t=this.peek;this.advance();for(var n,r=this.index,i=this.input;this.peek!=t;)if(this.peek==ae){null==n&&(n=new y),n.add(i.substring(r,this.index)),this.advance();var s=void 0;if(this.peek==ve){var a=i.substring(this.index+1,this.index+5);try{s=_.parseInt(a,16)}catch(c){this.error("Invalid unicode escape [\\u"+a+"]",0)}for(var u=0;5>u;u++)this.advance()}else s=d(this.peek),this.advance();n.add(b.fromCharCode(s)),r=this.index}else this.peek==O?this.error("Unterminated quote",0):this.advance();var l=i.substring(r,this.index);this.advance();var f=l;return null!=n&&(n.add(l),f=n.toString()),o(e,f)},error:function(e,t){var n=this.index+t;throw new Ee("Lexer Error: "+e+" at column "+n+" in expression ["+this.input+"]")}},{})}(),Se=v.createFromList(["+","-","*","/","%","^","=","==","!=","===","!==","<",">","<=",">=","&&","||","&","|","!","?","#","?."]),Oe=v.createFromList(["var","null","undefined","true","false","if","else"])}}}),System.register("angular2/src/change_detection/parser/parser",["angular2/src/di/decorators","angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/change_detection/parser/lexer","angular2/src/reflection/reflection","angular2/src/change_detection/parser/ast"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b,w,C,R,E,x,S,O,D,A,I,P,j,T,N,V,k,M,B,L,$,F,H,W,q,U,K,z,G;return{setters:[function(e){r=e.Injectable},function(e){i=e.isBlank,o=e.isPresent,s=e.BaseException,a=e.StringWrapper},function(e){c=e.ListWrapper},function(e){u=e.Lexer,l=e.EOF,f=e.$PERIOD,h=e.$COLON,d=e.$SEMICOLON,p=e.$LBRACKET,g=e.$RBRACKET,m=e.$COMMA,v=e.$LBRACE,_=e.$RBRACE,y=e.$LPAREN,b=e.$RPAREN},function(e){w=e.reflector,C=e.Reflector},function(e){R=e.EmptyExpr,E=e.ImplicitReceiver,x=e.AccessMember,S=e.SafeAccessMember,O=e.LiteralPrimitive,D=e.Binary,A=e.PrefixNot,I=e.Conditional,P=e.If,j=e.BindingPipe,T=e.Assignment,N=e.Chain,V=e.KeyedAccess,k=e.LiteralArray,M=e.LiteralMap,B=e.Interpolation,L=e.MethodCall,$=e.SafeMethodCall,F=e.FunctionCall,H=e.TemplateBinding,W=e.ASTWithSource}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},q=new E,U=/\{\{(.*?)\}\}/g,K=$traceurRuntime.createClass(function(e){var t=void 0!==arguments[1]?arguments[1]:null;this._lexer=e,this._reflector=o(t)?t:w},{parseAction:function(e,t){var n=this._lexer.tokenize(e),r=new z(e,t,n,this._reflector,!0).parseChain();return new W(r,e,t)},parseBinding:function(e,t){var n=this._lexer.tokenize(e),r=new z(e,t,n,this._reflector,!1).parseChain();return new W(r,e,t)},parseSimpleBinding:function(e,t){var n=this._lexer.tokenize(e),r=new z(e,t,n,this._reflector,!1).parseSimpleBinding();return new W(r,e,t)},parseTemplateBindings:function(e,t){var n=this._lexer.tokenize(e);return new z(e,t,n,this._reflector,!1).parseTemplateBindings()},parseInterpolation:function(e,t){var n=a.split(e,U);if(n.length<=1)return null;for(var r=[],i=[],o=0;o<n.length;o++){var s=n[o];if(o%2===0)r.push(s);else{var c=this._lexer.tokenize(s),u=new z(e,t,c,this._reflector,!1).parseChain();i.push(u)}}return new W(new B(r,i),e,t)},wrapLiteralPrimitive:function(e,t){return new W(new O(e),e,t)}},{}),e("Parser",K),e("Parser",K=t([r(),n("design:paramtypes",[u,C])],K)),z=function(){function e(e,t,n,r,i){this.input=e,this.location=t,this.tokens=n,this.reflector=r,this.parseAction=i,this.index=0}return $traceurRuntime.createClass(e,{peek:function(e){var t=this.index+e;return t<this.tokens.length?this.tokens[t]:l},get next(){return this.peek(0)},get inputIndex(){return this.index<this.tokens.length?this.next.index:this.input.length},advance:function(){this.index++},optionalCharacter:function(e){return this.next.isCharacter(e)?(this.advance(),!0):!1},optionalKeywordVar:function(){return this.peekKeywordVar()?(this.advance(),!0):!1},peekKeywordVar:function(){return this.next.isKeywordVar()||this.next.isOperator("#")},expectCharacter:function(e){this.optionalCharacter(e)||this.error("Missing expected "+a.fromCharCode(e))},optionalOperator:function(e){return this.next.isOperator(e)?(this.advance(),!0):!1},expectOperator:function(e){this.optionalOperator(e)||this.error("Missing expected operator "+e)},expectIdentifierOrKeyword:function(){var e=this.next;return e.isIdentifier()||e.isKeyword()||this.error("Unexpected token "+e+", expected identifier or keyword"),this.advance(),e.toString()},expectIdentifierOrKeywordOrString:function(){var e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()||this.error("Unexpected token "+e+", expected identifier, keyword, or string"),this.advance(),e.toString()},parseChain:function(){for(var e=[];this.index<this.tokens.length;){var t=this.parsePipe();if(e.push(t),this.optionalCharacter(d))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.optionalCharacter(d););else this.index<this.tokens.length&&this.error("Unexpected token '"+this.next+"'")}return 0==e.length?new R:1==e.length?e[0]:new N(e)},parseSimpleBinding:function(){var e=this.parseChain();return G.check(e)||this.error("Simple binding expression can only contain field access and constants'"),e},parsePipe:function(){var e=this.parseExpression();if(this.optionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{for(var t=this.expectIdentifierOrKeyword(),n=[];this.optionalCharacter(h);)n.push(this.parsePipe());e=new j(e,t,n)}while(this.optionalOperator("|"))}return e},parseExpression:function(){for(var e=this.inputIndex,t=this.parseConditional();this.next.isOperator("=");){if(!t.isAssignable){var n=this.inputIndex,r=this.input.substring(e,n);this.error("Expression "+r+" is not assignable")}this.parseAction||this.error("Binding expression cannot contain assignments"),this.expectOperator("="),t=new T(t,this.parseConditional())}return t},parseConditional:function(){var e=this.inputIndex,t=this.parseLogicalOr();if(this.optionalOperator("?")){var n=this.parsePipe();if(!this.optionalCharacter(h)){var r=this.inputIndex,i=this.input.substring(e,r);this.error("Conditional expression "+i+" requires all 3 expressions")}var o=this.parsePipe();return new I(t,n,o)}return t},parseLogicalOr:function(){for(var e=this.parseLogicalAnd();this.optionalOperator("||");)e=new D("||",e,this.parseLogicalAnd());return e},parseLogicalAnd:function(){for(var e=this.parseEquality();this.optionalOperator("&&");)e=new D("&&",e,this.parseEquality());return e},parseEquality:function(){for(var e=this.parseRelational();;)if(this.optionalOperator("=="))e=new D("==",e,this.parseRelational());else if(this.optionalOperator("==="))e=new D("===",e,this.parseRelational());else if(this.optionalOperator("!="))e=new D("!=",e,this.parseRelational());else{if(!this.optionalOperator("!=="))return e;e=new D("!==",e,this.parseRelational())}},parseRelational:function(){for(var e=this.parseAdditive();;)if(this.optionalOperator("<"))e=new D("<",e,this.parseAdditive());else if(this.optionalOperator(">"))e=new D(">",e,this.parseAdditive());else if(this.optionalOperator("<="))e=new D("<=",e,this.parseAdditive());else{if(!this.optionalOperator(">="))return e;e=new D(">=",e,this.parseAdditive())}},parseAdditive:function(){for(var e=this.parseMultiplicative();;)if(this.optionalOperator("+"))e=new D("+",e,this.parseMultiplicative());else{if(!this.optionalOperator("-"))return e;e=new D("-",e,this.parseMultiplicative())}},parseMultiplicative:function(){for(var e=this.parsePrefix();;)if(this.optionalOperator("*"))e=new D("*",e,this.parsePrefix());else if(this.optionalOperator("%"))e=new D("%",e,this.parsePrefix());else{if(!this.optionalOperator("/"))return e;e=new D("/",e,this.parsePrefix())}},parsePrefix:function(){return this.optionalOperator("+")?this.parsePrefix():this.optionalOperator("-")?new D("-",new O(0),this.parsePrefix()):this.optionalOperator("!")?new A(this.parsePrefix()):this.parseCallChain()},parseCallChain:function(){for(var e=this.parsePrimary();;)if(this.optionalCharacter(f))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.optionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.optionalCharacter(p)){var t=this.parsePipe();this.expectCharacter(g),e=new V(e,t)}else{if(!this.optionalCharacter(y))return e;var n=this.parseCallArguments();this.expectCharacter(b),e=new F(e,n)}},parsePrimary:function(){if(this.optionalCharacter(y)){var e=this.parsePipe();return this.expectCharacter(b),e}if(this.next.isKeywordNull()||this.next.isKeywordUndefined())return this.advance(),new O(null);if(this.next.isKeywordTrue())return this.advance(),new O(!0);if(this.next.isKeywordFalse())return this.advance(),new O(!1);if(this.parseAction&&this.next.isKeywordIf()){this.advance(),this.expectCharacter(y);var t=this.parseExpression();this.expectCharacter(b);var n,r=this.parseExpressionOrBlock();return this.next.isKeywordElse()&&(this.advance(),n=this.parseExpressionOrBlock()),new P(t,r,n)}if(this.optionalCharacter(p)){var i=this.parseExpressionList(g);return this.expectCharacter(g),new k(i)}if(this.next.isCharacter(v))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(q,!1);if(this.next.isNumber()){var o=this.next.toNumber();return this.advance(),new O(o)}if(this.next.isString()){var a=this.next.toString();return this.advance(),new O(a)}throw this.error(this.index>=this.tokens.length?"Unexpected end of expression: "+this.input:"Unexpected token "+this.next),new s("Fell through all cases in parsePrimary")},parseExpressionList:function(e){var t=[];if(!this.next.isCharacter(e))do t.push(this.parsePipe());while(this.optionalCharacter(m));return t},parseLiteralMap:function(){var e=[],t=[];if(this.expectCharacter(v),!this.optionalCharacter(_)){do{var n=this.expectIdentifierOrKeywordOrString();e.push(n),this.expectCharacter(h),t.push(this.parsePipe())}while(this.optionalCharacter(m));this.expectCharacter(_)}return new M(e,t)},parseAccessMemberOrMethodCall:function(e){var t=void 0!==arguments[1]?arguments[1]:!1,n=this.expectIdentifierOrKeyword();if(this.optionalCharacter(y)){var r=this.parseCallArguments();this.expectCharacter(b);var i=this.reflector.method(n);
18
-
19
- return t?new $(e,n,i,r):new L(e,n,i,r)}var o=this.reflector.getter(n),s=this.reflector.setter(n);return t?new S(e,n,o,s):new x(e,n,o,s)},parseCallArguments:function(){if(this.next.isCharacter(b))return[];var e=[];do e.push(this.parsePipe());while(this.optionalCharacter(m));return e},parseExpressionOrBlock:function(){if(this.optionalCharacter(v)){var e=this.parseBlockContent();return this.expectCharacter(_),e}return this.parseExpression()},parseBlockContent:function(){this.parseAction||this.error("Binding expression cannot contain chained expression");for(var e=[];this.index<this.tokens.length&&!this.next.isCharacter(_);){var t=this.parseExpression();if(e.push(t),this.optionalCharacter(d))for(;this.optionalCharacter(d););}return 0==e.length?new R:1==e.length?e[0]:new N(e)},expectTemplateBindingKey:function(){var e="",t=!1;do e+=this.expectIdentifierOrKeywordOrString(),t=this.optionalOperator("-"),t&&(e+="-");while(t);return e.toString()},parseTemplateBindings:function(){for(var e=[],t=null;this.index<this.tokens.length;){var n=this.optionalKeywordVar(),r=this.expectTemplateBindingKey();n||(null==t?t=r:r=t+"-"+r),this.optionalCharacter(h);var i=null,o=null;if(n)i=this.optionalOperator("=")?this.expectTemplateBindingKey():"$implicit";else if(this.next!==l&&!this.peekKeywordVar()){var s=this.inputIndex,a=this.parsePipe(),c=this.input.substring(s,this.inputIndex);o=new W(a,c,this.location)}e.push(new H(r,n,i,o)),this.optionalCharacter(d)||this.optionalCharacter(m)}return e},error:function(e){var t=void 0!==arguments[1]?arguments[1]:null;i(t)&&(t=this.index);var n=t<this.tokens.length?"at column "+(this.tokens[t].index+1)+" in":"at the end of the expression";throw new s("Parser Error: "+e+" "+n+" ["+this.input+"] in "+this.location)}},{})}(),G=function(){function e(){this.simple=!0}return $traceurRuntime.createClass(e,{visitImplicitReceiver:function(e){},visitInterpolation:function(e){this.simple=!1},visitLiteralPrimitive:function(e){},visitAccessMember:function(e){},visitSafeAccessMember:function(e){this.simple=!1},visitMethodCall:function(e){this.simple=!1},visitSafeMethodCall:function(e){this.simple=!1},visitFunctionCall:function(e){this.simple=!1},visitLiteralArray:function(e){this.visitAll(e.expressions)},visitLiteralMap:function(e){this.visitAll(e.values)},visitBinary:function(e){this.simple=!1},visitPrefixNot:function(e){this.simple=!1},visitConditional:function(e){this.simple=!1},visitPipe:function(e){this.simple=!1},visitKeyedAccess:function(e){this.simple=!1},visitAll:function(e){for(var t=c.createFixedSize(e.length),n=0;n<e.length;++n)t[n]=e[n].visit(this);return t},visitChain:function(e){this.simple=!1},visitAssignment:function(e){this.simple=!1},visitIf:function(e){this.simple=!1}},{check:function(t){var n=new e;return t.visit(n),n.simple}})}()}}}),System.register("angular2/src/change_detection/dynamic_change_detector",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/change_detection/abstract_change_detector","angular2/src/change_detection/change_detection_util","angular2/src/change_detection/proto_record"],function(e){"use strict";function t(e,t){return e===t?!0:e instanceof String&&t instanceof String&&e==t?!0:e!==e&&t!==t?!0:!1}var n,r,i,o,s,a,c,u,l,f;return{setters:[function(e){n=e.isPresent,r=e.isBlank,i=e.BaseException,o=e.FunctionWrapper},function(e){s=e.ListWrapper},function(e){a=e.AbstractChangeDetector},function(e){c=e.ChangeDetectionUtil,u=e.uninitialized},function(e){l=e.RecordType}],execute:function(){f=function(e){function a(e,t,n,r,i){$traceurRuntime.superConstructor(a).call(this,e),this.changeControlStrategy=t,this.dispatcher=n,this.protos=r,this.directiveRecords=i,this.locals=null,this.directives=null,this.alreadyChecked=!1,this.pipes=null,this.values=s.createFixedSize(r.length+1),this.localPipes=s.createFixedSize(r.length+1),this.prevContexts=s.createFixedSize(r.length+1),this.changes=s.createFixedSize(r.length+1),this.values[0]=null,s.fill(this.values,u,1),s.fill(this.localPipes,null),s.fill(this.prevContexts,u),s.fill(this.changes,!1)}return $traceurRuntime.createClass(a,{hydrate:function(e,t,n,r){this.mode=c.changeDetectionMode(this.changeControlStrategy),this.values[0]=e,this.locals=t,this.directives=n,this.alreadyChecked=!1,this.pipes=r},dehydrate:function(){this._destroyPipes(),this.values[0]=null,s.fill(this.values,u,1),s.fill(this.changes,!1),s.fill(this.localPipes,null),s.fill(this.prevContexts,u),this.locals=null,this.pipes=null},_destroyPipes:function(){for(var e=0;e<this.localPipes.length;++e)n(this.localPipes[e])&&this.localPipes[e].onDestroy()},hydrated:function(){return null!==this.values[0]},detectChangesInRecords:function(e){this.hydrated()||c.throwDehydrated();for(var t=this.protos,r=null,i=!1,o=0;o<t.length;++o){var s=t[o],a=s.bindingRecord,u=a.directiveRecord;if(s.isLifeCycleRecord())"onCheck"!==s.name||e?"onInit"!==s.name||e||this.alreadyChecked?"onChange"===s.name&&n(r)&&!e&&this._getDirectiveFor(u.directiveIndex).onChange(r):this._getDirectiveFor(u.directiveIndex).onInit():this._getDirectiveFor(u.directiveIndex).onCheck();else{var l=this._check(s,e);n(l)&&(this._updateDirectiveOrElement(l,a),i=!0,r=this._addChange(a,l,r))}s.lastInDirective&&(r=null,i&&a.isOnPushChangeDetection()&&this._getDetectorFor(u.directiveIndex).markAsCheckOnce(),i=!1)}this.alreadyChecked=!0},callOnAllChangesDone:function(){this.dispatcher.notifyOnAllChangesDone();for(var e=this.directiveRecords,t=e.length-1;t>=0;--t){var n=e[t];n.callOnAllChangesDone&&this._getDirectiveFor(n.directiveIndex).onAllChangesDone()}},_updateDirectiveOrElement:function(e,t){if(r(t.directiveRecord))this.dispatcher.notifyOnBinding(t,e.currentValue);else{var n=t.directiveRecord.directiveIndex;t.setter(this._getDirectiveFor(n),e.currentValue)}},_addChange:function(e,t,n){return e.callOnChange()?c.addChange(n,e.propertyName,t):n},_getDirectiveFor:function(e){return this.directives.getDirectiveFor(e)},_getDetectorFor:function(e){return this.directives.getDetectorFor(e)},_check:function(e,t){try{return e.isPipeRecord()?this._pipeCheck(e,t):this._referenceCheck(e,t)}catch(n){this.throwError(e,n,n.stack)}},_referenceCheck:function(e,n){if(this._pureFuncAndArgsDidNotChange(e))return this._setChanged(e,!1),null;var r=this._readSelf(e),i=this._calculateCurrValue(e);if(t(r,i))return this._setChanged(e,!1),null;if(e.lastInBinding){var o=c.simpleChange(r,i);return n&&c.throwOnChange(e,o),this._writeSelf(e,i),this._setChanged(e,!0),o}return this._writeSelf(e,i),this._setChanged(e,!0),null},_calculateCurrValue:function(e){switch(e.mode){case l.SELF:return this._readContext(e);case l.CONST:return e.funcOrValue;case l.PROPERTY:var t=this._readContext(e);return e.funcOrValue(t);case l.SAFE_PROPERTY:var t=this._readContext(e);return r(t)?null:e.funcOrValue(t);case l.LOCAL:return this.locals.get(e.name);case l.INVOKE_METHOD:var t=this._readContext(e),n=this._readArgs(e);return e.funcOrValue(t,n);case l.SAFE_INVOKE_METHOD:var t=this._readContext(e);if(r(t))return null;var n=this._readArgs(e);return e.funcOrValue(t,n);case l.KEYED_ACCESS:var s=this._readArgs(e)[0];return this._readContext(e)[s];case l.INVOKE_CLOSURE:return o.apply(this._readContext(e),this._readArgs(e));case l.INTERPOLATE:case l.PRIMITIVE_OP:return o.apply(e.funcOrValue,this._readArgs(e));default:throw new i("Unknown operation "+e.mode)}},_pipeCheck:function(e,n){var r=this._readContext(e),i=this._readArgs(e),o=this._pipeFor(e,r),s=this._readSelf(e),a=o.transform(r,i);if(t(s,a))return this._setChanged(e,!1),null;if(a=c.unwrapValue(a),e.lastInBinding){var u=c.simpleChange(s,a);return n&&c.throwOnChange(e,u),this._writeSelf(e,a),this._setChanged(e,!0),u}return this._writeSelf(e,a),this._setChanged(e,!0),null},_pipeFor:function(e,t){var r=this._readPipe(e);if(n(r)&&r.supports(t))return r;n(r)&&r.onDestroy();var i=this.pipes.get(e.name,t,this.ref);return this._writePipe(e,i),i},_readContext:function(e){return-1==e.contextIndex?this._getDirectiveFor(e.directiveIndex):this.values[e.contextIndex]},_readSelf:function(e){return this.values[e.selfIndex]},_writeSelf:function(e,t){this.values[e.selfIndex]=t},_readPipe:function(e){return this.localPipes[e.selfIndex]},_writePipe:function(e,t){this.localPipes[e.selfIndex]=t},_setChanged:function(e,t){this.changes[e.selfIndex]=t},_pureFuncAndArgsDidNotChange:function(e){return e.isPureFunction()&&!this._argsChanged(e)},_argsChanged:function(e){for(var t=e.args,n=0;n<t.length;++n)if(this.changes[t[n]])return!0;return!1},_readArgs:function(e){for(var t=s.createFixedSize(e.args.length),n=e.args,r=0;r<n.length;++r)t[r]=this.values[n[r]];return t}},{},e)}(a),e("DynamicChangeDetector",f)}}}),System.register("angular2/src/di/binding",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/reflection/reflection","angular2/src/di/key","angular2/src/di/metadata","angular2/src/di/exceptions","angular2/src/di/forward_ref"],function(e){"use strict";function t(e){return new I(e)}function n(e,t){if(u(t))return r(e);var n=m.map(t,function(e){return[e]});return m.map(t,function(t){return i(e,t,n)})}function r(e){var t=v.parameters(e);if(u(t))return[];if(m.any(t,function(e){return u(e)}))throw new E(e,t);return m.map(t,function(n){return i(e,n,t)})}function i(e,t,n){var r=[],i=null,s=!1;if(!g(t))return o(t,s,C,r);for(var a=C,u=0;u<t.length;++u){var f=t[u];f instanceof c?i=f:f instanceof y?i=f.token:f instanceof w?s=!0:f instanceof b?a=f:f instanceof R&&(l(f.token)&&(i=f.token),r.push(f))}if(i=x(i),l(i))return o(i,s,a,r);throw new E(e,n)}function o(e,t,n,r){return new S(_.get(e),t,n,r)}var s,a,c,u,l,f,h,d,p,g,m,v,_,y,b,w,C,R,E,x,S,O,D,A,I;return e("bind",t),{setters:[function(e){c=e.Type,u=e.isBlank,l=e.isPresent,f=e.CONST,h=e.CONST_EXPR,d=e.BaseException,p=e.stringify,g=e.isArray},function(e){m=e.ListWrapper},function(e){v=e.reflector},function(e){_=e.Key},function(e){y=e.InjectMetadata,b=e.VisibilityMetadata,w=e.OptionalMetadata,C=e.DEFAULT_VISIBILITY,R=e.DependencyMetadata},function(e){E=e.NoAnnotationError},function(e){x=e.resolveForwardRef}],execute:function(){s=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},S=function(){function e(e,t,n,r){this.key=e,this.optional=t,this.visibility=n,this.properties=r}return $traceurRuntime.createClass(e,{},{fromKey:function(t){return new e(t,!1,C,[])}})}(),e("Dependency",S),O=h([]),D=$traceurRuntime.createClass(function(e,t){var n=t,r=n.toClass,i=n.toValue,o=n.toAlias,s=n.toFactory,a=n.deps;this.token=e,this.toClass=r,this.toValue=i,this.toAlias=o,this.toFactory=s,this.dependencies=a},{resolve:function(){var e,t,i=this;if(l(this.toClass)){var o=x(this.toClass);e=v.factory(o),t=r(o)}else l(this.toAlias)?(e=function(e){return e},t=[S.fromKey(_.get(this.toAlias))]):l(this.toFactory)?(e=this.toFactory,t=n(this.toFactory,this.dependencies)):(e=function(){return i.toValue},t=O);return new A(_.get(this.token),e,t)}},{}),e("Binding",D),e("Binding",D=s([f(),a("design:paramtypes",[Object,Object])],D)),A=function(){function e(e,t,n){this.key=e,this.factory=t,this.dependencies=n}return $traceurRuntime.createClass(e,{},{})}(),e("ResolvedBinding",A),I=function(){function e(e){this.token=e}return $traceurRuntime.createClass(e,{toClass:function(e){return new D(this.token,{toClass:e})},toValue:function(e){return new D(this.token,{toValue:e})},toAlias:function(e){if(u(e))throw new d("Can not alias "+p(this.token)+" to a blank value!");return new D(this.token,{toAlias:e})},toFactory:function(e,t){return new D(this.token,{toFactory:e,deps:t})}},{})}(),e("BindingBuilder",I)}}}),System.register("angular2/src/change_detection/pipes/observable_pipe",["angular2/src/facade/async","angular2/src/facade/lang","angular2/src/change_detection/pipes/pipe"],function(e){"use strict";var t,n,r,i,o,s,a,c,u;return{setters:[function(e){r=e.ObservableWrapper},function(e){i=e.isBlank,o=e.isPresent,s=e.CONST},function(e){a=e.WrappedValue}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=function(){function e(e){this._ref=e,this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._observable=null}return $traceurRuntime.createClass(e,{supports:function(e){return r.isObservable(e)},onDestroy:function(){o(this._subscription)&&this._dispose()},transform:function(e){return void 0!==arguments[1]?arguments[1]:null,i(this._subscription)?(this._subscribe(e),null):e!==this._observable?(this._dispose(),this.transform(e)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,a.wrap(this._latestValue))},_subscribe:function(e){var t=this;this._observable=e,this._subscription=r.subscribe(e,function(e){return t._updateLatestValue(e)},function(e){throw e})},_dispose:function(){r.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._observable=null},_updateLatestValue:function(e){this._latestValue=e,this._ref.requestCheck()}},{})}(),e("ObservablePipe",c),u=$traceurRuntime.createClass(function(){},{supports:function(e){return r.isObservable(e)},create:function(e){return new c(e)}},{}),e("ObservablePipeFactory",u),e("ObservablePipeFactory",u=t([s(),n("design:paramtypes",[])],u))}}}),System.register("angular2/src/core/compiler/view_manager",["angular2/di","angular2/src/facade/lang","angular2/src/core/compiler/view_ref","angular2/src/render/api","angular2/src/core/compiler/view_manager_utils","angular2/src/core/compiler/view_pool","angular2/src/core/compiler/view_listener"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p;return{setters:[function(e){r=e.Injectable},function(e){i=e.isPresent,o=e.isBlank,s=e.BaseException},function(e){a=e.internalView,c=e.internalProtoView},function(e){u=e.Renderer,l=e.ViewType},function(e){f=e.AppViewManagerUtils},function(e){h=e.AppViewPool},function(e){d=e.AppViewListener}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},p=$traceurRuntime.createClass(function(e,t,n,r){this._viewPool=e,this._viewListener=t,this._utils=n,this._renderer=r},{getViewContainer:function(e){var t=a(e.parentView);return t.elementInjectors[e.boundElementIndex].getViewContainerRef()},getHostElement:function(e){var t=a(e);if(t.proto.type!==l.HOST)throw new s("This operation is only allowed on host views");return t.elementRefs[t.elementOffset]},getNamedElementInComponentView:function(e,t){var n=a(e.parentView),r=e.boundElementIndex,i=n.getNestedView(r);if(o(i))throw new s("There is no component directive at element "+r);var c=i.proto.variableLocations.get(t);if(o(c))throw new s("Could not find variable "+t);return i.elementRefs[i.elementOffset+c]},getComponent:function(e){var t=a(e.parentView),n=e.boundElementIndex;return this._utils.getComponentInstance(t,n)},createRootHostView:function(e,t,n){var r=c(e),i=t;o(i)&&(i=r.elementBinders[0].componentDirective.metadata.selector);var s=this._renderer.createRootHostView(r.mergeMapping.renderProtoViewRef,r.mergeMapping.renderFragmentCount,i),a=this._createMainView(r,s);return this._renderer.hydrateView(a.render),this._utils.hydrateRootHostView(a,n),a.ref},destroyRootHostView:function(e){var t=a(e);this._renderer.detachFragment(t.renderFragment),this._renderer.dehydrateView(t.render),this._viewDehydrateRecurse(t),this._viewListener.viewDestroyed(t),this._renderer.destroyView(t.render)},createEmbeddedViewInContainer:function(e,t,n){var r=c(n.protoViewRef);if(r.type!==l.EMBEDDED)throw new s("This method can only be called with embedded ProtoViews!");return this._createViewInContainer(e,t,r,n.elementRef,null)},createHostViewInContainer:function(e,t,n,r){var i=c(n);if(i.type!==l.HOST)throw new s("This method can only be called with host ProtoViews!");return this._createViewInContainer(e,t,i,e,r)},_createViewInContainer:function(e,t,n,r,o){var s,c=a(e.parentView),u=e.boundElementIndex,f=a(r.parentView),h=r.boundElementIndex,d=f.getNestedView(h);return n.type===l.EMBEDDED&&i(d)&&!d.hydrated()?(s=d,this._attachRenderView(c,u,t,s)):(s=this._createPooledView(n),this._attachRenderView(c,u,t,s),this._renderer.hydrateView(s.render)),this._utils.attachViewInContainer(c,u,f,h,t,s),this._utils.hydrateViewInContainer(c,u,f,h,t,o),s.ref},_attachRenderView:function(e,t,n,r){var i=e.elementRefs[t];if(0===n)this._renderer.attachFragmentAfterElement(i,r.renderFragment);else{var o=e.viewContainers[t].views[n-1];this._renderer.attachFragmentAfterFragment(o.renderFragment,r.renderFragment)}},destroyViewInContainer:function(e,t){var n=a(e.parentView),r=e.boundElementIndex;this._destroyViewInContainer(n,r,t)},attachViewInContainer:function(e,t,n){var r=a(n),i=a(e.parentView),o=e.boundElementIndex;return this._utils.attachViewInContainer(i,o,null,null,t,r),this._attachRenderView(i,o,t,r),n},detachViewInContainer:function(e,t){var n=a(e.parentView),r=e.boundElementIndex,i=n.viewContainers[r],o=i.views[t];return this._utils.detachViewInContainer(n,r,t),this._renderer.detachFragment(o.renderFragment),o.ref},_createMainView:function(e,t){var n=this._utils.createView(e,t,this,this._renderer);return this._renderer.setEventDispatcher(n.render,n),this._viewListener.viewCreated(n),n},_createPooledView:function(e){var t=this._viewPool.getView(e);return o(t)&&(t=this._createMainView(e,this._renderer.createView(e.mergeMapping.renderProtoViewRef,e.mergeMapping.renderFragmentCount))),t},_destroyPooledView:function(e){var t=this._viewPool.returnView(e);t||(this._viewListener.viewDestroyed(e),this._renderer.destroyView(e.render))},_destroyViewInContainer:function(e,t,n){var r=e.viewContainers[t],i=r.views[n];this._viewDehydrateRecurse(i),this._utils.detachViewInContainer(e,t,n),i.viewOffset>0?this._renderer.detachFragment(i.renderFragment):(this._renderer.dehydrateView(i.render),this._renderer.detachFragment(i.renderFragment),this._destroyPooledView(i))},_viewDehydrateRecurse:function(e){e.hydrated()&&this._utils.dehydrateView(e);for(var t=e.viewContainers,n=e.viewOffset,r=e.viewOffset+e.mainMergeMapping.nestedViewCountByViewIndex[e.viewOffset],o=e.elementOffset,s=n;r>=s;s++)for(var a=e.views[s],c=0;c<a.proto.elementBinders.length;c++,o++){var u=t[o];if(i(u))for(var l=u.views.length-1;l>=0;l--)this._destroyViewInContainer(a,o,l)}}},{}),e("AppViewManager",p),e("AppViewManager",p=t([r(),n("design:paramtypes",[h,d,f,u])],p))}}}),System.register("angular2/src/render/dom/compiler/view_loader",["angular2/di","angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/facade/async","angular2/src/dom/dom_adapter","angular2/src/render/xhr","angular2/src/render/dom/compiler/style_inliner","angular2/src/render/dom/compiler/style_url_resolver"],function(e){"use strict";function t(e,t){if(0!=t.length)for(var n=p.firstChild(e),r=t.length-1;r>=0;r--){var i=p.createStyleElement(t[r]);s(n)?p.insertBefore(n,i):p.appendChild(e,i),n=i}}var n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_;return{setters:[function(e){i=e.Injectable},function(e){o=e.isBlank,s=e.isPresent,a=e.BaseException,c=e.isPromise,u=e.StringWrapper},function(e){l=e.Map,f=e.MapWrapper,h=e.ListWrapper},function(e){d=e.PromiseWrapper},function(e){p=e.DOM},function(e){g=e.XHR},function(e){m=e.StyleInliner},function(e){v=e.StyleUrlResolver}],execute:function(){n=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},r=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},_=$traceurRuntime.createClass(function(e,t,n){this._xhr=e,this._styleInliner=t,this._styleUrlResolver=n,this._cache=new l},{load:function(e){var n=this,r=[this._loadHtml(e)];return s(e.styles)&&e.styles.forEach(function(t){var i=n._resolveAndInlineCssText(t,e.templateAbsUrl);r.push(i)}),s(e.styleAbsUrls)&&e.styleAbsUrls.forEach(function(t){var i=n._loadText(t).then(function(t){return n._resolveAndInlineCssText(t,e.templateAbsUrl)});r.push(i)}),d.all(r).then(function(e){var n=e[0],r=h.slice(e,1);return t(p.content(n),r),n})},_loadText:function(e){var t=this._cache.get(e);return o(t)&&(t=d.catchError(this._xhr.get(e),function(t){return d.reject(new a('Failed to fetch url "'+e+'"'),null)}),this._cache.set(e,t)),t},_loadHtml:function(e){var t,n=this;if(s(e.template))t=d.resolve(e.template);else{if(!s(e.templateAbsUrl))throw new a("View should have either the templateUrl or template property set");t=this._loadText(e.templateAbsUrl)}return t.then(function(t){var r=p.createTemplate(t),i=e.templateAbsUrl;if(s(i)&&i.indexOf("/")>=0){var o=i.substring(0,i.lastIndexOf("/"));n._substituteBaseUrl(p.content(r),o)}for(var a=p.querySelectorAll(p.content(r),"STYLE"),u=[],l=0;l<a.length;l++){var f=n._resolveAndInlineElement(a[l],e.templateAbsUrl);c(f)&&u.push(f)}return u.length>0?d.all(u).then(function(e){return r}):r})},_substituteBaseUrl:function(e,t){if(p.isElementNode(e)){var n=p.attributeMap(e);f.forEach(n,function(n,r){s(n)&&n.indexOf("$baseUrl")>=0&&p.setAttribute(e,r,u.replaceAll(n,/\$baseUrl/g,t))})}for(var r=p.childNodes(e),i=0;i<r.length;i++)p.isElementNode(r[i])&&this._substituteBaseUrl(r[i],t)},_resolveAndInlineElement:function(e,t){var n=this._resolveAndInlineCssText(p.getText(e),t);return c(n)?n.then(function(t){p.setText(e,t)}):(p.setText(e,n),null)},_resolveAndInlineCssText:function(e,t){return e=this._styleUrlResolver.resolveUrls(e,t),this._styleInliner.inlineImports(e,t)}},{}),e("ViewLoader",_),e("ViewLoader",_=n([i(),r("design:paramtypes",[g,m,v])],_))}}}),System.register("angular2/src/render/dom/shadow_dom/emulated_unscoped_shadow_dom_strategy",["angular2/src/dom/dom_adapter","angular2/src/render/dom/shadow_dom/shadow_dom_strategy","angular2/src/render/dom/shadow_dom/util"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){t=e.DOM},function(e){n=e.ShadowDomStrategy},function(e){r=e.insertSharedStyleText}],execute:function(){i=function(e){function n(e){$traceurRuntime.superConstructor(n).call(this),this.styleHost=e}return $traceurRuntime.createClass(n,{hasNativeContentElement:function(){return!1},processStyleElement:function(e,n,i){var o=t.getText(i);r(o,this.styleHost,i)}},{},e)}(n),e("EmulatedUnscopedShadowDomStrategy",i)}}}),System.register("angular2/src/render/dom/dom_renderer",["angular2/di","angular2/src/facade/lang","angular2/src/dom/dom_adapter","angular2/src/render/dom/events/event_manager","angular2/src/render/dom/view/proto_view","angular2/src/render/dom/view/view","angular2/src/render/dom/view/fragment","angular2/src/render/dom/util","angular2/src/render/api"],function(e){"use strict";function t(e,t){if(t.length>0&&u(d.parentElement(e))){for(var n=0;n<t.length;n++)d.insertBefore(e,t[n]);d.insertBefore(t[t.length-1],e)}}function n(e,t){for(var n=d.firstChild(e);u(n);){var r=d.nextSibling(n);d.appendChild(t,n),n=r}}var r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b,w,C,R,E,x,S,O,D;return{setters:[function(e){s=e.Inject,a=e.Injectable,c=e.OpaqueToken},function(e){u=e.isPresent,l=e.isBlank,f=e.BaseException,h=e.CONST_EXPR},function(e){d=e.DOM},function(e){p=e.EventManager},function(e){g=e.resolveInternalDomProtoView},function(e){m=e.DomView,v=e.DomViewRef,_=e.resolveInternalDomView},function(e){y=e.DomFragmentRef,b=e.resolveInternalDomFragment},function(e){w=e.cloneAndQueryProtoView,C=e.camelCaseToDashCase},function(e){R=e.Renderer,E=e.RenderViewWithFragments}],execute:function(){r=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},x=h(new c("DocumentToken")),e("DOCUMENT_TOKEN",x),S=h(new c("DomReflectPropertiesAsAttributes")),e("DOM_REFLECT_PROPERTIES_AS_ATTRIBUTES",S),O="ng-reflect-",D=function(e){function r(e,t,n){$traceurRuntime.superConstructor(r).call(this),this._eventManager=e,this._reflectPropertiesAsAttributes=n,this._document=t}return $traceurRuntime.createClass(r,{createRootHostView:function(e,t,n){var r=g(e),i=d.querySelector(this._document,n);if(l(i))throw new f('The selector "'+n+'" did not match any elements');return this._createView(r,i)},createView:function(e,t){var n=g(e);return this._createView(n,null)},destroyView:function(e){},getNativeElementSync:function(e){return l(e.renderBoundElementIndex)?null:_(e.renderView).boundElements[e.renderBoundElementIndex]},getRootNodes:function(e){return b(e)},attachFragmentAfterFragment:function(e,n){var r=b(e);if(r.length>0){var i=r[r.length-1];t(i,b(n))}},attachFragmentAfterElement:function(e,n){if(!l(e.renderBoundElementIndex)){var r=_(e.renderView),i=r.boundElements[e.renderBoundElementIndex];t(i,b(n))}},detachFragment:function(e){for(var t=b(e),n=0;n<t.length;n++)d.remove(t[n])},hydrateView:function(e){var t=_(e);if(t.hydrated)throw new f("The view is already hydrated.");t.hydrated=!0,t.eventHandlerRemovers=[];for(var n=t.proto.elementBinders,r=0;r<n.length;r++){var i=n[r];if(u(i.globalEvents))for(var o=0;o<i.globalEvents.length;o++){var s=i.globalEvents[o],a=this._createGlobalEventListener(t,r,s.name,s.target,s.fullName);t.eventHandlerRemovers.push(a)}}},dehydrateView:function(e){for(var t=_(e),n=0;n<t.eventHandlerRemovers.length;n++)t.eventHandlerRemovers[n]();t.eventHandlerRemovers=null,t.hydrated=!1},setElementProperty:function(e,t,n){if(!l(e.renderBoundElementIndex)){var r=_(e.renderView);r.setElementProperty(e.renderBoundElementIndex,t,n),this._reflectPropertiesAsAttributes&&this.setElementAttribute(e,""+O+C(t),n)}},setElementAttribute:function(e,t,n){if(!l(e.renderBoundElementIndex)){var r=_(e.renderView);r.setElementAttribute(e.renderBoundElementIndex,t,n)}},setElementClass:function(e,t,n){if(!l(e.renderBoundElementIndex)){var r=_(e.renderView);r.setElementClass(e.renderBoundElementIndex,t,n)}},setElementStyle:function(e,t,n){if(!l(e.renderBoundElementIndex)){var r=_(e.renderView);r.setElementStyle(e.renderBoundElementIndex,t,n)}},invokeElementMethod:function(e,t,n){if(!l(e.renderBoundElementIndex)){var r=_(e.renderView);r.invokeElementMethod(e.renderBoundElementIndex,t,n)}},setText:function(e,t,n){if(!l(t)){var r=_(e);d.setText(r.boundTextNodes[t],n)}},setEventDispatcher:function(e,t){var n=_(e);n.eventDispatcher=t},_createView:function(e,t){var r=w(e,!0),i=r.boundElements;if(u(t)){if(1!==e.fragmentsRootNodeCount[0])throw new f("Root proto views can only contain one element!");d.clearNodes(t);var o=r.fragments[0][0];n(o,t),i.length>0&&i[0]===o&&(i[0]=t),r.fragments[0][0]=t}for(var s=new m(e,r.boundTextNodes,i),a=e.elementBinders,c=0;c<a.length;c++){var l=a[c],h=i[c];if(l.hasNativeShadowRoot){var p=d.firstChild(h);n(p,d.createShadowRoot(h)),d.remove(p)}if(u(l.eventLocals)&&u(l.localEvents))for(var g=0;g<l.localEvents.length;g++)this._createEventListener(s,h,c,l.localEvents[g].name,l.eventLocals)}return new E(new v(s),r.fragments.map(function(e){return new y(e)}))},_createEventListener:function(e,t,n,r,i){this._eventManager.addEventListener(t,r,function(t){e.dispatchEvent(n,r,t)})},_createGlobalEventListener:function(e,t,n,r,i){return this._eventManager.addGlobalEventListener(r,n,function(n){e.dispatchEvent(t,i,n)})}},{},e)}(R),e("DomRenderer",D),e("DomRenderer",D=r([a(),o(1,s(x)),o(2,s(S)),i("design:paramtypes",[p,Object,Boolean])],D))}}}),System.register("angular2/src/render/dom/compiler/compile_pipeline",["angular2/src/facade/lang","angular2/src/dom/dom_adapter","angular2/src/render/dom/compiler/compile_element","angular2/src/render/dom/compiler/compile_control","angular2/src/render/dom/view/proto_view_builder","angular2/src/render/api"],function(e){"use strict";var t,n,r,i,o,s,a,c;return{setters:[function(e){t=e.isPresent,n=e.isBlank},function(e){r=e.DOM},function(e){i=e.CompileElement},function(e){o=e.CompileControl},function(e){s=e.ProtoViewBuilder},function(e){a=e.ViewType}],execute:function(){c=function(){function e(e){var t=void 0!==arguments[1]?arguments[1]:!1;this._useNativeShadowDom=t,this._control=new o(e)}return $traceurRuntime.createClass(e,{process:function(e){var t=void 0!==arguments[1]?arguments[1]:null,r=void 0!==arguments[2]?arguments[2]:"";n(t)&&(t=a.COMPONENT);var o=[],c=new i(e,r);return c.inheritedProtoView=new s(e,t,this._useNativeShadowDom),c.isViewRoot=!0,this._process(o,null,c,r),o},_process:function(e,n,o){var s=void 0!==arguments[3]?arguments[3]:"",a=this._control.internalProcess(e,0,n,o);if(o.compileChildren)for(var c=r.firstChild(r.templateAwareRoot(o.element));t(c);){var u=r.nextSibling(c);if(r.isElementNode(c)){var l=new i(c,s);l.inheritedProtoView=o.inheritedProtoView,l.inheritedElementBinder=o.inheritedElementBinder,l.distanceToInheritedBinder=o.distanceToInheritedBinder+1,this._process(e,o,l)}c=u}if(t(a))for(var f=0;f<a.length;f++)this._process(e,o,a[f])}},{})}(),e("CompilePipeline",c)}}}),System.register("angular2/src/render/dom/compiler/compile_step_factory",["angular2/src/render/dom/compiler/property_binding_parser","angular2/src/render/dom/compiler/text_interpolation_parser","angular2/src/render/dom/compiler/directive_parser","angular2/src/render/dom/compiler/view_splitter","angular2/src/render/dom/shadow_dom/shadow_dom_compile_step"],function(e){"use strict";var t,n,r,i,o,s,a;return{setters:[function(e){t=e.PropertyBindingParser},function(e){n=e.TextInterpolationParser},function(e){r=e.DirectiveParser},function(e){i=e.ViewSplitter},function(e){o=e.ShadowDomCompileStep}],execute:function(){s=function(){function e(){}return $traceurRuntime.createClass(e,{createSteps:function(e){return null}},{})}(),e("CompileStepFactory",s),a=function(e){function s(e,t){$traceurRuntime.superConstructor(s).call(this),this._parser=e,this._shadowDomStrategy=t}return $traceurRuntime.createClass(s,{createSteps:function(e){return[new i(this._parser),new t(this._parser),new r(this._parser,e.directives),new n(this._parser),new o(this._shadowDomStrategy,e)]}},{},e)}(s),e("DefaultStepFactory",a)}}}),System.register("angular2/src/forms/directives/default_value_accessor",["angular2/render","angular2/annotations","angular2/core","angular2/src/forms/directives/ng_control","angular2/src/facade/lang","angular2/src/forms/directives/shared"],function(e){
20
- "use strict";var t,n,r,i,o,s,a,c,u,l;return{setters:[function(e){r=e.Renderer},function(e){i=e.Directive},function(e){o=e.ElementRef},function(e){s=e.NgControl},function(e){a=e.isBlank,c=e.isPresent},function(e){u=e.setProperty}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},l=$traceurRuntime.createClass(function(e,t,n){this.cd=e,this.renderer=t,this.elementRef=n,this.onChange=function(e){},this.onTouched=function(){},e.valueAccessor=this},{writeValue:function(e){var t=a(e)?"":e;u(this.renderer,this.elementRef,"value",t)},get ngClassUntouched(){return c(this.cd.control)?this.cd.control.untouched:!1},get ngClassTouched(){return c(this.cd.control)?this.cd.control.touched:!1},get ngClassPristine(){return c(this.cd.control)?this.cd.control.pristine:!1},get ngClassDirty(){return c(this.cd.control)?this.cd.control.dirty:!1},get ngClassValid(){return c(this.cd.control)?this.cd.control.valid:!1},get ngClassInvalid(){return c(this.cd.control)?!this.cd.control.valid:!1},registerOnChange:function(e){this.onChange=e},registerOnTouched:function(e){this.onTouched=e}},{}),e("DefaultValueAccessor",l),e("DefaultValueAccessor",l=t([i({selector:"input:not([type=checkbox])[ng-control],textarea[ng-control],input:not([type=checkbox])[ng-form-control],textarea[ng-form-control],input:not([type=checkbox])[ng-model],textarea[ng-model]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()","[class.ng-untouched]":"ngClassUntouched","[class.ng-touched]":"ngClassTouched","[class.ng-pristine]":"ngClassPristine","[class.ng-dirty]":"ngClassDirty","[class.ng-valid]":"ngClassValid","[class.ng-invalid]":"ngClassInvalid"}}),n("design:paramtypes",[s,r,o])],l))}}}),System.register("angular2/src/http/http",["angular2/src/facade/lang","angular2/src/di/decorators","angular2/src/http/interfaces","angular2/src/http/static_request","angular2/src/http/base_request_options","angular2/src/http/enums"],function(e){"use strict";function t(e,t){return e.createConnection(t).response}function n(e,t,n,r){var i=e;return s(t)&&(i=i.merge(new f({method:t.method,url:t.url,headers:t.headers,body:t.body,mode:t.mode,credentials:t.credentials,cache:t.cache}))),i.merge(new f(s(n)?{method:n,url:r}:{url:r}))}var r,i,o,s,a,c,u,l,f,h,d,p;return{setters:[function(e){o=e.isString,s=e.isPresent,a=e.makeTypeError},function(e){c=e.Injectable},function(e){u=e.ConnectionBackend},function(e){l=e.Request},function(e){f=e.RequestOptions},function(e){h=e.RequestMethods}],execute:function(){r=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},d=$traceurRuntime.createClass(function(e,t){this._backend=e,this._defaultOptions=t},{request:function(e,r){var i;return o(e)?i=t(this._backend,new l(n(this._defaultOptions,r,h.GET,e))):e instanceof l&&(i=t(this._backend,e)),i},get:function(e,r){return t(this._backend,new l(n(this._defaultOptions,r,h.GET,e)))},post:function(e,r,i){return t(this._backend,new l(n(this._defaultOptions.merge(new f({body:r})),i,h.POST,e)))},put:function(e,r,i){return t(this._backend,new l(n(this._defaultOptions.merge(new f({body:r})),i,h.PUT,e)))},"delete":function(e,r){return t(this._backend,new l(n(this._defaultOptions,r,h.DELETE,e)))},patch:function(e,r,i){return t(this._backend,new l(n(this._defaultOptions.merge(new f({body:r})),i,h.PATCH,e)))},head:function(e,r){return t(this._backend,new l(n(this._defaultOptions,r,h.HEAD,e)))}},{}),e("Http",d),e("Http",d=r([c(),i("design:paramtypes",[u,f])],d)),p=function(e){function r(e,t){$traceurRuntime.superConstructor(r).call(this,e,t)}return $traceurRuntime.createClass(r,{request:function(e,r){var i;return o(e)&&(e=new l(n(this._defaultOptions,r,h.GET,e))),e instanceof l&&(e.method!==h.GET&&a("JSONP requests must use GET request method."),i=t(this._backend,e)),i}},{},e)}(d),e("Jsonp",p),e("Jsonp",p=r([c(),i("design:paramtypes",[u,f])],p))}}}),System.register("angular2/src/http/backends/xhr_backend",["angular2/src/http/enums","angular2/src/http/static_response","angular2/src/http/base_response_options","angular2/di","angular2/src/http/backends/browser_xhr","angular2/src/facade/async","angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d;return{setters:[function(e){r=e.RequestMethodsMap},function(e){i=e.Response},function(e){o=e.ResponseOptions},function(e){s=e.Injectable},function(e){a=e.BrowserXhr},function(e){c=e.EventEmitter,u=e.ObservableWrapper},function(e){l=e.isPresent,f=e.ENUM_INDEX}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},h=function(){function e(e,t,n){var s=this,a=new r;this.request=e,this.response=new c,this._xhr=t.build(),this._xhr.open(a.getMethod(f(e.method)),e.url),this._xhr.addEventListener("load",function(e){var t=new o({body:l(s._xhr.response)?s._xhr.response:s._xhr.responseText});l(n)&&(t=n.merge(t)),u.callNext(s.response,new i(t))}),l(e.headers)&&e.headers.forEach(function(e,t){s._xhr.setRequestHeader(t,e)}),this._xhr.send(this.request.text())}return $traceurRuntime.createClass(e,{dispose:function(){this._xhr.abort()}},{})}(),e("XHRConnection",h),d=$traceurRuntime.createClass(function(e,t){this._browserXHR=e,this._baseResponseOptions=t},{createConnection:function(e){return new h(e,this._browserXHR,this._baseResponseOptions)}},{}),e("XHRBackend",d),e("XHRBackend",d=t([s(),n("design:paramtypes",[a,o])],d))}}}),System.register("angular2/src/change_detection/proto_change_detector",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/change_detection/parser/ast","angular2/src/change_detection/change_detection_util","angular2/src/change_detection/dynamic_change_detector","angular2/src/change_detection/directive_record","angular2/src/change_detection/coalesce","angular2/src/change_detection/proto_record"],function(e){"use strict";function t(e){switch(e){case 0:return h.arrayFn0;case 1:return h.arrayFn1;case 2:return h.arrayFn2;case 3:return h.arrayFn3;case 4:return h.arrayFn4;case 5:return h.arrayFn5;case 6:return h.arrayFn6;case 7:return h.arrayFn7;case 8:return h.arrayFn8;case 9:return h.arrayFn9;default:throw new a("Does not support literal maps with more than 9 elements")}}function n(e){var t=l.join(l.map(e,function(e){return u(e)?'"'+e+'"':""+e}),", ");return"mapFn(["+t+"])"}function r(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";case"&&":return"operation_logical_and";case"||":return"operation_logical_or";default:throw new a("Unsupported operation "+e)}}function i(e){switch(e){case"+":return h.operation_add;case"-":return h.operation_subtract;case"*":return h.operation_multiply;case"/":return h.operation_divide;case"%":return h.operation_remainder;case"==":return h.operation_equals;case"!=":return h.operation_not_equals;case"===":return h.operation_identical;case"!==":return h.operation_not_identical;case"<":return h.operation_less_then;case">":return h.operation_greater_then;case"<=":return h.operation_less_or_equals_then;case">=":return h.operation_greater_or_equals_then;case"&&":return h.operation_logical_and;case"||":return h.operation_logical_or;default:throw new a("Unsupported operation "+e)}}function o(e){return c(e)?""+e:""}function s(e){var t=e.length,n=t>0?e[0]:null,r=t>1?e[1]:null,i=t>2?e[2]:null,s=t>3?e[3]:null,c=t>4?e[4]:null,u=t>5?e[5]:null,l=t>6?e[6]:null,f=t>7?e[7]:null,h=t>8?e[8]:null,d=t>9?e[9]:null;switch(t-1){case 1:return function(e){return n+o(e)+r};case 2:return function(e,t){return n+o(e)+r+o(t)+i};case 3:return function(e,t,a){return n+o(e)+r+o(t)+i+o(a)+s};case 4:return function(e,t,a,u){return n+o(e)+r+o(t)+i+o(a)+s+o(u)+c};case 5:return function(e,t,a,l,f){return n+o(e)+r+o(t)+i+o(a)+s+o(l)+c+o(f)+u};case 6:return function(e,t,a,f,h,d){return n+o(e)+r+o(t)+i+o(a)+s+o(f)+c+o(h)+u+o(d)+l};case 7:return function(e,t,a,h,d,p,g){return n+o(e)+r+o(t)+i+o(a)+s+o(h)+c+o(d)+u+o(p)+l+o(g)+f};case 8:return function(e,t,a,d,p,g,m,v){return n+o(e)+r+o(t)+i+o(a)+s+o(d)+c+o(p)+u+o(g)+l+o(m)+f+o(v)+h};case 9:return function(e,t,a,p,g,m,v,_,y){return n+o(e)+r+o(t)+i+o(a)+s+o(p)+c+o(g)+u+o(m)+l+o(v)+f+o(_)+h+o(y)+d};default:throw new a("Does not support more than 9 expressions")}}var a,c,u,l,f,h,d,p,g,m,v,_,y,b;return{setters:[function(e){a=e.BaseException,c=e.isPresent,u=e.isString},function(e){l=e.ListWrapper},function(e){f=e.ImplicitReceiver},function(e){h=e.ChangeDetectionUtil},function(e){d=e.DynamicChangeDetector},function(e){p=e.DirectiveIndex},function(e){g=e.coalesce},function(e){m=e.ProtoRecord,v=e.RecordType}],execute:function(){_=function(){function e(e){this.definition=e,this._records=this._createRecords(e)}return $traceurRuntime.createClass(e,{instantiate:function(e){return new d(this.definition.id,this.definition.strategy,e,this._records,this.definition.directiveRecords)},_createRecords:function(e){var t=new y;return l.forEach(e.bindingRecords,function(n){t.add(n,e.variableNames)}),g(t.records)}},{})}(),e("DynamicProtoChangeDetector",_),y=function(){function e(){this.records=[]}return $traceurRuntime.createClass(e,{add:function(e){var t=void 0!==arguments[1]?arguments[1]:null,n=l.last(this.records);c(n)&&n.bindingRecord.directiveRecord==e.directiveRecord&&(n.lastInDirective=!1),this._appendRecords(e,t);var r=l.last(this.records);c(r)&&r!==n&&(r.lastInBinding=!0,r.lastInDirective=!0)},_appendRecords:function(e,t){e.isDirectiveLifecycle()?this.records.push(new m(v.DIRECTIVE_LIFECYCLE,e.lifecycleEvent,null,[],[],-1,null,this.records.length+1,e,null,!1,!1)):b.append(this.records,e,t)}},{})}(),e("ProtoRecordBuilder",y),b=function(){function e(e,t,n,r){this._records=e,this._bindingRecord=t,this._expressionAsString=n,this._variableNames=r}return $traceurRuntime.createClass(e,{visitImplicitReceiver:function(e){return this._bindingRecord.implicitReceiver},visitInterpolation:function(e){var t=this._visitAll(e.expressions);return this._addRecord(v.INTERPOLATE,"interpolate",s(e.strings),t,e.strings,0)},visitLiteralPrimitive:function(e){return this._addRecord(v.CONST,"literal",e.value,[],null,0)},visitAccessMember:function(e){var t=e.receiver.visit(this);return c(this._variableNames)&&l.contains(this._variableNames,e.name)&&e.receiver instanceof f?this._addRecord(v.LOCAL,e.name,e.name,[],null,t):this._addRecord(v.PROPERTY,e.name,e.getter,[],null,t)},visitSafeAccessMember:function(e){var t=e.receiver.visit(this);return this._addRecord(v.SAFE_PROPERTY,e.name,e.getter,[],null,t)},visitMethodCall:function(e){var t=e.receiver.visit(this),n=this._visitAll(e.args);if(c(this._variableNames)&&l.contains(this._variableNames,e.name)){var r=this._addRecord(v.LOCAL,e.name,e.name,[],null,t);return this._addRecord(v.INVOKE_CLOSURE,"closure",null,n,null,r)}return this._addRecord(v.INVOKE_METHOD,e.name,e.fn,n,null,t)},visitSafeMethodCall:function(e){var t=e.receiver.visit(this),n=this._visitAll(e.args);return this._addRecord(v.SAFE_INVOKE_METHOD,e.name,e.fn,n,null,t)},visitFunctionCall:function(e){var t=e.target.visit(this),n=this._visitAll(e.args);return this._addRecord(v.INVOKE_CLOSURE,"closure",null,n,null,t)},visitLiteralArray:function(e){var n="arrayFn"+e.expressions.length;return this._addRecord(v.PRIMITIVE_OP,n,t(e.expressions.length),this._visitAll(e.expressions),null,0)},visitLiteralMap:function(e){return this._addRecord(v.PRIMITIVE_OP,n(e.keys),h.mapFn(e.keys),this._visitAll(e.values),null,0)},visitBinary:function(e){var t=e.left.visit(this),n=e.right.visit(this);return this._addRecord(v.PRIMITIVE_OP,r(e.operation),i(e.operation),[t,n],null,0)},visitPrefixNot:function(e){var t=e.expression.visit(this);return this._addRecord(v.PRIMITIVE_OP,"operation_negate",h.operation_negate,[t],null,0)},visitConditional:function(e){var t=e.condition.visit(this),n=e.trueExp.visit(this),r=e.falseExp.visit(this);return this._addRecord(v.PRIMITIVE_OP,"cond",h.cond,[t,n,r],null,0)},visitPipe:function(e){var t=e.exp.visit(this),n=this._visitAll(e.args);return this._addRecord(v.PIPE,e.name,e.name,n,null,t)},visitKeyedAccess:function(e){var t=e.obj.visit(this),n=e.key.visit(this);return this._addRecord(v.KEYED_ACCESS,"keyedAccess",h.keyedAccess,[n],null,t)},visitAssignment:function(e){throw new a("Not supported")},visitChain:function(e){throw new a("Not supported")},visitIf:function(e){throw new a("Not supported")},_visitAll:function(e){for(var t=l.createFixedSize(e.length),n=0;n<e.length;++n)t[n]=e[n].visit(this);return t},_addRecord:function(e,t,n,r,i,o){var s=this._records.length+1;return this._records.push(o instanceof p?new m(e,t,n,r,i,-1,o,s,this._bindingRecord,this._expressionAsString,!1,!1):new m(e,t,n,r,i,o,null,s,this._bindingRecord,this._expressionAsString,!1,!1)),s}},{append:function(t,n,r){var i=new e(t,n,n.ast.toString(),r);n.ast.visit(i)}})}()}}}),System.register("angular2/src/di/injector",["angular2/src/facade/collection","angular2/src/di/binding","angular2/src/di/exceptions","angular2/src/facade/lang","angular2/src/di/key","angular2/src/di/forward_ref","angular2/src/di/metadata"],function(e){"use strict";function t(e){for(var n=a.createFixedSize(e.length),r=0;r<e.length;r++){var i=C(e[r]),s=void 0;if(i instanceof c)s=i;else if(i instanceof _)s=f(i).toClass(i).resolve();else if(i instanceof u)s=i.resolve();else{if(!(i instanceof o))throw new m(i instanceof l?i.token:i);s=t(i)}n[r]=s}return n}function n(e){return s.values(e)}function r(e,t){return a.forEach(e,function(e){e instanceof c?t.set(e.key.id,e):e instanceof o&&r(e,t)}),t}var i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b,w,C,R,E,x,S,O,D,A,I,P,j,T,N,V,k,M,B,L,$;return{setters:[function(e){i=e.Map,o=e.List,s=e.MapWrapper,a=e.ListWrapper},function(e){c=e.ResolvedBinding,u=e.Binding,l=e.BindingBuilder,f=e.bind},function(e){h=e.AbstractBindingError,d=e.NoBindingError,p=e.CyclicDependencyError,g=e.InstantiationError,m=e.InvalidBindingError,v=e.OutOfBoundsError},function(e){_=e.Type,y=e.isPresent,b=e.CONST_EXPR},function(e){w=e.Key},function(e){C=e.resolveForwardRef},function(e){R=e.DEFAULT_VISIBILITY,E=e.SelfMetadata,x=e.AncestorMetadata}],execute:function(){S=b(new Object),O=b(new Object),D=10,A=b(new Object),e("undefinedValue",A),I=1,e("PUBLIC",I),P=2,e("PRIVATE",P),j=3,e("PUBLIC_AND_PRIVATE",j),T=function(){function e(e,t){this.binding0=null,this.binding1=null,this.binding2=null,this.binding3=null,this.binding4=null,this.binding5=null,this.binding6=null,this.binding7=null,this.binding8=null,this.binding9=null,this.keyId0=null,this.keyId1=null,this.keyId2=null,this.keyId3=null,this.keyId4=null,this.keyId5=null,this.keyId6=null,this.keyId7=null,this.keyId8=null,this.keyId9=null,this.visibility0=null,this.visibility1=null,this.visibility2=null,this.visibility3=null,this.visibility4=null,this.visibility5=null,this.visibility6=null,this.visibility7=null,this.visibility8=null,this.visibility9=null;var n=t.length;n>0&&(this.binding0=t[0].binding,this.keyId0=t[0].getKeyId(),this.visibility0=t[0].visibility),n>1&&(this.binding1=t[1].binding,this.keyId1=t[1].getKeyId(),this.visibility1=t[1].visibility),n>2&&(this.binding2=t[2].binding,this.keyId2=t[2].getKeyId(),this.visibility2=t[2].visibility),n>3&&(this.binding3=t[3].binding,this.keyId3=t[3].getKeyId(),this.visibility3=t[3].visibility),n>4&&(this.binding4=t[4].binding,this.keyId4=t[4].getKeyId(),this.visibility4=t[4].visibility),n>5&&(this.binding5=t[5].binding,this.keyId5=t[5].getKeyId(),this.visibility5=t[5].visibility),n>6&&(this.binding6=t[6].binding,this.keyId6=t[6].getKeyId(),this.visibility6=t[6].visibility),n>7&&(this.binding7=t[7].binding,this.keyId7=t[7].getKeyId(),this.visibility7=t[7].visibility),n>8&&(this.binding8=t[8].binding,this.keyId8=t[8].getKeyId(),this.visibility8=t[8].visibility),n>9&&(this.binding9=t[9].binding,this.keyId9=t[9].getKeyId(),this.visibility9=t[9].visibility)}return $traceurRuntime.createClass(e,{getBindingAtIndex:function(e){if(0==e)return this.binding0;if(1==e)return this.binding1;if(2==e)return this.binding2;if(3==e)return this.binding3;if(4==e)return this.binding4;if(5==e)return this.binding5;if(6==e)return this.binding6;if(7==e)return this.binding7;if(8==e)return this.binding8;if(9==e)return this.binding9;throw new v(e)},createInjectorStrategy:function(e){return new k(e,this)}},{})}(),e("ProtoInjectorInlineStrategy",T),N=function(){function e(e,t){var n=t.length;this.bindings=a.createFixedSize(n),this.keyIds=a.createFixedSize(n),this.visibilities=a.createFixedSize(n);for(var r=0;n>r;r++)this.bindings[r]=t[r].binding,this.keyIds[r]=t[r].getKeyId(),this.visibilities[r]=t[r].visibility}return $traceurRuntime.createClass(e,{getBindingAtIndex:function(e){if(0>e||e>=this.bindings.length)throw new v(e);return this.bindings[e]},createInjectorStrategy:function(e){return new M(this,e)}},{})}(),e("ProtoInjectorDynamicStrategy",N),V=function(){function e(e){this._strategy=e.length>D?new N(this,e):new T(this,e)}return $traceurRuntime.createClass(e,{getBindingAtIndex:function(e){return this._strategy.getBindingAtIndex(e)}},{})}(),e("ProtoInjector",V),k=function(){function e(e,t){this.injector=e,this.protoStrategy=t,this.obj0=A,this.obj1=A,this.obj2=A,this.obj3=A,this.obj4=A,this.obj5=A,this.obj6=A,this.obj7=A,this.obj8=A,this.obj9=A}return $traceurRuntime.createClass(e,{resetContructionCounter:function(){this.injector._constructionCounter=0},instantiateBinding:function(e,t){return this.injector._new(e,t)},attach:function(e,t){var n=this.injector;n._parent=e,n._isBoundary=t},getObjByKeyId:function(e,t){var n=this.protoStrategy,r=this.injector;return n.keyId0===e&&(n.visibility0&t)>0?(this.obj0===A&&(this.obj0=r._new(n.binding0,n.visibility0)),this.obj0):n.keyId1===e&&(n.visibility1&t)>0?(this.obj1===A&&(this.obj1=r._new(n.binding1,n.visibility1)),this.obj1):n.keyId2===e&&(n.visibility2&t)>0?(this.obj2===A&&(this.obj2=r._new(n.binding2,n.visibility2)),this.obj2):n.keyId3===e&&(n.visibility3&t)>0?(this.obj3===A&&(this.obj3=r._new(n.binding3,n.visibility3)),this.obj3):n.keyId4===e&&(n.visibility4&t)>0?(this.obj4===A&&(this.obj4=r._new(n.binding4,n.visibility4)),this.obj4):n.keyId5===e&&(n.visibility5&t)>0?(this.obj5===A&&(this.obj5=r._new(n.binding5,n.visibility5)),this.obj5):n.keyId6===e&&(n.visibility6&t)>0?(this.obj6===A&&(this.obj6=r._new(n.binding6,n.visibility6)),this.obj6):n.keyId7===e&&(n.visibility7&t)>0?(this.obj7===A&&(this.obj7=r._new(n.binding7,n.visibility7)),this.obj7):n.keyId8===e&&(n.visibility8&t)>0?(this.obj8===A&&(this.obj8=r._new(n.binding8,n.visibility8)),this.obj8):n.keyId9===e&&(n.visibility9&t)>0?(this.obj9===A&&(this.obj9=r._new(n.binding9,n.visibility9)),this.obj9):A},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 v(e)},getMaxNumberOfObjects:function(){return D}},{})}(),e("InjectorInlineStrategy",k),M=function(){function e(e,t){this.protoStrategy=e,this.injector=t,this.objs=a.createFixedSize(e.bindings.length),a.fill(this.objs,A)}return $traceurRuntime.createClass(e,{resetContructionCounter:function(){this.injector._constructionCounter=0},instantiateBinding:function(e,t){return this.injector._new(e,t)},attach:function(e,t){var n=this.injector;n._parent=e,n._isBoundary=t},getObjByKeyId:function(e,t){for(var n=this.protoStrategy,r=0;r<n.keyIds.length;r++)if(n.keyIds[r]===e&&(n.visibilities[r]&t)>0)return this.objs[r]===A&&(this.objs[r]=this.injector._new(n.bindings[r],n.visibilities[r])),this.objs[r];return A},getObjAtIndex:function(e){if(0>e||e>=this.objs.length)throw new v(e);return this.objs[e]},getMaxNumberOfObjects:function(){return this.objs.length}},{})}(),e("InjectorDynamicStrategy",M),B=function(){function e(e,t){this.binding=e,this.visibility=t}return $traceurRuntime.createClass(e,{getKeyId:function(){return this.binding.key.id}},{})}(),e("BindingWithVisibility",B),L=function(){function e(e){var t=void 0!==arguments[1]?arguments[1]:null,n=void 0!==arguments[2]?arguments[2]:null;this._proto=e,this._parent=t,this._depProvider=n,this._isBoundary=!1,this._constructionCounter=0,this._strategy=e._strategy.createInjectorStrategy(this)}return $traceurRuntime.createClass(e,{get:function(e){return this._getByKey(w.get(e),R,!1,j)},getOptional:function(e){return this._getByKey(w.get(e),R,!0,j)},getAt:function(e){return this._strategy.getObjAtIndex(e)},get parent(){return this._parent},get internalStrategy(){return this._strategy},resolveAndCreateChild:function(t){var n=void 0!==arguments[1]?arguments[1]:null,r=e.resolve(t);return this.createChildFromResolved(r,n)},createChildFromResolved:function(t){var n=void 0!==arguments[1]?arguments[1]:null,r=t.map(function(e){return new B(e,I)}),i=new V(r),o=new e(i,null,n);return o._parent=this,o},_new:function(e,t){if(this._constructionCounter++>this._strategy.getMaxNumberOfObjects())throw new p(e.key);var n,r,i,o,s,a,c,u,l,f,d,m,v,_,y,b,w,C,R,E,x=e.factory,S=e.dependencies,O=S.length;try{n=O>0?this._getByDependency(e,S[0],t):null,r=O>1?this._getByDependency(e,S[1],t):null,i=O>2?this._getByDependency(e,S[2],t):null,o=O>3?this._getByDependency(e,S[3],t):null,s=O>4?this._getByDependency(e,S[4],t):null,a=O>5?this._getByDependency(e,S[5],t):null,c=O>6?this._getByDependency(e,S[6],t):null,u=O>7?this._getByDependency(e,S[7],t):null,l=O>8?this._getByDependency(e,S[8],t):null,f=O>9?this._getByDependency(e,S[9],t):null,d=O>10?this._getByDependency(e,S[10],t):null,m=O>11?this._getByDependency(e,S[11],t):null,v=O>12?this._getByDependency(e,S[12],t):null,_=O>13?this._getByDependency(e,S[13],t):null,y=O>14?this._getByDependency(e,S[14],t):null,b=O>15?this._getByDependency(e,S[15],t):null,w=O>16?this._getByDependency(e,S[16],t):null,C=O>17?this._getByDependency(e,S[17],t):null,R=O>18?this._getByDependency(e,S[18],t):null,E=O>19?this._getByDependency(e,S[19],t):null}catch(D){throw D instanceof h&&D.addKey(e.key),D}var A;try{switch(O){case 0:A=x();break;case 1:A=x(n);break;case 2:A=x(n,r);break;case 3:A=x(n,r,i);break;case 4:A=x(n,r,i,o);break;case 5:A=x(n,r,i,o,s);break;case 6:A=x(n,r,i,o,s,a);break;case 7:A=x(n,r,i,o,s,a,c);break;case 8:A=x(n,r,i,o,s,a,c,u);break;case 9:A=x(n,r,i,o,s,a,c,u,l);break;case 10:A=x(n,r,i,o,s,a,c,u,l,f);break;case 11:A=x(n,r,i,o,s,a,c,u,l,f,d);break;case 12:A=x(n,r,i,o,s,a,c,u,l,f,d,m);break;case 13:A=x(n,r,i,o,s,a,c,u,l,f,d,m,v);break;case 14:A=x(n,r,i,o,s,a,c,u,l,f,d,m,v,_);break;case 15:A=x(n,r,i,o,s,a,c,u,l,f,d,m,v,_,y);break;case 16:A=x(n,r,i,o,s,a,c,u,l,f,d,m,v,_,y,b);break;case 17:A=x(n,r,i,o,s,a,c,u,l,f,d,m,v,_,y,b,w);break;case 18:A=x(n,r,i,o,s,a,c,u,l,f,d,m,v,_,y,b,w,C);break;case 19:A=x(n,r,i,o,s,a,c,u,l,f,d,m,v,_,y,b,w,C,R);break;case 20:A=x(n,r,i,o,s,a,c,u,l,f,d,m,v,_,y,b,w,C,R,E)}}catch(D){throw new g(D,D.stack,e.key)}return A},_getByDependency:function(e,t,n){var r=y(this._depProvider)?this._depProvider.getDependency(this,e,t):A;return r!==A?r:this._getByKey(t.key,t.visibility,t.optional,n)},_getByKey:function(e,t,n,r){return e===$?this:t instanceof E?this._getByKeySelf(e,n,r):t instanceof x?this._getByKeyAncestor(e,n,r,t.includeSelf):this._getByKeyUnbounded(e,n,r,t.includeSelf)},_throwOrNull:function(e,t){if(t)return null;throw new d(e)},_getByKeySelf:function(e,t,n){var r=this._strategy.getObjByKeyId(e.id,n);return r!==A?r:this._throwOrNull(e,t)},_getByKeyAncestor:function(e,t,n,r){var i=this;if(!r){if(i._isBoundary)return this._getPrivateDependency(e,t,i);i=i._parent}for(;null!=i;){var o=i._strategy.getObjByKeyId(e.id,n);if(o!==A)return o;if(y(i._parent)&&i._isBoundary)return this._getPrivateDependency(e,t,i);i=i._parent}return this._throwOrNull(e,t)},_getPrivateDependency:function(e,t,n){var r=n._parent._strategy.getObjByKeyId(e.id,P);return r!==A?r:this._throwOrNull(e,t)},_getByKeyUnbounded:function(e,t,n,r){var i=this;for(r||(n=i._isBoundary?j:I,i=i._parent);null!=i;){var o=i._strategy.getObjByKeyId(e.id,n);if(o!==A)return o;n=i._isBoundary?j:I,i=i._parent}return this._throwOrNull(e,t)}},{resolve:function(e){var o=t(e),s=r(o,new i);return n(s)},resolveAndCreate:function(t){var n=void 0!==arguments[1]?arguments[1]:null,r=e.resolve(t);return e.fromResolvedBindings(r,n)},fromResolvedBindings:function(t){var n=void 0!==arguments[1]?arguments[1]:null,r=t.map(function(e){return new B(e,I)}),i=new V(r),o=new e(i,null,n);return o}})}(),e("Injector",L),$=w.get(L)}}}),System.register("angular2/src/change_detection/change_detection",["angular2/src/change_detection/jit_proto_change_detector","angular2/src/change_detection/pregen_proto_change_detector","angular2/src/change_detection/proto_change_detector","angular2/src/change_detection/pipes/pipes","angular2/src/change_detection/pipes/iterable_changes","angular2/src/change_detection/pipes/keyvalue_changes","angular2/src/change_detection/pipes/observable_pipe","angular2/src/change_detection/pipes/promise_pipe","angular2/src/change_detection/pipes/uppercase_pipe","angular2/src/change_detection/pipes/lowercase_pipe","angular2/src/change_detection/pipes/json_pipe","angular2/src/change_detection/pipes/limit_to_pipe","angular2/src/change_detection/pipes/date_pipe","angular2/src/change_detection/pipes/number_pipe","angular2/src/change_detection/pipes/null_pipe","angular2/src/change_detection/interfaces","angular2/di","angular2/src/facade/collection","angular2/src/facade/lang"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b,w,C,R,E,x,S,O,D,A,I,P,j,T,N,V,k,M,B,L,$,F,H,W,q,U,K;return{setters:[function(e){i=e.JitProtoChangeDetector},function(e){o=e.PregenProtoChangeDetector},function(e){s=e.DynamicProtoChangeDetector},function(e){a=e.Pipes},function(e){c=e.IterableChangesFactory},function(e){u=e.KeyValueChangesFactory},function(e){l=e.ObservablePipeFactory},function(e){f=e.PromisePipeFactory},function(e){h=e.UpperCaseFactory},function(e){d=e.LowerCaseFactory},function(e){p=e.JsonPipe},function(e){g=e.LimitToPipeFactory},function(e){m=e.DatePipe},function(e){v=e.DecimalPipe,_=e.PercentPipe,y=e.CurrencyPipe},function(e){b=e.NullPipeFactory},function(e){w=e.ChangeDetection},function(e){C=e.Inject,R=e.Injectable,E=e.OpaqueToken,x=e.Optional},function(e){S=e.StringMapWrapper},function(e){O=e.CONST,D=e.CONST_EXPR,A=e.isPresent}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},r=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},I=D([D(new u),D(new b)]),e("keyValDiff",I),P=D([D(new c),D(new b)]),e("iterableDiff",P),j=D([D(new l),D(new f),D(new b)]),e("async",j),T=D([D(new h),D(new b)]),e("uppercase",T),N=D([D(new d),D(new b)]),e("lowercase",N),V=D([D(new p),D(new b)]),e("json",V),k=D([D(new g),D(new b)]),e("limitTo",k),M=D([D(new v),D(new b)]),e("decimal",M),B=D([D(new _),D(new b)]),e("percent",B),L=D([D(new y),D(new b)]),e("currency",L),$=D([D(new m),D(new b)]),e("date",$),F=D(new a({iterableDiff:P,keyValDiff:I,async:j,uppercase:T,lowercase:N,json:V,limitTo:k,number:M,percent:B,currency:L,date:$})),e("defaultPipes",F),H={},e("preGeneratedProtoDetectors",H),W=D(new E("ProtoChangeDetectors")),e("PROTO_CHANGE_DETECTOR_KEY",W),q=function(e){function t(e){$traceurRuntime.superConstructor(t).call(this),this._dynamicChangeDetection=new U,this._protoChangeDetectorFactories=A(e)?e:H}return $traceurRuntime.createClass(t,{createProtoChangeDetector:function(e){var t=e.id;return S.contains(this._protoChangeDetectorFactories,t)?S.get(this._protoChangeDetectorFactories,t)(e):this._dynamicChangeDetection.createProtoChangeDetector(e)}},{isSupported:function(){return o.isSupported()}},e)}(w),e("PreGeneratedChangeDetection",q),e("PreGeneratedChangeDetection",q=t([R(),r(0,C(W)),r(0,x()),n("design:paramtypes",[Object])],q)),U=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{createProtoChangeDetector:function(e){return new s(e)}},{},e)}(w),e("DynamicChangeDetection",U),e("DynamicChangeDetection",U=t([R(),n("design:paramtypes",[])],U)),K=function(e){function t(){$traceurRuntime.superConstructor(t).apply(this,arguments)}return $traceurRuntime.createClass(t,{createProtoChangeDetector:function(e){return new i(e)}},{isSupported:function(){return i.isSupported()}},e)}(w),e("JitChangeDetection",K),e("JitChangeDetection",K=t([R(),O(),n("design:paramtypes",[])],K))}}}),System.register("angular2/src/core/compiler/element_injector",["angular2/src/facade/lang","angular2/src/facade/async","angular2/src/facade/collection","angular2/di","angular2/src/di/injector","angular2/src/core/annotations_impl/di","angular2/src/core/compiler/view_manager","angular2/src/core/compiler/view_container_ref","angular2/src/core/compiler/element_ref","angular2/src/core/compiler/template_ref","angular2/src/core/annotations_impl/annotations","angular2/src/core/compiler/directive_lifecycle_reflector","angular2/change_detection","angular2/src/core/compiler/query_list","angular2/src/reflection/reflection","angular2/src/render/api"],function(e){"use strict";function t(e){var t=e.binding;if(!(t instanceof W))return[];var n=t;return u.map(n.eventEmitters,function(e){var t,n,r=e.indexOf(":");return r>-1?(t=a.substring(e,0,r).trim(),n=a.substring(e,r+1).trim()):t=n=e,new U(n,M.getter(t))})}function n(e){var t=e.binding;if(!(t instanceof W))return[];var n=[],r=t;return l.forEach(r.hostActions,function(e,t){n.push(new K(e,M.getter(t)))}),n}var r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b,w,C,R,E,x,S,O,D,A,I,P,j,T,N,V,k,M,B,L,$,F,H,W,q,U,K,z,G,Q,Y,J,X;return{setters:[function(e){r=e.isPresent,i=e.isBlank,o=e.BaseException,s=e.stringify,a=e.StringWrapper},function(e){c=e.ObservableWrapper},function(e){u=e.ListWrapper,l=e.MapWrapper},function(e){f=e.Injector,h=e.ProtoInjector,d=e.PUBLIC_AND_PRIVATE,p=e.PUBLIC,g=e.PRIVATE,m=e.undefinedValue,v=e.Key,_=e.Dependency,y=e.Binding,b=e.ResolvedBinding,w=e.NoBindingError},function(e){C=e.InjectorInlineStrategy,R=e.BindingWithVisibility;
21
-
22
- },function(e){E=e.Attribute,x=e.Query},function(e){S=e},function(e){O=e.ViewContainerRef},function(e){D=e.ElementRef},function(e){A=e.TemplateRef},function(e){I=e.Directive,P=e.Component,j=e.LifecycleEvent},function(e){T=e.hasLifecycleHook},function(e){N=e.ChangeDetectorRef,V=e.Pipes},function(e){k=e.QueryList},function(e){M=e.reflector},function(e){B=e.DirectiveMetadata}],execute:function(){$=function(){function e(){this.viewManagerId=v.get(S.AppViewManager).id,this.templateRefId=v.get(A).id,this.viewContainerId=v.get(O).id,this.changeDetectorRefId=v.get(N).id,this.elementRefId=v.get(D).id,this.pipesKey=v.get(V)}return $traceurRuntime.createClass(e,{},{instance:function(){return i(L)&&(L=new e),L}})}(),e("StaticKeys",$),F=function(){function e(e){this._head=null,this._tail=null,this._next=null,r(e)&&e.addChild(this)}return $traceurRuntime.createClass(e,{addChild:function(e){r(this._tail)?(this._tail._next=e,this._tail=e):this._tail=this._head=e,e._next=null,e._parent=this},addChildAfter:function(e,t){if(i(t)){var n=this._head;this._head=e,e._next=n,i(this._tail)&&(this._tail=e)}else{if(i(t._next))return void this.addChild(e);e._next=t._next,t._next=e}e._parent=this},remove:function(){if(!i(this.parent)){var e=this._next,t=this._findPrev();i(t)?this.parent._head=this._next:t._next=this._next,i(e)&&(this._parent._tail=t),this._parent=null,this._next=null}},_findPrev:function(){var e=this.parent._head;if(e==this)return null;for(;e._next!==this;)e=e._next;return e},get parent(){return this._parent},get children(){for(var e=[],t=this._head;null!=t;)e.push(t),t=t._next;return e}},{})}(),e("TreeNode",F),H=function(e){function t(e,n,r,i,o,s){$traceurRuntime.superConstructor(t).call(this,e,n,r,i),this.attributeName=o,this.queryDecorator=s,this._verify()}return $traceurRuntime.createClass(t,{_verify:function(){var e=0;if(r(this.queryDecorator)&&e++,r(this.attributeName)&&e++,e>1)throw new o("A directive injectable can contain only one of the following @Attribute or @Query.")}},{createFrom:function(e){return new t(e.key,e.optional,e.visibility,e.properties,t._attributeName(e.properties),t._query(e.properties))},_attributeName:function(e){var t=u.find(e,function(e){return e instanceof E});return r(t)?t.attributeName:null},_query:function(e){return u.find(e,function(e){return e instanceof x})}},e)}(_),e("DirectiveDependency",H),W=function(e){function t(e,n,r,i,o,s){$traceurRuntime.superConstructor(t).call(this,e,n,r),this.resolvedHostInjectables=i,this.resolvedViewInjectables=o,this.metadata=s}return $traceurRuntime.createClass(t,{get callOnDestroy(){return this.metadata.callOnDestroy},get callOnChange(){return this.metadata.callOnChange},get callOnAllChangesDone(){return this.metadata.callOnAllChangesDone},get displayName(){return this.key.displayName},get eventEmitters(){return r(this.metadata)&&r(this.metadata.events)?this.metadata.events:[]},get hostActions(){return r(this.metadata)&&r(this.metadata.hostActions)?this.metadata.hostActions:new Map},get changeDetection(){return this.metadata.changeDetection}},{createFromBinding:function(e,n){i(n)&&(n=new I);var o=e.resolve(),a=u.map(o.dependencies,H.createFrom),c=r(n.hostInjector)?f.resolve(n.hostInjector):[],h=n instanceof P&&r(n.viewInjector)?f.resolve(n.viewInjector):[],d=B.create({id:s(o.key.token),type:n instanceof P?B.COMPONENT_TYPE:B.DIRECTIVE_TYPE,selector:n.selector,compileChildren:n.compileChildren,events:n.events,host:r(n.host)?l.createFromStringMap(n.host):null,properties:n.properties,readAttributes:t._readAttributes(a),callOnDestroy:T(j.onDestroy,o.key.token,n),callOnChange:T(j.onChange,o.key.token,n),callOnCheck:T(j.onCheck,o.key.token,n),callOnInit:T(j.onInit,o.key.token,n),callOnAllChangesDone:T(j.onAllChangesDone,o.key.token,n),changeDetection:n instanceof P?n.changeDetection:null,exportAs:n.exportAs});return new t(o.key,o.factory,a,c,h,d)},_readAttributes:function(e){var t=[];return u.forEach(e,function(e){r(e.attributeName)&&t.push(e.attributeName)}),t},createFromType:function(e,n){var r=new y(e,{toClass:e});return t.createFromBinding(r,n)}},e)}(b),e("DirectiveBinding",W),q=function(){function e(e,t,n,r){this.viewManager=e,this.view=t,this.elementRef=n,this.templateRef=r}return $traceurRuntime.createClass(e,{},{})}(),e("PreBuiltObjects",q),U=function(){function e(e,t){this.eventName=e,this.getter=t}return $traceurRuntime.createClass(e,{subscribe:function(e,t,n){var r=this,i=this.getter(n);return c.subscribe(i,function(n){return e.triggerEventHandlers(r.eventName,n,t)})}},{})}(),e("EventEmitterAccessor",U),K=function(){function e(e,t){this.methodName=e,this.getter=t}return $traceurRuntime.createClass(e,{subscribe:function(e,t,n){var r=this,i=this.getter(n);return c.subscribe(i,function(n){return e.invokeElementMethod(t,r.methodName,n)})}},{})}(),e("HostActionAccessor",K),z=function(){function e(e,r,i,o,s,a){this.parent=e,this.index=r,this.distanceToParent=o,this._firstBindingIsComponent=s,this.directiveVariableBindings=a;var c=i.length;this.protoInjector=new h(i),this.eventEmitterAccessors=u.createFixedSize(c),this.hostActionAccessors=u.createFixedSize(c);for(var l=0;c>l;++l)this.eventEmitterAccessors[l]=t(i[l]),this.hostActionAccessors[l]=n(i[l])}return $traceurRuntime.createClass(e,{instantiate:function(e){return new G(this,e)},directParent:function(){return this.distanceToParent<2?this.parent:null},get hasBindings(){return this.eventEmitterAccessors.length>0},getBindingAtIndex:function(e){return this.protoInjector.getBindingAtIndex(e)}},{create:function(t,n,r,i,o,s){var a=[];return e._createDirectiveBindingWithVisibility(r,a,i),i&&e._createViewInjectorBindingWithVisibility(r,a),e._createHostInjectorBindingWithVisibility(r,a,i),new e(t,n,a,o,i,s)},_createDirectiveBindingWithVisibility:function(t,n,r){u.forEach(t,function(i){n.push(e._createBindingWithVisibility(r,i,t,i))})},_createHostInjectorBindingWithVisibility:function(t,n,r){u.forEach(t,function(i){u.forEach(i.resolvedHostInjectables,function(o){n.push(e._createBindingWithVisibility(r,i,t,o))})})},_createBindingWithVisibility:function(e,t,n,r){var i=e&&n[0]===t;return new R(r,i?d:p)},_createViewInjectorBindingWithVisibility:function(e,t){var n=e[0];u.forEach(n.resolvedViewInjectables,function(e){return t.push(new R(e,g))})}})}(),e("ProtoElementInjector",z),G=function(e){function t(e,n){$traceurRuntime.superConstructor(t).call(this,n),this._proto=e,this._preBuiltObjects=null,this._injector=new f(this._proto.protoInjector,null,this);var r=this._injector.internalStrategy;this._strategy=r instanceof C?new Q(r,this):new Y(r,this),this.hydrated=!1,this._buildQueries(),this._addParentQueries()}return $traceurRuntime.createClass(t,{dehydrate:function(){this.hydrated=!1,this._host=null,this._preBuiltObjects=null,this._strategy.callOnDestroy(),this._strategy.dehydrate()},onAllChangesDone:function(){r(this._query0)&&this._query0.originator===this&&this._query0.list.fireCallbacks(),r(this._query1)&&this._query1.originator===this&&this._query1.list.fireCallbacks(),r(this._query2)&&this._query2.originator===this&&this._query2.list.fireCallbacks()},hydrate:function(e,t,n){this._host=t,this._preBuiltObjects=n,this._reattachInjectors(e),this._strategy.hydrate(),r(t)&&this._addViewQueries(t),this._addDirectivesToQueries(),this._addVarBindingsToQueries(),this.hydrated=!0},_reattachInjectors:function(e){r(this._parent)?r(e)?(this._reattachInjector(this._injector,e,!1),this._reattachInjector(e,this._parent._injector,!1)):this._reattachInjector(this._injector,this._parent._injector,!1):r(this._host)?r(e)?(this._reattachInjector(this._injector,e,!1),this._reattachInjector(e,this._host._injector,!0)):this._reattachInjector(this._injector,this._host._injector,!0):r(e)&&this._reattachInjector(this._injector,e,!0)},_reattachInjector:function(e,t,n){e.internalStrategy.attach(t,n)},getPipes:function(){var e=$.instance().pipesKey;return this._injector.getOptional(e)},hasVariableBinding:function(e){var t=this._proto.directiveVariableBindings;return r(t)&&t.has(e)},getVariableBinding:function(e){var t=this._proto.directiveVariableBindings.get(e);return r(t)?this.getDirectiveAtIndex(t):this.getElementRef()},get:function(e){return this._injector.get(e)},hasDirective:function(e){return r(this._injector.getOptional(e))},getEventEmitterAccessors:function(){return this._proto.eventEmitterAccessors},getHostActionAccessors:function(){return this._proto.hostActionAccessors},getDirectiveVariableBindings:function(){return this._proto.directiveVariableBindings},getComponent:function(){return this._strategy.getComponent()},getElementRef:function(){return this._preBuiltObjects.elementRef},getViewContainerRef:function(){return new O(this._preBuiltObjects.viewManager,this.getElementRef())},directParent:function(){return this._proto.distanceToParent<2?this.parent:null},isComponentKey:function(e){return this._strategy.isComponentKey(e)},getDependency:function(e,t,n){var o=n.key;if(!(n instanceof H))return m;if(!(t instanceof W))return m;var s=n,a=t,c=$.instance();if(o.id===c.viewManagerId)return this._preBuiltObjects.viewManager;if(r(s.attributeName))return this._buildAttribute(s);if(r(s.queryDecorator))return this._findQuery(s.queryDecorator).list;if(s.key.id===$.instance().changeDetectorRefId){if(a.metadata.type===B.COMPONENT_TYPE){var u=this._preBuiltObjects.view.getNestedView(this._preBuiltObjects.elementRef.boundElementIndex);return u.changeDetector.ref}return this._preBuiltObjects.view.changeDetector.ref}if(s.key.id===$.instance().elementRefId)return this.getElementRef();if(s.key.id===$.instance().viewContainerId)return this.getViewContainerRef();if(s.key.id===$.instance().templateRefId){if(i(this._preBuiltObjects.templateRef)){if(s.optional)return null;throw new w(s.key)}return this._preBuiltObjects.templateRef}return m},_buildAttribute:function(e){var t=this._proto.attributes;return r(t)&&t.has(e.attributeName)?t.get(e.attributeName):null},_buildQueriesForDeps:function(e){for(var t=0;t<e.length;t++){var n=e[t];r(n.queryDecorator)&&this._createQueryRef(n.queryDecorator)}},_addViewQueries:function(e){r(e._query0)&&e._query0.originator==e&&this._addViewQuery(e._query0),r(e._query1)&&e._query1.originator==e&&this._addViewQuery(e._query1),r(e._query2)&&e._query2.originator==e&&this._addViewQuery(e._query2)},_addViewQuery:function(e){(e.query.descendants||!r(this.parent))&&this._assignQueryRef(e)},_addVarBindingsToQueries:function(){this._addVarBindingsToQuery(this._query0),this._addVarBindingsToQuery(this._query1),this._addVarBindingsToQuery(this._query2)},_addDirectivesToQueries:function(){this._addDirectivesToQuery(this._query0),this._addDirectivesToQuery(this._query1),this._addDirectivesToQuery(this._query2)},_addVarBindingsToQuery:function(e){if(!i(e)&&e.query.isVarBindingQuery)for(var t=e.query.varBindings,n=0;n<t.length;++n)this.hasVariableBinding(t[n])&&e.list.add(this.getVariableBinding(t[n]))},_addDirectivesToQuery:function(e){if(!i(e)&&!e.query.isVarBindingQuery){var t=[];this.addDirectivesMatchingQuery(e.query,t),t.forEach(function(t){return e.list.add(t)})}},_createQueryRef:function(e){var t=new k;if(i(this._query0))this._query0=new X(e,t,this);else if(i(this._query1))this._query1=new X(e,t,this);else{if(!i(this._query2))throw new J;this._query2=new X(e,t,this)}},addDirectivesMatchingQuery:function(e,t){this._strategy.addDirectivesMatchingQuery(e,t)},_buildQueries:function(){r(this._proto)&&this._strategy.buildQueries()},_findQuery:function(e){if(r(this._query0)&&this._query0.query===e)return this._query0;if(r(this._query1)&&this._query1.query===e)return this._query1;if(r(this._query2)&&this._query2.query===e)return this._query2;throw new o("Cannot find query for directive "+e+".")},_hasQuery:function(e){return this._query0==e||this._query1==e||this._query2==e},link:function(e){e.addChild(this),this._addParentQueries()},linkAfter:function(e,t){e.addChildAfter(this,t),this._addParentQueries()},_addParentQueries:function(){i(this.parent)||(r(this.parent._query0)&&!this.parent._query0.query.isViewQuery&&(this._addQueryToTree(this.parent._query0),this.hydrated&&this.parent._query0.update()),r(this.parent._query1)&&!this.parent._query1.query.isViewQuery&&(this._addQueryToTree(this.parent._query1),this.hydrated&&this.parent._query1.update()),r(this.parent._query2)&&!this.parent._query2.query.isViewQuery&&(this._addQueryToTree(this.parent._query2),this.hydrated&&this.parent._query2.update()))},unlink:function(){var e=[];r(this.parent._query0)&&(this._pruneQueryFromTree(this.parent._query0),e.push(this.parent._query0)),r(this.parent._query1)&&(this._pruneQueryFromTree(this.parent._query1),e.push(this.parent._query1)),r(this.parent._query2)&&(this._pruneQueryFromTree(this.parent._query2),e.push(this.parent._query2)),this.remove(),u.forEach(e,function(e){return e.update()})},_pruneQueryFromTree:function(e){this._removeQueryRef(e);for(var t=this._head;r(t);)t._pruneQueryFromTree(e),t=t._next},_addQueryToTree:function(e){0==e.query.descendants?this==e.originator?this._addQueryToTreeSelfAndRecurse(e):this.parent==e.originator&&this._assignQueryRef(e):this._addQueryToTreeSelfAndRecurse(e)},_addQueryToTreeSelfAndRecurse:function(e){this._assignQueryRef(e);for(var t=this._head;r(t);)t._addQueryToTree(e),t=t._next},_assignQueryRef:function(e){if(i(this._query0))return void(this._query0=e);if(i(this._query1))return void(this._query1=e);if(i(this._query2))return void(this._query2=e);throw new J},_removeQueryRef:function(e){this._query0==e&&(this._query0=null),this._query1==e&&(this._query1=null),this._query2==e&&(this._query2=null)},getDirectiveAtIndex:function(e){return this._injector.getAt(e)},hasInstances:function(){return this._proto.hasBindings&&this.hydrated},getHost:function(){return this._host},getBoundElementIndex:function(){return this._proto.index}},{},e)}(F),e("ElementInjector",G),Q=function(){function e(e,t){this.injectorStrategy=e,this._ei=t}return $traceurRuntime.createClass(e,{hydrate:function(){var e=this.injectorStrategy,t=e.protoStrategy;e.resetContructionCounter(),t.binding0 instanceof W&&r(t.keyId0)&&e.obj0===m&&(e.obj0=e.instantiateBinding(t.binding0,t.visibility0)),t.binding1 instanceof W&&r(t.keyId1)&&e.obj1===m&&(e.obj1=e.instantiateBinding(t.binding1,t.visibility1)),t.binding2 instanceof W&&r(t.keyId2)&&e.obj2===m&&(e.obj2=e.instantiateBinding(t.binding2,t.visibility2)),t.binding3 instanceof W&&r(t.keyId3)&&e.obj3===m&&(e.obj3=e.instantiateBinding(t.binding3,t.visibility3)),t.binding4 instanceof W&&r(t.keyId4)&&e.obj4===m&&(e.obj4=e.instantiateBinding(t.binding4,t.visibility4)),t.binding5 instanceof W&&r(t.keyId5)&&e.obj5===m&&(e.obj5=e.instantiateBinding(t.binding5,t.visibility5)),t.binding6 instanceof W&&r(t.keyId6)&&e.obj6===m&&(e.obj6=e.instantiateBinding(t.binding6,t.visibility6)),t.binding7 instanceof W&&r(t.keyId7)&&e.obj7===m&&(e.obj7=e.instantiateBinding(t.binding7,t.visibility7)),t.binding8 instanceof W&&r(t.keyId8)&&e.obj8===m&&(e.obj8=e.instantiateBinding(t.binding8,t.visibility8)),t.binding9 instanceof W&&r(t.keyId9)&&e.obj9===m&&(e.obj9=e.instantiateBinding(t.binding9,t.visibility9))},dehydrate:function(){var e=this.injectorStrategy;e.obj0=m,e.obj1=m,e.obj2=m,e.obj3=m,e.obj4=m,e.obj5=m,e.obj6=m,e.obj7=m,e.obj8=m,e.obj9=m},callOnDestroy:function(){var e=this.injectorStrategy,t=e.protoStrategy;t.binding0 instanceof W&&t.binding0.callOnDestroy&&e.obj0.onDestroy(),t.binding1 instanceof W&&t.binding1.callOnDestroy&&e.obj1.onDestroy(),t.binding2 instanceof W&&t.binding2.callOnDestroy&&e.obj2.onDestroy(),t.binding3 instanceof W&&t.binding3.callOnDestroy&&e.obj3.onDestroy(),t.binding4 instanceof W&&t.binding4.callOnDestroy&&e.obj4.onDestroy(),t.binding5 instanceof W&&t.binding5.callOnDestroy&&e.obj5.onDestroy(),t.binding6 instanceof W&&t.binding6.callOnDestroy&&e.obj6.onDestroy(),t.binding7 instanceof W&&t.binding7.callOnDestroy&&e.obj7.onDestroy(),t.binding8 instanceof W&&t.binding8.callOnDestroy&&e.obj8.onDestroy(),t.binding9 instanceof W&&t.binding9.callOnDestroy&&e.obj9.onDestroy()},getComponent:function(){return this.injectorStrategy.obj0},isComponentKey:function(e){return this._ei._proto._firstBindingIsComponent&&r(e)&&e.id===this.injectorStrategy.protoStrategy.keyId0},buildQueries:function(){var e=this.injectorStrategy.protoStrategy;e.binding0 instanceof W&&this._ei._buildQueriesForDeps(e.binding0.dependencies),e.binding1 instanceof W&&this._ei._buildQueriesForDeps(e.binding1.dependencies),e.binding2 instanceof W&&this._ei._buildQueriesForDeps(e.binding2.dependencies),e.binding3 instanceof W&&this._ei._buildQueriesForDeps(e.binding3.dependencies),e.binding4 instanceof W&&this._ei._buildQueriesForDeps(e.binding4.dependencies),e.binding5 instanceof W&&this._ei._buildQueriesForDeps(e.binding5.dependencies),e.binding6 instanceof W&&this._ei._buildQueriesForDeps(e.binding6.dependencies),e.binding7 instanceof W&&this._ei._buildQueriesForDeps(e.binding7.dependencies),e.binding8 instanceof W&&this._ei._buildQueriesForDeps(e.binding8.dependencies),e.binding9 instanceof W&&this._ei._buildQueriesForDeps(e.binding9.dependencies)},addDirectivesMatchingQuery:function(e,t){var n=this.injectorStrategy,i=n.protoStrategy;r(i.binding0)&&i.binding0.key.token===e.selector&&(n.obj0===m&&(n.obj0=n.instantiateBinding(i.binding0,i.visibility0)),t.push(n.obj0)),r(i.binding1)&&i.binding1.key.token===e.selector&&(n.obj1===m&&(n.obj1=n.instantiateBinding(i.binding1,i.visibility1)),t.push(n.obj1)),r(i.binding2)&&i.binding2.key.token===e.selector&&(n.obj2===m&&(n.obj2=n.instantiateBinding(i.binding2,i.visibility2)),t.push(n.obj2)),r(i.binding3)&&i.binding3.key.token===e.selector&&(n.obj3===m&&(n.obj3=n.instantiateBinding(i.binding3,i.visibility3)),t.push(n.obj3)),r(i.binding4)&&i.binding4.key.token===e.selector&&(n.obj4===m&&(n.obj4=n.instantiateBinding(i.binding4,i.visibility4)),t.push(n.obj4)),r(i.binding5)&&i.binding5.key.token===e.selector&&(n.obj5===m&&(n.obj5=n.instantiateBinding(i.binding5,i.visibility5)),t.push(n.obj5)),r(i.binding6)&&i.binding6.key.token===e.selector&&(n.obj6===m&&(n.obj6=n.instantiateBinding(i.binding6,i.visibility6)),t.push(n.obj6)),r(i.binding7)&&i.binding7.key.token===e.selector&&(n.obj7===m&&(n.obj7=n.instantiateBinding(i.binding7,i.visibility7)),t.push(n.obj7)),r(i.binding8)&&i.binding8.key.token===e.selector&&(n.obj8===m&&(n.obj8=n.instantiateBinding(i.binding8,i.visibility8)),t.push(n.obj8)),r(i.binding9)&&i.binding9.key.token===e.selector&&(n.obj9===m&&(n.obj9=n.instantiateBinding(i.binding9,i.visibility9)),t.push(n.obj9))},getComponentBinding:function(){var e=this.injectorStrategy.protoStrategy;return e.binding0}},{})}(),Y=function(){function e(e,t){this.injectorStrategy=e,this._ei=t}return $traceurRuntime.createClass(e,{hydrate:function(){for(var e=this.injectorStrategy,t=e.protoStrategy,n=0;n<t.keyIds.length;n++)t.bindings[n]instanceof W&&r(t.keyIds[n])&&e.objs[n]===m&&(e.objs[n]=e.instantiateBinding(t.bindings[n],t.visibilities[n]))},dehydrate:function(){var e=this.injectorStrategy;u.fill(e.objs,m)},callOnDestroy:function(){for(var e=this.injectorStrategy,t=e.protoStrategy,n=0;n<t.bindings.length;n++)t.bindings[n]instanceof W&&t.bindings[n].callOnDestroy&&e.objs[n].onDestroy()},getComponent:function(){return this.injectorStrategy.objs[0]},isComponentKey:function(e){var t=this.injectorStrategy.protoStrategy;return this._ei._proto._firstBindingIsComponent&&r(e)&&e.id===t.keyIds[0]},buildQueries:function(){for(var e=this.injectorStrategy,t=e.protoStrategy,n=0;n<t.bindings.length;n++)t.bindings[n]instanceof W&&this._ei._buildQueriesForDeps(t.bindings[n].dependencies)},addDirectivesMatchingQuery:function(e,t){for(var n=this.injectorStrategy,r=n.protoStrategy,i=0;i<r.bindings.length;i++)r.bindings[i].key.token===e.selector&&(n.objs[i]===m&&(n.objs[i]=n.instantiateBinding(r.bindings[i],r.visibilities[i])),t.push(n.objs[i]))},getComponentBinding:function(){var e=this.injectorStrategy.protoStrategy;return e.bindings[0]}},{})}(),J=function(e){function t(){$traceurRuntime.superConstructor(t).call(this),this.message="Only 3 queries can be concurrently active in a template."}return $traceurRuntime.createClass(t,{toString:function(){return this.message}},{},e)}(o),e("QueryError",J),X=function(){function e(e,t,n){this.query=e,this.list=t,this.originator=n}return $traceurRuntime.createClass(e,{update:function(){var e=[];this.visit(this.originator,e),this.list.reset(e)},visit:function(e,t){if(!i(e)&&e._hasQuery(this)){this.query.isVarBindingQuery?this._aggregateVariableBindings(e,t):this._aggregateDirective(e,t);for(var n=e._head;r(n);)this.visit(n,t),n=n._next}},_aggregateVariableBindings:function(e,t){for(var n=this.query.varBindings,r=0;r<n.length;++r)e.hasVariableBinding(n[r])&&t.push(e.getVariableBinding(n[r]))},_aggregateDirective:function(e,t){e.addDirectivesMatchingQuery(this.query,t)}},{})}(),e("QueryRef",X)}}}),System.register("angular2/src/render/dom/compiler/compiler",["angular2/di","angular2/src/facade/async","angular2/src/facade/lang","angular2/src/dom/dom_adapter","angular2/src/render/api","angular2/src/render/dom/compiler/compile_pipeline","angular2/src/render/dom/compiler/view_loader","angular2/src/render/dom/compiler/compile_step_factory","angular2/change_detection","angular2/src/render/dom/shadow_dom/shadow_dom_strategy","angular2/src/render/dom/view/proto_view_merger"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v;return{setters:[function(e){r=e.Injectable},function(e){i=e.PromiseWrapper},function(e){o=e.BaseException},function(e){s=e.DOM},function(e){a=e.ViewDefinition,c=e.ViewType,u=e.RenderCompiler},function(e){l=e.CompilePipeline},function(e){f=e.ViewLoader},function(e){h=e.DefaultStepFactory},function(e){d=e.Parser},function(e){p=e.ShadowDomStrategy},function(e){g=e}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},m=function(e){function t(e,n,r){$traceurRuntime.superConstructor(t).call(this),this._stepFactory=e,this._viewLoader=n,this._useNativeShadowDom=r}return $traceurRuntime.createClass(t,{compile:function(e){var t=this,n=this._viewLoader.load(e);return i.then(n,function(n){return t._compileTemplate(e,n,c.COMPONENT)},function(t){throw new o('Failed to load the template for "'+e.componentId+'" : '+t)})},compileHost:function(e){var t=new a({componentId:e.id,templateAbsUrl:null,template:null,styles:null,styleAbsUrls:null,directives:[e]}),n=s.createTemplate("");return s.appendChild(s.content(n),s.createElement(e.selector)),this._compileTemplate(t,n,c.HOST)},mergeProtoViewsRecursively:function(e){return i.resolve(g.mergeProtoViewsRecursively(e))},_compileTemplate:function(e,t,n){var r=new l(this._stepFactory.createSteps(e),this._useNativeShadowDom),o=r.process(t,n,e.componentId);return i.resolve(o[0].inheritedProtoView.build())}},{},e)}(u),e("DomCompiler",m),v=function(e){function t(e,n,r){$traceurRuntime.superConstructor(t).call(this,new h(e,n),r,n.hasNativeContentElement())}return $traceurRuntime.createClass(t,{},{},e)}(m),e("DefaultDomCompiler",v),e("DefaultDomCompiler",v=t([r(),n("design:paramtypes",[d,p,f])],v))}}}),System.register("angular2/forms",["angular2/src/forms/model","angular2/src/forms/directives/abstract_control_directive","angular2/src/forms/directives/control_container","angular2/src/forms/directives/ng_control_name","angular2/src/forms/directives/ng_form_control","angular2/src/forms/directives/ng_model","angular2/src/forms/directives/ng_control","angular2/src/forms/directives/ng_control_group","angular2/src/forms/directives/ng_form_model","angular2/src/forms/directives/ng_form","angular2/src/forms/directives/default_value_accessor","angular2/src/forms/directives/checkbox_value_accessor","angular2/src/forms/directives/select_control_value_accessor","angular2/src/forms/directives","angular2/src/forms/validators","angular2/src/forms/directives/validators","angular2/src/forms/form_builder","angular2/src/facade/lang"],function(e){"use strict";var t,n,r;return{setters:[function(t){e("AbstractControl",t.AbstractControl),e("Control",t.Control),e("ControlGroup",t.ControlGroup),e("ControlArray",t.ControlArray)},function(t){e("AbstractControlDirective",t.AbstractControlDirective)},function(t){e("ControlContainer",t.ControlContainer)},function(t){e("NgControlName",t.NgControlName)},function(t){e("NgFormControl",t.NgFormControl)},function(t){e("NgModel",t.NgModel)},function(t){e("NgControl",t.NgControl)},function(t){e("NgControlGroup",t.NgControlGroup)},function(t){e("NgFormModel",t.NgFormModel)},function(t){e("NgForm",t.NgForm)},function(t){e("DefaultValueAccessor",t.DefaultValueAccessor)},function(t){e("CheckboxControlValueAccessor",t.CheckboxControlValueAccessor)},function(t){e("NgSelectOption",t.NgSelectOption),e("SelectControlValueAccessor",t.SelectControlValueAccessor)},function(t){e("formDirectives",t.formDirectives)},function(t){e("Validators",t.Validators)},function(t){e("NgValidator",t.NgValidator),e("NgRequiredValidator",t.NgRequiredValidator)},function(n){t=n.FormBuilder,e("FormBuilder",n.FormBuilder)},function(e){n=e.CONST_EXPR}],execute:function(){r=n([t]),e("formInjectables",r)}}}),System.register("angular2/http",["angular2/di","angular2/src/http/http","angular2/src/http/backends/xhr_backend","angular2/src/http/backends/jsonp_backend","angular2/src/http/backends/browser_xhr","angular2/src/http/backends/browser_jsonp","angular2/src/http/base_request_options","angular2/src/http/interfaces","angular2/src/http/backends/mock_backend","angular2/src/http/static_request","angular2/src/http/static_response","angular2/src/http/base_response_options","angular2/src/http/headers","angular2/src/http/enums","angular2/src/http/url_search_params"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p;return{setters:[function(e){t=e.bind},function(t){n=t.Http,r=t.Jsonp,e("Http",t.Http),e("Jsonp",t.Jsonp)},function(t){i=t.XHRBackend,e("XHRBackend",t.XHRBackend),e("XHRConnection",t.XHRConnection)},function(t){o=t.JSONPBackend,e("JSONPBackend",t.JSONPBackend),e("JSONPConnection",t.JSONPConnection)},function(e){s=e.BrowserXhr},function(e){a=e.BrowserJsonp},function(t){c=t.BaseRequestOptions,u=t.RequestOptions,e("BaseRequestOptions",t.BaseRequestOptions),e("RequestOptions",t.RequestOptions)},function(t){l=t.ConnectionBackend,e("Connection",t.Connection),e("ConnectionBackend",t.ConnectionBackend)},function(t){e("MockConnection",t.MockConnection),e("MockBackend",t.MockBackend)},function(t){e("Request",t.Request)},function(t){e("Response",t.Response)},function(t){f=t.BaseResponseOptions,h=t.ResponseOptions,e("BaseResponseOptions",t.BaseResponseOptions),e("ResponseOptions",t.ResponseOptions)},function(t){e("Headers",t.Headers)},function(t){e("ResponseTypes",t.ResponseTypes),e("ReadyStates",t.ReadyStates),e("RequestMethods",t.RequestMethods),e("RequestCredentialsOpts",t.RequestCredentialsOpts),e("RequestCacheOpts",t.RequestCacheOpts),e("RequestModesOpts",t.RequestModesOpts)},function(t){e("URLSearchParams",t.URLSearchParams)}],execute:function(){d=[t(l).toClass(i),s,t(u).toClass(c),t(h).toClass(f),n],e("httpInjectables",d),p=[t(l).toClass(o),a,t(u).toClass(c),t(h).toClass(f),r],e("jsonpInjectables",p)}}}),System.register("angular2/di",["angular2/src/di/metadata","angular2/src/di/decorators","angular2/src/di/forward_ref","angular2/src/di/injector","angular2/src/di/binding","angular2/src/di/key","angular2/src/di/exceptions","angular2/src/di/opaque_token"],function(e){"use strict";var t={undefined:!0};return{setters:[function(t){e("InjectMetadata",t.InjectMetadata),e("OptionalMetadata",t.OptionalMetadata),e("InjectableMetadata",t.InjectableMetadata),e("VisibilityMetadata",t.VisibilityMetadata),e("SelfMetadata",t.SelfMetadata),e("AncestorMetadata",t.AncestorMetadata),e("UnboundedMetadata",t.UnboundedMetadata),e("DependencyMetadata",t.DependencyMetadata),e("DEFAULT_VISIBILITY",t.DEFAULT_VISIBILITY)},function(n){Object.keys(n).forEach(function(r){t[r]||e(r,n[r])})},function(t){e("forwardRef",t.forwardRef),e("resolveForwardRef",t.resolveForwardRef)},function(t){e("Injector",t.Injector),e("ProtoInjector",t.ProtoInjector),e("BindingWithVisibility",t.BindingWithVisibility),e("PUBLIC_AND_PRIVATE",t.PUBLIC_AND_PRIVATE),e("PUBLIC",t.PUBLIC),e("PRIVATE",t.PRIVATE),e("undefinedValue",t.undefinedValue)},function(t){e("Binding",t.Binding),e("BindingBuilder",t.BindingBuilder),e("ResolvedBinding",t.ResolvedBinding),e("Dependency",t.Dependency),e("bind",t.bind)},function(t){e("Key",t.Key),e("KeyRegistry",t.KeyRegistry),e("TypeLiteral",t.TypeLiteral)},function(t){e("NoBindingError",t.NoBindingError),e("AbstractBindingError",t.AbstractBindingError),e("AsyncBindingError",t.AsyncBindingError),e("CyclicDependencyError",t.CyclicDependencyError),e("InstantiationError",t.InstantiationError),e("InvalidBindingError",t.InvalidBindingError),e("NoAnnotationError",t.NoAnnotationError),e("OutOfBoundsError",t.OutOfBoundsError)},function(t){e("OpaqueToken",t.OpaqueToken)}],execute:function(){}}}),System.register("angular2/src/core/compiler/compiler",["angular2/di","angular2/src/facade/lang","angular2/src/facade/async","angular2/src/facade/collection","angular2/src/core/compiler/directive_resolver","angular2/src/core/compiler/view","angular2/src/core/compiler/element_injector","angular2/src/core/compiler/view_resolver","angular2/src/core/compiler/component_url_mapper","angular2/src/core/compiler/proto_view_factory","angular2/src/services/url_resolver","angular2/src/services/app_root_url","angular2/src/render/api"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b,w,C,R,E,x,S,O,D,A;return{setters:[function(e){r=e.Binding,i=e.resolveForwardRef,o=e.Injectable},function(e){s=e.Type,a=e.isBlank,c=e.isType,u=e.isPresent,l=e.BaseException,f=e.normalizeBlank,h=e.stringify,d=e.isArray,p=e.isPromise},function(e){g=e.PromiseWrapper},function(e){m=e.ListWrapper,v=e.Map,_=e.MapWrapper},function(e){y=e.DirectiveResolver},function(e){b=e.AppProtoViewMergeMapping},function(e){w=e.DirectiveBinding},function(e){C=e.ViewResolver},function(e){R=e.ComponentUrlMapper},function(e){E=e.ProtoViewFactory},function(e){x=e.UrlResolver},function(e){S=e.AppRootUrl},function(e){O=e}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},D=$traceurRuntime.createClass(function(){this._cache=new v,this._hostCache=new v},{set:function(e,t){this._cache.set(e,t)},get:function(e){var t=this._cache.get(e);return f(t)},setHost:function(e,t){this._hostCache.set(e,t)},getHost:function(e){var t=this._hostCache.get(e);return f(t)},clear:function(){this._cache.clear(),this._hostCache.clear()}},{}),e("CompilerCache",D),e("CompilerCache",D=t([o(),n("design:paramtypes",[])],D)),A=$traceurRuntime.createClass(function(e,t,n,r,i,o,s,a){this._protoViewsToBeMerged=[],this._reader=e,this._compilerCache=t,this._compiling=new v,this._viewResolver=n,this._componentUrlMapper=r,this._urlResolver=i,this._appUrl=a.value,this._render=o,this._protoViewFactory=s},{_bindDirective:function(e){if(e instanceof w)return e;if(e instanceof r){var t=this._reader.resolve(e.token);return w.createFromBinding(e,t)}var n=this._reader.resolve(e);return w.createFromType(e,n)},compileInHost:function(e){var t,n=this,r=c(e)?e:e.token,i=this._compilerCache.getHost(r);
23
-
24
- if(u(i))t=g.resolve(i);else{var o=this._bindDirective(e);A._assertTypeIsComponent(o);var s=o.metadata;t=this._render.compileHost(s).then(function(e){var t=n._protoViewFactory.createAppProtoViews(o,e,[o]);return n._compilerCache.setHost(r,t),n._compileNestedProtoViews(e,t,r)})}return t.then(function(e){return n._mergeUnmergedProtoViews().then(function(t){return e.ref})})},_mergeUnmergedProtoViews:function(){var e=this,t=this._protoViewsToBeMerged;return this._protoViewsToBeMerged=[],g.all(t.map(function(t){return e._render.mergeProtoViewsRecursively(e._collectMergeRenderProtoViews(t)).then(function(e){t.mergeMapping=new b(e)})}))},_collectMergeRenderProtoViews:function(e){for(var t=[e.render],n=0;n<e.elementBinders.length;n++){var r=e.elementBinders[n];u(r.nestedProtoView)&&t.push(r.hasStaticComponent()||r.hasEmbeddedProtoView()&&r.nestedProtoView.isEmbeddedFragment?this._collectMergeRenderProtoViews(r.nestedProtoView):null)}return t},_compile:function(e){var t=this,n=e.key.token,r=this._compilerCache.get(n);if(u(r))return r;var i=this._compiling.get(n);if(u(i))return i;for(var o=this._viewResolver.resolve(n),s=this._flattenDirectives(o),a=0;a<s.length;a++)if(!A._isValidDirective(s[a]))throw new l("Unexpected directive value '"+h(s[a])+"' on the View of component '"+h(n)+"'");var c=this._removeDuplicatedDirectives(m.map(s,function(e){return t._bindDirective(e)})),f=this._buildRenderTemplate(n,o,c);return i=this._render.compile(f).then(function(r){var i=t._protoViewFactory.createAppProtoViews(e,r,c);return t._compilerCache.set(n,i),_["delete"](t._compiling,n),t._compileNestedProtoViews(r,i,n)}),this._compiling.set(n,i),i},_removeDuplicatedDirectives:function(e){var t=new v;return e.forEach(function(e){t.set(e.key.id,e)}),_.values(t)},_compileNestedProtoViews:function(e,t,n){var r=this,i=[];return this._loopComponentElementBinders(t,function(e,t){var n=t.componentDirective,o=function(e){t.nestedProtoView=e},s=r._compile(n);p(s)?i.push(s.then(o)):o(s)}),g.all(i).then(function(e){return r._collectMergableProtoViews(t,n),t})},_collectMergableProtoViews:function(e,t){for(var n=!1,r=0;r<e.elementBinders.length;r++){var i=e.elementBinders[r];if(i.hasStaticComponent()){if(a(i.nestedProtoView.isRecursive)){n=!0;break}}else i.hasEmbeddedProtoView()&&this._collectMergableProtoViews(i.nestedProtoView,t)}if(n){if(e.isEmbeddedFragment)throw new l("<ng-content> is used within the recursive path of "+h(t));if(e.type===O.ViewType.COMPONENT)throw new l("Unconditional component cycle in "+h(t))}(e.type===O.ViewType.EMBEDDED||e.type===O.ViewType.HOST)&&this._protoViewsToBeMerged.push(e),e.isRecursive=n},_loopComponentElementBinders:function(e,t){var n=this;e.elementBinders.forEach(function(r){u(r.componentDirective)?t(e,r):u(r.nestedProtoView)&&n._loopComponentElementBinders(r.nestedProtoView,t)})},_buildRenderTemplate:function(e,t,n){var r=this,i=this._urlResolver.resolve(this._appUrl,this._componentUrlMapper.getUrl(e)),o=null,s=null;return u(t.templateUrl)?o=this._urlResolver.resolve(i,t.templateUrl):u(t.template)&&(o=i),u(t.styleUrls)&&(s=m.map(t.styleUrls,function(e){return r._urlResolver.resolve(i,e)})),new O.ViewDefinition({componentId:h(e),templateAbsUrl:o,template:t.template,styleAbsUrls:s,styles:t.styles,directives:m.map(n,function(e){return e.metadata})})},_flattenDirectives:function(e){if(a(e.directives))return[];var t=[];return this._flattenList(e.directives,t),t},_flattenList:function(e,t){for(var n=0;n<e.length;n++){var r=i(e[n]);d(r)?this._flattenList(r,t):t.push(r)}}},{_isValidDirective:function(e){return u(e)&&(e instanceof s||e instanceof r)},_assertTypeIsComponent:function(e){if(e.metadata.type!==O.DirectiveMetadata.COMPONENT_TYPE)throw new l("Could not load '"+h(e.key.token)+"' because it is not a component.")}}),e("Compiler",A),e("Compiler",A=t([o(),n("design:paramtypes",[y,D,C,R,x,O.RenderCompiler,E,S])],A))}}}),System.register("angular2/src/change_detection/pipes/pipes",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/di"],function(e){"use strict";var t,n,r,i,o,s,a,c,u,l,f,h,d;return{setters:[function(e){r=e.ListWrapper,i=e.StringMapWrapper},function(e){o=e.isBlank,s=e.isPresent,a=e.BaseException,c=e.CONST},function(e){u=e.Injectable,l=e.UnboundedMetadata,f=e.OptionalMetadata,h=e.Binding}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},d=$traceurRuntime.createClass(function(e){this.config=e},{get:function(e,t,n,r){if(s(r)&&r.supports(t))return r;s(r)&&r.onDestroy();var i=this._getListOfFactories(e,t),o=this._getMatchingFactory(i,e,t);return o.create(n)},_getListOfFactories:function(e,t){var n=this.config[e];if(o(n))throw new a("Cannot find '"+e+"' pipe supporting object '"+t+"'");return n},_getMatchingFactory:function(e,t,n){var i=r.find(e,function(e){return e.supports(n)});if(o(i))throw new a("Cannot find '"+t+"' pipe supporting object '"+n+"'");return i}},{extend:function(e){return new h(d,{toFactory:function(t){if(o(t))throw new a("Cannot extend Pipes without a parent injector");return d.create(e,t)},deps:[[d,new l,new f]]})},create:function(e){var t=void 0!==arguments[1]?arguments[1]:null;return s(t)&&i.forEach(t.config,function(t,n){if(i.contains(e,n)){var o=e[n];e[n]=o.concat(t)}else e[n]=r.clone(t)}),new d(e)}}),e("Pipes",d),e("Pipes",d=t([u(),c(),n("design:paramtypes",[Object])],d))}}}),System.register("angular2/src/core/application",["angular2/di","angular2/src/facade/lang","angular2/src/dom/browser_adapter","angular2/src/dom/dom_adapter","angular2/src/core/compiler/compiler","angular2/src/reflection/reflection","angular2/change_detection","angular2/src/core/exception_handler","angular2/src/render/dom/compiler/view_loader","angular2/src/render/dom/compiler/style_url_resolver","angular2/src/render/dom/compiler/style_inliner","angular2/src/core/compiler/view_resolver","angular2/src/core/compiler/directive_resolver","angular2/src/facade/collection","angular2/src/facade/async","angular2/src/core/zone/ng_zone","angular2/src/core/life_cycle/life_cycle","angular2/src/render/dom/shadow_dom/shadow_dom_strategy","angular2/src/render/dom/shadow_dom/emulated_unscoped_shadow_dom_strategy","angular2/src/render/xhr","angular2/src/render/xhr_impl","angular2/src/render/dom/events/event_manager","angular2/src/render/dom/events/key_events","angular2/src/render/dom/events/hammer_gestures","angular2/src/core/compiler/component_url_mapper","angular2/src/services/url_resolver","angular2/src/services/app_root_url","angular2/src/core/compiler/dynamic_component_loader","angular2/src/core/testability/testability","angular2/src/core/compiler/view_pool","angular2/src/core/compiler/view_manager","angular2/src/core/compiler/view_manager_utils","angular2/src/core/compiler/view_listener","angular2/src/core/compiler/proto_view_factory","angular2/src/render/api","angular2/src/render/dom/dom_renderer","angular2/src/render/dom/compiler/compiler","angular2/src/core/compiler/view_ref","angular2/src/core/application_tokens"],function(e){"use strict";function t(e){var t=y;return w.isSupported()?t=w:b.isSupported()&&(t=b),[s(re).toValue(f.defaultDoc()),s(ie).toValue(!1),s(ce).toValue(e),s(ae).toFactory(function(t,n,r,i){return t.loadAsRoot(e,null,n).then(function(e){return i.registerApplication(e.location.nativeElement,r),e})},[U,o,z,K]),s(e).toFactory(function(e){return e.then(function(e){return e.instance})},[ae]),s(T).toFactory(function(e){return new T(e,null,u())},[E]),s(B).toFactory(function(e){var t=[new F,new $,new L];return new B(t,e)},[j]),s(N).toFactory(function(e){return new V(e.head)},[re]),ne,oe,s(ee).toAlias(ne),s(te).toAlias(oe),Z,G,s(Q).toValue(1e4),Y,J,X,h,d,D,s(C).toValue(R),s(_).toClass(t),x,A,m,v,E,s(k).toValue(new M),H,W,S,O,U,z,q]}function n(e){var t=function(e,t){var n=I.join(t,"\n\n-----async gap-----\n");throw f.logError(e+"\n\n"+n),e},n=c(e)?e:t,r=new j({enableLongStackTrace:u()});return r.overrideOnErrorHandler(n),r}function r(e){var t=void 0!==arguments[1]?arguments[1]:null,r=void 0!==arguments[2]?arguments[2]:null;l.makeCurrent();var o=P.completer(),s=n(r);return s.run(function(){var n=i(e,t,s),r=P.wrap(function(){return n.get(ae)}),a=function(t){var r=se(t.hostView).changeDetector,i=n.get(T);i.registerWith(s,r),i.tick(),o.resolve(new fe(t,e,n))};P.then(r,a,function(e,t){return o.reject(e,t)})}),o.promise}function i(e,n,r){a(ue)&&(ue=o.resolveAndCreate(le));var i=c(n)?I.concat(t(e),n):t(e);return i.push(s(j).toValue(r)),ue.resolveAndCreateChild(i)}var o,s,a,c,u,l,f,h,d,p,g,m,v,_,y,b,w,C,R,E,x,S,O,D,A,I,P,j,T,N,V,k,M,B,L,$,F,H,W,q,U,K,z,G,Q,Y,J,X,Z,ee,te,ne,re,ie,oe,se,ae,ce,ue,le,fe;return e("bootstrap",r),{setters:[function(e){o=e.Injector,s=e.bind},function(e){a=e.isBlank,c=e.isPresent,u=e.assertionsEnabled},function(e){l=e.BrowserDomAdapter},function(e){f=e.DOM},function(e){h=e.Compiler,d=e.CompilerCache},function(e){p=e.Reflector,g=e.reflector},function(e){m=e.Parser,v=e.Lexer,_=e.ChangeDetection,y=e.DynamicChangeDetection,b=e.JitChangeDetection,w=e.PreGeneratedChangeDetection,C=e.Pipes,R=e.defaultPipes},function(e){E=e.ExceptionHandler},function(e){x=e.ViewLoader},function(e){S=e.StyleUrlResolver},function(e){O=e.StyleInliner},function(e){D=e.ViewResolver},function(e){A=e.DirectiveResolver},function(e){I=e.ListWrapper},function(e){P=e.PromiseWrapper},function(e){j=e.NgZone},function(e){T=e.LifeCycle},function(e){N=e.ShadowDomStrategy},function(e){V=e.EmulatedUnscopedShadowDomStrategy},function(e){k=e.XHR},function(e){M=e.XHRImpl},function(e){B=e.EventManager,L=e.DomEventsPlugin},function(e){$=e.KeyEventsPlugin},function(e){F=e.HammerGesturesPlugin},function(e){H=e.ComponentUrlMapper},function(e){W=e.UrlResolver},function(e){q=e.AppRootUrl},function(e){U=e.DynamicComponentLoader},function(e){K=e.TestabilityRegistry,z=e.Testability},function(e){G=e.AppViewPool,Q=e.APP_VIEW_POOL_CAPACITY},function(e){Y=e.AppViewManager},function(e){J=e.AppViewManagerUtils},function(e){X=e.AppViewListener},function(e){Z=e.ProtoViewFactory},function(e){ee=e.Renderer,te=e.RenderCompiler},function(e){ne=e.DomRenderer,re=e.DOCUMENT_TOKEN,ie=e.DOM_REFLECT_PROPERTIES_AS_ATTRIBUTES},function(e){oe=e.DefaultDomCompiler},function(e){se=e.internalView},function(e){ae=e.appComponentRefPromiseToken,ce=e.appComponentTypeToken}],execute:function(){le=[s(p).toValue(g),K],fe=function(){function e(e,t,n){this._hostComponent=e,this._injector=n,this._hostComponentType=t}return $traceurRuntime.createClass(e,{get hostComponentType(){return this._hostComponentType},get hostComponent(){return this._hostComponent.instance},dispose:function(){this._hostComponent.dispose()},get injector(){return this._injector}},{})}(),e("ApplicationRef",fe)}}}),System.register("angular2/change_detection",["angular2/src/change_detection/parser/ast","angular2/src/change_detection/parser/lexer","angular2/src/change_detection/parser/parser","angular2/src/change_detection/parser/locals","angular2/src/change_detection/exceptions","angular2/src/change_detection/interfaces","angular2/src/change_detection/constants","angular2/src/change_detection/proto_change_detector","angular2/src/change_detection/binding_record","angular2/src/change_detection/directive_record","angular2/src/change_detection/dynamic_change_detector","angular2/src/change_detection/change_detector_ref","angular2/src/change_detection/pipes/pipes","angular2/src/change_detection/change_detection_util","angular2/src/change_detection/pipes/pipe","angular2/src/change_detection/pipes/null_pipe","angular2/src/change_detection/change_detection"],function(e){"use strict";return{setters:[function(t){e("ASTWithSource",t.ASTWithSource),e("AST",t.AST),e("AstTransformer",t.AstTransformer),e("AccessMember",t.AccessMember),e("LiteralArray",t.LiteralArray),e("ImplicitReceiver",t.ImplicitReceiver)},function(t){e("Lexer",t.Lexer)},function(t){e("Parser",t.Parser)},function(t){e("Locals",t.Locals)},function(t){e("DehydratedException",t.DehydratedException),e("ExpressionChangedAfterItHasBeenChecked",t.ExpressionChangedAfterItHasBeenChecked),e("ChangeDetectionError",t.ChangeDetectionError)},function(t){e("ChangeDetection",t.ChangeDetection),e("ChangeDetectorDefinition",t.ChangeDetectorDefinition)},function(t){e("CHECK_ONCE",t.CHECK_ONCE),e("CHECK_ALWAYS",t.CHECK_ALWAYS),e("DETACHED",t.DETACHED),e("CHECKED",t.CHECKED),e("ON_PUSH",t.ON_PUSH),e("DEFAULT",t.DEFAULT)},function(t){e("DynamicProtoChangeDetector",t.DynamicProtoChangeDetector)},function(t){e("BindingRecord",t.BindingRecord)},function(t){e("DirectiveIndex",t.DirectiveIndex),e("DirectiveRecord",t.DirectiveRecord)},function(t){e("DynamicChangeDetector",t.DynamicChangeDetector)},function(t){e("ChangeDetectorRef",t.ChangeDetectorRef)},function(t){e("Pipes",t.Pipes)},function(t){e("uninitialized",t.uninitialized)},function(t){e("WrappedValue",t.WrappedValue),e("BasePipe",t.BasePipe)},function(t){e("NullPipe",t.NullPipe),e("NullPipeFactory",t.NullPipeFactory)},function(t){e("defaultPipes",t.defaultPipes),e("DynamicChangeDetection",t.DynamicChangeDetection),e("JitChangeDetection",t.JitChangeDetection),e("PreGeneratedChangeDetection",t.PreGeneratedChangeDetection),e("preGeneratedProtoDetectors",t.preGeneratedProtoDetectors)}],execute:function(){}}}),System.register("angular2/core",["angular2/src/core/application","angular2/src/core/application_tokens","angular2/src/services/app_root_url","angular2/src/services/url_resolver","angular2/src/core/compiler/component_url_mapper","angular2/src/core/compiler/directive_resolver","angular2/src/core/compiler/compiler","angular2/src/core/compiler/view_manager","angular2/src/core/compiler/query_list","angular2/src/core/compiler/element_ref","angular2/src/core/compiler/template_ref","angular2/src/core/compiler/view_ref","angular2/src/core/compiler/view_container_ref","angular2/src/core/compiler/dynamic_component_loader","angular2/src/core/zone/ng_zone","angular2/src/facade/async"],function(e){"use strict";return{setters:[function(t){e("bootstrap",t.bootstrap),e("ApplicationRef",t.ApplicationRef)},function(t){e("appComponentTypeToken",t.appComponentTypeToken)},function(t){e("AppRootUrl",t.AppRootUrl)},function(t){e("UrlResolver",t.UrlResolver)},function(t){e("ComponentUrlMapper",t.ComponentUrlMapper)},function(t){e("DirectiveResolver",t.DirectiveResolver)},function(t){e("Compiler",t.Compiler)},function(t){e("AppViewManager",t.AppViewManager)},function(t){e("QueryList",t.QueryList)},function(t){e("ElementRef",t.ElementRef)},function(t){e("TemplateRef",t.TemplateRef)},function(t){e("ViewRef",t.ViewRef),e("ProtoViewRef",t.ProtoViewRef)},function(t){e("ViewContainerRef",t.ViewContainerRef)},function(t){e("DynamicComponentLoader",t.DynamicComponentLoader),e("ComponentRef",t.ComponentRef)},function(t){e("NgZone",t.NgZone)},function(t){e("Observable",t.Observable),e("EventEmitter",t.EventEmitter)}],execute:function(){}}}),System.register("angular2/src/core/annotations_impl/annotations",["angular2/src/facade/lang","angular2/src/di/metadata","angular2/change_detection"],function(e){"use strict";var t,n,r,i,o,s,a,c;return{setters:[function(e){r=e.CONST},function(e){i=e.InjectableMetadata},function(e){o=e.DEFAULT}],execute:function(){t=this&&this.__decorate||function(e,t,n,r){if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)return Reflect.decorate(e,t,n,r);switch(arguments.length){case 2:return e.reduceRight(function(e,t){return t&&t(e)||e},t);case 3:return e.reduceRight(function(e,r){return void(r&&r(t,n))},void 0);case 4:return e.reduceRight(function(e,r){return r&&r(t,n,e)||e},r)}},n=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=function(e){function t(){var e,n=void 0!==arguments[0]?arguments[0]:{},r=n.selector,i=n.properties,o=n.events,s=n.host,a=n.lifecycle,c=n.hostInjector,u=n.exportAs,l=void 0===(e=n.compileChildren)?!0:e;$traceurRuntime.superConstructor(t).call(this),this.selector=r,this.properties=i,this.events=o,this.host=s,this.exportAs=u,this.lifecycle=a,this.compileChildren=l,this.hostInjector=c}return $traceurRuntime.createClass(t,{},{},e)}(i),e("Directive",s),e("Directive",s=t([r(),n("design:paramtypes",[Object])],s)),a=function(e){function t(){var e,n,r=void 0!==arguments[0]?arguments[0]:{},i=r.selector,s=r.properties,a=r.events,c=r.host,u=r.exportAs,l=r.lifecycle,f=r.hostInjector,h=r.viewInjector,d=void 0===(e=r.changeDetection)?o:e,p=void 0===(n=r.compileChildren)?!0:n;$traceurRuntime.superConstructor(t).call(this,{selector:i,properties:s,events:a,host:c,exportAs:u,hostInjector:f,lifecycle:l,compileChildren:p}),this.changeDetection=d,this.viewInjector=h}return $traceurRuntime.createClass(t,{},{},e)}(s),e("Component",a),e("Component",a=t([r(),n("design:paramtypes",[Object])],a)),e("LifecycleEvent",c),function(e){e[e.onDestroy=0]="onDestroy",e[e.onChange=1]="onChange",e[e.onCheck=2]="onCheck",e[e.onInit=3]="onInit",e[e.onAllChangesDone=4]="onAllChangesDone"}(c||e("LifecycleEvent",c={}))}}}),System.register("angular2/src/core/annotations/annotations",["angular2/src/core/annotations_impl/annotations"],function(e){"use strict";return{setters:[function(t){e("ComponentAnnotation",t.Component),e("DirectiveAnnotation",t.Directive),e("LifecycleEvent",t.LifecycleEvent)}],execute:function(){}}}),System.register("angular2/annotations",["angular2/src/core/annotations/annotations","angular2/src/core/annotations/view","angular2/src/core/annotations/di","angular2/src/util/decorators","angular2/src/core/annotations/decorators"],function(e){"use strict";return{setters:[function(t){e("ComponentAnnotation",t.ComponentAnnotation),e("DirectiveAnnotation",t.DirectiveAnnotation),e("LifecycleEvent",t.LifecycleEvent)},function(t){e("ViewAnnotation",t.ViewAnnotation)},function(t){e("QueryAnnotation",t.QueryAnnotation),e("AttributeAnnotation",t.AttributeAnnotation)},function(t){e("Class",t.Class)},function(t){e("Attribute",t.Attribute),e("Component",t.Component),e("Directive",t.Directive),e("View",t.View),e("Query",t.Query),e("ViewQuery",t.ViewQuery)}],execute:function(){}}}),System.register("angular2/angular2",["angular2/annotations","angular2/core","angular2/change_detection","angular2/di","angular2/forms","angular2/directives","angular2/http","angular2/src/render/api","angular2/src/render/dom/dom_renderer"],function(e){"use strict";var t={undefined:!0},t={undefined:!0},t={undefined:!0},t={undefined:!0},t={undefined:!0},t={undefined:!0};return{setters:[function(n){Object.keys(n).forEach(function(r){t[r]||e(r,n[r])})},function(n){Object.keys(n).forEach(function(r){t[r]||e(r,n[r])})},function(t){e("DehydratedException",t.DehydratedException),e("ExpressionChangedAfterItHasBeenChecked",t.ExpressionChangedAfterItHasBeenChecked),e("ChangeDetectionError",t.ChangeDetectionError),e("ON_PUSH",t.ON_PUSH),e("DEFAULT",t.DEFAULT),e("ChangeDetectorRef",t.ChangeDetectorRef),e("Pipes",t.Pipes),e("WrappedValue",t.WrappedValue),e("NullPipe",t.NullPipe),e("NullPipeFactory",t.NullPipeFactory),e("defaultPipes",t.defaultPipes),e("BasePipe",t.BasePipe),e("Locals",t.Locals)},function(n){Object.keys(n).forEach(function(r){t[r]||e(r,n[r])})},function(n){e("AbstractControl",n.AbstractControl),e("AbstractControlDirective",n.AbstractControlDirective),e("Control",n.Control),e("ControlGroup",n.ControlGroup),e("ControlArray",n.ControlArray),e("NgControlName",n.NgControlName),e("NgFormControl",n.NgFormControl),e("NgModel",n.NgModel),e("NgControl",n.NgControl),e("NgControlGroup",n.NgControlGroup),e("NgFormModel",n.NgFormModel),e("NgForm",n.NgForm),e("DefaultValueAccessor",n.DefaultValueAccessor),e("CheckboxControlValueAccessor",n.CheckboxControlValueAccessor),e("SelectControlValueAccessor",n.SelectControlValueAccessor),e("formDirectives",n.formDirectives),e("Validators",n.Validators),e("NgValidator",n.NgValidator),e("NgRequiredValidator",n.NgRequiredValidator),e("FormBuilder",n.FormBuilder),e("formInjectables",n.formInjectables),Object.keys(n).forEach(function(r){t[r]||e(r,n[r])})},function(n){Object.keys(n).forEach(function(r){t[r]||e(r,n[r])})},function(n){Object.keys(n).forEach(function(r){t[r]||e(r,n[r])})},function(t){e("Renderer",t.Renderer),e("RenderViewRef",t.RenderViewRef),e("RenderProtoViewRef",t.RenderProtoViewRef),e("RenderFragmentRef",t.RenderFragmentRef),e("RenderViewWithFragments",t.RenderViewWithFragments)},function(t){e("DomRenderer",t.DomRenderer),e("DOCUMENT_TOKEN",t.DOCUMENT_TOKEN),e("DOM_REFLECT_PROPERTIES_AS_ATTRIBUTES",t.DOM_REFLECT_PROPERTIES_AS_ATTRIBUTES)}],execute:function(){}}});
1
+ "format register";System.register("angular2/src/facade/lang",[],!0,function(e,t,r){function n(e){return e.name}function i(){F=!0}function o(){if(F)throw"Cannot enable prod mode after platform setup.";B=!1}function a(){return B}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 L.Promise}function m(e){return Array.isArray(e)}function v(e){return"number"==typeof e}function y(e){return e instanceof t.Date&&!isNaN(e.valueOf())}function _(){}function b(e){if("string"==typeof e)return e;if(void 0===e||null===e)return""+e;if(e.name)return e.name;if(e.overriddenName)return e.overriddenName;var t=e.toString(),r=t.indexOf("\n");return-1===r?t:t.substring(0,r)}function C(e){return e}function w(e,t){return e}function P(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function E(e){return e}function S(e){return u(e)?null:e}function R(e){return u(e)?!1:e}function x(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function O(e){console.log(e)}function D(e,t,r){for(var n=t.split("."),i=e;n.length>1;){var o=n.shift();i=i.hasOwnProperty(o)&&l(i[o])?i[o]:i[o]={}}(void 0===i||null===i)&&(i={}),i[n.shift()]=r}function A(){if(u(X))if(l(Symbol)&&l(Symbol.iterator))X=Symbol.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),t=0;t<e.length;++t){var r=e[t];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&(X=r)}return X}function T(e,t,r,n){var i=r+"\nreturn "+t+"\n//# sourceURL="+e,o=[],a=[];for(var s in n)o.push(s),a.push(n[s]);return(new(Function.bind.apply(Function,[void 0].concat(o.concat(i))))).apply(void 0,a)}function I(e){return!x(e)}function k(e,t){return e.constructor===t}var N=System.global,V=N.define;N.define=void 0;var M,j=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)};M="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:N:window,t.IS_DART=!1;var L=M;t.global=L,t.Type=Function,t.getTypeNameForDebugging=n,t.Math=L.Math,t.Date=L.Date;var B=!0,F=!1;t.lockMode=i,t.enableProdMode=o,t.assertionsEnabled=a,L.assert=function(e){},t.CONST_EXPR=s,t.CONST=c,t.isPresent=l,t.isBlank=u,t.isString=p,t.isFunction=d,t.isType=f,t.isStringMap=h,t.isPromise=g,t.isArray=m,t.isNumber=v,t.isDate=y,t.noop=_,t.stringify=b,t.serializeEnum=C,t.deserializeEnum=w;var W=function(){function e(){}return e.fromCharCode=function(e){return String.fromCharCode(e)},e.charCodeAt=function(e,t){return e.charCodeAt(t)},e.split=function(e,t){return e.split(t)},e.equals=function(e,t){return e===t},e.stripLeft=function(e,t){if(e&&e.length){for(var r=0,n=0;n<e.length&&e[n]==t;n++)r++;e=e.substring(r)}return e},e.stripRight=function(e,t){if(e&&e.length){for(var r=e.length,n=e.length-1;n>=0&&e[n]==t;n--)r--;e=e.substring(0,r)}return e},e.replace=function(e,t,r){return e.replace(t,r)},e.replaceAll=function(e,t,r){return e.replace(t,r)},e.slice=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=null),e.slice(t,null===r?void 0:r)},e.replaceAllMapped=function(e,t,r){return e.replace(t,function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return e.splice(-2,2),r(e)})},e.contains=function(e,t){return-1!=e.indexOf(t)},e.compare=function(e,t){return t>e?-1:e>t?1:0},e}();t.StringWrapper=W;var U=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=U;var H=function(e){function t(t){e.call(this),this.message=t}return j(t,e),t.prototype.toString=function(){return this.message},t}(Error);t.NumberParseError=H;var G=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 H("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 H("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=G,t.RegExp=L.RegExp;var q=function(){function e(){}return e.create=function(e,t){return void 0===t&&(t=""),t=t.replace(/g/g,""),new L.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=q;var K=function(){function e(){}return e.next=function(e){return e.re.exec(e.input)},e}();t.RegExpMatcherWrapper=K;var z=function(){function e(){}return e.apply=function(e,t){return e.apply(null,t)},e}();t.FunctionWrapper=z,t.looseIdentical=P,t.getMapKey=E,t.normalizeBlank=S,t.normalizeBool=R,t.isJsObject=x,t.print=O;var $=function(){function e(){}return e.parse=function(e){return L.JSON.parse(e)},e.stringify=function(e){return L.JSON.stringify(e,null,2)},e}();t.Json=$;var Q=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=Q,t.setValueOnPath=D;var X=null;return t.getSymbolIterator=A,t.evalExpression=T,t.isPrimitive=I,t.hasConstructor=k,N.define=V,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 d=0;d<u.length;d++)l.push(n(u[d]));else p.isFunction(u)?l.push(n(u)):l.push(u)}return f.defineMetadata("parameters",a,i),i}throw new Error("Only Function or Array is supported in Class definition for key '"+t+"' is '"+p.stringify(e)+"'")}function o(e){var t=i(e.hasOwnProperty("constructor")?e.constructor:void 0,"constructor"),r=t.prototype;if(e.hasOwnProperty("extends")){if(!p.isFunction(e["extends"]))throw new Error("Class definition 'extends' property must be a constructor function was: "+p.stringify(e["extends"]));t.prototype=r=Object.create(e["extends"].prototype)}for(var n in e)"extends"!=n&&"prototype"!=n&&e.hasOwnProperty(n)&&(r[n]=i(e[n],n));return this&&this.annotations instanceof Array&&f.defineMetadata("annotations",this.annotations,t),t.name||(t.overriddenName="class"+d++),t}function a(e,t){function r(r){var n=new e(r);if(this instanceof e)return n;var i=p.isFunction(this)&&this.annotations instanceof Array?this.annotations:[];i.push(n);var a=function(e){var t=f.getOwnMetadata("annotations",e);return t=t||[],t.push(n),f.defineMetadata("annotations",t,e),e};return a.annotations=i,a.Class=o,t&&t(a),a}return void 0===t&&(t=null),r.prototype=Object.create(e.prototype),r}function s(e){function t(){function t(e,t,r){var n=f.getMetadata("parameters",e);for(n=n||[];n.length<=r;)n.push(null);n[r]=n[r]||[];var o=n[r];return o.push(i),f.defineMetadata("parameters",n,e),e}for(var r=[],n=0;n<arguments.length;n++)r[n-0]=arguments[n];var i=Object.create(e.prototype);return e.apply(i,r),this instanceof e?i:(t.annotation=i,t)}return t.prototype=Object.create(e.prototype),t}function c(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r-0]=arguments[r];var n=Object.create(e.prototype);return e.apply(n,t),this instanceof e?n:function(e,t){var r=f.getOwnMetadata("propMetadata",e.constructor);r=r||{},r[t]=r[t]||[],r[t].unshift(n),f.defineMetadata("propMetadata",r,e.constructor)}}return t.prototype=Object.create(e.prototype),t}var l=System.global,u=l.define;l.define=void 0;var p=e("angular2/src/facade/lang"),d=0;t.Class=o;var f=p.global.Reflect;if(!f||!f.getMetadata)throw"reflect-metadata shim is required when using class decorators";return t.makeDecorator=a,t.makeParamDecorator=s,t.makePropDecorator=c,l.define=u,r.exports}),System.register("angular2/src/core/di/forward_ref",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e){return e.__forward_ref__=n,e.toString=function(){return s.stringify(this())},e}function i(e){return s.isFunction(e)&&e.hasOwnProperty("__forward_ref__")&&e.__forward_ref__===n?e():e}var o=System.global,a=o.define;o.define=void 0;var s=e("angular2/src/facade/lang");return t.forwardRef=n,t.resolveForwardRef=i,o.define=a,r.exports}),System.register("angular2/src/facade/collection",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e){return c.isJsObject(e)?c.isArray(e)||!(e instanceof t.Map)&&c.getSymbolIterator()in e:!1}function i(e,t,r){for(var n=e[c.getSymbolIterator()](),i=t[c.getSymbolIterator()]();;){var o=n.next(),a=i.next();if(o.done&&a.done)return!0;if(o.done||a.done)return!1;if(!r(o.value,a.value))return!1}}function o(e,t){if(c.isArray(e))for(var r=0;r<e.length;r++)t(e[r]);else for(var n,i=e[c.getSymbolIterator()]();!(n=i.next()).done;)t(n.value)}var a=System.global,s=a.define;a.define=void 0;var c=e("angular2/src/facade/lang");t.Map=c.global.Map,t.Set=c.global.Set;var l=function(){try{if(1===new t.Map([[1,2]]).size)return function(e){return new t.Map(e)}}catch(e){}return function(e){for(var r=new t.Map,n=0;n<e.length;n++){var i=e[n];r.set(i[0],i[1])}return r}}(),u=function(){try{if(new t.Map(new t.Map))return function(e){return new t.Map(e)}}catch(e){}return function(e){var r=new t.Map;return e.forEach(function(e,t){r.set(t,e)}),r}}(),p=function(){return(new t.Map).keys().next?function(e){for(var t,r=e.keys();!(t=r.next()).done;)e.set(t.value,null)}:function(e){e.forEach(function(t,r){e.set(r,null)})}}(),d=function(){try{if((new t.Map).values().next)return function(e,t){return t?Array.from(e.values()):Array.from(e.keys())}}catch(e){}return function(e,t){var r=g.createFixedSize(e.size),n=0;return e.forEach(function(e,i){r[n]=t?e:i,n++}),r}}(),f=function(){function e(){}return e.clone=function(e){return u(e)},e.createFromStringMap=function(e){var r=new t.Map;for(var n in e)r.set(n,e[n]);return r},e.toStringMap=function(e){var t={};return e.forEach(function(e,r){return t[r]=e}),t},e.createFromPairs=function(e){return l(e)},e.clearValues=function(e){p(e)},e.iterable=function(e){return e},e.keys=function(e){return d(e,!1)},e.values=function(e){return d(e,!0)},e}();t.MapWrapper=f;var h=function(){function e(){}return e.create=function(){return{}},e.contains=function(e,t){return e.hasOwnProperty(t)},e.get=function(e,t){return e.hasOwnProperty(t)?e[t]:void 0},e.set=function(e,t,r){e[t]=r},e.keys=function(e){return Object.keys(e)},e.isEmpty=function(e){for(var t in e)return!1;return!0},e["delete"]=function(e,t){delete e[t]},e.forEach=function(e,t){for(var r in e)e.hasOwnProperty(r)&&t(e[r],r)},e.merge=function(e,t){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r},e.equals=function(e,t){var r=Object.keys(e),n=Object.keys(t);if(r.length!=n.length)return!1;for(var i,o=0;o<r.length;o++)if(i=r[o],e[i]!==t[i])return!1;return!0},e}();t.StringMapWrapper=h;var g=function(){function e(){}return e.createFixedSize=function(e){return new Array(e)},e.createGrowableSize=function(e){return new Array(e)},e.clone=function(e){return e.slice(0)},e.forEachWithIndex=function(e,t){for(var r=0;r<e.length;r++)t(e[r],r)},e.first=function(e){return e?e[0]:null},e.last=function(e){return e&&0!=e.length?e[e.length-1]:null},e.indexOf=function(e,t,r){return void 0===r&&(r=0),e.indexOf(t,r)},e.contains=function(e,t){return-1!==e.indexOf(t)},e.reversed=function(t){var r=e.clone(t);return r.reverse()},e.concat=function(e,t){return e.concat(t)},e.insert=function(e,t,r){e.splice(t,0,r)},e.removeAt=function(e,t){var r=e[t];return e.splice(t,1),r},e.removeAll=function(e,t){for(var r=0;r<t.length;++r){var n=e.indexOf(t[r]);e.splice(n,1)}},e.remove=function(e,t){var r=e.indexOf(t);return r>-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;r<e.length;++r)if(e[r]!==t[r])return!1;return!0},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.splice=function(e,t,r){return e.splice(t,r)},e.sort=function(e,t){c.isPresent(t)?e.sort(t):e.sort()},e.toString=function(e){return e.toString()},e.toJSON=function(e){return JSON.stringify(e)},e.maximum=function(e,t){if(0==e.length)return null;for(var r=null,n=-(1/0),i=0;i<e.length;i++){var o=e[i];if(!c.isBlank(o)){var a=t(o);a>n&&(r=o,n=a)}}return r},e}();t.ListWrapper=g,t.isListLikeIterable=n,t.areIterablesEqual=i,t.iterateListLike=o;var m=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;n<e.length;n++)r.add(e[n]);return r}}(),v=function(){function e(){}return e.createFromList=function(e){return m(e)},e.has=function(e,t){return e.has(t)},e["delete"]=function(e,t){e["delete"](t)},e}();return t.SetWrapper=v,a.define=s,r.exports}),System.register("angular2/src/facade/exception_handler",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection"],!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=function(){function e(){this.res=[]}return e.prototype.log=function(e){this.res.push(e)},e.prototype.logError=function(e){this.res.push(e)},e.prototype.logGroup=function(e){this.res.push(e)},e.prototype.logGroupEnd=function(){},e}(),l=function(){function e(e,t){void 0===t&&(t=!0),this._logger=e,this._rethrowException=t}return e.exceptionToString=function(t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var i=new c,o=new e(i,!1);return o.call(t,r,n),i.res.join("\n")},e.prototype.call=function(e,t,r){void 0===t&&(t=null),void 0===r&&(r=null);var n=this._findOriginalException(e),i=this._findOriginalStack(e),a=this._findContext(e);if(this._logger.logGroup("EXCEPTION: "+this._extractMessage(e)),o.isPresent(t)&&o.isBlank(i)&&(this._logger.logError("STACKTRACE:"),this._logger.logError(this._longStackTrace(t))),o.isPresent(r)&&this._logger.logError("REASON: "+r),o.isPresent(n)&&this._logger.logError("ORIGINAL EXCEPTION: "+this._extractMessage(n)),o.isPresent(i)&&(this._logger.logError("ORIGINAL STACKTRACE:"),this._logger.logError(this._longStackTrace(i))),o.isPresent(a)&&(this._logger.logError("ERROR CONTEXT:"),this._logger.logError(a)),this._logger.logGroupEnd(),this._rethrowException)throw e},e.prototype._extractMessage=function(e){return e instanceof a.WrappedException?e.wrapperMessage:e.toString()},e.prototype._longStackTrace=function(e){return s.isListLikeIterable(e)?e.join("\n\n-----async gap-----\n"):e.toString()},e.prototype._findContext=function(e){try{return e instanceof a.WrappedException?o.isPresent(e.context)?e.context:this._findContext(e.originalException):null}catch(t){return null}},e.prototype._findOriginalException=function(e){if(!(e instanceof a.WrappedException))return null;for(var t=e.originalException;t instanceof a.WrappedException&&o.isPresent(t.originalException);)t=t.originalException;return t},e.prototype._findOriginalStack=function(e){if(!(e instanceof a.WrappedException))return null;for(var t=e,r=e.originalStack;t instanceof a.WrappedException&&o.isPresent(t.originalException);)t=t.originalException,t instanceof a.WrappedException&&o.isPresent(t.originalException)&&(r=t.originalStack);return r},e}();return t.ExceptionHandler=l,n.define=i,r.exports}),System.register("angular2/src/core/reflection/reflector",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection"],!0,function(e,t,r){function n(e,t){c.StringMapWrapper.forEach(t,function(t,r){return e.set(r,t)})}var i=System.global,o=i.define;i.define=void 0;var a=e("angular2/src/facade/lang"),s=e("angular2/src/facade/exceptions"),c=e("angular2/src/facade/collection"),l=function(){function e(e,t,r,n,i){this.annotations=e,this.parameters=t,this.factory=r,this.interfaces=n,this.propMetadata=i}return e}();t.ReflectionInfo=l;var u=function(){function e(e){this._injectableInfo=new c.Map,this._getters=new c.Map,this._setters=new c.Map,this._methods=new c.Map,this._usedKeys=null,this.reflectionCapabilities=e}return e.prototype.isReflectionEnabled=function(){return this.reflectionCapabilities.isReflectionEnabled()},e.prototype.trackUsage=function(){this._usedKeys=new c.Set},e.prototype.listUnusedKeys=function(){var e=this;if(null==this._usedKeys)throw new s.BaseException("Usage tracking is disabled");var t=c.MapWrapper.keys(this._injectableInfo);return t.filter(function(t){return!c.SetWrapper.has(e._usedKeys,t)})},e.prototype.registerFunction=function(e,t){this._injectableInfo.set(e,t)},e.prototype.registerType=function(e,t){this._injectableInfo.set(e,t)},e.prototype.registerGetters=function(e){n(this._getters,e)},e.prototype.registerSetters=function(e){n(this._setters,e)},e.prototype.registerMethods=function(e){n(this._methods,e)},e.prototype.factory=function(e){if(this._containsReflectionInfo(e)){var t=this._getReflectionInfo(e).factory;return a.isPresent(t)?t:null}return this.reflectionCapabilities.factory(e)},e.prototype.parameters=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).parameters;return a.isPresent(t)?t:[]}return this.reflectionCapabilities.parameters(e)},e.prototype.annotations=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).annotations;return a.isPresent(t)?t:[]}return this.reflectionCapabilities.annotations(e)},e.prototype.propMetadata=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).propMetadata;return a.isPresent(t)?t:{}}return this.reflectionCapabilities.propMetadata(e)},e.prototype.interfaces=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).interfaces;return a.isPresent(t)?t:[]}return this.reflectionCapabilities.interfaces(e)},e.prototype.getter=function(e){return this._getters.has(e)?this._getters.get(e):this.reflectionCapabilities.getter(e)},e.prototype.setter=function(e){return this._setters.has(e)?this._setters.get(e):this.reflectionCapabilities.setter(e)},e.prototype.method=function(e){return this._methods.has(e)?this._methods.get(e):this.reflectionCapabilities.method(e)},e.prototype._getReflectionInfo=function(e){return a.isPresent(this._usedKeys)&&this._usedKeys.add(e),this._injectableInfo.get(e)},e.prototype._containsReflectionInfo=function(e){return this._injectableInfo.has(e)},e.prototype.importUri=function(e){return this.reflectionCapabilities.importUri(e)},e}();return t.Reflector=u,i.define=o,r.exports}),System.register("angular2/src/core/reflection/reflection_capabilities",["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){this._reflect=o.isPresent(e)?e:o.global.Reflect}return e.prototype.isReflectionEnabled=function(){return!0},e.prototype.factory=function(e){switch(e.length){case 0:return function(){return new e};case 1:return function(t){return new e(t)};case 2:return function(t,r){return new e(t,r)};case 3:return function(t,r,n){return new e(t,r,n)};case 4:return function(t,r,n,i){return new e(t,r,n,i)};case 5:return function(t,r,n,i,o){return new e(t,r,n,i,o)};case 6:return function(t,r,n,i,o,a){return new e(t,r,n,i,o,a)};case 7:return function(t,r,n,i,o,a,s){return new e(t,r,n,i,o,a,s)};case 8:return function(t,r,n,i,o,a,s,c){return new e(t,r,n,i,o,a,s,c)};case 9:return function(t,r,n,i,o,a,s,c,l){return new e(t,r,n,i,o,a,s,c,l)};case 10:return function(t,r,n,i,o,a,s,c,l,u){return new e(t,r,n,i,o,a,s,c,l,u)};case 11:return function(t,r,n,i,o,a,s,c,l,u,p){return new e(t,r,n,i,o,a,s,c,l,u,p)};case 12:return function(t,r,n,i,o,a,s,c,l,u,p,d){return new e(t,r,n,i,o,a,s,c,l,u,p,d)};case 13:return function(t,r,n,i,o,a,s,c,l,u,p,d,f){return new e(t,r,n,i,o,a,s,c,l,u,p,d,f)};case 14:return function(t,r,n,i,o,a,s,c,l,u,p,d,f,h){return new e(t,r,n,i,o,a,s,c,l,u,p,d,f,h)};case 15:return function(t,r,n,i,o,a,s,c,l,u,p,d,f,h,g){return new e(t,r,n,i,o,a,s,c,l,u,p,d,f,h,g)};case 16:return function(t,r,n,i,o,a,s,c,l,u,p,d,f,h,g,m){return new e(t,r,n,i,o,a,s,c,l,u,p,d,f,h,g,m)};case 17:return function(t,r,n,i,o,a,s,c,l,u,p,d,f,h,g,m,v){return new e(t,r,n,i,o,a,s,c,l,u,p,d,f,h,g,m,v)};case 18:return function(t,r,n,i,o,a,s,c,l,u,p,d,f,h,g,m,v,y){return new e(t,r,n,i,o,a,s,c,l,u,p,d,f,h,g,m,v,y)};case 19:return function(t,r,n,i,o,a,s,c,l,u,p,d,f,h,g,m,v,y,_){return new e(t,r,n,i,o,a,s,c,l,u,p,d,f,h,g,m,v,y,_)};case 20:return function(t,r,n,i,o,a,s,c,l,u,p,d,f,h,g,m,v,y,_,b){return new e(t,r,n,i,o,a,s,c,l,u,p,d,f,h,g,m,v,y,_,b)}}throw new Error("Cannot create a factory for '"+o.stringify(e)+"' because its constructor has more than 20 arguments")},e.prototype._zipTypesAndAnnotations=function(e,t){var r;r="undefined"==typeof e?new Array(t.length):new Array(e.length);for(var n=0;n<r.length;n++)"undefined"==typeof e?r[n]=[]:e[n]!=Object?r[n]=[e[n]]:r[n]=[],o.isPresent(t)&&o.isPresent(t[n])&&(r[n]=r[n].concat(t[n]));return r},e.prototype.parameters=function(e){if(o.isPresent(e.parameters))return e.parameters;if(o.isPresent(this._reflect)&&o.isPresent(this._reflect.getMetadata)){var t=this._reflect.getMetadata("parameters",e),r=this._reflect.getMetadata("design:paramtypes",e);if(o.isPresent(r)||o.isPresent(t))return this._zipTypesAndAnnotations(r,t)}var n=new Array(e.length);return n.fill(void 0),n},e.prototype.annotations=function(e){if(o.isPresent(e.annotations)){var t=e.annotations;return o.isFunction(t)&&t.annotations&&(t=t.annotations),t}if(o.isPresent(this._reflect)&&o.isPresent(this._reflect.getMetadata)){var t=this._reflect.getMetadata("annotations",e);if(o.isPresent(t))return t}return[]},e.prototype.propMetadata=function(e){if(o.isPresent(e.propMetadata)){var t=e.propMetadata;return o.isFunction(t)&&t.propMetadata&&(t=t.propMetadata),t}if(o.isPresent(this._reflect)&&o.isPresent(this._reflect.getMetadata)){var t=this._reflect.getMetadata("propMetadata",e);if(o.isPresent(t))return t}return{}},e.prototype.interfaces=function(e){throw new a.BaseException("JavaScript does not support interfaces")},e.prototype.getter=function(e){return new Function("o","return o."+e+";")},e.prototype.setter=function(e){return new Function("o","v","return o."+e+" = v;")},e.prototype.method=function(e){var t="if (!o."+e+") throw new Error('\""+e+"\" is undefined');\n return o."+e+".apply(o, args);";return new Function("o","args",t)},e.prototype.importUri=function(e){return"./"},e}();return t.ReflectionCapabilities=s,n.define=i,r.exports}),System.register("angular2/src/core/di/type_literal",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=function(){function e(){}return Object.defineProperty(e.prototype,"type",{get:function(){throw new Error("Type literals are only supported in Dart")},enumerable:!0,configurable:!0}),e}();return t.TypeLiteral=o,n.define=i,r.exports}),System.register("angular2/src/core/di/exceptions",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/facade/exceptions"],!0,function(e,t,r){function n(e){for(var t=[],r=0;r<e.length;++r){if(c.ListWrapper.contains(t,e[r]))return t.push(e[r]),t;t.push(e[r])}return t}function i(e){if(e.length>1){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 that all the parameters are decorated with Inject or have valid type annotations and that '"+l.stringify(e)+"' is decorated with Injectable."},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;
2
+ if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=e("angular2/src/core/di"),c=e("angular2/src/facade/math"),l=e("angular2/src/platform/dom/dom_adapter"),u=function(){function e(){this.elapsedTimeIncludesDelay=!1,this.doesElapsedTimeIncludesDelay()}return e.prototype.doesElapsedTimeIncludesDelay=function(){var e=this,t=l.DOM.createElement("div");l.DOM.setAttribute(t,"style","position: absolute; top: -9999px; left: -9999px; width: 1px;\n height: 1px; transition: all 1ms linear 1ms;"),this.raf(function(r){l.DOM.on(t,"transitionend",function(r){var n=c.Math.round(1e3*r.elapsedTime);e.elapsedTimeIncludesDelay=2==n,l.DOM.remove(t)}),l.DOM.setStyle(t,"width","2px")},2)},e.prototype.raf=function(e,t){void 0===t&&(t=1);var r=new p(e,t);return function(){return r.cancel()}},e=o([s.Injectable(),a("design:paramtypes",[])],e)}();t.BrowserDetails=u;var p=function(){function e(e,t){this.callback=e,this.frames=t,this._raf()}return e.prototype._raf=function(){var e=this;this.currentFrameId=l.DOM.requestAnimationFrame(function(t){return e._nextFrame(t)})},e.prototype._nextFrame=function(e){this.frames--,this.frames>0?this._raf():this.callback(e)},e.prototype.cancel=function(){l.DOM.cancelAnimationFrame(this.currentFrameId),this.currentFrameId=null},e}();return n.define=i,r.exports}),System.register("angular2/src/platform/dom/dom_tokens",["angular2/src/core/di","angular2/src/facade/lang"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/di"),a=e("angular2/src/facade/lang");return t.DOCUMENT=a.CONST_EXPR(new o.OpaqueToken("DocumentToken")),n.define=i,r.exports}),System.register("angular2/src/facade/promise",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=function(){function e(){}return e.resolve=function(e){return Promise.resolve(e)},e.reject=function(e,t){return Promise.reject(e)},e.catchError=function(e,t){return e["catch"](t)},e.all=function(e){return 0==e.length?Promise.resolve([]):Promise.all(e)},e.then=function(e,t,r){return e.then(t,r)},e.wrap=function(e){return new Promise(function(t,r){try{t(e())}catch(n){r(n)}})},e.scheduleMicrotask=function(t){e.then(e.resolve(null),t,function(e){})},e.isPromise=function(e){return e instanceof Promise},e.completer=function(){var e,t,r=new Promise(function(r,n){e=r,t=n});return{promise:r,resolve:e,reject:t}},e}();return t.PromiseWrapper=o,n.define=i,r.exports}),System.register("angular2/src/core/profile/wtf_impl",["angular2/src/facade/lang"],!0,function(e,t,r){function n(){var e=d.global.wtf;return e&&(u=e.trace)?(p=u.events,!0):!1}function i(e,t){return void 0===t&&(t=null),p.createScope(e,t)}function o(e,t){return u.leaveScope(e,t),t}function a(e,t){return u.beginTimeRange(e,t)}function s(e){u.endTimeRange(e)}var c=System.global,l=c.define;c.define=void 0;var u,p,d=e("angular2/src/facade/lang");return t.detectWTF=n,t.createScope=i,t.leave=o,t.startTimeRange=a,t.endTimeRange=s,c.define=l,r.exports}),System.register("angular2/src/core/metadata/di",["angular2/src/facade/lang","angular2/src/core/di","angular2/src/core/di/metadata"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=e("angular2/src/facade/lang"),l=e("angular2/src/core/di"),u=e("angular2/src/core/di/metadata"),p=function(e){function t(t){e.call(this),this.attributeName=t}return o(t,e),Object.defineProperty(t.prototype,"token",{get:function(){return this},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"@Attribute("+c.stringify(this.attributeName)+")"},t=a([c.CONST(),s("design:paramtypes",[String])],t)}(u.DependencyMetadata);t.AttributeMetadata=p;var d=function(e){function t(t,r){var n=void 0===r?{}:r,i=n.descendants,o=void 0===i?!1:i,a=n.first,s=void 0===a?!1:a;e.call(this),this._selector=t,this.descendants=o,this.first=s}return o(t,e),Object.defineProperty(t.prototype,"isViewQuery",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selector",{get:function(){return l.resolveForwardRef(this._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,t){return new f(t)},e=o([s.CONST(),a("design:paramtypes",[])],e)}();t.DefaultIterableDifferFactory=p;var d=function(e,t){return t},f=function(){function e(e){this._trackByFn=e,this._length=null,this._collection=null,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=u.isPresent(this._trackByFn)?this._trackByFn:d}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.forEachIdentityChange=function(e){var t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)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,o=this._itHead,a=!1;if(u.isArray(e)){var s=e;for(this._length=e.length,r=0;r<this._length;r++)n=s[r],i=this._trackByFn(r,n),null!==o&&u.looseIdentical(o.trackById,i)?(a&&(o=this._verifyReinsertion(o,n,i,r)),u.looseIdentical(o.item,n)||this._addIdentityChange(o,n)):(o=this._mismatch(o,n,i,r),a=!0),o=o._next}else r=0,l.iterateListLike(e,function(e){i=t._trackByFn(r,e),null!==o&&u.looseIdentical(o.trackById,i)?(a&&(o=t._verifyReinsertion(o,e,i,r)),u.looseIdentical(o.item,e)||t._addIdentityChange(o,e)):(o=t._mismatch(o,e,i,r),a=!0),o=o._next,r++}),this._length=r;return this._truncate(o),this._collection=e,this.isDirty},Object.defineProperty(e.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead},enumerable:!0,configurable:!0}),e.prototype._reset=function(){if(this.isDirty){var e,t;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=t)e.previousIndex=e.currentIndex,t=e._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}},e.prototype._mismatch=function(e,t,r,n){var i;return null===e?i=this._itTail:(i=e._prev,this._remove(e)),e=null===this._linkedRecords?null:this._linkedRecords.get(r,n),null!==e?(u.looseIdentical(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,i,n)):(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r),null!==e?(u.looseIdentical(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,i,n)):e=this._addAfter(new h(t,r),i,n)),e},e.prototype._verifyReinsertion=function(e,t,r,n){var i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r);return null!==i?e=this._reinsertAfter(i,e._prev,n):e.currentIndex!=n&&(e.currentIndex=n,this._addToMoves(e,n)),e},e.prototype._truncate=function(e){for(;null!==e;){var t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null)},e.prototype._reinsertAfter=function(e,t,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);var n=e._prevRemoved,i=e._nextRemoved;return null===n?this._removalsHead=i:n._nextRemoved=i,null===i?this._removalsTail=n:i._prevRemoved=n,this._insertAfter(e,t,r),this._addToMoves(e,r),e},e.prototype._moveAfter=function(e,t,r){return this._unlink(e),this._insertAfter(e,t,r),this._addToMoves(e,r),e},e.prototype._addAfter=function(e,t,r){return this._insertAfter(e,t,r),null===this._additionsTail?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e},e.prototype._insertAfter=function(e,t,r){var n=null===t?this._itHead:t._next;return e._next=n,e._prev=t,null===n?this._itTail=e:n._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new m),this._linkedRecords.put(e),e.currentIndex=r,e},e.prototype._remove=function(e){return this._addToRemovals(this._unlink(e))},e.prototype._unlink=function(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);var t=e._prev,r=e._next;return null===t?this._itHead=r:t._next=r,null===r?this._itTail=t:r._prev=t,e},e.prototype._addToMoves=function(e,t){return e.previousIndex===t?e:(null===this._movesTail?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e,e)},e.prototype._addToRemovals=function(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new m),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e},e.prototype._addIdentityChange=function(e,t){return e.item=t,null===this._identityChangesTail?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e},e.prototype.toString=function(){var e=[];this.forEachItem(function(t){return e.push(t)});var t=[];this.forEachPreviousItem(function(e){return t.push(e)});var r=[];this.forEachAddedItem(function(e){return r.push(e)});var n=[];this.forEachMovedItem(function(e){return n.push(e)});var i=[];this.forEachRemovedItem(function(e){return i.push(e)});var o=[];return this.forEachIdentityChange(function(e){return o.push(e)}),"collection: "+e.join(", ")+"\nprevious: "+t.join(", ")+"\nadditions: "+r.join(", ")+"\nmoves: "+n.join(", ")+"\nremovals: "+i.join(", ")+"\nidentityChanges: "+o.join(", ")+"\n"},e}();t.DefaultIterableDiffer=f;var h=function(){function e(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}return e.prototype.toString=function(){return this.previousIndex===this.currentIndex?u.stringify(this.item):u.stringify(this.item)+"["+u.stringify(this.previousIndex)+"->"+u.stringify(this.currentIndex)+"]"},e}();t.CollectionChangeRecord=h;var g=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||t<r.currentIndex)&&u.looseIdentical(r.trackById,e))return r;return null},e.prototype.remove=function(e){var t=e._prevDup,r=e._nextDup;return null===t?this._head=r:t._nextDup=r,null===r?this._tail=t:r._prevDup=t,null===this._head},e}(),m=function(){function e(){this.map=new Map}return e.prototype.put=function(e){var t=u.getMapKey(e.trackById),r=this.map.get(t);u.isPresent(r)||(r=new g,this.map.set(t,r)),r.add(e)},e.prototype.get=function(e,t){void 0===t&&(t=null);var r=u.getMapKey(e),n=this.map.get(r);return u.isBlank(n)?null:n.get(e,t)},e.prototype.remove=function(e){var t=u.getMapKey(e.trackById),r=this.map.get(t);return r.remove(e)&&this.map["delete"](t),e},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.map.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.map.clear()},e.prototype.toString=function(){return"_DuplicateMap("+u.stringify(this.map)+")"},e}();return n.define=i,r.exports}),System.register("angular2/src/core/change_detection/differs/keyvalue_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 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 A=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=A;var T=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){
3
+ 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<e.length;++r)t[r]=e[r].visit(this);return t},e.prototype.visitChain=function(e){return new p(this.visitAll(e.expressions))},e.prototype.visitQuote=function(e){return new c(e.prefix,e.uninterpretedExpression,e.location)},e}();return t.AstTransformer=T,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/parser/lexer",["angular2/src/core/di/decorators","angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/facade/exceptions"],!0,function(e,t,r){function n(e,t){return new O(e,R.Character,t,E.StringWrapper.fromCharCode(t))}function i(e,t){return new O(e,R.Identifier,0,t)}function o(e,t){return new O(e,R.Keyword,0,t)}function a(e,t){return new O(e,R.Operator,0,t)}function s(e,t){return new O(e,R.String,0,t)}function c(e,t){return new O(e,R.Number,t,"")}function l(e){return e>=t.$TAB&&e<=t.$SPACE||e==q}function u(e){return e>=M&&G>=e||e>=T&&k>=e||e==V||e==t.$$}function p(e){if(0==e.length)return!1;var r=new z(e);if(!u(r.peek))return!1;for(r.advance();r.peek!==t.$EOF;){if(!d(r.peek))return!1;r.advance()}return!0}function d(e){return e>=M&&G>=e||e>=T&&k>=e||e>=D&&A>=e||e==V||e==t.$$}function f(e){return e>=D&&A>=e}function h(e){return e==j||e==I}function g(e){return e==t.$MINUS||e==t.$PLUS}function m(e){switch(e){case B:return t.$LF;case L:return t.$FF;case F:return t.$CR;case W:return t.$TAB;case H:return t.$VTAB;default:return e}}var v=System.global,y=v.define;v.define=void 0;var _=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},b=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},C=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},w=e("angular2/src/core/di/decorators"),P=e("angular2/src/facade/collection"),E=e("angular2/src/facade/lang"),S=e("angular2/src/facade/exceptions");!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.Keyword=2]="Keyword",e[e.String=3]="String",e[e.Operator=4]="Operator",e[e.Number=5]="Number"}(t.TokenType||(t.TokenType={}));var R=t.TokenType,x=function(){function e(){}return e.prototype.tokenize=function(e){for(var t=new z(e),r=[],n=t.scanToken();null!=n;)r.push(n),n=t.scanToken();return r},e=b([w.Injectable(),C("design:paramtypes",[])],e)}();t.Lexer=x;var O=function(){function e(e,t,r,n){this.index=e,this.type=t,this.numValue=r,this.strValue=n}return e.prototype.isCharacter=function(e){return this.type==R.Character&&this.numValue==e},e.prototype.isNumber=function(){return this.type==R.Number},e.prototype.isString=function(){return this.type==R.String},e.prototype.isOperator=function(e){return this.type==R.Operator&&this.strValue==e},e.prototype.isIdentifier=function(){return this.type==R.Identifier},e.prototype.isKeyword=function(){return this.type==R.Keyword},e.prototype.isKeywordVar=function(){return this.type==R.Keyword&&"var"==this.strValue},e.prototype.isKeywordNull=function(){return this.type==R.Keyword&&"null"==this.strValue},e.prototype.isKeywordUndefined=function(){return this.type==R.Keyword&&"undefined"==this.strValue},e.prototype.isKeywordTrue=function(){return this.type==R.Keyword&&"true"==this.strValue},e.prototype.isKeywordFalse=function(){return this.type==R.Keyword&&"false"==this.strValue},e.prototype.toNumber=function(){return this.type==R.Number?this.numValue:-1},e.prototype.toString=function(){switch(this.type){case R.Character:case R.Identifier:case R.Keyword:case R.Operator:case R.String:return this.strValue;case R.Number:return this.numValue.toString();default:return null}},e}();t.Token=O,t.EOF=new O(-1,R.Character,0,""),t.$EOF=0,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63;var D=48,A=57,T=65,I=69,k=90;t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93;var N=94,V=95,M=97,j=101,L=102,B=110,F=114,W=116,U=117,H=118,G=122;t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125;var q=160,K=function(e){function t(t){e.call(this),this.message=t}return _(t,e),t.prototype.toString=function(){return this.message},t}(S.BaseException);t.ScannerError=K;var z=function(){function e(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 q: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 this.advance(),n(e,t)},e.prototype.scanOperator=function(e,t){return this.advance(),a(e,t)},e.prototype.scanComplexOperator=function(e,t,r,n,i,o){this.advance();var s=t;return this.peek==r&&(this.advance(),s+=n),E.isPresent(i)&&this.peek==i&&(this.advance(),s+=o),a(e,s)},e.prototype.scanIdentifier=function(){var e=this.index;for(this.advance();d(this.peek);)this.advance();var t=this.input.substring(e,this.index);return P.SetWrapper.has($,t)?o(e,t):i(e,t)},e.prototype.scanNumber=function(e){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(){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(["+","-","*","/","%","^","=","==","!=","===","!==","<",">","<=",">=","&&","||","&","|","!","?","#","?."]),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=/\{\{([\s\S]*?)\}\}/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;o<r.length;o++){var a=r[o];if(o%2===0)n.push(a);else{if(!(a.trim().length>0))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<this.tokens.length?this.tokens[t]:d.EOF},Object.defineProperty(e.prototype,"next",{get:function(){return this.peek(0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputIndex",{get:function(){return this.index<this.tokens.length?this.next.index:this.input.length},enumerable:!0,configurable:!0}),e.prototype.advance=function(){this.index++},e.prototype.optionalCharacter=function(e){return this.next.isCharacter(e)?(this.advance(),!0):!1},e.prototype.optionalKeywordVar=function(){return this.peekKeywordVar()?(this.advance(),!0):!1},e.prototype.peekKeywordVar=function(){return this.next.isKeywordVar()||this.next.isOperator("#")},e.prototype.expectCharacter=function(e){this.optionalCharacter(e)||this.error("Missing expected "+l.StringWrapper.fromCharCode(e))},e.prototype.optionalOperator=function(e){return this.next.isOperator(e)?(this.advance(),!0):!1},e.prototype.expectOperator=function(e){this.optionalOperator(e)||this.error("Missing expected operator "+e)},e.prototype.expectIdentifierOrKeyword=function(){var e=this.next;return e.isIdentifier()||e.isKeyword()||this.error("Unexpected token "+e+", expected identifier or keyword"),this.advance(),e.toString()},e.prototype.expectIdentifierOrKeywordOrString=function(){var e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()||this.error("Unexpected token "+e+", expected identifier, keyword, or string"),this.advance(),e.toString()},e.prototype.parseChain=function(){for(var e=[];this.index<this.tokens.length;){var t=this.parsePipe();if(e.push(t),this.optionalCharacter(d.$SEMICOLON))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.optionalCharacter(d.$SEMICOLON););else this.index<this.tokens.length&&this.error("Unexpected token '"+this.next+"'")}return 0==e.length?new h.EmptyExpr:1==e.length?e[0]:new h.Chain(e)},e.prototype.parsePipe=function(){var e=this.parseExpression();if(this.optionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{for(var t=this.expectIdentifierOrKeyword(),r=[];this.optionalCharacter(d.$COLON);)r.push(this.parseExpression());e=new h.BindingPipe(e,t,r)}while(this.optionalOperator("|"))}return e},e.prototype.parseExpression=function(){return this.parseConditional()},e.prototype.parseConditional=function(){var e=this.inputIndex,t=this.parseLogicalOr();if(this.optionalOperator("?")){var r=this.parsePipe();if(!this.optionalCharacter(d.$COLON)){var n=this.inputIndex,i=this.input.substring(e,n);this.error("Conditional expression "+i+" requires all 3 expressions")}var o=this.parsePipe();return new h.Conditional(t,r,o)}return t},e.prototype.parseLogicalOr=function(){for(var e=this.parseLogicalAnd();this.optionalOperator("||");)e=new h.Binary("||",e,this.parseLogicalAnd());return e},e.prototype.parseLogicalAnd=function(){for(var e=this.parseEquality();this.optionalOperator("&&");)e=new h.Binary("&&",e,this.parseEquality());return e},e.prototype.parseEquality=function(){for(var e=this.parseRelational();;)if(this.optionalOperator("=="))e=new h.Binary("==",e,this.parseRelational());else if(this.optionalOperator("==="))e=new h.Binary("===",e,this.parseRelational());else if(this.optionalOperator("!="))e=new h.Binary("!=",e,this.parseRelational());else{if(!this.optionalOperator("!=="))return e;e=new h.Binary("!==",e,this.parseRelational())}},e.prototype.parseRelational=function(){for(var e=this.parseAdditive();;)if(this.optionalOperator("<"))e=new h.Binary("<",e,this.parseAdditive());else if(this.optionalOperator(">"))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.index<this.tokens.length&&!this.next.isCharacter(d.$RBRACE);){var t=this.parseExpression();if(e.push(t),this.optionalCharacter(d.$SEMICOLON))for(;this.optionalCharacter(d.$SEMICOLON););}return 0==e.length?new h.EmptyExpr:1==e.length?e[0]:new h.Chain(e)},e.prototype.expectTemplateBindingKey=function(){var e="",t=!1;do e+=this.expectIdentifierOrKeywordOrString(),t=this.optionalOperator("-"),t&&(e+="-");while(t);return e.toString()},e.prototype.parseTemplateBindings=function(){for(var e=[],t=null;this.index<this.tokens.length;){var r=this.optionalKeywordVar(),n=this.expectTemplateBindingKey();r||(null==t?t=n:n=t+n[0].toUpperCase()+n.substring(1)),this.optionalCharacter(d.$COLON);var i=null,o=null;if(r)i=this.optionalOperator("=")?this.expectTemplateBindingKey():"$implicit";else if(this.next!==d.EOF&&!this.peekKeywordVar()){var a=this.inputIndex,s=this.parsePipe(),c=this.input.substring(a,this.inputIndex);o=new h.ASTWithSource(s,c,this.location)}e.push(new h.TemplateBinding(n,r,i,o)),this.optionalCharacter(d.$SEMICOLON)||this.optionalCharacter(d.$COMMA)}return e},e.prototype.error=function(e,t){void 0===t&&(t=null),l.isBlank(t)&&(t=this.index);var r=t<this.tokens.length?"at column "+(this.tokens[t].index+1)+" in":"at the end of the expression";throw new v(e,this.input,r,this.location)},e}();t._ParseAST=_;var b=function(){function e(){this.simple=!0}return e.check=function(t){var r=new e;return t.visit(r),r.simple},e.prototype.visitImplicitReceiver=function(e){},e.prototype.visitInterpolation=function(e){this.simple=!1},e.prototype.visitLiteralPrimitive=function(e){},e.prototype.visitPropertyRead=function(e){},e.prototype.visitPropertyWrite=function(e){this.simple=!1},e.prototype.visitSafePropertyRead=function(e){this.simple=!1},e.prototype.visitMethodCall=function(e){this.simple=!1},e.prototype.visitSafeMethodCall=function(e){this.simple=!1},e.prototype.visitFunctionCall=function(e){this.simple=!1},e.prototype.visitLiteralArray=function(e){this.visitAll(e.expressions)},e.prototype.visitLiteralMap=function(e){this.visitAll(e.values)},e.prototype.visitBinary=function(e){this.simple=!1},e.prototype.visitPrefixNot=function(e){this.simple=!1},e.prototype.visitConditional=function(e){this.simple=!1},e.prototype.visitPipe=function(e){this.simple=!1},e.prototype.visitKeyedRead=function(e){this.simple=!1},e.prototype.visitKeyedWrite=function(e){this.simple=!1},e.prototype.visitAll=function(e){for(var t=p.ListWrapper.createFixedSize(e.length),r=0;r<e.length;++r)t[r]=e[r].visit(this);return t},e.prototype.visitChain=function(e){this.simple=!1},e.prototype.visitQuote=function(e){this.simple=!1},e}();return n.define=i,r.exports}),System.register("angular2/src/core/change_detection/parser/locals",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection"],!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=function(){function e(e,t){this.parent=e,this.current=t}return e.prototype.contains=function(e){return this.current.has(e)?!0:o.isPresent(this.parent)?this.parent.contains(e):!1},e.prototype.get=function(e){if(this.current.has(e))return this.current.get(e);if(o.isPresent(this.parent))return this.parent.get(e);throw new a.BaseException("Cannot find '"+e+"'")},e.prototype.set=function(e,t){if(!this.current.has(e))throw new a.BaseException("Setting of new keys post-construction is not supported. Key: "+e+".");this.current.set(e,t)},e.prototype.clearLocalValues=function(){s.MapWrapper.clearValues(this.current)},e}();return t.Locals=c,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/exceptions",["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(e){function t(t,r,n,i){e.call(this,"Expression '"+t+"' has changed after it was checked. "+("Previous value: '"+r+"'. Current value: '"+n+"'"))}return o(t,e),t}(a.BaseException);t.ExpressionChangedAfterItHasBeenCheckedException=s;var c=function(e){function t(t,r,n,i){e.call(this,r+" in ["+t+"]",r,n,i),this.location=t}return o(t,e),t}(a.WrappedException);t.ChangeDetectionError=c;var l=function(e){function t(t){e.call(this,"Attempt to use a dehydrated detector: "+t)}return o(t,e),t}(a.BaseException);t.DehydratedException=l;var u=function(e){function t(t,r,n,i){e.call(this,'Error during evaluation of "'+t+'"',r,n,i)}return o(t,e),t}(a.WrappedException);t.EventEvaluationError=u;var p=function(){function e(e,t,r,n,i){this.element=e,this.componentElement=t,this.context=r,this.locals=n,this.injector=i}return e}();return t.EventEvaluationErrorContext=p,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/interfaces",[],!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,i,o){this.element=e,this.componentElement=t,this.directive=r,this.context=n,this.locals=i,this.injector=o}return e}();t.DebugContext=o;var a=function(){function e(e,t,r){this.genDebugInfo=e,this.logBindingUpdate=t,this.useJit=r}return e}();t.ChangeDetectorGenConfig=a;var s=function(){function e(e,t,r,n,i,o,a){this.id=e,this.strategy=t,this.variableNames=r,this.bindingRecords=n,this.eventRecords=i,this.directiveRecords=o,this.genConfig=a}return e}();return t.ChangeDetectorDefinition=s,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/constants",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e){return a.isBlank(e)||e===c.Default}var i=System.global,o=i.define;i.define=void 0;var a=e("angular2/src/facade/lang");!function(e){e[e.NeverChecked=0]="NeverChecked",e[e.CheckedBefore=1]="CheckedBefore",e[e.Errored=2]="Errored"}(t.ChangeDetectorState||(t.ChangeDetectorState={}));var s=t.ChangeDetectorState;!function(e){e[e.CheckOnce=0]="CheckOnce",e[e.Checked=1]="Checked",e[e.CheckAlways=2]="CheckAlways",e[e.Detached=3]="Detached",e[e.OnPush=4]="OnPush",e[e.Default=5]="Default",e[e.OnPushObserve=6]="OnPushObserve"}(t.ChangeDetectionStrategy||(t.ChangeDetectionStrategy={}));var c=t.ChangeDetectionStrategy;return t.CHANGE_DETECTION_STRATEGY_VALUES=[c.CheckOnce,c.Checked,c.CheckAlways,c.Detached,c.OnPush,c.Default,c.OnPushObserve],t.CHANGE_DETECTOR_STATE_VALUES=[s.NeverChecked,s.CheckedBefore,s.Errored],t.isDefaultChangeDetectionStrategy=n,i.define=o,r.exports}),System.register("angular2/src/core/change_detection/pipe_lifecycle_reflector",[],!0,function(e,t,r){function n(e){return e.constructor.prototype.ngOnDestroy}var i=System.global,o=i.define;return i.define=void 0,t.implementsOnDestroy=n,i.define=o,r.exports}),System.register("angular2/src/core/change_detection/binding_record",["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"),a="directiveLifecycle",s="native",c="directive",l="elementProperty",u="elementAttribute",p="elementClass",d="elementStyle",f="textNode",h="event",g="hostEvent",m=function(){function e(e,t,r,n,i){this.mode=e,this.elementIndex=t,this.name=r,this.unit=n,this.debug=i}return e.prototype.isDirective=function(){return this.mode===c},e.prototype.isElementProperty=function(){return this.mode===l},e.prototype.isElementAttribute=function(){return this.mode===u},e.prototype.isElementClass=function(){return this.mode===p},e.prototype.isElementStyle=function(){return this.mode===d},e.prototype.isTextNode=function(){return this.mode===f},e}();t.BindingTarget=m;var v=function(){function e(e,t,r,n,i,o,a){this.mode=e,this.target=t,this.implicitReceiver=r,this.ast=n,this.setter=i,this.lifecycleEvent=o,this.directiveRecord=a}return e.prototype.isDirectiveLifecycle=function(){return this.mode===a},e.prototype.callOnChanges=function(){return o.isPresent(this.directiveRecord)&&this.directiveRecord.callOnChanges},e.prototype.isDefaultChangeDetection=function(){return o.isBlank(this.directiveRecord)||this.directiveRecord.isDefaultChangeDetection()},e.createDirectiveDoCheck=function(t){return new e(a,null,0,null,null,"DoCheck",t)},e.createDirectiveOnInit=function(t){return new e(a,null,0,null,null,"OnInit",t)},e.createDirectiveOnChanges=function(t){return new e(a,null,0,null,null,"OnChanges",t)},e.createForDirective=function(t,r,n,i){var o=i.directiveIndex.elementIndex,a=new m(c,o,r,null,t.toString());return new e(c,a,0,t,n,null,i)},e.createForElementProperty=function(t,r,n){var i=new m(l,r,n,null,t.toString());return new e(s,i,0,t,null,null,null)},e.createForElementAttribute=function(t,r,n){var i=new m(u,r,n,null,t.toString());return new e(s,i,0,t,null,null,null)},e.createForElementClass=function(t,r,n){var i=new m(p,r,n,null,t.toString());return new e(s,i,0,t,null,null,null)},e.createForElementStyle=function(t,r,n,i){var o=new m(d,r,n,i,t.toString());return new e(s,o,0,t,null,null,null)},e.createForHostProperty=function(t,r,n){var i=new m(l,t.elementIndex,n,null,r.toString());return new e(s,i,t,r,null,null,null)},e.createForHostAttribute=function(t,r,n){var i=new m(u,t.elementIndex,n,null,r.toString());return new e(s,i,t,r,null,null,null)},e.createForHostClass=function(t,r,n){var i=new m(p,t.elementIndex,n,null,r.toString());return new e(s,i,t,r,null,null,null)},e.createForHostStyle=function(t,r,n,i){var o=new m(d,t.elementIndex,n,i,r.toString());return new e(s,o,t,r,null,null,null)},e.createForTextNode=function(t,r){var n=new m(f,r,null,null,t.toString());return new e(s,n,0,t,null,null,null)},e.createForEvent=function(t,r,n){var i=new m(h,n,r,null,t.toString());return new e(h,i,0,t,null,null,null)},e.createForHostEvent=function(t,r,n){var i=n.directiveIndex,o=new m(g,i.elementIndex,r,null,t.toString());return new e(g,o,i,t,null,null,n)},e}();return t.BindingRecord=v,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/directive_record",["angular2/src/facade/lang","angular2/src/core/change_detection/constants"],!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/core/change_detection/constants"),s=function(){function e(e,t){this.elementIndex=e,this.directiveIndex=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.elementIndex+"_"+this.directiveIndex},enumerable:!0,configurable:!0}),e}();t.DirectiveIndex=s;var c=function(){function e(e){var t=void 0===e?{}:e,r=t.directiveIndex,n=t.callAfterContentInit,i=t.callAfterContentChecked,a=t.callAfterViewInit,s=t.callAfterViewChecked,c=t.callOnChanges,l=t.callDoCheck,u=t.callOnInit,p=t.callOnDestroy,d=t.changeDetection,f=t.outputs;
4
+ this.directiveIndex=r,this.callAfterContentInit=o.normalizeBool(n),this.callAfterContentChecked=o.normalizeBool(i),this.callOnChanges=o.normalizeBool(c),this.callAfterViewInit=o.normalizeBool(a),this.callAfterViewChecked=o.normalizeBool(s),this.callDoCheck=o.normalizeBool(l),this.callOnInit=o.normalizeBool(u),this.callOnDestroy=o.normalizeBool(p),this.changeDetection=d,this.outputs=f}return e.prototype.isDefaultChangeDetection=function(){return a.isDefaultChangeDetectionStrategy(this.changeDetection)},e}();return t.DirectiveRecord=c,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/change_detector_ref",["angular2/src/core/change_detection/constants"],!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/change_detection/constants"),s=function(){function e(){}return e}();t.ChangeDetectorRef=s;var c=function(e){function t(t){e.call(this),this._cd=t}return o(t,e),t.prototype.markForCheck=function(){this._cd.markPathToRootAsCheckOnce()},t.prototype.detach=function(){this._cd.mode=a.ChangeDetectionStrategy.Detached},t.prototype.detectChanges=function(){this._cd.detectChanges()},t.prototype.checkNoChanges=function(){this._cd.checkNoChanges()},t.prototype.reattach=function(){this._cd.mode=a.ChangeDetectionStrategy.CheckAlways,this.markForCheck()},t}(s);return t.ChangeDetectorRef_=c,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/observable_facade",[],!0,function(e,t,r){function n(e){return!1}var i=System.global,o=i.define;return i.define=void 0,t.isObservable=n,i.define=o,r.exports}),System.register("angular2/src/core/change_detection/proto_record",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0,function(e){e[e.Self=0]="Self",e[e.Const=1]="Const",e[e.PrimitiveOp=2]="PrimitiveOp",e[e.PropertyRead=3]="PropertyRead",e[e.PropertyWrite=4]="PropertyWrite",e[e.Local=5]="Local",e[e.InvokeMethod=6]="InvokeMethod",e[e.InvokeClosure=7]="InvokeClosure",e[e.KeyedRead=8]="KeyedRead",e[e.KeyedWrite=9]="KeyedWrite",e[e.Pipe=10]="Pipe",e[e.Interpolate=11]="Interpolate",e[e.SafeProperty=12]="SafeProperty",e[e.CollectionLiteral=13]="CollectionLiteral",e[e.SafeMethodInvoke=14]="SafeMethodInvoke",e[e.DirectiveLifecycle=15]="DirectiveLifecycle",e[e.Chain=16]="Chain",e[e.SkipRecordsIf=17]="SkipRecordsIf",e[e.SkipRecordsIfNot=18]="SkipRecordsIfNot",e[e.SkipRecords=19]="SkipRecords"}(t.RecordType||(t.RecordType={}));var o=t.RecordType,a=function(){function e(e,t,r,n,i,o,a,s,c,l,u,p,d,f){this.mode=e,this.name=t,this.funcOrValue=r,this.args=n,this.fixedArgs=i,this.contextIndex=o,this.directiveIndex=a,this.selfIndex=s,this.bindingRecord=c,this.lastInBinding=l,this.lastInDirective=u,this.argumentToPureFunction=p,this.referencedBySelf=d,this.propertyBindingIndex=f}return e.prototype.isPureFunction=function(){return this.mode===o.Interpolate||this.mode===o.CollectionLiteral},e.prototype.isUsedByOtherRecord=function(){return!this.lastInBinding||this.referencedBySelf},e.prototype.shouldBeChecked=function(){return this.argumentToPureFunction||this.lastInBinding||this.isPureFunction()||this.isPipeRecord()},e.prototype.isPipeRecord=function(){return this.mode===o.Pipe},e.prototype.isConditionalSkipRecord=function(){return this.mode===o.SkipRecordsIfNot||this.mode===o.SkipRecordsIf},e.prototype.isUnconditionalSkipRecord=function(){return this.mode===o.SkipRecords},e.prototype.isSkipRecord=function(){return this.isConditionalSkipRecord()||this.isUnconditionalSkipRecord()},e.prototype.isLifeCycleRecord=function(){return this.mode===o.DirectiveLifecycle},e}();return t.ProtoRecord=a,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/event_binding",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=function(){function e(e,t,r,n){this.eventName=e,this.elIndex=t,this.dirIndex=r,this.records=n}return e}();return t.EventBinding=o,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/coalesce",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/core/change_detection/proto_record"],!0,function(e,t,r){function n(e){for(var t=[],r=[],n=new h.Map,a=0,c=h.ListWrapper.createFixedSize(e.length),l=0;l<e.length;l++){var u=c[l];f.isPresent(u)&&(a--,u.fixedArgs[0]=t.length);var p=e[l],d=s(p,t,n);if(d.isSkipRecord())t.push(d),a++,c[d.fixedArgs[0]]=d;else{var g=o(d,t,r,a>0);n.set(p.selfIndex,g.selfIndex)}}return i(t)}function i(e){for(var t=[],r=h.ListWrapper.createFixedSize(e.length),n=new h.Map,i=0;i<e.length;i++){var o=r[i];f.isPresent(o)&&(o.fixedArgs[0]=t.length);var a=e[i];if(a.isSkipRecord()){if(a.isConditionalSkipRecord()&&a.fixedArgs[0]===i+2&&i<e.length-1&&e[i+1].mode===g.RecordType.SkipRecords&&(a.mode=a.mode===g.RecordType.SkipRecordsIf?g.RecordType.SkipRecordsIfNot:g.RecordType.SkipRecordsIf,a.fixedArgs[0]=e[i+1].fixedArgs[0],i++),a.fixedArgs[0]>i+1){var c=s(a,t,n);t.push(c),r[c.fixedArgs[0]]=c}}else{var c=s(a,t,n);t.push(c),n.set(a.selfIndex,c.selfIndex)}}return t}function o(e,t,r,n){var i=a(e,t,r);return f.isPresent(i)?(e.lastInBinding?(t.push(l(e,i.selfIndex,t.length+1)),i.referencedBySelf=!0):e.argumentToPureFunction&&(i.argumentToPureFunction=!0),i):(n&&r.push(e.selfIndex),t.push(e),e)}function a(e,t,r){return t.find(function(t){return-1==r.indexOf(t.selfIndex)&&t.mode!==g.RecordType.DirectiveLifecycle&&u(t,e)&&t.mode===e.mode&&f.looseIdentical(t.funcOrValue,e.funcOrValue)&&t.contextIndex===e.contextIndex&&f.looseIdentical(t.name,e.name)&&h.ListWrapper.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;l<r.length;++l){for(var u=r[l],p=[t.CONTEXT_ACCESSOR],a=0,c=u.records.length;c>a;++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;o<n.length;++o)o!==t.CONTEXT_INDEX&&r.push(""+e.getEventLocalName(i,o))}),r.length>1?"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/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_tokens",["angular2/src/core/di","angular2/src/facade/lang"],!0,function(e,t,r){function n(){return""+i()+i()+i()}function i(){return c.StringWrapper.fromCharCode(97+c.Math.floor(25*c.Math.random()))}var o=System.global,a=o.define;o.define=void 0;var s=e("angular2/src/core/di"),c=e("angular2/src/facade/lang");return t.APP_COMPONENT_REF_PROMISE=c.CONST_EXPR(new s.OpaqueToken("Promise<ComponentRef>")),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._didWork=!1,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._didWork=!0,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._didWork=!0,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;return this.isStable()?void f.PromiseWrapper.resolve(null).then(function(t){for(;0!==e._callbacks.length;)e._callbacks.pop()(e._didWork);e._didWork=!1}):void(this._didWork=!0)},e.prototype.whenStable=function(e){this._callbacks.push(e),this._runCallbacksIfReady()},e.prototype.getPendingRequestCount=function(){return this._pendingCount},e.prototype.isAngularEventPending=function(){return this._isAngularEventPending},e.prototype.findBindings=function(e,t,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/linker/view_type",[],!0,function(e,t,r){var n=System.global,i=n.define;return n.define=void 0,function(e){e[e.HOST=0]="HOST",e[e.COMPONENT=1]="COMPONENT",e[e.EMBEDDED=2]="EMBEDDED"}(t.ViewType||(t.ViewType={})),t.ViewType,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=e("angular2/src/facade/exceptions"),a=function(){function e(){}return Object.defineProperty(e.prototype,"nativeElement",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ElementRef=a;var s=function(){function e(e){this._appElement=e}return Object.defineProperty(e.prototype,"internalElement",{get:function(){return this._appElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nativeElement",{get:function(){return this._appElement.nativeElement},enumerable:!0,configurable:!0}),e}();return t.ElementRef_=s,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"],!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=function(){function e(){}return Object.defineProperty(e.prototype,"element",{get:function(){return s.unimplemented()},enumerable:!0,configurable:!0}),e.prototype.clear=function(){for(var e=this.length-1;e>=0;e--)this.remove(e)},Object.defineProperty(e.prototype,"length",{get:function(){return s.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ViewContainerRef=l;var u=function(e){function t(t){e.call(this),this._element=t}return o(t,e),t.prototype.get=function(e){return this._element.nestedViews[e].ref},Object.defineProperty(t.prototype,"length",{get:function(){var e=this._element.nestedViews;return c.isPresent(e)?e.length:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element.ref},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(e,t){void 0===t&&(t=-1),-1==t&&(t=this.length);var r=this._element.parentView.viewManager;return r.createEmbeddedViewInContainer(this._element.ref,t,e)},t.prototype.createHostView=function(e,t,r,n){void 0===t&&(t=-1),void 0===r&&(r=null),void 0===n&&(n=null),-1==t&&(t=this.length);var i=this._element.parentView.viewManager;return i.createHostViewInContainer(this._element.ref,t,e,r,n)},t.prototype.insert=function(e,t){void 0===t&&(t=-1),-1==t&&(t=this.length);var r=this._element.parentView.viewManager;return r.attachViewInContainer(this._element.ref,t,e)},t.prototype.indexOf=function(e){return a.ListWrapper.indexOf(this._element.nestedViews,e.internalView)},t.prototype.remove=function(e){void 0===e&&(e=-1),-1==e&&(e=this.length-1);var t=this._element.parentView.viewManager;return t.destroyViewInContainer(this._element.ref,e)},t.prototype.detach=function(e){void 0===e&&(e=-1),-1==e&&(e=this.length-1);var t=this._element.parentView.viewManager;return t.detachViewInContainer(this._element.ref,e)},t}(l);return t.ViewContainerRef_=u,n.define=i,r.exports}),System.register("angular2/src/core/render/api",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=function(){function e(e,t,r){this.id=e,this.encapsulation=t,this.styles=r}return e}();t.RenderComponentType=o;var a=function(){function e(e,t,r,n){this.injector=e,this.component=t,this.providerTokens=r,this.locals=n}return e}();t.RenderDebugInfo=a;var s=function(){function e(){}return e}();t.Renderer=s;var c=function(){function e(){}return e}();return t.RootRenderer=c,n.define=i,r.exports}),System.register("angular2/src/core/linker/template_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=function(){function e(){}return Object.defineProperty(e.prototype,"elementRef",{get:function(){return null},enumerable:!0,configurable:!0}),e}();t.TemplateRef=a;var s=function(e){function t(t){e.call(this),this._elementRef=t}return o(t,e),Object.defineProperty(t.prototype,"elementRef",{get:function(){return this._elementRef},enumerable:!0,configurable:!0}),t}(a);return t.TemplateRef_=s,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/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/linker/view_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,"changeDetectorRef",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ViewRef=s;var c=function(e){function t(){e.apply(this,arguments)}return o(t,e),Object.defineProperty(t.prototype,"rootNodes",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),t}(s);t.HostViewRef=c;var l=function(e){function t(){e.apply(this,arguments)}return o(t,e),Object.defineProperty(t.prototype,"rootNodes",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),t}(s);t.EmbeddedViewRef=l;var u=function(){function e(e){this._view=e,this._view=e}return Object.defineProperty(e.prototype,"internalView",{get:function(){return this._view},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"changeDetectorRef",{get:function(){return this._view.changeDetector.ref},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rootNodes",{get:function(){return this._view.flatRootNodes},enumerable:!0,configurable:!0}),e.prototype.setLocal=function(e,t){this._view.setLocal(e,t)},e.prototype.hasLocal=function(e){return this._view.hasLocal(e)},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._view.destroyed},enumerable:!0,configurable:!0}),e}();t.ViewRef_=u;var p=function(){function e(){}return e}();t.HostViewFactoryRef=p;var d=function(){function e(e){this._hostViewFactory=e}return Object.defineProperty(e.prototype,"internalHostViewFactory",{get:function(){return this._hostViewFactory},enumerable:!0,configurable:!0}),e}();return t.HostViewFactoryRef_=d,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/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/view_manager",["angular2/src/core/di","angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/facade/exceptions","angular2/src/core/linker/view","angular2/src/core/linker/element","angular2/src/core/render/api","angular2/src/core/profile/profile","angular2/src/core/application_tokens","angular2/src/core/linker/view_type"],!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/core/di"),u=e("angular2/src/facade/lang"),p=e("angular2/src/facade/collection"),d=e("angular2/src/facade/exceptions"),f=e("angular2/src/core/linker/view"),h=e("angular2/src/core/linker/element"),g=e("angular2/src/core/render/api"),m=e("angular2/src/core/profile/profile"),v=e("angular2/src/core/application_tokens"),y=e("angular2/src/core/linker/view_type"),_=function(){function e(){}return e}();t.AppViewManager=_;var b=function(e){function t(t,r){e.call(this),this._renderer=t,this._appId=r,this._nextCompTypeId=0,this._createRootHostViewScope=m.wtfCreateScope("AppViewManager#createRootHostView()"),this._destroyRootHostViewScope=m.wtfCreateScope("AppViewManager#destroyRootHostView()"),this._createEmbeddedViewInContainerScope=m.wtfCreateScope("AppViewManager#createEmbeddedViewInContainer()"),this._createHostViewInContainerScope=m.wtfCreateScope("AppViewManager#createHostViewInContainer()"),this._destroyViewInContainerScope=m.wtfCreateScope("AppViewMananger#destroyViewInContainer()"),this._attachViewInContainerScope=m.wtfCreateScope("AppViewMananger#attachViewInContainer()"),this._detachViewInContainerScope=m.wtfCreateScope("AppViewMananger#detachViewInContainer()")}return o(t,e),t.prototype.getViewContainer=function(e){return e.internalElement.getViewContainerRef()},t.prototype.getHostElement=function(e){var t=e.internalView;if(t.proto.type!==y.ViewType.HOST)throw new d.BaseException("This operation is only allowed on host views");return t.appElements[0].ref},t.prototype.getNamedElementInComponentView=function(e,t){var r=e.internalElement,n=r.componentView;if(u.isBlank(n))throw new d.BaseException("There is no component directive at element "+e);for(var i=0;i<n.appElements.length;i++){var o=n.appElements[i];if(p.StringMapWrapper.contains(o.proto.directiveVariableBindings,t))return o.ref}throw new d.BaseException("Could not find variable "+t)},t.prototype.getComponent=function(e){return e.internalElement.getComponent()},t.prototype.createRootHostView=function(e,t,r,n){void 0===n&&(n=null);var i=this._createRootHostViewScope(),o=e.internalHostViewFactory,a=u.isPresent(t)?t:o.selector,s=o.viewFactory(this._renderer,this,null,n,a,null,r);return m.wtfLeave(i,s.ref)},t.prototype.destroyRootHostView=function(e){var t=this._destroyRootHostViewScope(),r=e.internalView;r.renderer.detachView(f.flattenNestedViewRenderNodes(r.rootNodesOrAppElements)),r.destroy(),m.wtfLeave(t)},t.prototype.createEmbeddedViewInContainer=function(e,t,r){var n=this._createEmbeddedViewInContainerScope(),i=r.elementRef.internalElement,o=i.embeddedViewFactory(i.parentView.renderer,this,i,i.parentView.projectableNodes,null,null,null);return this._attachViewToContainer(o,e.internalElement,t),m.wtfLeave(n,o.ref)},t.prototype.createHostViewInContainer=function(e,t,r,n,i){var o=this._createHostViewInContainerScope(),a=e,s=a.internalElement,c=r.internalHostViewFactory,l=c.viewFactory(s.parentView.renderer,s.parentView.viewManager,s,i,null,n,null);return this._attachViewToContainer(l,a.internalElement,t),m.wtfLeave(o,l.ref)},t.prototype.destroyViewInContainer=function(e,t){var r=this._destroyViewInContainerScope(),n=this._detachViewInContainer(e.internalElement,t);
5
+ n.destroy(),m.wtfLeave(r)},t.prototype.attachViewInContainer=function(e,t,r){var n=r,i=this._attachViewInContainerScope();return this._attachViewToContainer(n.internalView,e.internalElement,t),m.wtfLeave(i,n)},t.prototype.detachViewInContainer=function(e,t){var r=this._detachViewInContainerScope(),n=this._detachViewInContainer(e.internalElement,t);return m.wtfLeave(r,n.ref)},t.prototype.onViewCreated=function(e){},t.prototype.onViewDestroyed=function(e){},t.prototype.createRenderComponentType=function(e,t){return new g.RenderComponentType(this._appId+"-"+this._nextCompTypeId++,e,t)},t.prototype._attachViewToContainer=function(e,t,r){if(e.proto.type===y.ViewType.COMPONENT)throw new d.BaseException("Component views can't be moved!");var n=t.nestedViews;null==n&&(n=[],t.nestedViews=n),p.ListWrapper.insert(n,r,e);var i;if(r>0){var o=n[r-1];i=o.rootNodesOrAppElements.length>0?o.rootNodesOrAppElements[o.rootNodesOrAppElements.length-1]:null}else i=t.nativeElement;if(u.isPresent(i)){var a;a=i instanceof h.AppElement?i.nativeElement:i,e.renderer.attachViewAfter(a,f.flattenNestedViewRenderNodes(e.rootNodesOrAppElements))}t.parentView.changeDetector.addContentChild(e.changeDetector),t.traverseAndSetQueriesAsDirty()},t.prototype._detachViewInContainer=function(e,t){var r=p.ListWrapper.removeAt(e.nestedViews,t);if(r.proto.type===y.ViewType.COMPONENT)throw new d.BaseException("Component views can't be moved!");return e.traverseAndSetQueriesAsDirty(),r.renderer.detachView(f.flattenNestedViewRenderNodes(r.rootNodesOrAppElements)),r.changeDetector.remove(),r},t=a([l.Injectable(),c(1,l.Inject(v.APP_ID)),s("design:paramtypes",[g.RootRenderer,String])],t)}(_);return t.AppViewManager_=b,n.define=i,r.exports}),System.register("angular2/src/core/console",["angular2/src/core/di","angular2/src/facade/lang"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=e("angular2/src/core/di"),c=e("angular2/src/facade/lang"),l=function(){function e(){}return e.prototype.log=function(e){c.print(e)},e=o([s.Injectable(),a("design:paramtypes",[])],e)}();return t.Console=l,n.define=i,r.exports}),System.register("angular2/src/core/zone",["angular2/src/core/zone/ng_zone"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/zone/ng_zone");return t.NgZone=o.NgZone,t.NgZoneError=o.NgZoneError,n.define=i,r.exports}),System.register("angular2/src/core/render",["angular2/src/core/render/api"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/render/api");return t.RootRenderer=o.RootRenderer,t.Renderer=o.Renderer,t.RenderComponentType=o.RenderComponentType,n.define=i,r.exports}),System.register("angular2/src/core/linker/directive_resolver",["angular2/src/core/di","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/core/metadata","angular2/src/core/reflection/reflection"],!0,function(e,t,r){function n(e){return e instanceof d.DirectiveMetadata}var i=System.global,o=i.define;i.define=void 0;var a=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=e("angular2/src/core/di"),l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/exceptions"),p=e("angular2/src/facade/collection"),d=e("angular2/src/core/metadata"),f=e("angular2/src/core/reflection/reflection"),h=function(){function e(){}return e.prototype.resolve=function(e){var t=f.reflector.annotations(c.resolveForwardRef(e));if(l.isPresent(t)){var r=t.find(n);if(l.isPresent(r)){var i=f.reflector.propMetadata(e);return this._mergeWithPropertyMetadata(r,i,e)}}throw new u.BaseException("No Directive annotation found on "+l.stringify(e))},e.prototype._mergeWithPropertyMetadata=function(e,t,r){var n=[],i=[],o={},a={};return p.StringMapWrapper.forEach(t,function(e,t){e.forEach(function(e){if(e instanceof d.InputMetadata&&(l.isPresent(e.bindingPropertyName)?n.push(t+": "+e.bindingPropertyName):n.push(t)),e instanceof d.OutputMetadata&&(l.isPresent(e.bindingPropertyName)?i.push(t+": "+e.bindingPropertyName):i.push(t)),e instanceof d.HostBindingMetadata&&(l.isPresent(e.hostPropertyName)?o["["+e.hostPropertyName+"]"]=t:o["["+t+"]"]=t),e instanceof d.HostListenerMetadata){var r=l.isPresent(e.args)?e.args.join(", "):"";o["("+e.eventName+")"]=t+"("+r+")"}e instanceof d.ContentChildrenMetadata&&(a[t]=e),e instanceof d.ViewChildrenMetadata&&(a[t]=e),e instanceof d.ContentChildMetadata&&(a[t]=e),e instanceof d.ViewChildMetadata&&(a[t]=e)})}),this._merge(e,n,i,o,a,r)},e.prototype._merge=function(e,t,r,n,i,o){var a,s=l.isPresent(e.inputs)?p.ListWrapper.concat(e.inputs,t):t;l.isPresent(e.outputs)?(e.outputs.forEach(function(e){if(p.ListWrapper.contains(r,e))throw new u.BaseException("Output event '"+e+"' defined multiple times in '"+l.stringify(o)+"'")}),a=p.ListWrapper.concat(e.outputs,r)):a=r;var c=l.isPresent(e.host)?p.StringMapWrapper.merge(e.host,n):n,f=l.isPresent(e.queries)?p.StringMapWrapper.merge(e.queries,i):i;return e instanceof d.ComponentMetadata?new d.ComponentMetadata({selector:e.selector,inputs:s,outputs:a,host:c,exportAs:e.exportAs,moduleId:e.moduleId,queries:f,changeDetection:e.changeDetection,providers:e.providers,viewProviders:e.viewProviders}):new d.DirectiveMetadata({selector:e.selector,inputs:s,outputs:a,host:c,exportAs:e.exportAs,queries:f,providers:e.providers})},e=a([c.Injectable(),s("design:paramtypes",[])],e)}();return t.DirectiveResolver=h,t.CODEGEN_DIRECTIVE_RESOLVER=new 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/debug/debug_node",["angular2/src/facade/lang","angular2/src/facade/collection"],!0,function(e,t,r){function n(e){return e.map(function(e){return e.nativeElement})}function i(e,t,r){e.childNodes.forEach(function(e){e instanceof v&&(t(e)&&r.push(e),i(e,t,r))})}function o(e,t,r){e instanceof v&&e.childNodes.forEach(function(e){t(e)&&r.push(e),e instanceof v&&o(e,t,r)})}function a(e){return y.get(e)}function s(){return h.MapWrapper.values(y)}function c(e){y.set(e.nativeNode,e)}function l(e){y["delete"](e.nativeNode)}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/facade/lang"),h=e("angular2/src/facade/collection"),g=function(){function e(e,t){this.name=e,this.callback=t}return e}();t.EventListener=g;var m=function(){function e(e,t){this.nativeNode=e,f.isPresent(t)&&t instanceof v?t.addChild(this):this.parent=null,this.listeners=[],this.providerTokens=[]}return e.prototype.setDebugInfo=function(e){this.injector=e.injector,this.providerTokens=e.providerTokens,this.locals=e.locals,this.componentInstance=e.component},e.prototype.inject=function(e){return this.injector.get(e)},e.prototype.getLocal=function(e){return this.locals.get(e)},e}();t.DebugNode=m;var v=function(e){function t(t,r){e.call(this,t,r),this.properties=new Map,this.attributes=new Map,this.childNodes=[],this.nativeElement=t}return d(t,e),t.prototype.addChild=function(e){f.isPresent(e)&&(this.childNodes.push(e),e.parent=this)},t.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);-1!==t&&(e.parent=null,this.childNodes.splice(t,1))},t.prototype.insertChildrenAfter=function(e,t){var r=this.childNodes.indexOf(e);if(-1!==r){var n=this.childNodes.slice(0,r+1),i=this.childNodes.slice(r+1);this.childNodes=h.ListWrapper.concat(h.ListWrapper.concat(n,t),i);for(var o=0;o<t.length;++o){var a=t[o];f.isPresent(a.parent)&&a.parent.removeChild(a),a.parent=this}}},t.prototype.query=function(e){var t=this.queryAll(e);return t.length>0?t[0]:null},t.prototype.queryAll=function(e){var t=[];return i(this,e,t),t},t.prototype.queryAllNodes=function(e){var t=[];return o(this,e,t),t},Object.defineProperty(t.prototype,"children",{get:function(){var e=[];return this.childNodes.forEach(function(r){r instanceof t&&e.push(r)}),e},enumerable:!0,configurable:!0}),t.prototype.triggerEventHandler=function(e,t){this.listeners.forEach(function(r){r.name==e&&r.callback(t)})},t}(m);t.DebugElement=v,t.asNativeElements=n;var y=new Map;return t.getDebugNode=a,t.getAllDebugNodes=s,t.indexDebugNode=c,t.removeDebugNodeFromIndex=l,u.define=p,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/platform_common_providers",["angular2/src/facade/lang","angular2/src/core/di","angular2/src/core/console","angular2/src/core/reflection/reflection","angular2/src/core/testability/testability"],!0,function(e,t,r){function n(){return l.reflector}var i=System.global,o=i.define;i.define=void 0;var a=e("angular2/src/facade/lang"),s=e("angular2/src/core/di"),c=e("angular2/src/core/console"),l=e("angular2/src/core/reflection/reflection"),u=e("angular2/src/core/testability/testability");return t.PLATFORM_COMMON_PROVIDERS=a.CONST_EXPR([new s.Provider(l.Reflector,{useFactory:n,deps:[]}),u.TestabilityRegistry,c.Console]),i.define=o,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,t.CODEGEN_PIPE_RESOLVER=new f,i.define=o,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-1!==t.providerTokens.indexOf(e)}},e}();return t.By=s,n.define=i,r.exports}),System.register("angular2/src/core/debug/debug_renderer",["angular2/src/facade/lang","angular2/src/core/debug/debug_node"],!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/core/debug/debug_node"),s=function(){function e(e){this._delegate=e}return e.prototype.renderComponent=function(e){return new c(this,this._delegate.renderComponent(e))},e}();t.DebugDomRootRenderer=s;var c=function(){function e(e,t){this._rootRenderer=e,this._delegate=t}return e.prototype.renderComponent=function(e){return this._rootRenderer.renderComponent(e)},e.prototype.selectRootElement=function(e){var t=this._delegate.selectRootElement(e),r=new a.DebugElement(t,null);return a.indexDebugNode(r),t},e.prototype.createElement=function(e,t){var r=this._delegate.createElement(e,t),n=new a.DebugElement(r,a.getDebugNode(e));return n.name=t,a.indexDebugNode(n),r},e.prototype.createViewRoot=function(e){return this._delegate.createViewRoot(e)},e.prototype.createTemplateAnchor=function(e){var t=this._delegate.createTemplateAnchor(e),r=new a.DebugNode(t,a.getDebugNode(e));return a.indexDebugNode(r),t},e.prototype.createText=function(e,t){var r=this._delegate.createText(e,t),n=new a.DebugNode(r,a.getDebugNode(e));return a.indexDebugNode(n),r},e.prototype.projectNodes=function(e,t){var r=a.getDebugNode(e);return o.isPresent(r)&&r instanceof a.DebugElement&&t.forEach(function(e){r.addChild(a.getDebugNode(e))}),this._delegate.projectNodes(e,t)},e.prototype.attachViewAfter=function(e,t){var r=a.getDebugNode(e);if(o.isPresent(r)){var n=r.parent;if(t.length>0&&o.isPresent(n)){var i=[];t.forEach(function(e){return i.push(a.getDebugNode(e))}),n.insertChildrenAfter(r,i)}}return this._delegate.attachViewAfter(e,t)},e.prototype.detachView=function(e){return e.forEach(function(e){var t=a.getDebugNode(e);o.isPresent(t)&&o.isPresent(t.parent)&&t.parent.removeChild(t)}),this._delegate.detachView(e)},e.prototype.destroyView=function(e,t){return t.forEach(function(e){a.removeDebugNodeFromIndex(a.getDebugNode(e))}),this._delegate.destroyView(e,t)},e.prototype.listen=function(e,t,r){var n=a.getDebugNode(e);return o.isPresent(n)&&n.listeners.push(new a.EventListener(t,r)),this._delegate.listen(e,t,r)},e.prototype.listenGlobal=function(e,t,r){return this._delegate.listenGlobal(e,t,r)},e.prototype.setElementProperty=function(e,t,r){var n=a.getDebugNode(e);return o.isPresent(n)&&n instanceof a.DebugElement&&n.properties.set(t,r),this._delegate.setElementProperty(e,t,r)},e.prototype.setElementAttribute=function(e,t,r){var n=a.getDebugNode(e);return o.isPresent(n)&&n instanceof a.DebugElement&&n.attributes.set(t,r),this._delegate.setElementAttribute(e,t,r)},e.prototype.setBindingDebugInfo=function(e,t,r){return this._delegate.setBindingDebugInfo(e,t,r)},e.prototype.setElementDebugInfo=function(e,t){var r=a.getDebugNode(e);return r.setDebugInfo(t),this._delegate.setElementDebugInfo(e,t)},e.prototype.setElementClass=function(e,t,r){return this._delegate.setElementClass(e,t,r)},e.prototype.setElementStyle=function(e,t,r){return this._delegate.setElementStyle(e,t,r)},e.prototype.invokeElementMethod=function(e,t,r){return this._delegate.invokeElementMethod(e,t,r)},e.prototype.setText=function(e,t){return this._delegate.setText(e,t)},e}();return t.DebugDomRenderer=c,n.define=i,r.exports}),System.register("angular2/src/platform/dom/dom_adapter",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e){a.isBlank(t.DOM)&&(t.DOM=e)}var i=System.global,o=i.define;i.define=void 0;var a=e("angular2/src/facade/lang");t.DOM=null,t.setRootDomAdapter=n;var s=function(){function e(){}return Object.defineProperty(e.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(e){this._attrToPropMap=e},enumerable:!0,configurable:!0}),e}();return t.DomAdapter=s,i.define=o,r.exports}),System.register("angular2/src/core/di/decorators",["angular2/src/core/di/metadata","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/di/metadata"),a=e("angular2/src/core/util/decorators");return t.Inject=a.makeParamDecorator(o.InjectMetadata),t.Optional=a.makeParamDecorator(o.OptionalMetadata),t.Injectable=a.makeDecorator(o.InjectableMetadata),t.Self=a.makeParamDecorator(o.SelfMetadata),t.Host=a.makeParamDecorator(o.HostMetadata),t.SkipSelf=a.makeParamDecorator(o.SkipSelfMetadata),n.define=i,r.exports}),System.register("angular2/src/facade/exceptions",["angular2/src/facade/exception_handler","angular2/src/facade/exception_handler"],!0,function(e,t,r){function n(e){return new TypeError(e)}function i(){throw new u("unimplemented")}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/exception_handler"),l=e("angular2/src/facade/exception_handler");t.ExceptionHandler=l.ExceptionHandler;var u=function(e){function t(t){void 0===t&&(t="--"),e.call(this,t),this.message=t,this.stack=new Error(t).stack}return s(t,e),t.prototype.toString=function(){return this.message},t}(Error);t.BaseException=u;var p=function(e){function t(t,r,n,i){e.call(this,t),this._wrapperMessage=t,this._originalException=r,this._originalStack=n,this._context=i,this._wrapperStack=new Error(t).stack}return s(t,e),Object.defineProperty(t.prototype,"wrapperMessage",{get:function(){return this._wrapperMessage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapperStack",{get:function(){return this._wrapperStack},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalException",{get:function(){return this._originalException},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalStack",{get:function(){return this._originalStack},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return c.ExceptionHandler.exceptionToString(this)},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.message},t}(Error);return t.WrappedException=p,t.makeTypeError=n,t.unimplemented=i,o.define=a,r.exports}),System.register("angular2/src/core/reflection/reflection",["angular2/src/core/reflection/reflector","angular2/src/core/reflection/reflector","angular2/src/core/reflection/reflection_capabilities"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/reflection/reflector"),a=e("angular2/src/core/reflection/reflector");t.Reflector=a.Reflector,t.ReflectionInfo=a.ReflectionInfo;var s=e("angular2/src/core/reflection/reflection_capabilities");return t.reflector=new o.Reflector(new s.ReflectionCapabilities),n.define=i,r.exports}),System.register("angular2/src/core/di/key",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/core/di/type_literal","angular2/src/core/di/forward_ref","angular2/src/core/di/type_literal"],!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/core/di/type_literal"),c=e("angular2/src/core/di/forward_ref"),l=e("angular2/src/core/di/type_literal");t.TypeLiteral=l.TypeLiteral;var u=function(){function e(e,t){if(this.token=e,this.id=t,o.isBlank(e))throw new a.BaseException("Token must be defined!")}return Object.defineProperty(e.prototype,"displayName",{get:function(){return o.stringify(this.token)},enumerable:!0,configurable:!0}),e.get=function(e){return d.get(c.resolveForwardRef(e))},Object.defineProperty(e,"numberOfKeys",{get:function(){return d.numberOfKeys},enumerable:!0,configurable:!0}),e}();t.Key=u;var p=function(){function e(){this._allKeys=new Map}return e.prototype.get=function(e){if(e instanceof u)return e;var t=e;if(e instanceof s.TypeLiteral&&(t=e.type),e=t,this._allKeys.has(e))return this._allKeys.get(e);var r=new u(e,u.numberOfKeys);return this._allKeys.set(e,r),r},Object.defineProperty(e.prototype,"numberOfKeys",{get:function(){return this._allKeys.size},enumerable:!0,configurable:!0}),e}();t.KeyRegistry=p;var d=new p;return n.define=i,r.exports}),System.register("angular2/src/animate/animation",["angular2/src/facade/lang","angular2/src/facade/math","angular2/src/platform/dom/util","angular2/src/facade/collection","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/facade/math"),s=e("angular2/src/platform/dom/util"),c=e("angular2/src/facade/collection"),l=e("angular2/src/platform/dom/dom_adapter"),u=function(){function e(e,t,r){var n=this;this.element=e,this.data=t,this.browserDetails=r,this.callbacks=[],this.eventClearFunctions=[],this.completed=!1,this._stringPrefix="",this.startTime=o.DateWrapper.toMillis(o.DateWrapper.now()),this._stringPrefix=l.DOM.getAnimationPrefix(),this.setup(),this.wait(function(e){return n.start()})}return Object.defineProperty(e.prototype,"totalTime",{get:function(){var e=null!=this.computedDelay?this.computedDelay:0,t=null!=this.computedDuration?this.computedDuration:0;return e+t},enumerable:!0,configurable:!0}),e.prototype.wait=function(e){this.browserDetails.raf(e,2)},e.prototype.setup=function(){null!=this.data.fromStyles&&this.applyStyles(this.data.fromStyles),null!=this.data.duration&&this.applyStyles({transitionDuration:this.data.duration.toString()+"ms"}),null!=this.data.delay&&this.applyStyles({transitionDelay:this.data.delay.toString()+"ms"})},e.prototype.start=function(){this.addClasses(this.data.classesToAdd),this.addClasses(this.data.animationClasses),this.removeClasses(this.data.classesToRemove),null!=this.data.toStyles&&this.applyStyles(this.data.toStyles);var e=l.DOM.getComputedStyle(this.element);this.computedDelay=a.Math.max(this.parseDurationString(e.getPropertyValue(this._stringPrefix+"transition-delay")),this.parseDurationString(this.element.style.getPropertyValue(this._stringPrefix+"transition-delay"))),this.computedDuration=a.Math.max(this.parseDurationString(e.getPropertyValue(this._stringPrefix+"transition-duration")),this.parseDurationString(this.element.style.getPropertyValue(this._stringPrefix+"transition-duration"))),this.addEvents()},e.prototype.applyStyles=function(e){var t=this;c.StringMapWrapper.forEach(e,function(e,r){var n=s.camelCaseToDashCase(r);o.isPresent(l.DOM.getStyle(t.element,n))?l.DOM.setStyle(t.element,n,e.toString()):l.DOM.setStyle(t.element,t._stringPrefix+n,e.toString())})},e.prototype.addClasses=function(e){for(var t=0,r=e.length;r>t;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;r<e.length;r++){var n=e[r];l.DOM.appendChild(t,l.DOM.createStyleElement(n))}},t.prototype.addHost=function(e){this._addStylesToHost(this._styles,e),this._hostNodes.add(e)},t.prototype.removeHost=function(e){p.SetWrapper["delete"](this._hostNodes,e)},t.prototype.onStylesAdded=function(e){var t=this;this._hostNodes.forEach(function(r){t._addStylesToHost(e,r)})},t=a([u.Injectable(),c(0,u.Inject(d.DOCUMENT)),s("design:paramtypes",[Object])],t)}(f);return t.DomSharedStylesHost=h,n.define=i,r.exports}),System.register("angular2/src/core/profile/profile",["angular2/src/core/profile/wtf_impl"],!0,function(e,t,r){function n(e,t){return null}var i=System.global,o=i.define;i.define=void 0;var a=e("angular2/src/core/profile/wtf_impl");return t.wtfEnabled=a.detectWTF(),t.wtfCreateScope=t.wtfEnabled?a.createScope:function(e,t){return n},t.wtfLeave=t.wtfEnabled?a.leave:function(e,t){return t},t.wtfStartTimeRange=t.wtfEnabled?a.startTimeRange:function(e,t){return null},t.wtfEndTimeRange=t.wtfEnabled?a.endTimeRange:function(e){return null},i.define=o,r.exports}),System.register("angular2/src/core/change_detection/change_detection_util",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/core/change_detection/constants","angular2/src/core/change_detection/pipe_lifecycle_reflector","angular2/src/core/change_detection/binding_record","angular2/src/core/change_detection/directive_record"],!0,function(e,t,r){function n(e,t){var r=v++%20,n=y[r];return n.previousValue=e,n.currentValue=t,n}var i=System.global,o=i.define;i.define=void 0;var 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/constants"),u=e("angular2/src/core/change_detection/pipe_lifecycle_reflector"),p=e("angular2/src/core/change_detection/binding_record"),d=e("angular2/src/core/change_detection/directive_record"),f=function(){function e(e){this.wrapped=e}return e.wrap=function(e){var t=h[g++%5];return t.wrapped=e,t},e}();t.WrappedValue=f;var h=[new f(null),new f(null),new f(null),new f(null),new f(null)],g=0,m=function(){function e(e,t){this.previousValue=e,this.currentValue=t}return e.prototype.isFirstChange=function(){return this.previousValue===_.uninitialized},e}();t.SimpleChange=m;var v=0,y=[new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null),new m(null,null)],_=function(){function e(){}return e.arrayFn0=function(){return[]},e.arrayFn1=function(e){return[e]},e.arrayFn2=function(e,t){return[e,t]},e.arrayFn3=function(e,t,r){return[e,t,r]},e.arrayFn4=function(e,t,r,n){
6
+ return[e,t,r,n]},e.arrayFn5=function(e,t,r,n,i){return[e,t,r,n,i]},e.arrayFn6=function(e,t,r,n,i,o){return[e,t,r,n,i,o]},e.arrayFn7=function(e,t,r,n,i,o,a){return[e,t,r,n,i,o,a]},e.arrayFn8=function(e,t,r,n,i,o,a,s){return[e,t,r,n,i,o,a,s]},e.arrayFn9=function(e,t,r,n,i,o,a,s,c){return[e,t,r,n,i,o,a,s,c]},e.operation_negate=function(e){return!e},e.operation_add=function(e,t){return e+t},e.operation_subtract=function(e,t){return e-t},e.operation_multiply=function(e,t){return e*t},e.operation_divide=function(e,t){return e/t},e.operation_remainder=function(e,t){return e%t},e.operation_equals=function(e,t){return e==t},e.operation_not_equals=function(e,t){return e!=t},e.operation_identical=function(e,t){return e===t},e.operation_not_identical=function(e,t){return e!==t},e.operation_less_then=function(e,t){return t>e},e.operation_greater_then=function(e,t){return e>t},e.operation_less_or_equals_then=function(e,t){return t>=e},e.operation_greater_or_equals_then=function(e,t){return e>=t},e.cond=function(e,t,r){return e?t:r},e.mapFn=function(e){function t(t){for(var r=c.StringMapWrapper.create(),n=0;n<e.length;++n)c.StringMapWrapper.set(r,e[n],t[n]);return r}switch(e.length){case 0:return function(){return[]};case 1:return function(e){return t([e])};case 2:return function(e,r){return t([e,r])};case 3:return function(e,r,n){return t([e,r,n])};case 4:return function(e,r,n,i){return t([e,r,n,i])};case 5:return function(e,r,n,i,o){return t([e,r,n,i,o])};case 6:return function(e,r,n,i,o,a){return t([e,r,n,i,o,a])};case 7:return function(e,r,n,i,o,a,s){return t([e,r,n,i,o,a,s])};case 8:return function(e,r,n,i,o,a,s,c){return t([e,r,n,i,o,a,s,c])};case 9:return function(e,r,n,i,o,a,s,c,l){return t([e,r,n,i,o,a,s,c,l])};default:throw new s.BaseException("Does not support literal maps with more than 9 elements")}},e.keyedAccess=function(e,t){return e[t[0]]},e.unwrapValue=function(e){return e instanceof f?e.wrapped:e},e.changeDetectionMode=function(e){return l.isDefaultChangeDetectionStrategy(e)?l.ChangeDetectionStrategy.CheckAlways:l.ChangeDetectionStrategy.CheckOnce},e.simpleChange=function(e,t){return n(e,t)},e.isValueBlank=function(e){return a.isBlank(e)},e.s=function(e){return a.isPresent(e)?""+e:""},e.protoByIndex=function(e,t){return 1>t?null:e[t-1]},e.callPipeOnDestroy=function(e){u.implementsOnDestroy(e.pipe)&&e.pipe.ngOnDestroy()},e.bindingTarget=function(e,t,r,n,i){return new p.BindingTarget(e,t,r,n,i)},e.directiveIndex=function(e,t){return new d.DirectiveIndex(e,t)},e.looseNotIdentical=function(e,t){return!a.looseIdentical(e,t)},e.devModeEqual=function(t,r){return c.isListLikeIterable(t)&&c.isListLikeIterable(r)?c.areIterablesEqual(t,r,e.devModeEqual):c.isListLikeIterable(t)||a.isPrimitive(t)||c.isListLikeIterable(r)||a.isPrimitive(r)?a.looseIdentical(t,r):!0},e.uninitialized=a.CONST_EXPR(new Object),e}();return t.ChangeDetectionUtil=_,i.define=o,r.exports}),System.register("angular2/src/core/change_detection/abstract_change_detector",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/core/change_detection/change_detection_util","angular2/src/core/change_detection/change_detector_ref","angular2/src/core/change_detection/exceptions","angular2/src/core/change_detection/parser/locals","angular2/src/core/change_detection/constants","angular2/src/core/profile/profile","angular2/src/core/change_detection/observable_facade","angular2/src/facade/async"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/facade/lang"),a=e("angular2/src/facade/collection"),s=e("angular2/src/core/change_detection/change_detection_util"),c=e("angular2/src/core/change_detection/change_detector_ref"),l=e("angular2/src/core/change_detection/exceptions"),u=e("angular2/src/core/change_detection/parser/locals"),p=e("angular2/src/core/change_detection/constants"),d=e("angular2/src/core/profile/profile"),f=e("angular2/src/core/change_detection/observable_facade"),h=e("angular2/src/facade/async"),g=d.wtfCreateScope("ChangeDetector#check(ascii id, bool throwOnChange)"),m=function(){function e(e,t,r,n,i,o){this.element=e,this.componentElement=t,this.context=r,this.locals=n,this.injector=i,this.expression=o}return e}(),v=function(){function e(e,t,r,n,i){this.id=e,this.numberOfPropertyProtoRecords=t,this.bindingTargets=r,this.directiveIndices=n,this.strategy=i,this.contentChildren=[],this.viewChildren=[],this.state=p.ChangeDetectorState.NeverChecked,this.locals=null,this.mode=null,this.pipes=null,this.ref=new c.ChangeDetectorRef_(this)}return e.prototype.addContentChild=function(e){this.contentChildren.push(e),e.parent=this},e.prototype.removeContentChild=function(e){a.ListWrapper.remove(this.contentChildren,e)},e.prototype.addViewChild=function(e){this.viewChildren.push(e),e.parent=this},e.prototype.removeViewChild=function(e){a.ListWrapper.remove(this.viewChildren,e)},e.prototype.remove=function(){this.parent.removeContentChild(this)},e.prototype.handleEvent=function(e,t,r){this.hydrated()||this.throwDehydratedError(this.id+" -> "+e);try{var n=new Map;n.set("$event",r);var i=!this.handleEventInternal(e,t,new u.Locals(this.locals,n));return this.markPathToRootAsCheckOnce(),i}catch(a){var s=this.dispatcher.getDebugContext(null,t,null),c=o.isPresent(s)?new l.EventEvaluationErrorContext(s.element,s.componentElement,s.context,s.locals,s.injector):null;throw new l.EventEvaluationError(e,a,a.stack,c)}},e.prototype.handleEventInternal=function(e,t,r){return!1},e.prototype.detectChanges=function(){this.runDetectChanges(!1)},e.prototype.checkNoChanges=function(){o.assertionsEnabled()&&this.runDetectChanges(!0)},e.prototype.runDetectChanges=function(e){if(this.mode!==p.ChangeDetectionStrategy.Detached&&this.mode!==p.ChangeDetectionStrategy.Checked&&this.state!==p.ChangeDetectorState.Errored){var t=g(this.id,e);this.detectChangesInRecords(e),this._detectChangesContentChildren(e),e||this.afterContentLifecycleCallbacks(),this._detectChangesInViewChildren(e),e||this.afterViewLifecycleCallbacks(),this.mode===p.ChangeDetectionStrategy.CheckOnce&&(this.mode=p.ChangeDetectionStrategy.Checked),this.state=p.ChangeDetectorState.CheckedBefore,d.wtfLeave(t)}},e.prototype.detectChangesInRecords=function(e){this.hydrated()||this.throwDehydratedError(this.id);try{this.detectChangesInRecordsInternal(e)}catch(t){t instanceof l.ExpressionChangedAfterItHasBeenCheckedException||(this.state=p.ChangeDetectorState.Errored),this._throwError(t,t.stack)}},e.prototype.detectChangesInRecordsInternal=function(e){},e.prototype.hydrate=function(e,t,r,n){this.dispatcher=r,this.mode=s.ChangeDetectionUtil.changeDetectionMode(this.strategy),this.context=e,this.strategy===p.ChangeDetectionStrategy.OnPushObserve&&this.observeComponent(e),this.locals=t,this.pipes=n,this.hydrateDirectives(r),this.state=p.ChangeDetectorState.NeverChecked},e.prototype.hydrateDirectives=function(e){},e.prototype.dehydrate=function(){this.dehydrateDirectives(!0),this.strategy===p.ChangeDetectionStrategy.OnPushObserve&&this._unsubsribeFromObservables(),this._unsubscribeFromOutputs(),this.dispatcher=null,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.destroyRecursive=function(){this.dispatcher.notifyOnDestroy(),this.dehydrate();for(var e=this.contentChildren,t=0;t<e.length;t++)e[t].destroyRecursive();e=this.viewChildren;for(var t=0;t<e.length;t++)e[t].destroyRecursive()},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<t.length;++r)t[r].runDetectChanges(e)},e.prototype._detectChangesInViewChildren=function(e){for(var t=this.viewChildren,r=0;r<t.length;++r)t[r].runDetectChanges(e)},e.prototype.markAsCheckOnce=function(){this.mode=p.ChangeDetectionStrategy.CheckOnce},e.prototype.markPathToRootAsCheckOnce=function(){for(var e=this;o.isPresent(e)&&e.mode!==p.ChangeDetectionStrategy.Detached;)e.mode===p.ChangeDetectionStrategy.Checked&&(e.mode=p.ChangeDetectionStrategy.CheckOnce),e=e.parent},e.prototype._unsubsribeFromObservables=function(){if(o.isPresent(this.subscriptions))for(var e=0;e<this.subscriptions.length;++e){var t=this.subscriptions[e];o.isPresent(this.subscriptions[e])&&(t.cancel(),this.subscriptions[e]=null)}},e.prototype._unsubscribeFromOutputs=function(){if(o.isPresent(this.outputSubscriptions))for(var e=0;e<this.outputSubscriptions.length;++e)h.ObservableWrapper.dispose(this.outputSubscriptions[e]),this.outputSubscriptions[e]=null},e.prototype.observeValue=function(e,t){var r=this;return f.isObservable(e)&&(this._createArrayToStoreObservables(),o.isBlank(this.subscriptions[t])?(this.streams[t]=e.changes,this.subscriptions[t]=e.changes.listen(function(e){return r.ref.markForCheck()})):this.streams[t]!==e.changes&&(this.subscriptions[t].cancel(),this.streams[t]=e.changes,this.subscriptions[t]=e.changes.listen(function(e){return r.ref.markForCheck()}))),e},e.prototype.observeDirective=function(e,t){var r=this;if(f.isObservable(e)){this._createArrayToStoreObservables();var n=this.numberOfPropertyProtoRecords+t+2;this.streams[n]=e.changes,this.subscriptions[n]=e.changes.listen(function(e){return r.ref.markForCheck()})}return e},e.prototype.observeComponent=function(e){var t=this;if(f.isObservable(e)){this._createArrayToStoreObservables();var r=this.numberOfPropertyProtoRecords+1;this.streams[r]=e.changes,this.subscriptions[r]=e.changes.listen(function(e){return t.ref.markForCheck()})}return e},e.prototype._createArrayToStoreObservables=function(){o.isBlank(this.subscriptions)&&(this.subscriptions=a.ListWrapper.createFixedSize(this.numberOfPropertyProtoRecords+this.directiveIndices.length+2),this.streams=a.ListWrapper.createFixedSize(this.numberOfPropertyProtoRecords+this.directiveIndices.length+2))},e.prototype.getDirectiveFor=function(e,t){return e.getDirectiveFor(this.directiveIndices[t])},e.prototype.getDetectorFor=function(e,t){return e.getDetectorFor(this.directiveIndices[t])},e.prototype.notifyDispatcher=function(e){this.dispatcher.notifyOnBinding(this._currentBinding(),e)},e.prototype.logBindingUpdate=function(e){this.dispatcher.logBindingUpdate(this._currentBinding(),e)},e.prototype.addChange=function(e,t,r){return o.isBlank(e)&&(e={}),e[this._currentBinding().name]=s.ChangeDetectionUtil.simpleChange(t,r),e},e.prototype._throwError=function(e,t){var r;try{var n=this.dispatcher.getDebugContext(null,this._currentBinding().elementIndex,null),i=o.isPresent(n)?new m(n.element,n.componentElement,n.context,n.locals,n.injector,this._currentBinding().debug):null;r=new l.ChangeDetectionError(this._currentBinding().debug,e,t,i)}catch(a){r=new l.ChangeDetectionError(null,e,t,null)}throw r},e.prototype.throwOnChangeError=function(e,t){throw new l.ExpressionChangedAfterItHasBeenCheckedException(this._currentBinding().debug,e,t,null)},e.prototype.throwDehydratedError=function(e){throw new l.DehydratedException(e)},e.prototype._currentBinding=function(){return this.bindingTargets[this.propertyBindingIndex]},e}();return t.AbstractChangeDetector=v,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/codegen_logic_util",["angular2/src/facade/lang","angular2/src/core/change_detection/codegen_facade","angular2/src/core/change_detection/proto_record","angular2/src/core/change_detection/constants","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/core/change_detection/codegen_facade"),s=e("angular2/src/core/change_detection/proto_record"),c=e("angular2/src/core/change_detection/constants"),l=e("angular2/src/facade/exceptions"),u=function(){function e(e,t,r,n){this._names=e,this._utilName=t,this._changeDetectorStateName=r,this._changeDetection=n}return e.prototype.genPropertyBindingEvalValue=function(e){var t=this;return this._genEvalValue(e,function(e){return t._names.getLocalName(e)},this._names.getLocalsAccessorName())},e.prototype.genEventBindingEvalValue=function(e,t){var r=this;return this._genEvalValue(t,function(t){return r._names.getEventLocalName(e,t)},"locals")},e.prototype._genEvalValue=function(e,t,r){var n,i=-1==e.contextIndex?this._names.getDirectiveName(e.directiveIndex):t(e.contextIndex),o=e.args.map(function(e){return t(e)}).join(", ");switch(e.mode){case s.RecordType.Self:n=i;break;case s.RecordType.Const:n=a.codify(e.funcOrValue);break;case s.RecordType.PropertyRead:n=this._observe(i+"."+e.name,e);break;case s.RecordType.SafeProperty:var c=this._observe(i+"."+e.name,e);n=this._utilName+".isValueBlank("+i+") ? null : "+this._observe(c,e);break;case s.RecordType.PropertyWrite:n=i+"."+e.name+" = "+t(e.args[0]);break;case s.RecordType.Local:n=this._observe(r+".get("+a.rawString(e.name)+")",e);break;case s.RecordType.InvokeMethod:n=this._observe(i+"."+e.name+"("+o+")",e);break;case s.RecordType.SafeMethodInvoke:var u=i+"."+e.name+"("+o+")";n=this._utilName+".isValueBlank("+i+") ? null : "+this._observe(u,e);break;case s.RecordType.InvokeClosure:n=i+"("+o+")";break;case s.RecordType.PrimitiveOp:n=this._utilName+"."+e.name+"("+o+")";break;case s.RecordType.CollectionLiteral:n=this._utilName+"."+e.name+"("+o+")";break;case s.RecordType.Interpolate:n=this._genInterpolation(e);break;case s.RecordType.KeyedRead:n=this._observe(i+"["+t(e.args[0])+"]",e);break;case s.RecordType.KeyedWrite:n=i+"["+t(e.args[0])+"] = "+t(e.args[1]);break;case s.RecordType.Chain:n=""+t(e.args[e.args.length-1]);break;default:throw new l.BaseException("Unknown operation "+e.mode)}return t(e.selfIndex)+" = "+n+";"},e.prototype._observe=function(e,t){return this._changeDetection===c.ChangeDetectionStrategy.OnPushObserve?"this.observeValue("+e+", "+t.selfIndex+")":e},e.prototype.genPropertyBindingTargets=function(e,t){var r=this,n=e.map(function(e){if(o.isBlank(e))return"null";var n=t?a.codify(e.debug):"null";return r._utilName+".bindingTarget("+a.codify(e.mode)+", "+e.elementIndex+", "+a.codify(e.name)+", "+a.codify(e.unit)+", "+n+")"});return"["+n.join(", ")+"]"},e.prototype.genDirectiveIndices=function(e){var t=this,r=e.map(function(e){return t._utilName+".directiveIndex("+e.directiveIndex.elementIndex+", "+e.directiveIndex.directiveIndex+")"});return"["+r.join(", ")+"]"},e.prototype._genInterpolation=function(e){for(var t=[],r=0;r<e.args.length;++r)t.push(a.codify(e.fixedArgs[r])),t.push(this._utilName+".s("+this._names.getLocalName(e.args[r])+")");return t.push(a.codify(e.fixedArgs[e.args.length])),a.combineGeneratedStrings(t)},e.prototype.genHydrateDirectives=function(e){for(var t=this,r=[],n=0,i=0;i<e.length;++i){var a=e[i],s=this._names.getDirectiveName(a.directiveIndex);r.push(s+" = "+this._genReadDirective(i)+";"),o.isPresent(a.outputs)&&a.outputs.forEach(function(e){var i=t._genEventHandler(a.directiveIndex.elementIndex,e[1]),c="this.outputSubscriptions["+n++ +"] = "+s+"."+e[0];o.IS_DART?r.push(c+".listen("+i+");"):r.push(c+".subscribe({next: "+i+"});")})}if(n>0){var c="this.outputSubscriptions";o.IS_DART?r.unshift(c+" = new List("+n+");"):r.unshift(c+" = new Array("+n+");")}return r.join("\n")},e.prototype.genDirectivesOnDestroy=function(e){for(var t=[],r=0;r<e.length;++r){var n=e[r];if(n.callOnDestroy){var i=this._names.getDirectiveName(n.directiveIndex);t.push(i+".ngOnDestroy();")}}return t.join("\n")},e.prototype._genEventHandler=function(e,t){return o.IS_DART?"(event) => this.handleEvent('"+t+"', "+e+", event)":"(function(event) { return this.handleEvent('"+t+"', "+e+", event); }).bind(this)"},e.prototype._genReadDirective=function(e){var t="this.getDirectiveFor(directives, "+e+")";return this._changeDetection===c.ChangeDetectionStrategy.OnPushObserve?"this.observeDirective("+t+", "+e+")":t},e.prototype.genHydrateDetectors=function(e){for(var t=[],r=0;r<e.length;++r){var n=e[r];n.isDefaultChangeDetection()||t.push(this._names.getDetectorName(n.directiveIndex)+" = this.getDetectorFor(directives, "+r+");")}return t.join("\n")},e.prototype.genContentLifecycleCallbacks=function(e){for(var t=[],r=o.IS_DART?"==":"===",n=e.length-1;n>=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/linker/element",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/core/di","angular2/src/core/di/provider","angular2/src/core/di/injector","angular2/src/core/di/provider","angular2/src/core/metadata/di","angular2/src/core/linker/view_type","angular2/src/core/linker/element_ref","angular2/src/core/linker/view_container_ref","angular2/src/core/linker/element_ref","angular2/src/core/render/api","angular2/src/core/linker/template_ref","angular2/src/core/metadata/directives","angular2/src/core/change_detection/change_detection","angular2/src/core/linker/query_list","angular2/src/core/reflection/reflection","angular2/src/core/pipes/pipe_provider","angular2/src/core/linker/view_container_ref"],!0,function(e,t,r){function n(e,t,r){for(var n=0;n<e.length;n++)r.set(e[n].key.id,t)}var i=System.global,o=i.define;i.define=void 0;var a,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/facade/collection"),p=e("angular2/src/core/di"),d=e("angular2/src/core/di/provider"),f=e("angular2/src/core/di/injector"),h=e("angular2/src/core/di/provider"),g=e("angular2/src/core/metadata/di"),m=e("angular2/src/core/linker/view_type"),v=e("angular2/src/core/linker/element_ref"),y=e("angular2/src/core/linker/view_container_ref"),_=e("angular2/src/core/linker/element_ref"),b=e("angular2/src/core/render/api"),C=e("angular2/src/core/linker/template_ref"),w=e("angular2/src/core/metadata/directives"),P=e("angular2/src/core/change_detection/change_detection"),E=e("angular2/src/core/linker/query_list"),S=e("angular2/src/core/reflection/reflection"),R=e("angular2/src/core/pipes/pipe_provider"),x=e("angular2/src/core/linker/view_container_ref"),O=function(){function e(){this.templateRefId=p.Key.get(C.TemplateRef).id,this.viewContainerId=p.Key.get(y.ViewContainerRef).id,this.changeDetectorRefId=p.Key.get(P.ChangeDetectorRef).id,this.elementRefId=p.Key.get(_.ElementRef).id,this.rendererId=p.Key.get(b.Renderer).id}return e.instance=function(){return c.isBlank(a)&&(a=new e),a},e}();t.StaticKeys=O;var D=function(e){function t(t,r,n,i,o,a,s){e.call(this,t,r,n,i,o),this.attributeName=a,this.queryDecorator=s,this._verify()}return s(t,e),t.prototype._verify=function(){var e=0;if(c.isPresent(this.queryDecorator)&&e++,c.isPresent(this.attributeName)&&e++,e>1)throw new l.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 g.AttributeMetadata});return c.isPresent(t)?t.attributeName:null},t._query=function(e){return e.find(function(e){return e instanceof g.QueryMetadata})},t}(p.Dependency);t.DirectiveDependency=D;var A=function(e){function t(t,r,n,i,o,a,s){e.call(this,t,[new h.ResolvedFactory(r,n)],!1),this.isComponent=i,this.providers=o,this.viewProviders=a,this.queries=s}return s(t,e),Object.defineProperty(t.prototype,"displayName",{get:function(){return this.key.displayName},enumerable:!0,configurable:!0}),t.createFromType=function(e,r){var n=new p.Provider(e,{useClass:e});c.isBlank(r)&&(r=new w.DirectiveMetadata);var i=h.resolveProvider(n),o=i.resolvedFactories[0],a=o.dependencies.map(D.createFrom),s=r instanceof w.ComponentMetadata,l=c.isPresent(r.providers)?p.Injector.resolve(r.providers):null,d=r instanceof w.ComponentMetadata&&c.isPresent(r.viewProviders)?p.Injector.resolve(r.viewProviders):null,f=[];return c.isPresent(r.queries)&&u.StringMapWrapper.forEach(r.queries,function(e,t){var r=S.reflector.setter(t);f.push(new T(r,e))}),a.forEach(function(e){c.isPresent(e.queryDecorator)&&f.push(new T(null,e.queryDecorator))}),new t(i.key,o.factory,a,s,l,d,f)},t}(h.ResolvedProvider_);t.DirectiveProvider=A;var T=function(){function e(e,t){this.setter=e,this.metadata=t}return e}();t.QueryMetadataWithSetter=T;var I=function(){function e(e,t,r,n,i,o){this.firstProviderIsComponent=e,this.index=t,this.attributes=r,this.protoQueryRefs=i,this.directiveVariableBindings=o;var a=n.length;a>0?this.protoInjector=new f.ProtoInjector(n):(this.protoInjector=null,this.protoQueryRefs=[])}return e.create=function(t,r,i,o,a){for(var s=null,l=new Map,p=new Map,h=u.ListWrapper.createGrowableSize(o.length),g=[],m=0;m<o.length;m++){var v=t.getResolvedDirectiveMetadata(o[m]);h[m]=new f.ProviderWithVisibility(v,v.isComponent?f.Visibility.PublicAndPrivate:f.Visibility.Public),v.isComponent?s=v:c.isPresent(v.providers)&&(d.mergeResolvedProviders(v.providers,l),n(v.providers,f.Visibility.Public,p)),c.isPresent(v.viewProviders)&&(d.mergeResolvedProviders(v.viewProviders,l),n(v.viewProviders,f.Visibility.Private,p));for(var y=0;y<v.queries.length;y++){var _=v.queries[y];g.push(new U(m,_.setter,_.metadata))}}return c.isPresent(s)&&c.isPresent(s.providers)&&(d.mergeResolvedProviders(s.providers,l),n(s.providers,f.Visibility.Public,p)),l.forEach(function(e,t){h.push(new f.ProviderWithVisibility(e,p.get(e.key.id)))}),new e(c.isPresent(s),r,i,h,g,a)},e.prototype.getProviderAtIndex=function(e){return this.protoInjector.getProviderAtIndex(e)},e}();t.AppProtoElement=I;var k=function(){function e(e,t,r){this.element=e,this.componentElement=t,this.injector=r}return e}(),N=function(){function e(e,t){this.injector=e,this.hostInjectorBoundary=t}return e}();t.InjectorWithHostBoundary=N;var V=function(){function e(e,t,r,n,i){var o=this;this.proto=e,this.parentView=t,this.parent=r,this.nativeElement=n,this.embeddedViewFactory=i,this.nestedViews=null,this.componentView=null,this.ref=new v.ElementRef_(this);var a=c.isPresent(r)?r._injector:t.parentInjector;if(c.isPresent(this.proto.protoInjector)){var s;s=c.isPresent(r)&&c.isPresent(r.proto.protoInjector)?!1:t.hostInjectorBoundary,this._queryStrategy=this._buildQueryStrategy(),this._injector=new p.Injector(this.proto.protoInjector,a,s,this,function(){return o._debugContext()});var l=this._injector.internalStrategy;this._strategy=l instanceof f.InjectorInlineStrategy?new F(l,this):new W(l,this),this._strategy.init()}else this._queryStrategy=null,this._injector=a,this._strategy=null}return e.getViewParentInjector=function(e,t,r,n){var i,o;switch(e){case m.ViewType.COMPONENT:i=t._injector,o=!0;break;case m.ViewType.EMBEDDED:i=c.isPresent(t.proto.protoInjector)?t._injector.parent:t._injector,o=t._injector.hostBoundary;break;case m.ViewType.HOST:if(c.isPresent(t))if(i=c.isPresent(t.proto.protoInjector)?t._injector.parent:t._injector,c.isPresent(r)){var a=r.map(function(e){return new f.ProviderWithVisibility(e,f.Visibility.Public)});i=new p.Injector(new f.ProtoInjector(a),i,!0,null,null),o=!1}else o=t._injector.hostBoundary;else i=n,o=!0}return new N(i,o)},e.prototype.attachComponentView=function(e){this.componentView=e},e.prototype._debugContext=function(){var e=this.parentView.getDebugContext(this,null,null);return c.isPresent(e)?new k(e.element,e.componentElement,e.injector):null},e.prototype.hasVariableBinding=function(e){var t=this.proto.directiveVariableBindings;return c.isPresent(t)&&u.StringMapWrapper.contains(t,e)},e.prototype.getVariableBinding=function(e){var t=this.proto.directiveVariableBindings[e];return c.isPresent(t)?this.getDirectiveAtIndex(t):this.getElementRef()},e.prototype.get=function(e){return this._injector.get(e)},e.prototype.hasDirective=function(e){return c.isPresent(this._injector.getOptional(e))},e.prototype.getComponent=function(){return c.isPresent(this._strategy)?this._strategy.getComponent():null},e.prototype.getInjector=function(){return this._injector},e.prototype.getElementRef=function(){return this.ref},e.prototype.getViewContainerRef=function(){return new x.ViewContainerRef_(this)},e.prototype.getTemplateRef=function(){return c.isPresent(this.embeddedViewFactory)?new C.TemplateRef_(this.ref):null},e.prototype.getDependency=function(e,t,r){if(t instanceof A){var n=r;if(c.isPresent(n.attributeName))return this._buildAttribute(n);if(c.isPresent(n.queryDecorator))return this._queryStrategy.findQuery(n.queryDecorator).list;if(n.key.id===O.instance().changeDetectorRefId)return this.proto.firstProviderIsComponent?new G(this):this.parentView.changeDetector.ref;if(n.key.id===O.instance().elementRefId)return this.getElementRef();if(n.key.id===O.instance().viewContainerId)return this.getViewContainerRef();if(n.key.id===O.instance().templateRefId){var i=this.getTemplateRef();if(c.isBlank(i)&&!n.optional)throw new p.NoProviderError(null,n.key);return i}if(n.key.id===O.instance().rendererId)return this.parentView.renderer}else if(t instanceof R.PipeProvider&&r.key.id===O.instance().changeDetectorRefId)return this.proto.firstProviderIsComponent?new G(this):this.parentView.changeDetector;return f.UNDEFINED},e.prototype._buildAttribute=function(e){var t=this.proto.attributes;return c.isPresent(t)&&u.StringMapWrapper.contains(t,e.attributeName)?t[e.attributeName]:null},e.prototype.addDirectivesMatchingQuery=function(e,t){var r=this.getTemplateRef();e.selector===C.TemplateRef&&c.isPresent(r)&&t.push(r),null!=this._strategy&&this._strategy.addDirectivesMatchingQuery(e,t)},e.prototype._buildQueryStrategy=function(){return 0===this.proto.protoQueryRefs.length?j:this.proto.protoQueryRefs.length<=L.NUMBER_OF_SUPPORTED_QUERIES?new L(this):new B(this)},e.prototype.getDirectiveAtIndex=function(e){return this._injector.getAt(e)},e.prototype.ngAfterViewChecked=function(){c.isPresent(this._queryStrategy)&&this._queryStrategy.updateViewQueries()},e.prototype.ngAfterContentChecked=function(){c.isPresent(this._queryStrategy)&&this._queryStrategy.updateContentQueries()},e.prototype.traverseAndSetQueriesAsDirty=function(){for(var e=this;c.isPresent(e);)e._setQueriesAsDirty(),e=c.isBlank(e.parent)&&e.parentView.proto.type===m.ViewType.EMBEDDED?e.parentView.containerAppElement:e.parent},e.prototype._setQueriesAsDirty=function(){c.isPresent(this._queryStrategy)&&this._queryStrategy.setContentQueriesAsDirty(),this.parentView.proto.type===m.ViewType.COMPONENT&&this.parentView.containerAppElement._queryStrategy.setViewQueriesAsDirty()},e}();t.AppElement=V;var M=function(){function e(){}return e.prototype.setContentQueriesAsDirty=function(){},e.prototype.setViewQueriesAsDirty=function(){},e.prototype.updateContentQueries=function(){},e.prototype.updateViewQueries=function(){},e.prototype.findQuery=function(e){throw new l.BaseException("Cannot find query for directive "+e+".")},e}(),j=new M,L=function(){function e(e){var t=e.proto.protoQueryRefs;t.length>0&&(this.query0=new H(t[0],e)),t.length>1&&(this.query1=new H(t[1],e)),t.length>2&&(this.query2=new H(t[2],e))}return e.prototype.setContentQueriesAsDirty=function(){c.isPresent(this.query0)&&!this.query0.isViewQuery&&(this.query0.dirty=!0),c.isPresent(this.query1)&&!this.query1.isViewQuery&&(this.query1.dirty=!0),c.isPresent(this.query2)&&!this.query2.isViewQuery&&(this.query2.dirty=!0)},e.prototype.setViewQueriesAsDirty=function(){c.isPresent(this.query0)&&this.query0.isViewQuery&&(this.query0.dirty=!0),c.isPresent(this.query1)&&this.query1.isViewQuery&&(this.query1.dirty=!0),c.isPresent(this.query2)&&this.query2.isViewQuery&&(this.query2.dirty=!0)},e.prototype.updateContentQueries=function(){c.isPresent(this.query0)&&!this.query0.isViewQuery&&this.query0.update(),c.isPresent(this.query1)&&!this.query1.isViewQuery&&this.query1.update(),c.isPresent(this.query2)&&!this.query2.isViewQuery&&this.query2.update()},e.prototype.updateViewQueries=function(){c.isPresent(this.query0)&&this.query0.isViewQuery&&this.query0.update(),c.isPresent(this.query1)&&this.query1.isViewQuery&&this.query1.update(),c.isPresent(this.query2)&&this.query2.isViewQuery&&this.query2.update()},e.prototype.findQuery=function(e){if(c.isPresent(this.query0)&&this.query0.protoQueryRef.query===e)return this.query0;if(c.isPresent(this.query1)&&this.query1.protoQueryRef.query===e)return this.query1;if(c.isPresent(this.query2)&&this.query2.protoQueryRef.query===e)return this.query2;throw new l.BaseException("Cannot find query for directive "+e+".")},e.NUMBER_OF_SUPPORTED_QUERIES=3,e}(),B=function(){function e(e){this.queries=e.proto.protoQueryRefs.map(function(t){return new H(t,e)})}return e.prototype.setContentQueriesAsDirty=function(){for(var e=0;e<this.queries.length;++e){var t=this.queries[e];t.isViewQuery||(t.dirty=!0)}},e.prototype.setViewQueriesAsDirty=function(){for(var e=0;e<this.queries.length;++e){var t=this.queries[e];t.isViewQuery&&(t.dirty=!0)}},e.prototype.updateContentQueries=function(){for(var e=0;e<this.queries.length;++e){var t=this.queries[e];t.isViewQuery||t.update()}},e.prototype.updateViewQueries=function(){for(var e=0;e<this.queries.length;++e){var t=this.queries[e];t.isViewQuery&&t.update()}},e.prototype.findQuery=function(e){for(var t=0;t<this.queries.length;++t){var r=this.queries[t];if(r.protoQueryRef.query===e)return r}throw new l.BaseException("Cannot find query for directive "+e+".")},e}(),F=function(){function e(e,t){this.injectorStrategy=e,this._ei=t}return e.prototype.init=function(){var e=this.injectorStrategy,t=e.protoStrategy;e.resetConstructionCounter(),t.provider0 instanceof A&&c.isPresent(t.keyId0)&&e.obj0===f.UNDEFINED&&(e.obj0=e.instantiateProvider(t.provider0,t.visibility0)),t.provider1 instanceof A&&c.isPresent(t.keyId1)&&e.obj1===f.UNDEFINED&&(e.obj1=e.instantiateProvider(t.provider1,t.visibility1)),t.provider2 instanceof A&&c.isPresent(t.keyId2)&&e.obj2===f.UNDEFINED&&(e.obj2=e.instantiateProvider(t.provider2,t.visibility2)),t.provider3 instanceof A&&c.isPresent(t.keyId3)&&e.obj3===f.UNDEFINED&&(e.obj3=e.instantiateProvider(t.provider3,t.visibility3)),t.provider4 instanceof A&&c.isPresent(t.keyId4)&&e.obj4===f.UNDEFINED&&(e.obj4=e.instantiateProvider(t.provider4,t.visibility4)),t.provider5 instanceof A&&c.isPresent(t.keyId5)&&e.obj5===f.UNDEFINED&&(e.obj5=e.instantiateProvider(t.provider5,t.visibility5)),t.provider6 instanceof A&&c.isPresent(t.keyId6)&&e.obj6===f.UNDEFINED&&(e.obj6=e.instantiateProvider(t.provider6,t.visibility6)),t.provider7 instanceof A&&c.isPresent(t.keyId7)&&e.obj7===f.UNDEFINED&&(e.obj7=e.instantiateProvider(t.provider7,t.visibility7)),t.provider8 instanceof A&&c.isPresent(t.keyId8)&&e.obj8===f.UNDEFINED&&(e.obj8=e.instantiateProvider(t.provider8,t.visibility8)),t.provider9 instanceof A&&c.isPresent(t.keyId9)&&e.obj9===f.UNDEFINED&&(e.obj9=e.instantiateProvider(t.provider9,t.visibility9))},e.prototype.getComponent=function(){
7
+ return this.injectorStrategy.obj0},e.prototype.isComponentKey=function(e){return this._ei.proto.firstProviderIsComponent&&c.isPresent(e)&&e.id===this.injectorStrategy.protoStrategy.keyId0},e.prototype.addDirectivesMatchingQuery=function(e,t){var r=this.injectorStrategy,n=r.protoStrategy;c.isPresent(n.provider0)&&n.provider0.key.token===e.selector&&(r.obj0===f.UNDEFINED&&(r.obj0=r.instantiateProvider(n.provider0,n.visibility0)),t.push(r.obj0)),c.isPresent(n.provider1)&&n.provider1.key.token===e.selector&&(r.obj1===f.UNDEFINED&&(r.obj1=r.instantiateProvider(n.provider1,n.visibility1)),t.push(r.obj1)),c.isPresent(n.provider2)&&n.provider2.key.token===e.selector&&(r.obj2===f.UNDEFINED&&(r.obj2=r.instantiateProvider(n.provider2,n.visibility2)),t.push(r.obj2)),c.isPresent(n.provider3)&&n.provider3.key.token===e.selector&&(r.obj3===f.UNDEFINED&&(r.obj3=r.instantiateProvider(n.provider3,n.visibility3)),t.push(r.obj3)),c.isPresent(n.provider4)&&n.provider4.key.token===e.selector&&(r.obj4===f.UNDEFINED&&(r.obj4=r.instantiateProvider(n.provider4,n.visibility4)),t.push(r.obj4)),c.isPresent(n.provider5)&&n.provider5.key.token===e.selector&&(r.obj5===f.UNDEFINED&&(r.obj5=r.instantiateProvider(n.provider5,n.visibility5)),t.push(r.obj5)),c.isPresent(n.provider6)&&n.provider6.key.token===e.selector&&(r.obj6===f.UNDEFINED&&(r.obj6=r.instantiateProvider(n.provider6,n.visibility6)),t.push(r.obj6)),c.isPresent(n.provider7)&&n.provider7.key.token===e.selector&&(r.obj7===f.UNDEFINED&&(r.obj7=r.instantiateProvider(n.provider7,n.visibility7)),t.push(r.obj7)),c.isPresent(n.provider8)&&n.provider8.key.token===e.selector&&(r.obj8===f.UNDEFINED&&(r.obj8=r.instantiateProvider(n.provider8,n.visibility8)),t.push(r.obj8)),c.isPresent(n.provider9)&&n.provider9.key.token===e.selector&&(r.obj9===f.UNDEFINED&&(r.obj9=r.instantiateProvider(n.provider9,n.visibility9)),t.push(r.obj9))},e}(),W=function(){function e(e,t){this.injectorStrategy=e,this._ei=t}return e.prototype.init=function(){var e=this.injectorStrategy,t=e.protoStrategy;e.resetConstructionCounter();for(var r=0;r<t.keyIds.length;r++)t.providers[r]instanceof A&&c.isPresent(t.keyIds[r])&&e.objs[r]===f.UNDEFINED&&(e.objs[r]=e.instantiateProvider(t.providers[r],t.visibilities[r]))},e.prototype.getComponent=function(){return this.injectorStrategy.objs[0]},e.prototype.isComponentKey=function(e){var t=this.injectorStrategy.protoStrategy;return this._ei.proto.firstProviderIsComponent&&c.isPresent(e)&&e.id===t.keyIds[0]},e.prototype.addDirectivesMatchingQuery=function(e,t){for(var r=this.injectorStrategy,n=r.protoStrategy,i=0;i<n.providers.length;i++)n.providers[i].key.token===e.selector&&(r.objs[i]===f.UNDEFINED&&(r.objs[i]=r.instantiateProvider(n.providers[i],n.visibilities[i])),t.push(r.objs[i]))},e}(),U=function(){function e(e,t,r){this.dirIndex=e,this.setter=t,this.query=r}return Object.defineProperty(e.prototype,"usesPropertySyntax",{get:function(){return c.isPresent(this.setter)},enumerable:!0,configurable:!0}),e}();t.ProtoQueryRef=U;var H=function(){function e(e,t){this.protoQueryRef=e,this.originator=t,this.list=new E.QueryList,this.dirty=!0}return Object.defineProperty(e.prototype,"isViewQuery",{get:function(){return this.protoQueryRef.query.isViewQuery},enumerable:!0,configurable:!0}),e.prototype.update=function(){if(this.dirty){if(this._update(),this.dirty=!1,this.protoQueryRef.usesPropertySyntax){var e=this.originator.getDirectiveAtIndex(this.protoQueryRef.dirIndex);this.protoQueryRef.query.first?this.protoQueryRef.setter(e,this.list.length>0?this.list.first:null):this.protoQueryRef.setter(e,this.list)}this.list.notifyOnChanges()}},e.prototype._update=function(){var e=[];if(this.protoQueryRef.query.isViewQuery){var t=this.originator.componentView;c.isPresent(t)&&this._visitView(t,e)}else this._visit(this.originator,e);this.list.reset(e)},e.prototype._visit=function(e,t){for(var r=e.parentView,n=e.proto.index,i=n;i<r.appElements.length;i++){var o=r.appElements[i];if(i>n&&(c.isBlank(o.parent)||o.parent.proto.index<n))break;(this.protoQueryRef.query.descendants||o.parent==this.originator||o==this.originator)&&(this._visitInjector(o,t),this._visitViewContainerViews(o.nestedViews,t))}},e.prototype._visitInjector=function(e,t){this.protoQueryRef.query.isVarBindingQuery?this._aggregateVariableBinding(e,t):this._aggregateDirective(e,t)},e.prototype._visitViewContainerViews=function(e,t){if(c.isPresent(e))for(var r=0;r<e.length;r++)this._visitView(e[r],t)},e.prototype._visitView=function(e,t){for(var r=0;r<e.appElements.length;r++){var n=e.appElements[r];this._visitInjector(n,t),this._visitViewContainerViews(n.nestedViews,t)}},e.prototype._aggregateVariableBinding=function(e,t){for(var r=this.protoQueryRef.query.varBindings,n=0;n<r.length;++n)e.hasVariableBinding(r[n])&&t.push(e.getVariableBinding(r[n]))},e.prototype._aggregateDirective=function(e,t){e.addDirectivesMatchingQuery(this.protoQueryRef.query,t)},e}();t.QueryRef=H;var G=function(e){function t(t){e.call(this),this._appElement=t}return s(t,e),t.prototype.markForCheck=function(){this._appElement.componentView.changeDetector.ref.markForCheck()},t.prototype.detach=function(){this._appElement.componentView.changeDetector.ref.detach()},t.prototype.detectChanges=function(){this._appElement.componentView.changeDetector.ref.detectChanges()},t.prototype.checkNoChanges=function(){this._appElement.componentView.changeDetector.ref.checkNoChanges()},t.prototype.reattach=function(){this._appElement.componentView.changeDetector.ref.reattach()},t}(P.ChangeDetectorRef);return i.define=o,r.exports}),System.register("angular2/src/core/pipes/pipes",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/core/change_detection/pipes"],!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",["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.EmbeddedViewRef=f.EmbeddedViewRef,t.HostViewRef=f.HostViewRef,t.ViewRef=f.ViewRef,t.HostViewFactoryRef=f.HostViewFactoryRef;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/linker/resolved_metadata_cache",["angular2/src/core/di","angular2/src/facade/lang","angular2/src/core/linker/element","angular2/src/core/linker/directive_resolver","angular2/src/core/pipes/pipe_provider","angular2/src/core/linker/pipe_resolver"],!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=e("angular2/src/core/linker/element"),u=e("angular2/src/core/linker/directive_resolver"),p=e("angular2/src/core/pipes/pipe_provider"),d=e("angular2/src/core/linker/pipe_resolver"),f=function(){function e(e,t){this._directiveResolver=e,this._pipeResolver=t,this._directiveCache=new Map,this._pipeCache=new Map}return e.prototype.getResolvedDirectiveMetadata=function(e){var t=this._directiveCache.get(e);return c.isBlank(t)&&(t=l.DirectiveProvider.createFromType(e,this._directiveResolver.resolve(e)),this._directiveCache.set(e,t)),t},e.prototype.getResolvedPipeMetadata=function(e){var t=this._pipeCache.get(e);return c.isBlank(t)&&(t=p.PipeProvider.createFromType(e,this._pipeResolver.resolve(e)),this._pipeCache.set(e,t)),t},e=o([s.Injectable(),a("design:paramtypes",[u.DirectiveResolver,d.PipeResolver])],e)}();return t.ResolvedMetadataCache=f,t.CODEGEN_RESOLVED_METADATA_CACHE=new f(u.CODEGEN_DIRECTIVE_RESOLVER,d.CODEGEN_PIPE_RESOLVER),n.define=i,r.exports}),System.register("angular2/src/platform/dom/debug/ng_probe",["angular2/src/facade/lang","angular2/src/core/di","angular2/src/platform/dom/dom_adapter","angular2/src/core/debug/debug_node","angular2/src/platform/dom/dom_renderer","angular2/core","angular2/src/core/debug/debug_renderer"],!0,function(e,t,r){function n(e){return p.getDebugNode(e)}function i(e){return c.assertionsEnabled()?o(e):e}function o(e){return u.DOM.setGlobalVar(g,n),new h.DebugDomRootRenderer(e)}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/src/platform/dom/dom_adapter"),p=e("angular2/src/core/debug/debug_node"),d=e("angular2/src/platform/dom/dom_renderer"),f=e("angular2/core"),h=e("angular2/src/core/debug/debug_renderer"),g="ng.probe";return t.inspectNativeElement=n,t.ELEMENT_PROBE_PROVIDERS=c.CONST_EXPR([new l.Provider(f.RootRenderer,{useFactory:i,deps:[d.DomRootRenderer]})]),t.ELEMENT_PROBE_PROVIDERS_PROD_MODE=c.CONST_EXPR([new l.Provider(f.RootRenderer,{useFactory:o,deps:[d.DomRootRenderer]})]),a.define=s,r.exports}),System.register("angular2/src/core/di/provider",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/core/reflection/reflection","angular2/src/core/di/key","angular2/src/core/di/metadata","angular2/src/core/di/exceptions","angular2/src/core/di/forward_ref"],!0,function(e,t,r){function n(e){return new k(e)}function i(e,t){var r=t.useClass,n=t.useValue,i=t.useExisting,o=t.useFactory,a=t.deps,s=t.multi;return new D(e,{useClass:r,useValue:n,useExisting:i,useFactory:o,deps:a,multi:s})}function o(e){var t,r;if(_.isPresent(e.useClass)){var n=R.resolveForwardRef(e.useClass);t=w.reflector.factory(n),r=p(n)}else _.isPresent(e.useExisting)?(t=function(e){return e},r=[x.fromKey(P.Key.get(e.useExisting))]):_.isPresent(e.useFactory)?(t=e.useFactory,r=u(e.useFactory,e.dependencies)):(t=function(){return e.useValue},r=O);return new I(t,r)}function a(e){return new T(P.Key.get(e.token),[o(e)],e.multi)}function s(e){var t=l(e,[]),r=t.map(a);return C.MapWrapper.values(c(r,new Map))}function c(e,t){for(var r=0;r<e.length;r++){var n=e[r],i=t.get(n.key.id);if(_.isPresent(i)){if(n.multiProvider!==i.multiProvider)throw new S.MixingMultiProvidersWithRegularProvidersError(i,n);if(n.multiProvider)for(var o=0;o<n.resolvedFactories.length;o++)i.resolvedFactories.push(n.resolvedFactories[o]);else t.set(n.key.id,n)}else{var a;a=n.multiProvider?new T(n.key,C.ListWrapper.clone(n.resolvedFactories),n.multiProvider):n,t.set(n.key.id,a)}}return t}function l(e,t){return e.forEach(function(e){if(e instanceof _.Type)t.push(i(e,{useClass:e}));else if(e instanceof D)t.push(e);else{if(!(e instanceof Array))throw e instanceof k?new S.InvalidProviderError(e.token):new S.InvalidProviderError(e);l(e,t)}}),t}function u(e,t){if(_.isBlank(t))return p(e);var r=t.map(function(e){return[e]});return t.map(function(t){return d(e,t,r)})}function p(e){var t=w.reflector.parameters(e);if(_.isBlank(t))return[];if(t.some(_.isBlank))throw new S.NoAnnotationError(e,t);return t.map(function(r){return d(e,r,t)})}function d(e,t,r){var n=[],i=null,o=!1;if(!_.isArray(t))return t instanceof E.InjectMetadata?f(t.token,o,null,null,n):f(t,o,null,null,n);for(var a=null,s=null,c=0;c<t.length;++c){var l=t[c];l instanceof _.Type?i=l:l instanceof E.InjectMetadata?i=l.token:l instanceof E.OptionalMetadata?o=!0:l instanceof E.SelfMetadata?s=l:l instanceof E.HostMetadata?s=l:l instanceof E.SkipSelfMetadata?a=l:l instanceof E.DependencyMetadata&&(_.isPresent(l.token)&&(i=l.token),n.push(l))}if(i=R.resolveForwardRef(i),_.isPresent(i))return f(i,o,a,s,n);throw new S.NoAnnotationError(e,r)}function f(e,t,r,n,i){return new x(P.Key.get(e),t,r,n,i)}var h=System.global,g=h.define;h.define=void 0;var m=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},v=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},y=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},_=e("angular2/src/facade/lang"),b=e("angular2/src/facade/exceptions"),C=e("angular2/src/facade/collection"),w=e("angular2/src/core/reflection/reflection"),P=e("angular2/src/core/di/key"),E=e("angular2/src/core/di/metadata"),S=e("angular2/src/core/di/exceptions"),R=e("angular2/src/core/di/forward_ref"),x=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=x;var O=_.CONST_EXPR([]),D=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 _.normalizeBool(this._multi)},enumerable:!0,configurable:!0}),e=v([_.CONST(),y("design:paramtypes",[Object,Object])],e)}();t.Provider=D;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 m(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=v([_.CONST(),y("design:paramtypes",[Object,Object])],t)}(D);t.Binding=A;var T=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_=T;var I=function(){function e(e,t){this.factory=e,this.dependencies=t}return e}();t.ResolvedFactory=I,t.bind=n,t.provide=i;var k=function(){function e(e){this.token=e}return e.prototype.toClass=function(e){if(!_.isType(e))throw new b.BaseException('Trying to create a class provider but "'+_.stringify(e)+'" is not a class!');return new D(this.token,{useClass:e})},e.prototype.toValue=function(e){return new D(this.token,{useValue:e})},e.prototype.toAlias=function(e){if(_.isBlank(e))throw new b.BaseException("Can not alias "+_.stringify(this.token)+" to a blank value!");return new D(this.token,{useExisting:e})},e.prototype.toFactory=function(e,t){if(!_.isFunction(e))throw new b.BaseException('Trying to create a factory provider but "'+_.stringify(e)+'" is not a function!');return new D(this.token,{useFactory:e,deps:t})},e}();return t.ProviderBuilder=k,t.resolveFactory=o,t.resolveProvider=a,t.resolveProviders=s,t.mergeResolvedProviders=c,h.define=g,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","angular2/src/core/reflection/reflection","angular2/src/facade/async"],!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=e("angular2/src/core/reflection/reflection"),h=e("angular2/src/facade/async"),g=function(e){function t(t,r,n,i,o,a,s,l,u){e.call(this,t,r,n,i,o),this._records=a,this._eventBindings=s,this._directiveRecords=l,this._genConfig=u;var p=a.length+1;this.values=c.ListWrapper.createFixedSize(p),this.localPipes=c.ListWrapper.createFixedSize(p),this.prevContexts=c.ListWrapper.createFixedSize(p),this.changes=c.ListWrapper.createFixedSize(p),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<e.records.length;++n){var i=e.records[n];if(i.isSkipRecord())n+=this._computeSkipLength(n,i,r);else{var o=this._calculateCurrValue(i,r,t);if(i.lastInBinding)return this._markPathAsCheckOnce(i),o;this._writeSelf(i,o,r)}}throw new s.BaseException("Cannot be reached")},t.prototype._computeSkipLength=function(e,t,r){if(t.mode===d.RecordType.SkipRecords)return t.fixedArgs[0]-e-1;if(t.mode===d.RecordType.SkipRecordsIf){var n=this._readContext(t,r);return n?t.fixedArgs[0]-e-1:0}if(t.mode===d.RecordType.SkipRecordsIfNot){var n=this._readContext(t,r);return n?0:t.fixedArgs[0]-e-1}throw new s.BaseException("Cannot be reached")},t.prototype._markPathAsCheckOnce=function(e){if(!e.bindingRecord.isDefaultChangeDetection()){var t=e.bindingRecord.directiveRecord;this._getDetectorFor(t.directiveIndex).markPathToRootAsCheckOnce()}},t.prototype._matchingEventBindings=function(e,t){return this._eventBindings.filter(function(r){return r.eventName==e&&r.elIndex===t})},t.prototype.hydrateDirectives=function(t){var r=this;if(this.values[0]=this.context,this.dispatcher=t,this.strategy===p.ChangeDetectionStrategy.OnPushObserve)for(var n=0;n<this.directiveIndices.length;++n){var i=this.directiveIndices[n];e.prototype.observeDirective.call(this,this._getDirectiveFor(i),n)}this.outputSubscriptions=[];for(var n=0;n<this._directiveRecords.length;++n){var o=this._directiveRecords[n];a.isPresent(o.outputs)&&o.outputs.forEach(function(e){var t=r._createEventHandler(o.directiveIndex.elementIndex,e[1]),n=r._getDirectiveFor(o.directiveIndex),i=f.reflector.getter(e[0]);r.outputSubscriptions.push(h.ObservableWrapper.subscribe(i(n),t))})}},t.prototype._createEventHandler=function(e,t){var r=this;return function(n){return r.handleEvent(t,e,n)}},t.prototype.dehydrateDirectives=function(e){e&&(this._destroyPipes(),this._destroyDirectives()),this.values[0]=null,c.ListWrapper.fill(this.values,u.ChangeDetectionUtil.uninitialized,1),c.ListWrapper.fill(this.changes,!1),c.ListWrapper.fill(this.localPipes,null),c.ListWrapper.fill(this.prevContexts,u.ChangeDetectionUtil.uninitialized)},t.prototype._destroyPipes=function(){for(var e=0;e<this.localPipes.length;++e)a.isPresent(this.localPipes[e])&&u.ChangeDetectionUtil.callPipeOnDestroy(this.localPipes[e])},t.prototype._destroyDirectives=function(){for(var e=0;e<this._directiveRecords.length;++e){var t=this._directiveRecords[e];t.callOnDestroy&&this._getDirectiveFor(t.directiveIndex).ngOnDestroy()}},t.prototype.checkNoChanges=function(){this.runDetectChanges(!0)},t.prototype.detectChangesInRecordsInternal=function(e){for(var t=this._records,r=null,n=!1,i=0;i<t.length;++i){var o=t[i],s=o.bindingRecord,c=s.directiveRecord;if(this._firstInBinding(o)&&(this.propertyBindingIndex=o.propertyBindingIndex),o.isLifeCycleRecord())"DoCheck"!==o.name||e?"OnInit"!==o.name||e||this.state!=p.ChangeDetectorState.NeverChecked?"OnChanges"===o.name&&a.isPresent(r)&&!e&&this._getDirectiveFor(c.directiveIndex).ngOnChanges(r):this._getDirectiveFor(c.directiveIndex).ngOnInit():this._getDirectiveFor(c.directiveIndex).ngDoCheck();else if(o.isSkipRecord())i+=this._computeSkipLength(i,o,this.values);else{var l=this._check(o,e,this.values,this.locals);a.isPresent(l)&&(this._updateDirectiveOrElement(l,s),n=!0,r=this._addChange(s,l,r))}o.lastInDirective&&(r=null,n&&!s.isDefaultChangeDetection()&&this._getDetectorFor(c.directiveIndex).markAsCheckOnce(),n=!1)}},t.prototype._firstInBinding=function(e){var t=u.ChangeDetectionUtil.protoByIndex(this._records,e.selfIndex-1);return a.isBlank(t)||t.bindingRecord!==e.bindingRecord},t.prototype.afterContentLifecycleCallbacksInternal=function(){for(var e=this._directiveRecords,t=e.length-1;t>=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.dispatcher.getDirectiveFor(e)},t.prototype._getDetectorFor=function(e){return this.dispatcher.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),s=r?!u.ChangeDetectionUtil.devModeEqual(a,o):u.ChangeDetectionUtil.looseNotIdentical(a,o);if(s){if(t.lastInBinding){var c=u.ChangeDetectionUtil.simpleChange(a,o);return r&&this.throwOnChangeError(a,o),this._writeSelf(t,o,n),this._setChanged(t,!0),c}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),c=t?!u.ChangeDetectionUtil.devModeEqual(s,a):u.ChangeDetectionUtil.looseNotIdentical(s,a);if(c){if(a=u.ChangeDetectionUtil.unwrapValue(a),e.lastInBinding){var l=u.ChangeDetectionUtil.simpleChange(s,a);return t&&this.throwOnChangeError(s,a),this._writeSelf(e,a,r),this._setChanged(e,!0),l}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;r<t.length;++r)if(this.changes[t[r]])return!0;return!1},t.prototype._argsOrContextChanged=function(e){return this._argsChanged(e)||this.changes[e.contextIndex]},t.prototype._readArgs=function(e,t){for(var r=c.ListWrapper.createFixedSize(e.args.length),n=e.args,i=0;i<n.length;++i)r[i]=t[n[i]];return r},t}(l.AbstractChangeDetector);return t.DynamicChangeDetector=g,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/change_detection_jit_generator",["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/proto_record","angular2/src/core/change_detection/codegen_name_util","angular2/src/core/change_detection/codegen_logic_util","angular2/src/core/change_detection/codegen_facade","angular2/src/core/change_detection/constants","angular2/src/core/change_detection/proto_change_detector"],!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/abstract_change_detector"),l=e("angular2/src/core/change_detection/change_detection_util"),u=e("angular2/src/core/change_detection/proto_record"),p=e("angular2/src/core/change_detection/codegen_name_util"),d=e("angular2/src/core/change_detection/codegen_logic_util"),f=e("angular2/src/core/change_detection/codegen_facade"),h=e("angular2/src/core/change_detection/constants"),g=e("angular2/src/core/change_detection/proto_change_detector"),m="isChanged",v="changes",y=function(){function e(e,t,r,n){this.changeDetectionUtilVarName=t,this.abstractChangeDetectorVarName=r,this.changeDetectorStateVarName=n;var i=g.createPropertyRecords(e),o=g.createEventRecords(e),a=e.bindingRecords.map(function(e){return e.target});this.id=e.id,this.changeDetectionStrategy=e.strategy,this.genConfig=e.genConfig,this.records=i,this.propertyBindingTargets=a,this.eventBindings=o,this.directiveRecords=e.directiveRecords,this._names=new p.CodegenNameUtil(this.records,this.eventBindings,this.directiveRecords,this.changeDetectionUtilVarName),this._logic=new d.CodegenLogicUtil(this._names,this.changeDetectionUtilVarName,this.changeDetectorStateVarName,this.changeDetectionStrategy),this.typeName=p.sanitizeName("ChangeDetector_"+this.id)}return e.prototype.generate=function(){var e="\n "+this.generateSource()+"\n return function() {\n return new "+this.typeName+"();\n }\n ";return new Function(this.abstractChangeDetectorVarName,this.changeDetectionUtilVarName,this.changeDetectorStateVarName,e)(c.AbstractChangeDetector,l.ChangeDetectionUtil,h.ChangeDetectorState)},e.prototype.generateSource=function(){return"\n var "+this.typeName+" = function "+this.typeName+"() {\n "+this.abstractChangeDetectorVarName+".call(\n this, "+JSON.stringify(this.id)+", "+this.records.length+",\n "+this.typeName+".gen_propertyBindingTargets, "+this.typeName+".gen_directiveIndices,\n "+f.codify(this.changeDetectionStrategy)+");\n this.dehydrateDirectives(false);\n }\n\n "+this.typeName+".prototype = Object.create("+this.abstractChangeDetectorVarName+".prototype);\n\n "+this.typeName+".prototype.detectChangesInRecordsInternal = function(throwOnChange) {\n "+this._names.genInitLocals()+"\n var "+m+" = false;\n var "+v+" = null;\n\n "+this._genAllRecords(this.records)+"\n }\n\n "+this._maybeGenHandleEventInternal()+"\n\n "+this._maybeGenAfterContentLifecycleCallbacks()+"\n\n "+this._maybeGenAfterViewLifecycleCallbacks()+"\n\n "+this._maybeGenHydrateDirectives()+"\n\n "+this._maybeGenDehydrateDirectives()+"\n\n "+this._genPropertyBindingTargets()+"\n\n "+this._genDirectiveIndices()+"\n ";
8
+ },e.prototype._genPropertyBindingTargets=function(){var e=this._logic.genPropertyBindingTargets(this.propertyBindingTargets,this.genConfig.genDebugInfo);return this.typeName+".gen_propertyBindingTargets = "+e+";"},e.prototype._genDirectiveIndices=function(){var e=this._logic.genDirectiveIndices(this.directiveRecords);return this.typeName+".gen_directiveIndices = "+e+";"},e.prototype._maybeGenHandleEventInternal=function(){var e=this;if(this.eventBindings.length>0){var t=this.eventBindings.map(function(t){return e._genEventBinding(t)}).join("\n");return"\n "+this.typeName+".prototype.handleEventInternal = function(eventName, elIndex, locals) {\n var "+this._names.getPreventDefaultAccesor()+" = false;\n "+this._names.genInitEventLocals()+"\n "+t+"\n return "+this._names.getPreventDefaultAccesor()+";\n }\n "}return""},e.prototype._genEventBinding=function(e){var t=this,r=[];return this._endOfBlockIdxs=[],s.ListWrapper.forEachWithIndex(e.records,function(n,i){var o;o=n.isConditionalSkipRecord()?t._genConditionalSkip(n,t._names.getEventLocalName(e,i)):n.isUnconditionalSkipRecord()?t._genUnconditionalSkip(n):t._genEventBindingEval(e,n),o+=t._genEndOfSkipBlock(i),r.push(o)}),'\n if (eventName === "'+e.eventName+'" && elIndex === '+e.elIndex+") {\n "+r.join("\n")+"\n }"},e.prototype._genEventBindingEval=function(e,t){if(t.lastInBinding){var r=this._logic.genEventBindingEvalValue(e,t),n=this._genMarkPathToRootAsCheckOnce(t),i=this._genUpdatePreventDefault(e,t);return r+"\n"+n+"\n"+i}return this._logic.genEventBindingEvalValue(e,t)},e.prototype._genMarkPathToRootAsCheckOnce=function(e){var t=e.bindingRecord;return t.isDefaultChangeDetection()?"":this._names.getDetectorName(t.directiveRecord.directiveIndex)+".markPathToRootAsCheckOnce();"},e.prototype._genUpdatePreventDefault=function(e,t){var r=this._names.getEventLocalName(e,t.selfIndex);return"if ("+r+" === false) { "+this._names.getPreventDefaultAccesor()+" = true};"},e.prototype._maybeGenDehydrateDirectives=function(){var e=this._names.genPipeOnDestroy(),t=this._logic.genDirectivesOnDestroy(this.directiveRecords),r=this._names.genDehydrateFields();return e||t||r?this.typeName+".prototype.dehydrateDirectives = function(destroyPipes) {\n if (destroyPipes) {\n "+e+"\n "+t+"\n }\n "+r+"\n }":""},e.prototype._maybeGenHydrateDirectives=function(){var e=this._logic.genHydrateDirectives(this.directiveRecords),t=this._logic.genHydrateDetectors(this.directiveRecords);return e||t?this.typeName+".prototype.hydrateDirectives = function(directives) {\n "+e+"\n "+t+"\n }":""},e.prototype._maybeGenAfterContentLifecycleCallbacks=function(){var e=this._logic.genContentLifecycleCallbacks(this.directiveRecords);if(e.length>0){var t=e.join("\n");return"\n "+this.typeName+".prototype.afterContentLifecycleCallbacksInternal = function() {\n "+t+"\n }\n "}return""},e.prototype._maybeGenAfterViewLifecycleCallbacks=function(){var e=this._logic.genViewLifecycleCallbacks(this.directiveRecords);if(e.length>0){var t=e.join("\n");return"\n "+this.typeName+".prototype.afterViewLifecycleCallbacksInternal = function() {\n "+t+"\n }\n "}return""},e.prototype._genAllRecords=function(e){var t=[];this._endOfBlockIdxs=[];for(var r=0;r<e.length;r++){var n=void 0,i=e[r];n=i.isLifeCycleRecord()?this._genDirectiveLifecycle(i):i.isPipeRecord()?this._genPipeCheck(i):i.isConditionalSkipRecord()?this._genConditionalSkip(i,this._names.getLocalName(i.contextIndex)):i.isUnconditionalSkipRecord()?this._genUnconditionalSkip(i):this._genReferenceCheck(i),n="\n "+this._maybeFirstInBinding(i)+"\n "+n+"\n "+this._maybeGenLastInDirective(i)+"\n "+this._genEndOfSkipBlock(r)+"\n ",t.push(n)}return t.join("\n")},e.prototype._genConditionalSkip=function(e,t){var r=e.mode===u.RecordType.SkipRecordsIf?"!":"";return this._endOfBlockIdxs.push(e.fixedArgs[0]-1),"if ("+r+t+") {"},e.prototype._genUnconditionalSkip=function(e){return this._endOfBlockIdxs.pop(),this._endOfBlockIdxs.push(e.fixedArgs[0]-1),"} else {"},e.prototype._genEndOfSkipBlock=function(e){if(!s.ListWrapper.isEmpty(this._endOfBlockIdxs)){var t=s.ListWrapper.last(this._endOfBlockIdxs);if(e===t)return this._endOfBlockIdxs.pop(),"}"}return""},e.prototype._genDirectiveLifecycle=function(e){if("DoCheck"===e.name)return this._genOnCheck(e);if("OnInit"===e.name)return this._genOnInit(e);if("OnChanges"===e.name)return this._genOnChange(e);throw new a.BaseException("Unknown lifecycle event '"+e.name+"'")},e.prototype._genPipeCheck=function(e){var t=this,r=this._names.getLocalName(e.contextIndex),n=e.args.map(function(e){return t._names.getLocalName(e)}).join(", "),i=this._names.getFieldName(e.selfIndex),o=this._names.getLocalName(e.selfIndex),a=this._names.getPipeName(e.selfIndex),s=e.name,c="\n if ("+a+" === "+this.changeDetectionUtilVarName+".uninitialized) {\n "+a+" = "+this._names.getPipesAccessorName()+".get('"+s+"');\n }\n ",l=o+" = "+a+".pipe.transform("+r+", ["+n+"]);",u=e.args.map(function(e){return t._names.getChangeName(e)});u.push(this._names.getChangeName(e.contextIndex));var p="!"+a+".pure || ("+u.join(" || ")+")",d="\n "+this._genThrowOnChangeCheck(i,o)+"\n if ("+this.changeDetectionUtilVarName+".looseNotIdentical("+i+", "+o+")) {\n "+o+" = "+this.changeDetectionUtilVarName+".unwrapValue("+o+")\n "+this._genChangeMarker(e)+"\n "+this._genUpdateDirectiveOrElement(e)+"\n "+this._genAddToChanges(e)+"\n "+i+" = "+o+";\n }\n ",f=e.shouldBeChecked()?""+l+d:l;return e.isUsedByOtherRecord()?c+" if ("+p+") { "+f+" } else { "+o+" = "+i+"; }":c+" if ("+p+") { "+f+" }"},e.prototype._genReferenceCheck=function(e){var t=this,r=this._names.getFieldName(e.selfIndex),n=this._names.getLocalName(e.selfIndex),i="\n "+this._logic.genPropertyBindingEvalValue(e)+"\n ",o="\n "+this._genThrowOnChangeCheck(r,n)+"\n if ("+this.changeDetectionUtilVarName+".looseNotIdentical("+r+", "+n+")) {\n "+this._genChangeMarker(e)+"\n "+this._genUpdateDirectiveOrElement(e)+"\n "+this._genAddToChanges(e)+"\n "+r+" = "+n+";\n }\n ",a=e.shouldBeChecked()?""+i+o:i;if(e.isPureFunction()){var s=e.args.map(function(e){return t._names.getChangeName(e)}).join(" || ");return e.isUsedByOtherRecord()?"if ("+s+") { "+a+" } else { "+n+" = "+r+"; }":"if ("+s+") { "+a+" }"}return a},e.prototype._genChangeMarker=function(e){return e.argumentToPureFunction?this._names.getChangeName(e.selfIndex)+" = true":""},e.prototype._genUpdateDirectiveOrElement=function(e){if(!e.lastInBinding)return"";var t=this._names.getLocalName(e.selfIndex),r=this.genConfig.logBindingUpdate?"this.logBindingUpdate("+t+");":"",n=e.bindingRecord;if(n.target.isDirective()){var i=this._names.getDirectiveName(n.directiveRecord.directiveIndex)+"."+n.target.name;return"\n "+i+" = "+t+";\n "+r+"\n "+m+" = true;\n "}return"\n this.notifyDispatcher("+t+");\n "+r+"\n "},e.prototype._genThrowOnChangeCheck=function(e,t){return o.assertionsEnabled()?"\n if (throwOnChange && !"+this.changeDetectionUtilVarName+".devModeEqual("+e+", "+t+")) {\n this.throwOnChangeError("+e+", "+t+");\n }\n ":""},e.prototype._genAddToChanges=function(e){var t=this._names.getLocalName(e.selfIndex),r=this._names.getFieldName(e.selfIndex);return e.bindingRecord.callOnChanges()?v+" = this.addChange("+v+", "+r+", "+t+");":""},e.prototype._maybeFirstInBinding=function(e){var t=l.ChangeDetectionUtil.protoByIndex(this.records,e.selfIndex-1),r=o.isBlank(t)||t.bindingRecord!==e.bindingRecord;return r&&!e.bindingRecord.isDirectiveLifecycle()?this._names.getPropertyBindingIndex()+" = "+e.propertyBindingIndex+";":""},e.prototype._maybeGenLastInDirective=function(e){return e.lastInDirective?"\n "+v+" = null;\n "+this._genNotifyOnPushDetectors(e)+"\n "+m+" = false;\n ":""},e.prototype._genOnCheck=function(e){var t=e.bindingRecord;return"if (!throwOnChange) "+this._names.getDirectiveName(t.directiveRecord.directiveIndex)+".ngDoCheck();"},e.prototype._genOnInit=function(e){var t=e.bindingRecord;return"if (!throwOnChange && "+this._names.getStateName()+" === "+this.changeDetectorStateVarName+".NeverChecked) "+this._names.getDirectiveName(t.directiveRecord.directiveIndex)+".ngOnInit();"},e.prototype._genOnChange=function(e){var t=e.bindingRecord;return"if (!throwOnChange && "+v+") "+this._names.getDirectiveName(t.directiveRecord.directiveIndex)+".ngOnChanges("+v+");"},e.prototype._genNotifyOnPushDetectors=function(e){var t=e.bindingRecord;if(!e.lastInDirective||t.isDefaultChangeDetection())return"";var r="\n if("+m+") {\n "+this._names.getDetectorName(t.directiveRecord.directiveIndex)+".markAsCheckOnce();\n }\n ";return r},e}();return t.ChangeDetectorJITGenerator=y,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/core/linker/element","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/core/render/api","angular2/src/core/linker/view_ref","angular2/src/core/pipes/pipes","angular2/src/core/render/util","angular2/src/core/change_detection/interfaces","angular2/src/core/pipes/pipes","angular2/src/core/linker/view_type"],!0,function(e,t,r){function n(e){for(var t={},r=e;g.isPresent(r);)t=p.StringMapWrapper.merge(t,p.MapWrapper.toStringMap(r.current)),r=r.parent;return t}function i(e){return o(e,[])}function o(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(n instanceof h.AppElement){var i=n;if(t.push(i.nativeElement),g.isPresent(i.nestedViews))for(var a=0;a<i.nestedViews.length;a++)o(i.nestedViews[a].rootNodesOrAppElements,t)}else t.push(n)}return t}function a(e,t,r){var n=g.isPresent(r)?r.length:0;if(t>n)throw new m.BaseException("The component "+e+" has "+t+" <ng-content> elements,"+(" but only "+n+" slots were provided."))}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=e("angular2/src/facade/collection"),d=e("angular2/src/core/change_detection/change_detection"),f=e("angular2/src/core/change_detection/interfaces"),h=e("angular2/src/core/linker/element"),g=e("angular2/src/facade/lang"),m=e("angular2/src/facade/exceptions"),v=e("angular2/src/core/render/api"),y=e("angular2/src/core/linker/view_ref"),_=e("angular2/src/core/pipes/pipes"),b=e("angular2/src/core/render/util"),C=e("angular2/src/core/change_detection/interfaces");t.DebugContext=C.DebugContext;var w=e("angular2/src/core/pipes/pipes"),P=e("angular2/src/core/linker/view_type"),E="ng-reflect-",S=g.CONST_EXPR(new Object),R=function(){function e(e,t,r,n,i,o,a,s){this.proto=e,this.renderer=t,this.viewManager=r,this.projectableNodes=n,this.containerAppElement=i,this.changeDetector=s,this.context=null,this.destroyed=!1,this.ref=new y.ViewRef_(this);var c=h.AppElement.getViewParentInjector(this.proto.type,i,o,a);this.parentInjector=c.injector,this.hostInjectorBoundary=c.hostInjectorBoundary;var l,u;switch(e.type){case P.ViewType.COMPONENT:l=new w.Pipes(e.protoPipes,i.getInjector()),u=i.getComponent();break;case P.ViewType.EMBEDDED:l=i.parentView.pipes,u=i.parentView.context;break;case P.ViewType.HOST:l=null,u=S}this.pipes=l,this.context=u}return e.prototype.init=function(e,t,r,n){this.rootNodesOrAppElements=e,this.allNodes=t,this.disposables=r,this.appElements=n;var i=new p.Map;p.StringMapWrapper.forEach(this.proto.templateVariableBindings,function(e,t){i.set(e,null)});for(var o=0;o<n.length;o++){var a=n[o],s=[];if(g.isPresent(a.proto.protoInjector))for(var c=0;c<a.proto.protoInjector.numberOfProviders;c++)s.push(a.proto.protoInjector.getProviderAtIndex(c).key.token);p.StringMapWrapper.forEach(a.proto.directiveVariableBindings,function(e,t){g.isBlank(e)?i.set(t,a.nativeElement):i.set(t,a.getDirectiveAtIndex(e))}),this.renderer.setElementDebugInfo(a.nativeElement,new v.RenderDebugInfo(a.getInjector(),a.getComponent(),s,i))}var l=null;this.proto.type!==P.ViewType.COMPONENT&&(l=g.isPresent(this.containerAppElement)?this.containerAppElement.parentView.locals:null),this.proto.type===P.ViewType.COMPONENT&&(this.containerAppElement.attachComponentView(this),this.containerAppElement.parentView.changeDetector.addViewChild(this.changeDetector)),this.locals=new d.Locals(l,i),this.changeDetector.hydrate(this.context,this.locals,this,this.pipes),this.viewManager.onViewCreated(this)},e.prototype.destroy=function(){if(this.destroyed)throw new m.BaseException("This view has already been destroyed!");this.changeDetector.destroyRecursive()},e.prototype.notifyOnDestroy=function(){this.destroyed=!0;var e=this.proto.type===P.ViewType.COMPONENT?this.containerAppElement.nativeElement:null;this.renderer.destroyView(e,this.allNodes);for(var t=0;t<this.disposables.length;t++)this.disposables[t]();this.viewManager.onViewDestroyed(this)},Object.defineProperty(e.prototype,"changeDetectorRef",{get:function(){return this.changeDetector.ref},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"flatRootNodes",{get:function(){return i(this.rootNodesOrAppElements)},enumerable:!0,configurable:!0}),e.prototype.hasLocal=function(e){return p.StringMapWrapper.contains(this.proto.templateVariableBindings,e)},e.prototype.setLocal=function(e,t){if(this.hasLocal(e)){var r=this.proto.templateVariableBindings[e];this.locals.set(r,t)}},e.prototype.notifyOnBinding=function(e,t){if(e.isTextNode())this.renderer.setText(this.allNodes[e.elementIndex],t);else{var r=this.appElements[e.elementIndex].nativeElement;if(e.isElementProperty())this.renderer.setElementProperty(r,e.name,t);else if(e.isElementAttribute())this.renderer.setElementAttribute(r,e.name,g.isPresent(t)?""+t:null);else if(e.isElementClass())this.renderer.setElementClass(r,e.name,t);else{if(!e.isElementStyle())throw new m.BaseException("Unsupported directive record");var n=g.isPresent(e.unit)?e.unit:"";this.renderer.setElementStyle(r,e.name,g.isPresent(t)?""+t+n:null)}}},e.prototype.logBindingUpdate=function(e,t){if(e.isDirective()||e.isElementProperty()){var r=this.appElements[e.elementIndex].nativeElement;this.renderer.setBindingDebugInfo(r,""+E+b.camelCaseToDashCase(e.name),""+t)}},e.prototype.notifyAfterContentChecked=function(){for(var e=this.appElements.length,t=e-1;t>=0;t--)this.appElements[t].ngAfterContentChecked()},e.prototype.notifyAfterViewChecked=function(){for(var e=this.appElements.length,t=e-1;t>=0;t--)this.appElements[t].ngAfterViewChecked()},e.prototype.getDebugContext=function(e,t,r){try{g.isBlank(e)&&t<this.appElements.length&&(e=this.appElements[t]);var i=this.containerAppElement,o=g.isPresent(e)?e.nativeElement:null,a=g.isPresent(i)?i.nativeElement:null,s=g.isPresent(r)?e.getDirectiveAtIndex(r):null,c=g.isPresent(e)?e.getInjector():null;return new f.DebugContext(o,a,s,this.context,n(this.locals),c)}catch(l){return null}},e.prototype.getDirectiveFor=function(e){return this.appElements[e.elementIndex].getDirectiveAtIndex(e.directiveIndex)},e.prototype.getDetectorFor=function(e){var t=this.appElements[e.elementIndex].componentView;return g.isPresent(t)?t.changeDetector:null},e.prototype.triggerEventHandlers=function(e,t,r){return this.changeDetector.handleEvent(e,r,t)},e}();t.AppView=R;var x=function(){function e(e,t,r){this.type=e,this.protoPipes=t,this.templateVariableBindings=r}return e.create=function(t,r,n,i){var o=null;if(g.isPresent(n)&&n.length>0){for(var a=p.ListWrapper.createFixedSize(n.length),s=0;s<n.length;s++)a[s]=t.getResolvedPipeMetadata(n[s]);o=_.ProtoPipes.fromProviders(a)}return new e(r,o,i)},e}();t.AppProtoView=x;var O=function(){function e(e,t){this.selector=e,this.viewFactory=t}return e=l([g.CONST(),u("design:paramtypes",[String,Function])],e)}();return t.HostViewFactory=O,t.flattenNestedViewRenderNodes=i,t.checkSlotCount=a,s.define=c,r.exports}),System.register("angular2/src/core/application_common_providers",["angular2/src/facade/lang","angular2/src/core/di","angular2/src/core/application_tokens","angular2/src/core/change_detection/change_detection","angular2/src/core/linker/resolved_metadata_cache","angular2/src/core/linker/view_manager","angular2/src/core/linker/view_manager","angular2/src/core/linker/view_resolver","angular2/src/core/linker/directive_resolver","angular2/src/core/linker/pipe_resolver","angular2/src/core/linker/compiler","angular2/src/core/linker/compiler","angular2/src/core/linker/dynamic_component_loader","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/facade/lang"),a=e("angular2/src/core/di"),s=e("angular2/src/core/application_tokens"),c=e("angular2/src/core/change_detection/change_detection"),l=e("angular2/src/core/linker/resolved_metadata_cache"),u=e("angular2/src/core/linker/view_manager"),p=e("angular2/src/core/linker/view_manager"),d=e("angular2/src/core/linker/view_resolver"),f=e("angular2/src/core/linker/directive_resolver"),h=e("angular2/src/core/linker/pipe_resolver"),g=e("angular2/src/core/linker/compiler"),m=e("angular2/src/core/linker/compiler"),v=e("angular2/src/core/linker/dynamic_component_loader"),y=e("angular2/src/core/linker/dynamic_component_loader");return t.APPLICATION_COMMON_PROVIDERS=o.CONST_EXPR([new a.Provider(g.Compiler,{useClass:m.Compiler_}),s.APP_ID_RANDOM_PROVIDER,l.ResolvedMetadataCache,new a.Provider(u.AppViewManager,{useClass:p.AppViewManager_}),d.ViewResolver,new a.Provider(c.IterableDiffers,{useValue:c.defaultIterableDiffers}),new a.Provider(c.KeyValueDiffers,{useValue:c.defaultKeyValueDiffers}),f.DirectiveResolver,h.PipeResolver,new a.Provider(v.DynamicComponentLoader,{useClass:y.DynamicComponentLoader_})]),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/facade/exceptions","angular2/src/core/di/key","angular2/src/core/di/metadata"],!0,function(e,t,r){function n(e,t){return e===t||t===g.PublicAndPrivate||e===g.PublicAndPrivate}function i(e,t){for(var r=[],n=0;n<e._proto.numberOfProviders;++n)r.push(t(e._proto.getProviderAtIndex(n)));return r}var o=System.global,a=o.define;o.define=void 0;var s=e("angular2/src/facade/collection"),c=e("angular2/src/core/di/provider"),l=e("angular2/src/core/di/exceptions"),u=e("angular2/src/facade/lang"),p=e("angular2/src/facade/exceptions"),d=e("angular2/src/core/di/key"),f=e("angular2/src/core/di/metadata"),h=10;t.UNDEFINED=u.CONST_EXPR(new Object),function(e){e[e.Public=0]="Public",e[e.Private=1]="Private",e[e.PublicAndPrivate=2]="PublicAndPrivate"}(t.Visibility||(t.Visibility={}));var g=t.Visibility,m=function(){function e(e,t){this.provider0=null,this.provider1=null,this.provider2=null,this.provider3=null,this.provider4=null,this.provider5=null,this.provider6=null,this.provider7=null,this.provider8=null,this.provider9=null,this.keyId0=null,this.keyId1=null,this.keyId2=null,this.keyId3=null,this.keyId4=null,this.keyId5=null,this.keyId6=null,this.keyId7=null,this.keyId8=null,this.keyId9=null,this.visibility0=null,this.visibility1=null,this.visibility2=null,this.visibility3=null,this.visibility4=null,this.visibility5=null,this.visibility6=null,this.visibility7=null,this.visibility8=null,this.visibility9=null;var r=t.length;r>0&&(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 _(e,this)},e}();t.ProtoInjectorInlineStrategy=m;var v=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 b(this,e)},e}();t.ProtoInjectorDynamicStrategy=v;var y=function(){function e(e){this.numberOfProviders=e.length,this._strategy=e.length>h?new v(this,e):new m(this,e)}return e.fromResolvedProviders=function(t){var r=t.map(function(e){return new C(e,g.Public)});return new e(r)},e.prototype.getProviderAtIndex=function(e){return this._strategy.getProviderAtIndex(e)},e}();t.ProtoInjector=y;var _=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.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 h},e}();t.InjectorInlineStrategy=_;var b=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.getObjByKeyId=function(e,r){for(var i=this.protoStrategy,o=0;o<i.keyIds.length;o++)if(i.keyIds[o]===e&&n(i.visibilities[o],r))return this.objs[o]===t.UNDEFINED&&(this.objs[o]=this.injector._new(i.providers[o],i.visibilities[o])),this.objs[o];return t.UNDEFINED},e.prototype.getObjAtIndex=function(e){if(0>e||e>=this.objs.length)throw new l.OutOfBoundsError(e);return this.objs[e]},e.prototype.getMaxNumberOfObjects=function(){return this.objs.length},e}();t.InjectorDynamicStrategy=b;var C=function(){function e(e,t){this.provider=e,this.visibility=t}return e.prototype.getKeyId=function(){return this.provider.key.id},e}();t.ProviderWithVisibility=C;var w=function(){function e(e,t,r,n,i){void 0===t&&(t=null),void 0===r&&(r=!1),void 0===n&&(n=null),void 0===i&&(i=null),this._isHostBoundary=r,this._depProvider=n,this._debugContext=i,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){return new e(y.fromResolvedProviders(t))},e.fromResolvedBindings=function(t){return e.fromResolvedProviders(t)},Object.defineProperty(e.prototype,"hostBoundary",{get:function(){return this._isHostBoundary},enumerable:!0,configurable:!0}),e.prototype.debugContext=function(){return this._debugContext()},e.prototype.get=function(e){return this._getByKey(d.Key.get(e),null,null,!1,g.PublicAndPrivate)},e.prototype.getOptional=function(e){return this._getByKey(d.Key.get(e),null,null,!0,g.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 C(e,g.Public)}),n=new y(r),i=new e(n);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,g.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;n<e.resolvedFactories.length;++n)r[n]=this._instantiate(e,e.resolvedFactories[n],t);return r}return this._instantiate(e,e.resolvedFactories[0],t)},e.prototype._instantiate=function(e,t,r){var n,i,o,a,s,c,u,d,f,h,g,m,v,y,_,b,C,w,P,E,S=t.factory,R=t.dependencies,x=R.length;try{n=x>0?this._getByDependency(e,R[0],r):null,i=x>1?this._getByDependency(e,R[1],r):null,o=x>2?this._getByDependency(e,R[2],r):null,a=x>3?this._getByDependency(e,R[3],r):null,s=x>4?this._getByDependency(e,R[4],r):null,c=x>5?this._getByDependency(e,R[5],r):null,u=x>6?this._getByDependency(e,R[6],r):null,d=x>7?this._getByDependency(e,R[7],r):null,f=x>8?this._getByDependency(e,R[8],r):null,h=x>9?this._getByDependency(e,R[9],r):null,g=x>10?this._getByDependency(e,R[10],r):null,m=x>11?this._getByDependency(e,R[11],r):null,v=x>12?this._getByDependency(e,R[12],r):null,y=x>13?this._getByDependency(e,R[13],r):null,_=x>14?this._getByDependency(e,R[14],r):null,b=x>15?this._getByDependency(e,R[15],r):null,C=x>16?this._getByDependency(e,R[16],r):null,w=x>17?this._getByDependency(e,R[17],r):null,P=x>18?this._getByDependency(e,R[18],r):null,E=x>19?this._getByDependency(e,R[19],r):null}catch(O){throw(O instanceof l.AbstractProviderError||O instanceof l.InstantiationError)&&O.addKey(this,e.key),O}var D;try{switch(x){case 0:D=S();break;case 1:D=S(n);break;case 2:D=S(n,i);break;case 3:D=S(n,i,o);break;case 4:D=S(n,i,o,a);break;case 5:D=S(n,i,o,a,s);break;case 6:D=S(n,i,o,a,s,c);break;case 7:D=S(n,i,o,a,s,c,u);break;case 8:D=S(n,i,o,a,s,c,u,d);break;case 9:D=S(n,i,o,a,s,c,u,d,f);break;case 10:D=S(n,i,o,a,s,c,u,d,f,h);break;case 11:D=S(n,i,o,a,s,c,u,d,f,h,g);break;case 12:D=S(n,i,o,a,s,c,u,d,f,h,g,m);break;case 13:D=S(n,i,o,a,s,c,u,d,f,h,g,m,v);break;case 14:D=S(n,i,o,a,s,c,u,d,f,h,g,m,v,y);break;case 15:D=S(n,i,o,a,s,c,u,d,f,h,g,m,v,y,_);break;case 16:D=S(n,i,o,a,s,c,u,d,f,h,g,m,v,y,_,b);break;case 17:D=S(n,i,o,a,s,c,u,d,f,h,g,m,v,y,_,b,C);break;case 18:D=S(n,i,o,a,s,c,u,d,f,h,g,m,v,y,_,b,C,w);break;case 19:D=S(n,i,o,a,s,c,u,d,f,h,g,m,v,y,_,b,C,w,P);break;case 20:D=S(n,i,o,a,s,c,u,d,f,h,g,m,v,y,_,b,C,w,P,E);break;default:throw new p.BaseException("Cannot instantiate '"+e.key.displayName+"' because it has more than 20 dependencies")}}catch(O){throw new l.InstantiationError(this,O,O.stack,e.key)}return D},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===P?this:r instanceof f.SelfMetadata?this._getByKeySelf(e,n,i):r instanceof f.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 f.SkipSelfMetadata){if(o._isHostBoundary)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._isHostBoundary)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,g.Private);return i!==t.UNDEFINED?i:this._throwOrNull(e,r)},e.prototype._getByKeyDefault=function(e,r,n,i){var o=this;for(i instanceof f.SkipSelfMetadata&&(n=o._isHostBoundary?g.PublicAndPrivate:g.Public,o=o._parent);null!=o;){var a=o._strategy.getObjByKeyId(e.id,n);if(a!==t.UNDEFINED)return a;n=o._isHostBoundary?g.PublicAndPrivate:g.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=w;var P=d.Key.get(w);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;
9
+ 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(){return new y.DynamicChangeDetector(this._definition.id,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;r<this.records.length;++r){var n=this.records[r];n.isPureFunction()&&n.args.forEach(function(e){return t.records[e-1].argumentToPureFunction=!0}),n.mode===w.RecordType.Pipe&&(n.args.forEach(function(e){return t.records[e-1].argumentToPureFunction=!0}),this.records[n.contextIndex-1].argumentToPureFunction=!0)}},e.prototype._appendRecords=function(e,t,r){e.isDirectiveLifecycle()?this.records.push(new w.ProtoRecord(w.RecordType.DirectiveLifecycle,e.lifecycleEvent,null,[],[],-1,null,this.records.length+1,e,!1,!1,!1,!1,null)):S.append(this.records,e,t,r)},e}();t.ProtoRecordBuilder=E;var S=function(){function e(e,t,r,n){this._records=e,this._bindingRecord=t,this._variableNames=r,this._bindingIndex=n}return e.append=function(t,r,n,i){var o=new e(t,r,n,i);r.ast.visit(o)},e.create=function(t,r){var n=[];return e.append(n,t,r,null),n[n.length-1].lastInBinding=!0,n},e.prototype.visitImplicitReceiver=function(e){return this._bindingRecord.implicitReceiver},e.prototype.visitInterpolation=function(e){var t=this._visitAll(e.expressions);return this._addRecord(w.RecordType.Interpolate,"interpolate",u(e.strings),t,e.strings,0)},e.prototype.visitLiteralPrimitive=function(e){return this._addRecord(w.RecordType.Const,"literal",e.value,[],null,0)},e.prototype.visitPropertyRead=function(e){var t=e.receiver.visit(this);return f.isPresent(this._variableNames)&&g.ListWrapper.contains(this._variableNames,e.name)&&e.receiver instanceof m.ImplicitReceiver?this._addRecord(w.RecordType.Local,e.name,e.name,[],null,t):this._addRecord(w.RecordType.PropertyRead,e.name,e.getter,[],null,t)},e.prototype.visitPropertyWrite=function(e){if(f.isPresent(this._variableNames)&&g.ListWrapper.contains(this._variableNames,e.name)&&e.receiver instanceof m.ImplicitReceiver)throw new h.BaseException("Cannot reassign a variable binding "+e.name);var t=e.receiver.visit(this),r=e.value.visit(this);return this._addRecord(w.RecordType.PropertyWrite,e.name,e.setter,[r],null,t)},e.prototype.visitKeyedWrite=function(e){var t=e.obj.visit(this),r=e.key.visit(this),n=e.value.visit(this);return this._addRecord(w.RecordType.KeyedWrite,null,null,[r,n],null,t)},e.prototype.visitSafePropertyRead=function(e){var t=e.receiver.visit(this);return this._addRecord(w.RecordType.SafeProperty,e.name,e.getter,[],null,t)},e.prototype.visitMethodCall=function(e){var t=e.receiver.visit(this),r=this._visitAll(e.args);if(f.isPresent(this._variableNames)&&g.ListWrapper.contains(this._variableNames,e.name)){var n=this._addRecord(w.RecordType.Local,e.name,e.name,[],null,t);return this._addRecord(w.RecordType.InvokeClosure,"closure",null,r,null,n)}return this._addRecord(w.RecordType.InvokeMethod,e.name,e.fn,r,null,t)},e.prototype.visitSafeMethodCall=function(e){var t=e.receiver.visit(this),r=this._visitAll(e.args);return this._addRecord(w.RecordType.SafeMethodInvoke,e.name,e.fn,r,null,t)},e.prototype.visitFunctionCall=function(e){var t=e.target.visit(this),r=this._visitAll(e.args);return this._addRecord(w.RecordType.InvokeClosure,"closure",null,r,null,t)},e.prototype.visitLiteralArray=function(e){var t="arrayFn"+e.expressions.length;return this._addRecord(w.RecordType.CollectionLiteral,t,o(e.expressions.length),this._visitAll(e.expressions),null,0)},e.prototype.visitLiteralMap=function(e){return this._addRecord(w.RecordType.CollectionLiteral,a(e.keys),v.ChangeDetectionUtil.mapFn(e.keys),this._visitAll(e.values),null,0)},e.prototype.visitBinary=function(e){var t=e.left.visit(this);switch(e.operation){case"&&":var r=[null];this._addRecord(w.RecordType.SkipRecordsIfNot,"SkipRecordsIfNot",null,[],r,t);var n=e.right.visit(this);return r[0]=n,this._addRecord(w.RecordType.PrimitiveOp,"cond",v.ChangeDetectionUtil.cond,[t,n,t],null,0);case"||":var r=[null];this._addRecord(w.RecordType.SkipRecordsIf,"SkipRecordsIf",null,[],r,t);var n=e.right.visit(this);return r[0]=n,this._addRecord(w.RecordType.PrimitiveOp,"cond",v.ChangeDetectionUtil.cond,[t,t,n],null,0);default:var n=e.right.visit(this);return this._addRecord(w.RecordType.PrimitiveOp,s(e.operation),c(e.operation),[t,n],null,0)}},e.prototype.visitPrefixNot=function(e){var t=e.expression.visit(this);return this._addRecord(w.RecordType.PrimitiveOp,"operation_negate",v.ChangeDetectionUtil.operation_negate,[t],null,0)},e.prototype.visitConditional=function(e){var t=e.condition.visit(this),r=[null],n=[null];this._addRecord(w.RecordType.SkipRecordsIfNot,"SkipRecordsIfNot",null,[],r,t);var i=e.trueExp.visit(this),o=this._addRecord(w.RecordType.SkipRecords,"SkipRecords",null,[],n,0),a=e.falseExp.visit(this);return r[0]=o,n[0]=a,this._addRecord(w.RecordType.PrimitiveOp,"cond",v.ChangeDetectionUtil.cond,[t,i,a],null,0)},e.prototype.visitPipe=function(e){var t=e.exp.visit(this),r=this._visitAll(e.args);return this._addRecord(w.RecordType.Pipe,e.name,e.name,r,null,t)},e.prototype.visitKeyedRead=function(e){var t=e.obj.visit(this),r=e.key.visit(this);return this._addRecord(w.RecordType.KeyedRead,"keyedAccess",v.ChangeDetectionUtil.keyedAccess,[r],null,t)},e.prototype.visitChain=function(e){var t=this,r=e.expressions.map(function(e){return e.visit(t)});return this._addRecord(w.RecordType.Chain,"chain",null,r,null,0)},e.prototype.visitQuote=function(e){throw new h.BaseException("Caught uninterpreted expression at "+e.location+": "+e.uninterpretedExpression+". "+("Expression prefix "+e.prefix+" did not match a template transformer to interpret the expression."))},e.prototype._visitAll=function(e){for(var t=g.ListWrapper.createFixedSize(e.length),r=0;r<e.length;++r)t[r]=e[r].visit(this);return t},e.prototype._addRecord=function(e,t,r,n,i,o){var a=this._records.length+1;return o instanceof _.DirectiveIndex?this._records.push(new w.ProtoRecord(e,t,r,n,i,-1,o,a,this._bindingRecord,!1,!1,!1,!1,this._bindingIndex)):this._records.push(new w.ProtoRecord(e,t,r,n,i,o,null,a,this._bindingRecord,!1,!1,!1,!1,this._bindingIndex)),a},e}();return p.define=d,r.exports}),System.register("angular2/src/core/change_detection/jit_proto_change_detector",["angular2/src/core/change_detection/change_detection_jit_generator"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/change_detection/change_detection_jit_generator"),a=function(){function e(e){this.definition=e,this._factory=this._createFactory(e)}return e.isSupported=function(){return!0},e.prototype.instantiate=function(){return this._factory()},e.prototype._createFactory=function(e){return new o.ChangeDetectorJITGenerator(e,"util","AbstractChangeDetector","ChangeDetectorStatus").generate()},e}();return t.JitProtoChangeDetector=a,n.define=i,r.exports}),System.register("angular2/src/core/linker/compiler",["angular2/src/core/di","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/async","angular2/src/core/reflection/reflection","angular2/src/core/linker/view","angular2/src/core/linker/view_ref"],!0,function(e,t,r){function n(e){return e instanceof h.HostViewFactory}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=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},l=e("angular2/src/core/di"),u=e("angular2/src/facade/lang"),p=e("angular2/src/facade/exceptions"),d=e("angular2/src/facade/async"),f=e("angular2/src/core/reflection/reflection"),h=e("angular2/src/core/linker/view"),g=e("angular2/src/core/linker/view_ref"),m=function(){function e(){}return e}();t.Compiler=m;var v=function(e){function t(){e.apply(this,arguments)}return a(t,e),t.prototype.compileInHost=function(e){var t=f.reflector.annotations(e),r=t.find(n);if(u.isBlank(r))throw new p.BaseException("No precompiled component "+u.stringify(e)+" found");return d.PromiseWrapper.resolve(new g.HostViewFactoryRef_(r))},t.prototype.clearCache=function(){},t=s([l.Injectable(),c("design:paramtypes",[])],t)}(m);return t.Compiler_=v,i.define=o,r.exports}),System.register("angular2/src/core/di",["angular2/src/core/di/metadata","angular2/src/core/di/decorators","angular2/src/core/di/forward_ref","angular2/src/core/di/injector","angular2/src/core/di/provider","angular2/src/core/di/key","angular2/src/core/di/exceptions","angular2/src/core/di/opaque_token"],!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/core/di/metadata");t.InjectMetadata=a.InjectMetadata,t.OptionalMetadata=a.OptionalMetadata,t.InjectableMetadata=a.InjectableMetadata,t.SelfMetadata=a.SelfMetadata,t.HostMetadata=a.HostMetadata,t.SkipSelfMetadata=a.SkipSelfMetadata,t.DependencyMetadata=a.DependencyMetadata,n(e("angular2/src/core/di/decorators"));var s=e("angular2/src/core/di/forward_ref");t.forwardRef=s.forwardRef,t.resolveForwardRef=s.resolveForwardRef;var c=e("angular2/src/core/di/injector");t.Injector=c.Injector;var l=e("angular2/src/core/di/provider");t.Binding=l.Binding,t.ProviderBuilder=l.ProviderBuilder,t.ResolvedFactory=l.ResolvedFactory,t.Dependency=l.Dependency,t.bind=l.bind,t.Provider=l.Provider,t.provide=l.provide;var u=e("angular2/src/core/di/key");t.Key=u.Key,t.TypeLiteral=u.TypeLiteral;var p=e("angular2/src/core/di/exceptions");t.NoProviderError=p.NoProviderError,t.AbstractProviderError=p.AbstractProviderError,t.CyclicDependencyError=p.CyclicDependencyError,t.InstantiationError=p.InstantiationError,t.InvalidProviderError=p.InvalidProviderError,t.NoAnnotationError=p.NoAnnotationError,t.OutOfBoundsError=p.OutOfBoundsError;var d=e("angular2/src/core/di/opaque_token");return t.OpaqueToken=d.OpaqueToken,i.define=o,r.exports}),System.register("angular2/src/core/change_detection/change_detection",["angular2/src/core/change_detection/differs/iterable_differs","angular2/src/core/change_detection/differs/default_iterable_differ","angular2/src/core/change_detection/differs/keyvalue_differs","angular2/src/core/change_detection/differs/default_keyvalue_differ","angular2/src/facade/lang","angular2/src/core/change_detection/parser/ast","angular2/src/core/change_detection/parser/lexer","angular2/src/core/change_detection/parser/parser","angular2/src/core/change_detection/parser/locals","angular2/src/core/change_detection/exceptions","angular2/src/core/change_detection/interfaces","angular2/src/core/change_detection/constants","angular2/src/core/change_detection/proto_change_detector","angular2/src/core/change_detection/jit_proto_change_detector","angular2/src/core/change_detection/binding_record","angular2/src/core/change_detection/directive_record","angular2/src/core/change_detection/dynamic_change_detector","angular2/src/core/change_detection/change_detector_ref","angular2/src/core/change_detection/differs/iterable_differs","angular2/src/core/change_detection/differs/keyvalue_differs","angular2/src/core/change_detection/change_detection_util"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/change_detection/differs/iterable_differs"),a=e("angular2/src/core/change_detection/differs/default_iterable_differ"),s=e("angular2/src/core/change_detection/differs/keyvalue_differs"),c=e("angular2/src/core/change_detection/differs/default_keyvalue_differ"),l=e("angular2/src/facade/lang"),u=e("angular2/src/core/change_detection/parser/ast");t.ASTWithSource=u.ASTWithSource,t.AST=u.AST,t.AstTransformer=u.AstTransformer,t.PropertyRead=u.PropertyRead,t.LiteralArray=u.LiteralArray,t.ImplicitReceiver=u.ImplicitReceiver;var p=e("angular2/src/core/change_detection/parser/lexer");t.Lexer=p.Lexer;var d=e("angular2/src/core/change_detection/parser/parser");t.Parser=d.Parser;var f=e("angular2/src/core/change_detection/parser/locals");t.Locals=f.Locals;var h=e("angular2/src/core/change_detection/exceptions");t.DehydratedException=h.DehydratedException,t.ExpressionChangedAfterItHasBeenCheckedException=h.ExpressionChangedAfterItHasBeenCheckedException,t.ChangeDetectionError=h.ChangeDetectionError;var g=e("angular2/src/core/change_detection/interfaces");t.ChangeDetectorDefinition=g.ChangeDetectorDefinition,t.DebugContext=g.DebugContext,t.ChangeDetectorGenConfig=g.ChangeDetectorGenConfig;var m=e("angular2/src/core/change_detection/constants");t.ChangeDetectionStrategy=m.ChangeDetectionStrategy,t.CHANGE_DETECTION_STRATEGY_VALUES=m.CHANGE_DETECTION_STRATEGY_VALUES;var v=e("angular2/src/core/change_detection/proto_change_detector");t.DynamicProtoChangeDetector=v.DynamicProtoChangeDetector;var y=e("angular2/src/core/change_detection/jit_proto_change_detector");t.JitProtoChangeDetector=y.JitProtoChangeDetector;var _=e("angular2/src/core/change_detection/binding_record");t.BindingRecord=_.BindingRecord,t.BindingTarget=_.BindingTarget;var b=e("angular2/src/core/change_detection/directive_record");t.DirectiveIndex=b.DirectiveIndex,t.DirectiveRecord=b.DirectiveRecord;var C=e("angular2/src/core/change_detection/dynamic_change_detector");t.DynamicChangeDetector=C.DynamicChangeDetector;var w=e("angular2/src/core/change_detection/change_detector_ref");t.ChangeDetectorRef=w.ChangeDetectorRef;var P=e("angular2/src/core/change_detection/differs/iterable_differs");t.IterableDiffers=P.IterableDiffers;var E=e("angular2/src/core/change_detection/differs/keyvalue_differs");t.KeyValueDiffers=E.KeyValueDiffers;var S=e("angular2/src/core/change_detection/change_detection_util");return t.WrappedValue=S.WrappedValue,t.SimpleChange=S.SimpleChange,t.keyValDiff=l.CONST_EXPR([l.CONST_EXPR(new c.DefaultKeyValueDifferFactory)]),t.iterableDiff=l.CONST_EXPR([l.CONST_EXPR(new a.DefaultIterableDifferFactory)]),t.defaultIterableDiffers=l.CONST_EXPR(new o.IterableDiffers(t.iterableDiff)),t.defaultKeyValueDiffers=l.CONST_EXPR(new s.KeyValueDiffers(t.keyValDiff)),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.internalElement.parentView.ref},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,i){var o=this;return this._compiler.compileInHost(e).then(function(a){var s=o._viewManager.createRootHostView(a,t,r,i),c=o._viewManager.getHostElement(s),l=o._viewManager.getComponent(c),p=function(){u.isPresent(n)&&n(),o._viewManager.destroyRootHostView(s)};return new f(c,l,e,r,p)})},t.prototype.loadIntoLocation=function(e,t,r,n,i){return void 0===n&&(n=null),void 0===i&&(i=null),this.loadNextToLocation(e,this._viewManager.getNamedElementInComponentView(t,r),n,i)},t.prototype.loadNextToLocation=function(e,t,r,n){var i=this;return void 0===r&&(r=null),void 0===n&&(n=null),this._compiler.compileInHost(e).then(function(o){var a=i._viewManager.getViewContainer(t),s=a.createHostView(o,a.length,r,n),c=i._viewManager.getHostElement(s),l=i._viewManager.getComponent(c),u=function(){var e=a.indexOf(s);s.destroyed||-1===e||a.remove(e)};return new f(c,l,e,null,u)})},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/change_detection",["angular2/src/core/change_detection/change_detection"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/change_detection/change_detection");return t.ChangeDetectionStrategy=o.ChangeDetectionStrategy,t.ExpressionChangedAfterItHasBeenCheckedException=o.ExpressionChangedAfterItHasBeenCheckedException,t.ChangeDetectionError=o.ChangeDetectionError,t.ChangeDetectorRef=o.ChangeDetectorRef,t.WrappedValue=o.WrappedValue,t.SimpleChange=o.SimpleChange,t.IterableDiffers=o.IterableDiffers,t.KeyValueDiffers=o.KeyValueDiffers,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/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){i=e;var t=n.getOptional(_.Testability);return h.isPresent(t)&&n.get(_.TestabilityRegistry).registerApplication(e.location.nativeElement,t),e})},deps:[b.DynamicComponentLoader,D,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(E.lockMode(),h.isPresent(S)){if(y.ListWrapper.equals(R,e))return S;throw new C.BaseException("platform cannot be initialized with different sets of providers.")}return s(e)}function a(){h.isPresent(S)&&(S.dispose(),S=null)}function s(e){R=e;var t=g.Injector.resolveAndCreate(e);return S=new O(t,function(){S=null,R=null}),c(t),S}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),r=[];return h.isPresent(t)&&t.forEach(function(e){var t=e();v.PromiseWrapper.isPromise(t)&&r.push(t)}),r.length>0?v.PromiseWrapper.all(r):null}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/console"),P=e("angular2/src/core/profile/profile"),E=e("angular2/src/facade/lang");t.createNgZone=i;var S,R;t.platform=o,t.disposePlatform=a;var x=function(){function e(){}return Object.defineProperty(e.prototype,"injector",{get:function(){return C.unimplemented()},enumerable:!0,configurable:!0}),e}();t.PlatformRef=x;var O=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);if(v.PromiseWrapper.isPromise(t))throw new C.BaseException("Cannot use asyncronous app initializers with application. Use asyncApplication instead.");return t},t.prototype.asyncApplication=function(e,t){var r=this,n=i(),o=v.PromiseWrapper.completer();return null===e?o.resolve(this._initApp(n,t)):n.run(function(){v.PromiseWrapper.then(e(n),function(e){h.isPresent(t)&&(e=y.ListWrapper.concat(e,t));var i=r._initApp(n,e);o.resolve(i)})}),o.promise},t.prototype._initApp=function(e,t){var r,n,i=this;e.run(function(){t=y.ListWrapper.concat(t,[g.provide(f.NgZone,{useValue:e}),g.provide(D,{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);var o=l(r);return null!==o?v.PromiseWrapper.then(o,function(e){return n}):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}(x);t.PlatformRef_=O;var D=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=D;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(w.Console);return h.assertionsEnabled()&&t.log("Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode."),e})},t.prototype._loadComponent=function(e){var t=e.location.internalElement.parentView.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(e.location.internalElement.parentView.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,P.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);
10
+ },Object.defineProperty(t.prototype,"componentTypes",{get:function(){return this._rootComponentTypes},enumerable:!0,configurable:!0}),t._tickScope=P.wtfCreateScope("ApplicationRef#tick()"),t}(D);return t.ApplicationRef_=A,u.define=p,r.exports}),System.register("angular2/src/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/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_node","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_node");return t.DebugElement=l.DebugElement,t.DebugNode=l.DebugNode,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/facade/async",["angular2/src/facade/lang","angular2/src/facade/promise","rxjs/Subject","rxjs/observable/PromiseObservable","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;var c=e("rxjs/Subject"),l=e("rxjs/observable/PromiseObservable"),u=e("rxjs/operator/toPromise"),p=e("rxjs/Observable");t.Observable=p.Observable;var d=e("rxjs/Subject");t.Subject=d.Subject;var f=function(){function e(){}return e.setTimeout=function(e,t){return a.global.setTimeout(e,t)},e.clearTimeout=function(e){a.global.clearTimeout(e)},e.setInterval=function(e,t){return a.global.setInterval(e,t)},e.clearInterval=function(e){a.global.clearInterval(e)},e}();t.TimerWrapper=f;var h=function(){function e(){}return e.subscribe=function(e,t,r,n){return void 0===n&&(n=function(){}),r="function"==typeof r&&r||a.noop,n="function"==typeof n&&n||a.noop,e.subscribe({next:t,error:r,complete:n})},e.isObservable=function(e){return!!e.subscribe},e.hasSubscribers=function(e){return e.observers.length>0},e.dispose=function(e){e.unsubscribe()},e.callNext=function(e,t){e.next(t)},e.callEmit=function(e,t){e.emit(t)},e.callError=function(e,t){e.error(t)},e.callComplete=function(e){e.complete()},e.fromPromise=function(e){return l.PromiseObservable.create(e)},e.toPromise=function(e){return u.toPromise.call(e)},e}();t.ObservableWrapper=h;var g=function(e){function t(t){void 0===t&&(t=!0),e.call(this),this._isAsync=t}return o(t,e),t.prototype.emit=function(t){e.prototype.next.call(this,t)},t.prototype.next=function(t){e.prototype.next.call(this,t)},t.prototype.subscribe=function(t,r,n){var i,o=function(e){return null},a=function(){return null};return t&&"object"==typeof t?(i=this._isAsync?function(e){setTimeout(function(){return t.next(e)})}:function(e){t.next(e)},t.error&&(o=this._isAsync?function(e){setTimeout(function(){return t.error(e)})}:function(e){t.error(e)}),t.complete&&(a=this._isAsync?function(){setTimeout(function(){return t.complete()})}:function(){t.complete()})):(i=this._isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)},r&&(o=this._isAsync?function(e){setTimeout(function(){return r(e)})}:function(e){r(e)}),n&&(a=this._isAsync?function(){setTimeout(function(){return n()})}:function(){n()})),e.prototype.subscribe.call(this,i,o,a)},t}(c.Subject);return t.EventEmitter=g,n.define=i,r.exports}),System.register("angular2/src/core/metadata",["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/platform/dom/events/dom_events",["angular2/src/platform/dom/dom_adapter","angular2/core","angular2/src/platform/dom/events/event_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/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)})};return this.manager.getZone().runOutsideAngular(function(){return c.DOM.onAndCancel(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/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(a.global.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<arguments.length;a++)n[a-2]=arguments[a];var s,c=function(){t(),o.ListWrapper.remove(i._pendingTimeouts,s)};return s=e.call(this,c,r,n),i._pendingTimeouts.push(s),s}},$clearTimeout:function(e){return function(t){e.call(this,t),o.ListWrapper.remove(i._pendingTimeouts,t)}},_innerZone:!0})},e.prototype._notifyOnError=function(e,t){if(!a.isPresent(this._onErrorHandler)&&!s.ObservableWrapper.hasSubscribers(this._onErrorEvents))throw console.log("## _notifyOnError ##"),console.log(t.stack),t;for(var r=[a.normalizeBlank(t.stack)];e&&e.constructedAtException;)r.push(e.constructedAtException.get()),e=e.parent;s.ObservableWrapper.hasSubscribers(this._onErrorEvents)&&s.ObservableWrapper.callEmit(this._onErrorEvents,new l(t,r)),a.isPresent(this._onErrorHandler)&&this._onErrorHandler(t,r)},e}();return t.NgZone=u,n.define=i,r.exports}),System.register("angular2/src/platform/dom/events/event_manager",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/core/di","angular2/src/core/zone/ng_zone","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/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);return 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;r<t.length;r++){var n=t[r];if(n.supports(e))return n}throw new l.BaseException("No event manager plugin found for event "+e)},e=o([u.Injectable(),s(0,u.Inject(t.EVENT_MANAGER_PLUGINS)),a("design:paramtypes",[Array,p.NgZone])],e)}();t.EventManager=f;var h=function(){function e(){}return e.prototype.supports=function(e){return!1},e.prototype.addEventListener=function(e,t,r){throw"not implemented"},e.prototype.addGlobalEventListener=function(e,t,r){throw"not implemented"},e}();return t.EventManagerPlugin=h,n.define=i,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/platform/dom/events/event_manager","angular2/src/platform/dom/dom_tokens","angular2/src/core/metadata","angular2/src/platform/dom/dom_adapter","angular2/src/platform/dom/util"],!0,function(e,t,r){function n(e,t){var r=E.DOM.parentElement(e);if(t.length>0&&y.isPresent(r)){var n=E.DOM.nextSibling(e);if(y.isPresent(n))for(var i=0;i<t.length;i++)E.DOM.insertBefore(n,t[i]);else for(var i=0;i<t.length;i++)E.DOM.appendChild(r,t[i])}}function i(e,t){for(var r=0;r<t.length;r++)E.DOM.appendChild(e,t[r])}function o(e){return function(t){var r=e(t);r===!1&&E.DOM.preventDefault(t)}}function a(e){return y.StringWrapper.replaceAll(t.CONTENT_ATTR,I,e)}function s(e){return y.StringWrapper.replaceAll(t.HOST_ATTR,I,e)}function c(e,t,r){for(var n=0;n<t.length;n++){var i=t[n];y.isArray(i)?c(e,i,r):(i=y.StringWrapper.replaceAll(i,I,e),r.push(i))}return r}function l(e){if("@"!=e[0])return[null,e];var t=y.RegExpWrapper.firstMatch(k,e);return[t[1],t[2]]}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=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},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/core/di"),v=e("angular2/src/animate/animation_builder"),y=e("angular2/src/facade/lang"),_=e("angular2/src/facade/exceptions"),b=e("angular2/src/platform/dom/shared_styles_host"),C=e("angular2/src/platform/dom/events/event_manager"),w=e("angular2/src/platform/dom/dom_tokens"),P=e("angular2/src/core/metadata"),E=e("angular2/src/platform/dom/dom_adapter"),S=e("angular2/src/platform/dom/util"),R=y.CONST_EXPR({xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"}),x="template bindings={}",O=/^template bindings=(.*)$/g,D=function(){function e(e,t,r,n){this.document=e,this.eventManager=t,this.sharedStylesHost=r,this.animate=n,this._registeredComponents=new Map}return e.prototype.renderComponent=function(e){var t=this._registeredComponents.get(e.id);return y.isBlank(t)&&(t=new T(this,e),this._registeredComponents.set(e.id,t)),t},e}();t.DomRootRenderer=D;var A=function(e){function t(t,r,n,i){e.call(this,t,r,n,i)}return d(t,e),t=f([m.Injectable(),g(0,m.Inject(w.DOCUMENT)),h("design:paramtypes",[Object,C.EventManager,b.DomSharedStylesHost,v.AnimationBuilder])],t)}(D);t.DomRootRenderer_=A;var T=function(){function e(e,t){this._rootRenderer=e,this.componentProto=t,this._styles=c(t.id,t.styles,[]),t.encapsulation!==P.ViewEncapsulation.Native&&this._rootRenderer.sharedStylesHost.addStyles(this._styles),this.componentProto.encapsulation===P.ViewEncapsulation.Emulated?(this._contentAttr=a(t.id),this._hostAttr=s(t.id)):(this._contentAttr=null,this._hostAttr=null)}return e.prototype.renderComponent=function(e){return this._rootRenderer.renderComponent(e)},e.prototype.selectRootElement=function(e){var t=E.DOM.querySelector(this._rootRenderer.document,e);if(y.isBlank(t))throw new _.BaseException('The selector "'+e+'" did not match any elements');return E.DOM.clearNodes(t),t},e.prototype.createElement=function(e,t){var r=l(t),n=y.isPresent(r[0])?E.DOM.createElementNS(R[r[0]],r[1]):E.DOM.createElement(r[1]);return y.isPresent(this._contentAttr)&&E.DOM.setAttribute(n,this._contentAttr,""),y.isPresent(e)&&E.DOM.appendChild(e,n),n},e.prototype.createViewRoot=function(e){var t;if(this.componentProto.encapsulation===P.ViewEncapsulation.Native){t=E.DOM.createShadowRoot(e),this._rootRenderer.sharedStylesHost.addHost(t);for(var r=0;r<this._styles.length;r++)E.DOM.appendChild(t,E.DOM.createStyleElement(this._styles[r]))}else y.isPresent(this._hostAttr)&&E.DOM.setAttribute(e,this._hostAttr,""),t=e;return t},e.prototype.createTemplateAnchor=function(e){var t=E.DOM.createComment(x);return y.isPresent(e)&&E.DOM.appendChild(e,t),t},e.prototype.createText=function(e,t){var r=E.DOM.createTextNode(t);return y.isPresent(e)&&E.DOM.appendChild(e,r),r},e.prototype.projectNodes=function(e,t){y.isBlank(e)||i(e,t)},e.prototype.attachViewAfter=function(e,t){n(e,t);for(var r=0;r<t.length;r++)this.animateNodeEnter(t[r])},e.prototype.detachView=function(e){for(var t=0;t<e.length;t++){var r=e[t];E.DOM.remove(r),this.animateNodeLeave(r)}},e.prototype.destroyView=function(e,t){this.componentProto.encapsulation===P.ViewEncapsulation.Native&&y.isPresent(e)&&this._rootRenderer.sharedStylesHost.removeHost(E.DOM.getShadowRoot(e))},e.prototype.listen=function(e,t,r){return this._rootRenderer.eventManager.addEventListener(e,t,o(r))},e.prototype.listenGlobal=function(e,t,r){return this._rootRenderer.eventManager.addGlobalEventListener(e,t,o(r))},e.prototype.setElementProperty=function(e,t,r){E.DOM.setProperty(e,t,r)},e.prototype.setElementAttribute=function(e,t,r){var n,i=l(t);y.isPresent(i[0])&&(t=i[0]+":"+i[1],n=R[i[0]]),y.isPresent(r)?y.isPresent(n)?E.DOM.setAttributeNS(e,n,t,r):E.DOM.setAttribute(e,i[1],r):E.DOM.removeAttribute(e,t)},e.prototype.setBindingDebugInfo=function(e,t,r){var n=S.camelCaseToDashCase(t);if(E.DOM.isCommentNode(e)){var i=y.RegExpWrapper.firstMatch(O,y.StringWrapper.replaceAll(E.DOM.getText(e),/\n/g,"")),o=y.Json.parse(i[1]);o[n]=r,E.DOM.setText(e,y.StringWrapper.replace(x,"{}",y.Json.stringify(o)))}else this.setElementAttribute(e,t,r)},e.prototype.setElementDebugInfo=function(e,t){},e.prototype.setElementClass=function(e,t,r){r?E.DOM.addClass(e,t):E.DOM.removeClass(e,t)},e.prototype.setElementStyle=function(e,t,r){y.isPresent(r)?E.DOM.setStyle(e,t,y.stringify(r)):E.DOM.removeStyle(e,t)},e.prototype.invokeElementMethod=function(e,t,r){E.DOM.invoke(e,t,r)},e.prototype.setText=function(e,t){E.DOM.setText(e,t)},e.prototype.animateNodeEnter=function(e){E.DOM.isElementNode(e)&&E.DOM.hasClass(e,"ng-animate")&&(E.DOM.addClass(e,"ng-enter"),this._rootRenderer.animate.css().addAnimationClass("ng-enter-active").start(e).onComplete(function(){E.DOM.removeClass(e,"ng-enter")}))},e.prototype.animateNodeLeave=function(e){E.DOM.isElementNode(e)&&E.DOM.hasClass(e,"ng-animate")?(E.DOM.addClass(e,"ng-leave"),this._rootRenderer.animate.css().addAnimationClass("ng-leave-active").start(e).onComplete(function(){E.DOM.removeClass(e,"ng-leave"),E.DOM.remove(e)})):E.DOM.remove(e)},e}();t.DomRenderer=T;var I=/%COMP%/g;t.COMPONENT_VARIABLE="%COMP%",t.HOST_ATTR="_nghost-"+t.COMPONENT_VARIABLE,t.CONTENT_ATTR="_ngcontent-"+t.COMPONENT_VARIABLE;var k=/^@([^:]+):(.+)/g;return u.define=p,r.exports}),System.register("angular2/platform/common_dom",["angular2/src/platform/dom/dom_adapter","angular2/src/platform/dom/dom_renderer","angular2/src/platform/dom/dom_tokens","angular2/src/platform/dom/shared_styles_host","angular2/src/platform/dom/events/dom_events","angular2/src/platform/dom/events/event_manager","angular2/src/platform/dom/debug/by","angular2/src/platform/dom/debug/ng_probe"],!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/platform/dom/dom_adapter");t.DOM=a.DOM,t.setRootDomAdapter=a.setRootDomAdapter,t.DomAdapter=a.DomAdapter;var s=e("angular2/src/platform/dom/dom_renderer");t.DomRenderer=s.DomRenderer;var c=e("angular2/src/platform/dom/dom_tokens");t.DOCUMENT=c.DOCUMENT;var l=e("angular2/src/platform/dom/shared_styles_host");t.SharedStylesHost=l.SharedStylesHost,t.DomSharedStylesHost=l.DomSharedStylesHost;var u=e("angular2/src/platform/dom/events/dom_events");t.DomEventsPlugin=u.DomEventsPlugin;var p=e("angular2/src/platform/dom/events/event_manager");return t.EVENT_MANAGER_PLUGINS=p.EVENT_MANAGER_PLUGINS,t.EventManager=p.EventManager,t.EventManagerPlugin=p.EventManagerPlugin,n(e("angular2/src/platform/dom/debug/by")),n(e("angular2/src/platform/dom/debug/ng_probe")),i.define=o,r.exports}),System.register("angular2/src/common/pipes/invalid_pipe_argument_exception",["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.__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=function(e){function t(t,r){e.call(this,"Invalid argument '"+r+"' for pipe '"+a.stringify(t)+"'")}return o(t,e),t}(s.BaseException);return t.InvalidPipeArgumentException=c,n.define=i,r.exports}),System.register("angular2/src/common/pipes/uppercase_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.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){
11
+ 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<e.length;){for(t=o;t<e.length&&e[t]==e[o];)t++;var a=t-o;switch(e[o]){case"G":r.era=i(a);break;case"y":r.year=n(a);break;case"M":a>=3?r.month=i(a):r.month=n(a);break;case"d":r.day=n(a);break;case"E":r.weekday=i(a);break;case"j":r.hour=n(a);break;case"h":r.hour=n(a),r.hour12=!0;break;case"H":r.hour=n(a),r.hour12=!1;break;case"m":r.minute=n(a);break;case"s":r.second=n(a);break;case"z":r.timeZoneName="long";break;case"Z":r.timeZoneName="short"}o=t}return r}var a=System.global,s=a.define;a.define=void 0,function(e){e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency"}(t.NumberFormatStyle||(t.NumberFormatStyle={}));var c=t.NumberFormatStyle,l=function(){function e(){}return e.format=function(e,t,r,n){var i=void 0===n?{}:n,o=i.minimumIntegerDigits,a=void 0===o?1:o,s=i.minimumFractionDigits,l=void 0===s?0:s,u=i.maximumFractionDigits,p=void 0===u?3:u,d=i.currency,f=i.currencyAsSymbol,h=void 0===f?!1:f,g={minimumIntegerDigits:a,minimumFractionDigits:l,maximumFractionDigits:p};return g.style=c[r].toLowerCase(),r==c.Currency&&(g.currency=d,g.currencyDisplay=h?"symbol":"code"),new Intl.NumberFormat(t,g).format(e)},e}();t.NumberFormatter=l;var u=new Map,p=function(){function e(){}return e.format=function(e,t,r){var n=t+r;if(u.has(n))return u.get(n).format(e);var i=new Intl.DateTimeFormat(t,o(r));return u.set(n,i),i.format(e)},e}();return t.DateFormatter=p,a.define=s,r.exports}),System.register("angular2/src/common/pipes/number_pipe",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/intl","angular2/core","angular2/src/facade/collection","angular2/src/common/pipes/invalid_pipe_argument_exception"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=e("angular2/src/facade/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.nativeElement,r[n],t);else this._renderer.setElementClass(this._ngEl.nativeElement,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,this._ngForTrackBy))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngForTemplate",{set:function(e){c.isPresent(e)&&(this._templateRef=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngForTrackBy",{set:function(e){this._ngForTrackBy=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=this,r=[];e.forEachRemovedItem(function(e){return r.push(new u(e,null))}),e.forEachMovedItem(function(e){return r.push(new u(e,null))});var n=this._bulkRemove(r);e.forEachAddedItem(function(e){return n.push(new u(e,null))}),this._bulkInsert(n);for(var i=0;i<n.length;i++)this._perViewChange(n[i].view,n[i].record);for(var i=0,o=this._viewContainer.length;o>i;i++){var a=this._viewContainer.get(i);a.setLocal("last",i===o-1)}e.forEachIdentityChange(function(e){var r=t._viewContainer.get(e.currentIndex);r.setLocal("$implicit",e.item)})},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;t<e.length;t++){var r=e[t];c.isPresent(r.view)?this._viewContainer.insert(r.view,r.record.currentIndex):r.view=this._viewContainer.createEmbeddedView(this._templateRef,r.record.currentIndex)}return e},e=o([s.Directive({selector:"[ngFor][ngForOf]",inputs:["ngForTrackBy","ngForOf","ngForTemplate"]}),a("design:paramtypes",[s.ViewContainerRef,s.TemplateRef,s.IterableDiffers,s.ChangeDetectorRef])],e)}();t.NgFor=l;var u=function(){function e(e,t){this.record=e,this.view=t}return e}();return n.define=i,r.exports}),System.register("angular2/src/common/directives/ng_if",["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){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.nativeElement,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}();t.SwitchView=d;var 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;t<e.length;t++)e[t].destroy();this._activeViews=[]},e.prototype._activateViews=function(e){if(l.isPresent(e)){for(var t=0;t<e.length;t++)e[t].create();this._activeViews=e}},e.prototype._registerView=function(e,t){var r=this._valueViews.get(e);l.isBlank(r)&&(r=[],this._valueViews.set(e,r)),r.push(t)},e.prototype._deregisterView=function(e,t){if(e!==p){var r=this._valueViews.get(e);1==r.length?this._valueViews["delete"](e):u.ListWrapper.remove(r,t)}},e=o([c.Directive({selector:"[ngSwitch]",inputs:["ngSwitch"]}),a("design:paramtypes",[])],e)}();t.NgSwitch=f;var h=function(){function e(e,t,r){this._value=p,this._switch=r,this._view=new d(e,t)}return Object.defineProperty(e.prototype,"ngSwitchWhen",{set:function(e){this._switch._onWhenValueChanged(this._value,e,this._view),this._value=e},enumerable:!0,configurable:!0}),e=o([c.Directive({selector:"[ngSwitchWhen]",inputs:["ngSwitchWhen"]}),s(2,c.Host()),a("design:paramtypes",[c.ViewContainerRef,c.TemplateRef,f])],e)}();t.NgSwitchWhen=h;var g=function(){function e(e,t,r){r._registerView(p,new d(e,t))}return e=o([c.Directive({selector:"[ngSwitchDefault]"}),s(2,c.Host()),a("design:paramtypes",[c.ViewContainerRef,c.TemplateRef,f])],e)}();return t.NgSwitchDefault=g,n.define=i,r.exports}),System.register("angular2/src/common/directives/observable_list_diff",[],!0,function(e,t,r){var n=System.global,i=n.define;return n.define=void 0,n.define=i,r.exports}),System.register("angular2/src/common/directives/core_directives",["angular2/src/facade/lang","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"],!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/directives/ng_class"),s=e("angular2/src/common/directives/ng_for"),c=e("angular2/src/common/directives/ng_if"),l=e("angular2/src/common/directives/ng_style"),u=e("angular2/src/common/directives/ng_switch");return t.CORE_DIRECTIVES=o.CONST_EXPR([a.NgClass,s.NgFor,c.NgIf,l.NgStyle,u.NgSwitch,u.NgSwitchWhen,u.NgSwitchDefault]),n.define=i,r.exports}),System.register("angular2/src/common/forms/model",["angular2/src/facade/lang","angular2/src/facade/async","angular2/src/facade/promise","angular2/src/facade/collection"],!0,function(e,t,r){function n(e){return e instanceof f}function i(e,t){return l.isBlank(t)?null:(t instanceof Array||(t=t.split("/")),t instanceof Array&&d.ListWrapper.isEmpty(t)?null:t.reduce(function(e,t){if(e instanceof g)return l.isPresent(e.controls[t])?e.controls[t]:null;if(e instanceof m){var r=t;return l.isPresent(e.at(r))?e.at(r):null}return null},e))}function o(e){return p.PromiseWrapper.isPromise(e)?u.ObservableWrapper.fromPromise(e):e}var a=System.global,s=a.define;a.define=void 0;var c=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)},l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/async"),p=e("angular2/src/facade/promise"),d=e("angular2/src/facade/collection");t.VALID="VALID",t.INVALID="INVALID",t.PENDING="PENDING",t.isControl=n;var f=function(){function e(e,t){this.validator=e,this.asyncValidator=t,this._pristine=!0,this._touched=!1}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this._status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this._status===t.VALID},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return this._errors},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pristine",{get:function(){return this._pristine},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirty",{get:function(){return!this.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"touched",{get:function(){return this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"untouched",{get:function(){return!this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valueChanges",{get:function(){return this._valueChanges},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"statusChanges",{get:function(){return this._statusChanges},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pending",{get:function(){return this._status==t.PENDING},enumerable:!0,configurable:!0}),e.prototype.markAsTouched=function(){this._touched=!0},e.prototype.markAsDirty=function(e){var t=(void 0===e?{}:e).onlySelf;t=l.normalizeBool(t),this._pristine=!1,l.isPresent(this._parent)&&!t&&this._parent.markAsDirty({onlySelf:t})},e.prototype.markAsPending=function(e){var r=(void 0===e?{}:e).onlySelf;r=l.normalizeBool(r),this._status=t.PENDING,l.isPresent(this._parent)&&!r&&this._parent.markAsPending({onlySelf:r})},e.prototype.setParent=function(e){this._parent=e},e.prototype.updateValueAndValidity=function(e){var r=void 0===e?{}:e,n=r.onlySelf,i=r.emitEvent;n=l.normalizeBool(n),i=l.isPresent(i)?i:!0,this._updateValue(),this._errors=this._runValidator(),this._status=this._calculateStatus(),(this._status==t.VALID||this._status==t.PENDING)&&this._runAsyncValidator(i),i&&(u.ObservableWrapper.callEmit(this._valueChanges,this._value),u.ObservableWrapper.callEmit(this._statusChanges,this._status)),l.isPresent(this._parent)&&!n&&this._parent.updateValueAndValidity({onlySelf:n,emitEvent:i})},e.prototype._runValidator=function(){return l.isPresent(this.validator)?this.validator(this):null},e.prototype._runAsyncValidator=function(e){var r=this;if(l.isPresent(this.asyncValidator)){this._status=t.PENDING,this._cancelExistingSubscription();var n=o(this.asyncValidator(this));this._asyncValidationSubscription=u.ObservableWrapper.subscribe(n,function(t){return r.setErrors(t,{emitEvent:e})})}},e.prototype._cancelExistingSubscription=function(){l.isPresent(this._asyncValidationSubscription)&&u.ObservableWrapper.dispose(this._asyncValidationSubscription)},e.prototype.setErrors=function(e,t){var r=(void 0===t?{}:t).emitEvent;r=l.isPresent(r)?r:!0,this._errors=e,this._status=this._calculateStatus(),r&&u.ObservableWrapper.callEmit(this._statusChanges,this._status),l.isPresent(this._parent)&&this._parent._updateControlsErrors()},e.prototype.find=function(e){return i(this,e)},e.prototype.getError=function(e,t){void 0===t&&(t=null);var r=l.isPresent(t)&&!d.ListWrapper.isEmpty(t)?this.find(t):this;return l.isPresent(r)&&l.isPresent(r._errors)?d.StringMapWrapper.get(r._errors,e):null},e.prototype.hasError=function(e,t){return void 0===t&&(t=null),l.isPresent(this.getError(e,t))},Object.defineProperty(e.prototype,"root",{get:function(){for(var e=this;l.isPresent(e._parent);)e=e._parent;return e},enumerable:!0,configurable:!0}),e.prototype._updateControlsErrors=function(){this._status=this._calculateStatus(),l.isPresent(this._parent)&&this._parent._updateControlsErrors()},e.prototype._initObservables=function(){this._valueChanges=new u.EventEmitter,this._statusChanges=new u.EventEmitter},e.prototype._calculateStatus=function(){return l.isPresent(this._errors)?t.INVALID:this._anyControlsHaveStatus(t.PENDING)?t.PENDING:this._anyControlsHaveStatus(t.INVALID)?t.INVALID:t.VALID},e}();t.AbstractControl=f;var h=function(e){function t(t,r,n){void 0===t&&(t=null),void 0===r&&(r=null),void 0===n&&(n=null),e.call(this,r,n),this._value=t,this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}return c(t,e),t.prototype.updateValue=function(e,t){var r=void 0===t?{}:t,n=r.onlySelf,i=r.emitEvent,o=r.emitModelToViewChange;o=l.isPresent(o)?o:!0,this._value=e,l.isPresent(this._onChange)&&o&&this._onChange(this._value),this.updateValueAndValidity({onlySelf:n,emitEvent:i})},t.prototype._updateValue=function(){},t.prototype._anyControlsHaveStatus=function(e){return!1},t.prototype.registerOnChange=function(e){this._onChange=e},t}(f);t.Control=h;var g=function(e){function t(t,r,n,i){void 0===r&&(r=null),void 0===n&&(n=null),void 0===i&&(i=null),e.call(this,n,i),this.controls=t,this._optionals=l.isPresent(r)?r:{},this._initObservables(),this._setParentForControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return c(t,e),t.prototype.addControl=function(e,t){this.controls[e]=t,t.setParent(this)},t.prototype.removeControl=function(e){d.StringMapWrapper["delete"](this.controls,e)},t.prototype.include=function(e){d.StringMapWrapper.set(this._optionals,e,!0),this.updateValueAndValidity()},t.prototype.exclude=function(e){d.StringMapWrapper.set(this._optionals,e,!1),this.updateValueAndValidity()},t.prototype.contains=function(e){var t=d.StringMapWrapper.contains(this.controls,e);return t&&this._included(e)},t.prototype._setParentForControls=function(){var e=this;d.StringMapWrapper.forEach(this.controls,function(t,r){t.setParent(e)})},t.prototype._updateValue=function(){this._value=this._reduceValue()},t.prototype._anyControlsHaveStatus=function(e){var t=this,r=!1;return d.StringMapWrapper.forEach(this.controls,function(n,i){r=r||t.contains(i)&&n.status==e}),r},t.prototype._reduceValue=function(){return this._reduceChildren({},function(e,t,r){return e[r]=t.value,e})},t.prototype._reduceChildren=function(e,t){var r=this,n=e;return d.StringMapWrapper.forEach(this.controls,function(e,i){r._included(i)&&(n=t(n,e,i))}),n},t.prototype._included=function(e){var t=d.StringMapWrapper.contains(this._optionals,e);return!t||d.StringMapWrapper.get(this._optionals,e)},t}(f);t.ControlGroup=g;var m=function(e){function t(t,r,n){void 0===r&&(r=null),void 0===n&&(n=null),e.call(this,r,n),this.controls=t,this._initObservables(),this._setParentForControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return c(t,e),t.prototype.at=function(e){return this.controls[e]},t.prototype.push=function(e){this.controls.push(e),e.setParent(this),this.updateValueAndValidity()},t.prototype.insert=function(e,t){d.ListWrapper.insert(this.controls,e,t),t.setParent(this),this.updateValueAndValidity()},t.prototype.removeAt=function(e){d.ListWrapper.removeAt(this.controls,e),this.updateValueAndValidity()},Object.defineProperty(t.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),t.prototype._updateValue=function(){this._value=this.controls.map(function(e){return e.value})},t.prototype._anyControlsHaveStatus=function(e){return this.controls.some(function(t){return t.status==e})},t.prototype._setParentForControls=function(){var e=this;this.controls.forEach(function(t){t.setParent(e)})},t}(f);return t.ControlArray=m,a.define=s,r.exports}),System.register("angular2/src/common/forms/directives/abstract_control_directive",["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(){}return Object.defineProperty(e.prototype,"control",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return o.isPresent(this.control)?this.control.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return o.isPresent(this.control)?this.control.valid:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return o.isPresent(this.control)?this.control.errors:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pristine",{get:function(){return o.isPresent(this.control)?this.control.pristine:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirty",{get:function(){return o.isPresent(this.control)?this.control.dirty:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"touched",{get:function(){return o.isPresent(this.control)?this.control.touched:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"untouched",{get:function(){return o.isPresent(this.control)?this.control.untouched:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),e}();return t.AbstractControlDirective=s,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/control_container",["angular2/src/common/forms/directives/abstract_control_directive"],!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/common/forms/directives/abstract_control_directive"),s=function(e){function t(){e.apply(this,arguments)}return o(t,e),Object.defineProperty(t.prototype,"formDirective",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),t}(a.AbstractControlDirective);return t.ControlContainer=s,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/ng_control",["angular2/src/common/forms/directives/abstract_control_directive","angular2/src/facade/exceptions"],!0,function(e,t,r){
12
+ 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/common/forms/directives/abstract_control_directive"),s=e("angular2/src/facade/exceptions"),c=function(e){function t(){e.apply(this,arguments),this.name=null,this.valueAccessor=null}return o(t,e),Object.defineProperty(t.prototype,"validator",{get:function(){return s.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return s.unimplemented()},enumerable:!0,configurable:!0}),t}(a.AbstractControlDirective);return t.NgControl=c,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/control_value_accessor",["angular2/core","angular2/src/facade/lang"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/core"),a=e("angular2/src/facade/lang");return t.NG_VALUE_ACCESSOR=a.CONST_EXPR(new o.OpaqueToken("NgValueAccessor")),n.define=i,r.exports}),System.register("angular2/src/common/forms/validators",["angular2/src/facade/lang","angular2/src/facade/promise","angular2/src/facade/async","angular2/src/facade/collection","angular2/core"],!0,function(e,t,r){function n(e){return l.PromiseWrapper.isPromise(e)?e:u.ObservableWrapper.toPromise(e)}function i(e,t){return t.map(function(t){return t(e)})}function o(e){var t=e.reduce(function(e,t){return c.isPresent(t)?p.StringMapWrapper.merge(e,t):e},{});return p.StringMapWrapper.isEmpty(t)?null:t}var a=System.global,s=a.define;a.define=void 0;var c=e("angular2/src/facade/lang"),l=e("angular2/src/facade/promise"),u=e("angular2/src/facade/async"),p=e("angular2/src/facade/collection"),d=e("angular2/core");t.NG_VALIDATORS=c.CONST_EXPR(new d.OpaqueToken("NgValidators")),t.NG_ASYNC_VALIDATORS=c.CONST_EXPR(new d.OpaqueToken("NgAsyncValidators"));var f=function(){function e(){}return e.required=function(e){return c.isBlank(e.value)||c.isString(e.value)&&""==e.value?{required:!0}:null},e.minLength=function(t){return function(r){if(c.isPresent(e.required(r)))return null;var n=r.value;return n.length<t?{minlength:{requiredLength:t,actualLength:n.length}}:null}},e.maxLength=function(t){return function(r){if(c.isPresent(e.required(r)))return null;var n=r.value;return n.length>t?{maxlength:{requiredLength:t,actualLength:n.length}}:null}},e.nullValidator=function(e){return null},e.compose=function(e){if(c.isBlank(e))return null;var t=e.filter(c.isPresent);return 0==t.length?null:function(e){return o(i(e,t))}},e.composeAsync=function(e){if(c.isBlank(e))return null;var t=e.filter(c.isPresent);return 0==t.length?null:function(e){var r=i(e,t).map(n);return l.PromiseWrapper.all(r).then(o)}},e}();return t.Validators=f,a.define=s,r.exports}),System.register("angular2/src/common/forms/directives/default_value_accessor",["angular2/core","angular2/src/common/forms/directives/control_value_accessor","angular2/src/facade/lang"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=e("angular2/core"),c=e("angular2/src/common/forms/directives/control_value_accessor"),l=e("angular2/src/facade/lang"),u=l.CONST_EXPR(new s.Provider(c.NG_VALUE_ACCESSOR,{useExisting:s.forwardRef(function(){return p}),multi:!0})),p=function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){var t=l.isBlank(e)?"":e;this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e=o([s.Directive({selector:"input:not([type=checkbox])[ngControl],textarea[ngControl],input:not([type=checkbox])[ngFormControl],textarea[ngFormControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]",host:{"(input)":"onChange($event.target.value)","(blur)":"onTouched()"},bindings:[u]}),a("design:paramtypes",[s.Renderer,s.ElementRef])],e)}();return t.DefaultValueAccessor=p,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/number_value_accessor",["angular2/core","angular2/src/common/forms/directives/control_value_accessor","angular2/src/facade/lang"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},a=this&&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.nativeElement,"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.nativeElement,"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()"},providers:[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.nativeElement,"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:{"(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/radio_control_value_accessor",["angular2/core","angular2/src/common/forms/directives/control_value_accessor","angular2/src/common/forms/directives/ng_control","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=e("angular2/core"),c=e("angular2/src/common/forms/directives/control_value_accessor"),l=e("angular2/src/common/forms/directives/ng_control"),u=e("angular2/src/facade/lang"),p=e("angular2/src/facade/collection"),d=u.CONST_EXPR(new s.Provider(c.NG_VALUE_ACCESSOR,{useExisting:s.forwardRef(function(){return g}),multi:!0})),f=function(){function e(){this._accessors=[]}return e.prototype.add=function(e,t){this._accessors.push([e,t])},e.prototype.remove=function(e){for(var t=-1,r=0;r<this._accessors.length;++r)this._accessors[r][1]===e&&(t=r);p.ListWrapper.removeAt(this._accessors,t)},e.prototype.select=function(e){this._accessors.forEach(function(t){t[0].control.root===e._control.control.root&&t[1]!==e&&t[1].fireUncheck()})},e=o([s.Injectable(),a("design:paramtypes",[])],e)}();t.RadioControlRegistry=f;var h=function(){function e(e,t){this.checked=e,this.value=t}return e}();t.RadioButtonState=h;var g=function(){function e(e,t,r,n){this._renderer=e,this._elementRef=t,this._registry=r,this._injector=n,this.onChange=function(){},this.onTouched=function(){}}return e.prototype.ngOnInit=function(){this._control=this._injector.get(l.NgControl),this._registry.add(this._control,this)},e.prototype.ngOnDestroy=function(){this._registry.remove(this)},e.prototype.writeValue=function(e){this._state=e,u.isPresent(e)&&e.checked&&this._renderer.setElementProperty(this._elementRef.nativeElement,"checked",!0)},e.prototype.registerOnChange=function(e){var t=this;this._fn=e,this.onChange=function(){e(new h(!0,t._state.value)),t._registry.select(t)}},e.prototype.fireUncheck=function(){this._fn(new h(!1,this._state.value))},e.prototype.registerOnTouched=function(e){this.onTouched=e},o([s.Input(),a("design:type",String)],e.prototype,"name",void 0),e=o([s.Directive({selector:"input[type=radio][ngControl],input[type=radio][ngFormControl],input[type=radio][ngModel]",host:{"(change)":"onChange()","(blur)":"onTouched()"},providers:[d]}),a("design:paramtypes",[s.Renderer,s.ElementRef,f,s.Injector])],e)}();return t.RadioControlValueAccessor=g,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(){
13
+ 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,n.define=i,r.exports}),System.register("angular2/src/common/common_directives",["angular2/src/facade/lang","angular2/src/common/forms","angular2/src/common/directives"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/facade/lang"),a=e("angular2/src/common/forms"),s=e("angular2/src/common/directives");return t.COMMON_DIRECTIVES=o.CONST_EXPR([s.CORE_DIRECTIVES,a.FORM_DIRECTIVES]),n.define=i,r.exports}),System.register("angular2/src/platform/dom/events/key_events",["angular2/src/platform/dom/dom_adapter","angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/platform/dom/events/event_manager","angular2/src/core/di"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=e("angular2/src/platform/dom/dom_adapter"),l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/collection"),p=e("angular2/src/platform/dom/events/event_manager"),d=e("angular2/src/core/di"),f=["alt","control","meta","shift"],h={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},g=function(e){function t(){e.call(this)}return o(t,e),t.prototype.supports=function(e){return l.isPresent(t.parseEventName(e))},t.prototype.addEventListener=function(e,r,n){var i=t.parseEventName(r),o=t.eventCallback(e,u.StringMapWrapper.get(i,"fullKey"),n,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return c.DOM.onAndCancel(e,u.StringMapWrapper.get(i,"domEventName"),o)})},t.parseEventName=function(e){var r=e.toLowerCase().split("."),n=r.shift();if(0===r.length||!l.StringWrapper.equals(n,"keydown")&&!l.StringWrapper.equals(n,"keyup"))return null;var i=t._normalizeKey(r.pop()),o="";if(f.forEach(function(e){u.ListWrapper.contains(r,e)&&(u.ListWrapper.remove(r,e),o+=e+".")}),o+=i,0!=r.length||0===i.length)return null;var a=u.StringMapWrapper.create();return u.StringMapWrapper.set(a,"domEventName",n),u.StringMapWrapper.set(a,"fullKey",o),a},t.getEventFullKey=function(e){var t="",r=c.DOM.getEventKey(e);return r=r.toLowerCase(),l.StringWrapper.equals(r," ")?r="space":l.StringWrapper.equals(r,".")&&(r="dot"),f.forEach(function(n){if(n!=r){var i=u.StringMapWrapper.get(h,n);i(e)&&(t+=n+".")}}),t+=r},t.eventCallback=function(e,r,n,i){return function(e){l.StringWrapper.equals(t.getEventFullKey(e),r)&&i.run(function(){return n(e)})}},t._normalizeKey=function(e){switch(e){case"esc":return"escape";default:return e}},t=a([d.Injectable(),s("design:paramtypes",[])],t)}(p.EventManagerPlugin);return t.KeyEventsPlugin=g,n.define=i,r.exports}),System.register("angular2/src/platform/dom/events/hammer_common",["angular2/src/platform/dom/events/event_manager","angular2/src/facade/collection"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__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/collection","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/collection"),a=e("angular2/src/facade/lang"),s=e("angular2/src/platform/dom/dom_adapter"),c=e("angular2/core"),l=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}(),u=function(){function e(){}return e.init=function(){c.setTestabilityGetter(new e)},e.prototype.addToWindow=function(e){a.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 l(n)},a.global.getAllAngularTestabilities=function(){var t=e.getAllTestabilities();return t.map(function(e){return new l(e)})};var t=function(e){var t=a.global.getAllAngularTestabilities(),r=t.length,n=!1,i=function(t){n=n||t,r--,0==r&&e(n)};t.forEach(function(e){e.whenStable(i)})};a.global.frameworkStabilizers||(a.global.frameworkStabilizers=o.ListWrapper.createGrowableSize(0)),a.global.frameworkStabilizers.push(t)},e.prototype.findTestabilityInTree=function(e,t,r){if(null==t)return null;var n=e.getTestability(t);return a.isPresent(n)?n:r?s.DOM.isShadowRoot(t)?this.findTestabilityInTree(e,s.DOM.getHost(t),!0):this.findTestabilityInTree(e,s.DOM.parentElement(t),!0):null},e}();return t.BrowserGetTestability=u,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;a<n.length;a++){var s=n[a];switch(s){case"":case".":break;case"..":i.length>0?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<this.attrs.length;n+=2){var i=this.attrs[n],o=""!==this.attrs[n+1]?'="'+this.attrs[n+1]+'"':"";r+=" "+i+o}return"<"+e+t+r+"></"+e+">"},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;t<this.classNames.length;t++)e+="."+this.classNames[t];if(a.isPresent(this.attrs))for(var t=0;t<this.attrs.length;){var r=this.attrs[t++],n=this.attrs[t++];e+="["+r,n.length>0&&(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;n<e.length;n++)this._addSelectable(e[n],t,r)},e.prototype._addSelectable=function(e,t,r){var n=this,i=e.element,s=e.classNames,c=e.attrs,l=new f(e,t,r);if(a.isPresent(i)){var u=0===c.length&&0===s.length;u?this._addTerminal(n._elementMap,i,l):n=this._addPartial(n._elementPartialMap,i)}if(a.isPresent(s))for(var p=0;p<s.length;p++){var u=0===c.length&&p===s.length-1,d=s[p];u?this._addTerminal(n._classMap,d,l):n=this._addPartial(n._classPartialMap,d)}if(a.isPresent(c))for(var p=0;p<c.length;){var u=p===c.length-2,h=c[p++],g=c[p++];if(u){var m=n._attrValueMap,v=m.get(h);a.isBlank(v)&&(v=new o.Map,m.set(h,v)),this._addTerminal(v,g,l)}else{var y=n._attrValuePartialMap,_=y.get(h);a.isBlank(_)&&(_=new o.Map,y.set(h,_)),n=this._addPartial(_,g)}}},e.prototype._addTerminal=function(e,t,r){var n=e.get(t);a.isBlank(n)&&(n=[],e.set(t,n)),n.push(r)},e.prototype._addPartial=function(t,r){var n=t.get(r);return a.isBlank(n)&&(n=new e,t.set(r,n)),n},e.prototype.match=function(e,t){for(var r=!1,n=e.element,i=e.classNames,o=e.attrs,s=0;s<this._listContexts.length;s++)this._listContexts[s].alreadyMatched=!1;if(r=this._matchTerminal(this._elementMap,n,e,t)||r,r=this._matchPartial(this._elementPartialMap,n,e,t)||r,a.isPresent(i))for(var l=0;l<i.length;l++){var u=i[l];r=this._matchTerminal(this._classMap,u,e,t)||r,r=this._matchPartial(this._classPartialMap,u,e,t)||r}if(a.isPresent(o))for(var l=0;l<o.length;){var p=o[l++],d=o[l++],f=this._attrValueMap.get(p);a.StringWrapper.equals(d,c)||(r=this._matchTerminal(f,c,e,t)||r),r=this._matchTerminal(f,d,e,t)||r;var h=this._attrValuePartialMap.get(p);a.StringWrapper.equals(d,c)||(r=this._matchPartial(h,c,e,t)||r),r=this._matchPartial(h,d,e,t)||r}return r},e.prototype._matchTerminal=function(e,t,r,n){if(a.isBlank(e)||a.isBlank(t))return!1;var i=e.get(t),o=e.get("*");if(a.isPresent(o)&&(i=i.concat(o)),a.isBlank(i))return!1;for(var s,c=!1,l=0;l<i.length;l++)s=i[l],c=s.finalize(r,n)||c;return c},e.prototype._matchPartial=function(e,t,r,n){if(a.isBlank(e)||a.isBlank(t))return!1;var i=e.get(t);return a.isBlank(i)?!1:i.match(r,n)},e}();t.SelectorMatcher=p;var d=function(){function e(e){this.selectors=e,this.alreadyMatched=!1}return e}();t.SelectorListContext=d;var f=function(){function e(e,t,r){this.selector=e,this.cbContext=t,this.listContext=r,this.notSelectors=e.notSelectors}return e.prototype.finalize=function(e,t){var r=!0;if(this.notSelectors.length>0&&(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 P.StringWrapper.replaceAllMapped(e,E,function(e){return"-"+e[1].toLowerCase()})}function i(e){return P.StringWrapper.replaceAllMapped(e,S,function(e){return e[1].toUpperCase()})}function o(e){return P.isBlank(e)?null:"'"+s(e,R)+"'"}function a(e){return P.isBlank(e)?null:'"'+s(e,x)+'"'}function s(e,t){return P.StringWrapper.replaceAllMapped(e,t,function(e){return"$"==e[0]?P.IS_DART?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]})}function c(e){return P.IS_DART?"const "+e+" = ":"var "+e+" = exports['"+e+"'] = "}function l(e){return P.IS_DART?"const "+e:"new "+e}function u(e,t,r){return void 0===r&&(r=""),P.IS_DART?p(e,r)+" => "+t:p(e,r)+" { return "+t+"; }"}function p(e,t){return void 0===t&&(t=""),P.IS_DART?t+"("+e.join(",")+")":"function "+t+"("+e.join(",")+")"}function d(e){return P.IS_DART?"'${"+e+"}'":e}function f(e,t){var r=P.StringWrapper.split(e.trim(),/\s*:\s*/g);return r.length>1?r:t}function h(e){return e instanceof D?e.expression:P.isString(e)?o(e):P.isBlank(e)?"null":""+e}function g(e){return"["+e.map(h).join(",")+"]"}function m(e){for(var t="([",r=!0,n=P.IS_DART?".addAll":"concat",i=0;i<e.length;i++){var o=e[i];o instanceof D&&o.isArray?(t+="])."+n+"("+o.expression+")."+n+"([",r=!0):(r||(t+=","),r=!1,t+=h(o))}return t+="])"}function v(e){return"{"+e.map(y).join(",")+"}"}function y(e){return h(e[0])+":"+h(e[1])}function _(e,t){for(var r=0;r<e.length;r++)t.push(e[r])}function b(e,t){if(P.isPresent(e))for(var r=0;r<e.length;r++){var n=e[r];P.isArray(n)?b(n,t):t.push(n)}return t}var C=System.global,w=C.define;C.define=void 0;var P=e("angular2/src/facade/lang"),E=/([A-Z])/g,S=/-([a-z])/g,R=/'|\\|\n|\r|\$/g,x=/"|\\|\n|\r|\$/g;t.MODULE_SUFFIX=P.IS_DART?".dart":".js",t.CONST_VAR=P.IS_DART?"const":"var",t.camelCaseToDashCase=n,t.dashCaseToCamelCase=i,t.escapeSingleQuoteString=o,t.escapeDoubleQuoteString=a,t.codeGenExportVariable=c,t.codeGenConstConstructorCall=l,t.codeGenValueFn=u,t.codeGenFnHeader=p,t.codeGenToString=d,t.splitAtColon=f;var O=function(){function e(e){this.statement=e}return e}();t.Statement=O;var D=function(){function e(e,t){void 0===t&&(t=!1),this.expression=e,this.isArray=t}return e}();return t.Expression=D,t.escapeValue=h,t.codeGenArray=g,t.codeGenFlatArray=m,t.codeGenStringMap=v,t.addAll=_,t.flattenArray=b,C.define=w,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/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/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.getSourceWithoutImports=function(e){return a.StringWrapper.replaceAllMapped(e,s,function(e){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/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.nodeCount=0,this.boundElementCount=0,this.variableNames=[],this.bindingRecords=[],this.eventRecords=[],this.directiveRecords=[],this.viewIndex=t.length,t.push(this)}return e.prototype.visitEmbeddedTemplate=function(t,r){this.nodeCount++,this.boundElementCount++,d.templateVisitAll(this,t.outputs);for(var n=0;n<t.directives.length;n++)t.directives[n].visit(this,n);var i=new e(this,this.allVisitors,p.ChangeDetectionStrategy.Default);return d.templateVisitAll(i,t.vars),d.templateVisitAll(i,t.children),null},e.prototype.visitElement=function(e,t){this.nodeCount++,e.isBound()&&this.boundElementCount++,d.templateVisitAll(this,e.inputs,null),d.templateVisitAll(this,e.outputs),d.templateVisitAll(this,e.exportAsVars);for(var r=0;r<e.directives.length;r++)e.directives[r].visit(this,r);return d.templateVisitAll(this,e.children),null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitVariable=function(e,t){return this.variableNames.push(e.name),null},e.prototype.visitEvent=function(e,t){var r=l.isPresent(t)?p.BindingRecord.createForHostEvent(e.handler,e.fullName,t):p.BindingRecord.createForEvent(e.handler,e.fullName,this.boundElementCount-1);return this.eventRecords.push(r),null},e.prototype.visitElementProperty=function(e,t){var r,n=this.boundElementCount-1,i=l.isPresent(t)?t.directiveIndex:null;return e.type===d.PropertyBindingType.Property?r=l.isPresent(i)?p.BindingRecord.createForHostProperty(i,e.value,e.name):p.BindingRecord.createForElementProperty(e.value,n,e.name):e.type===d.PropertyBindingType.Attribute?r=l.isPresent(i)?p.BindingRecord.createForHostAttribute(i,e.value,e.name):p.BindingRecord.createForElementAttribute(e.value,n,e.name):e.type===d.PropertyBindingType.Class?r=l.isPresent(i)?p.BindingRecord.createForHostClass(i,e.value,e.name):p.BindingRecord.createForElementClass(e.value,n,e.name):e.type===d.PropertyBindingType.Style&&(r=l.isPresent(i)?p.BindingRecord.createForHostStyle(i,e.value,e.name,e.unit):p.BindingRecord.createForElementStyle(e.value,n,e.name,e.unit)),this.bindingRecords.push(r),null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitBoundText=function(e,t){var r=this.nodeCount++;return this.bindingRecords.push(p.BindingRecord.createForTextNode(e.value,r)),null},e.prototype.visitText=function(e,t){return this.nodeCount++,null},e.prototype.visitDirective=function(e,t){var r=new p.DirectiveIndex(this.boundElementCount-1,t),n=e.directive,i=[];
14
+ c.StringMapWrapper.forEach(e.directive.outputs,function(e,t){return i.push([t,e])});var o=new p.DirectiveRecord({directiveIndex:r,callAfterContentInit:-1!==n.lifecycleHooks.indexOf(f.LifecycleHooks.AfterContentInit),callAfterContentChecked:-1!==n.lifecycleHooks.indexOf(f.LifecycleHooks.AfterContentChecked),callAfterViewInit:-1!==n.lifecycleHooks.indexOf(f.LifecycleHooks.AfterViewInit),callAfterViewChecked:-1!==n.lifecycleHooks.indexOf(f.LifecycleHooks.AfterViewChecked),callOnChanges:-1!==n.lifecycleHooks.indexOf(f.LifecycleHooks.OnChanges),callDoCheck:-1!==n.lifecycleHooks.indexOf(f.LifecycleHooks.DoCheck),callOnInit:-1!==n.lifecycleHooks.indexOf(f.LifecycleHooks.OnInit),callOnDestroy:-1!==n.lifecycleHooks.indexOf(f.LifecycleHooks.OnDestroy),changeDetection:n.changeDetection,outputs:i});this.directiveRecords.push(o),d.templateVisitAll(this,e.inputs,o);var a=this.bindingRecords;return o.callOnChanges&&a.push(p.BindingRecord.createDirectiveOnChanges(o)),o.callOnInit&&a.push(p.BindingRecord.createDirectiveOnInit(o)),o.callDoCheck&&a.push(p.BindingRecord.createDirectiveDoCheck(o)),d.templateVisitAll(this,e.hostProperties,o),d.templateVisitAll(this,e.hostEvents,o),d.templateVisitAll(this,e.exportAsVars),null},e.prototype.visitDirectiveProperty=function(e,t){var r=u.reflector.setter(e.directiveName);return this.bindingRecords.push(p.BindingRecord.createForDirective(e.value,e.directiveName,r,t)),null},e}();return a.define=s,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("{"+A)&&(o=r.blocks[n++],a=e[4].substring(A.length+1),s="{");var c=t(new T(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;a<t.length;a++){var s=t[a];s==D&&i--,i>0?o.push(s):(o.length>0&&(n.push(o.join("")),r.push(A),o=[]),r.push(s)),s==O&&i++}return o.length>0&&(n.push(o.join("")),r.push(A)),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<t.length;i++){var o=t[i];if(l.isBlank(o))break;o=o.trim(),n.push(r(_,o,e[3]))}return n.join(",")}return _+e[3]})},e.prototype._colonHostContextPartReplacer=function(e,t,r){return l.StringWrapper.contains(t,h)?this._colonHostPartReplacer(e,t,r):e+t+r+", "+t+" "+e+r},e.prototype._colonHostPartReplacer=function(e,t,r){return e+l.StringWrapper.replace(t,h,"")+r},e.prototype._convertShadowDOMSelectors=function(e){for(var t=0;t<b.length;t++)e=l.StringWrapper.replaceAll(e,b[t]," ");return e},e.prototype._scopeSelectors=function(e,t,r){var n=this;return i(e,function(e){var i=e.selector,o=e.content;return"@"!=e.selector[0]||e.selector.startsWith("@page")?i=n._scopeSelector(e.selector,t,r,n.strictStyling):e.selector.startsWith("@media")&&(o=n._scopeSelectors(e.content,t,r)),new T(i,o)})},e.prototype._scopeSelector=function(e,t,r,n){for(var i=[],o=e.split(","),a=0;a<o.length;a++){var s=o[a];s=s.trim(),this._selectorNeedsScoping(s,t)&&(s=n&&!l.StringWrapper.contains(s,_)?this._applyStrictSelectorScope(s,t):this._applySelectorScope(s,t,r)),i.push(s)}return i.join(", ")},e.prototype._selectorNeedsScoping=function(e,t){var r=this._makeScopeMatcher(t);return!l.isPresent(l.RegExpWrapper.firstMatch(r,e))},e.prototype._makeScopeMatcher=function(e){var t=/\[/g,r=/\]/g;return e=l.StringWrapper.replaceAll(e,t,"\\["),e=l.StringWrapper.replaceAll(e,r,"\\]"),l.RegExpWrapper.create("^("+e+")"+C,"m")},e.prototype._applySelectorScope=function(e,t,r){return this._applySimpleSelectorScope(e,t,r)},e.prototype._applySimpleSelectorScope=function(e,t,r){if(l.isPresent(l.RegExpWrapper.firstMatch(w,e))){var n=this.strictStyling?"["+r+"]":t;return e=l.StringWrapper.replace(e,_,n),l.StringWrapper.replaceAll(e,w,n+" ")}return t+" "+e},e.prototype._applyStrictSelectorScope=function(e,t){var r=/\[is=([^\]]*)\]/g;t=l.StringWrapper.replaceAllMapped(t,r,function(e){return e[1]});for(var n=[" ",">","+","~"],i=e,o="["+t+"]",a=0;a<n.length;a++){var s=n[a],u=i.split(s);i=u.map(function(e){var t=l.StringWrapper.replaceAll(e.trim(),w,"");if(t.length>0&&!c.ListWrapper.contains(n,t)&&!l.StringWrapper.contains(t,o)){var r=/([^:]*)(:*)(.*)/g,i=l.RegExpWrapper.firstMatch(r,t);l.isPresent(i)&&(e=i[1]+o+i[2]+i[3])}return e}).join(s)}return i},e.prototype._insertPolyfillHostInCssText=function(e){return e=l.StringWrapper.replaceAll(e,E,g),e=l.StringWrapper.replaceAll(e,P,h)},e}();t.ShadowCss=u;var p=/polyfill-next-selector[^}]*content:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,d=/(polyfill-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,f=/(polyfill-unscoped-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,h="-shadowcsshost",g="-shadowcsscontext",m=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",v=l.RegExpWrapper.create("("+h+m,"im"),y=l.RegExpWrapper.create("("+g+m,"im"),_=h+"-no-combinator",b=[/>>>/g,/::shadow/g,/::content/g,/\/deep\//g,/\/shadow-deep\//g,/\/shadow\//g],C="([>\\s~+[.,{:][\\s\\S]*)?$",w=l.RegExpWrapper.create(h,"im"),P=/:host/gim,E=/:host-context/gim,S=/\/\*[\s\S]*?\*\//g,R=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,x=/([{}])/g,O="{",D="}",A="%BLOCK%",T=function(){function e(e,t){this.selector=e,this.content=t}return e}();t.CssRule=T,t.processRules=i;var I=function(){function e(e,t){this.escapedString=e,this.blocks=t}return e}();return a.define=s,r.exports}),System.register("angular2/src/compiler/style_url_resolver",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e){if(s.isBlank(e)||0===e.length||"/"==e[0])return!1;var t=s.RegExpWrapper.firstMatch(u,e);return s.isBlank(t)||"package"==t[1]||"asset"==t[1]}function i(e,t,r){var i=[],o=s.StringWrapper.replaceAllMapped(r,l,function(r){var o=s.isPresent(r[1])?r[1]:r[2];return n(o)?(i.push(e.resolve(t,o)),""):r[0]});return new c(o,i)}var o=System.global,a=o.define;o.define=void 0;var s=e("angular2/src/facade/lang"),c=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/proto_view_compiler",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/compiler/template_ast","angular2/src/compiler/source_module","angular2/src/core/linker/view","angular2/src/core/linker/view_type","angular2/src/core/linker/element","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){var t=[];y.StringMapWrapper.forEach(e,function(e,r){t.push([r,e])}),y.ListWrapper.sort(t,function(e,t){return v.StringWrapper.compare(e[0],t[0])});var r=[];return t.forEach(function(e){r.push([e[0],e[1]])}),r}function o(e,t,r){return e==x||e==O?t+" "+r:r}function a(e){for(var t={},r=0;r<e.length;r++){var n=e[r];t[n[0]]=n[1]}return t}function s(e){var t=e.map(function(e){return u(e.type)});return"["+t.join(",")+"]"}function c(e){var t=e.map(u);return"["+t.join(",")+"]"}function l(e){return v.IS_DART?""+t.VIEW_TYPE_MODULE_REF+e:""+e}function u(e){return""+b.moduleRef(e.moduleUrl)+e.name}function p(e,t){return t>0?w.ViewType.EMBEDDED:e.type.isHost?w.ViewType.HOST:w.ViewType.COMPONENT}var d=System.global,f=d.define;d.define=void 0;var h=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)},g=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},m=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},v=e("angular2/src/facade/lang"),y=e("angular2/src/facade/collection"),_=e("angular2/src/compiler/template_ast"),b=e("angular2/src/compiler/source_module"),C=e("angular2/src/core/linker/view"),w=e("angular2/src/core/linker/view_type"),P=e("angular2/src/core/linker/element"),E=e("angular2/src/compiler/util"),S=e("angular2/src/core/di");t.PROTO_VIEW_JIT_IMPORTS=v.CONST_EXPR({AppProtoView:C.AppProtoView,AppProtoElement:P.AppProtoElement,ViewType:w.ViewType}),t.APP_VIEW_MODULE_REF=b.moduleRef("package:angular2/src/core/linker/view"+E.MODULE_SUFFIX),t.VIEW_TYPE_MODULE_REF=b.moduleRef("package:angular2/src/core/linker/view_type"+E.MODULE_SUFFIX),t.APP_EL_MODULE_REF=b.moduleRef("package:angular2/src/core/linker/element"+E.MODULE_SUFFIX),t.METADATA_MODULE_REF=b.moduleRef("package:angular2/src/core/metadata/view"+E.MODULE_SUFFIX);var R="$implicit",x="class",O="style",D=function(){function e(){}return e.prototype.compileProtoViewRuntime=function(e,t,r,n){var i=new V(e,t,n),o=[];return i.createCompileProtoView(r,[],[],o),new A([],o)},e.prototype.compileProtoViewCodeGen=function(e,t,r,n){var i=new N(e,t,n),o=[],a=[];return i.createCompileProtoView(r,[],a,o),new A(a.map(function(e){return e.statement}),o)},e=g([S.Injectable(),m("design:paramtypes",[])],e)}();t.ProtoViewCompiler=D;var A=function(){function e(e,t){this.declarations=e,this.protoViews=t}return e}();t.CompileProtoViews=A;var T=function(){function e(e,t,r){this.embeddedTemplateIndex=e,this.protoElements=t,this.protoView=r}return e}();t.CompileProtoView=T;var I=function(){function e(e,t,r,n,i,o,a){this.boundElementIndex=e,this.attrNameAndValues=t,this.variableNameAndValues=r,this.renderEvents=n,this.directives=i,this.embeddedTemplateIndex=o,this.appProtoEl=a}return e}();t.CompileProtoElement=I;var k=function(){function e(e){this.component=e}return e.prototype.createCompileProtoView=function(e,t,r,n){var i=n.length;n.push(null);var o=new M(this,r,n);_.templateVisitAll(o,e);var a=p(this.component,i),s=this.createAppProtoView(i,a,t,r),c=new T(i,o.protoElements,s);return n[i]=c,c},e}(),N=function(e){function r(t,r,n){e.call(this,r),this.resolvedMetadataCacheExpr=t,this.pipes=n,this._nextVarId=0}return h(r,e),r.prototype._nextProtoViewVar=function(e){return"appProtoView"+this._nextVarId++ +"_"+this.component.type.name+e},r.prototype.createAppProtoView=function(e,r,n,i){var o=this._nextProtoViewVar(e),a=l(r),s=0===e?c(this.pipes.map(function(e){return e.type})):null,u="var "+o+" = "+t.APP_VIEW_MODULE_REF+"AppProtoView.create("+this.resolvedMetadataCacheExpr.expression+", "+a+", "+s+", "+E.codeGenStringMap(n)+");";return i.push(new E.Statement(u)),new E.Expression(o)},r.prototype.createAppProtoElement=function(e,r,n,i,o){var a="appProtoEl"+this._nextVarId++ +"_"+this.component.type.name,c=t.APP_EL_MODULE_REF+"AppProtoElement.create(\n "+this.resolvedMetadataCacheExpr.expression+",\n "+e+",\n "+E.codeGenStringMap(r)+",\n "+s(i)+",\n "+E.codeGenStringMap(n)+"\n )",l="var "+a+" = "+c+";";return o.push(new E.Statement(l)),new E.Expression(a)},r}(k),V=function(e){function t(t,r,n){e.call(this,r),this.metadataCache=t,this.pipes=n}return h(t,e),t.prototype.createAppProtoView=function(e,t,r,n){var i=0===e?this.pipes.map(function(e){return e.type.runtime}):[],o=a(r);return C.AppProtoView.create(this.metadataCache,t,i,o)},t.prototype.createAppProtoElement=function(e,t,r,n,i){var o=a(t);return P.AppProtoElement.create(this.metadataCache,e,o,n.map(function(e){return e.type.runtime}),a(r))},t}(k),M=function(){function e(e,t,r){this.factory=e,this.allStatements=t,this.allProtoViews=r,this.protoElements=[],this.boundElementCount=0}return e.prototype._readAttrNameAndValues=function(e,t){var r=n(this,t,{});return e.forEach(function(e){y.StringMapWrapper.forEach(e.hostAttributes,function(e,t){var n=r[t];r[t]=v.isPresent(n)?o(t,n,e):e})}),i(r)},e.prototype.visitBoundText=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitElement=function(e,t){var r=this,i=null;e.isBound()&&(i=this.boundElementCount++);var o=e.getComponent(),a=[];v.isBlank(o)&&e.exportAsVars.forEach(function(e){a.push([e.name,null])});var s=[],c=n(this,e.outputs,new Map);y.ListWrapper.forEachWithIndex(e.directives,function(e,t){e.visit(r,new j(t,i,c,a,s))});var l=[];c.forEach(function(e,t){return l.push(e)});var u=this._readAttrNameAndValues(s,e.attrs);return this._addProtoElement(e.isBound(),i,u,a,l,s,null),_.templateVisitAll(this,e.children),null},e.prototype.visitEmbeddedTemplate=function(e,t){var r=this,n=this.boundElementCount++,i=[];y.ListWrapper.forEachWithIndex(e.directives,function(e,t){e.visit(r,new j(t,n,new Map,[],i))});var o=this._readAttrNameAndValues(i,e.attrs),a=e.vars.map(function(e){return[e.value.length>0?e.value:R,e.name]}),s=this.factory.createCompileProtoView(e.children,a,this.allStatements,this.allProtoViews);return this._addProtoElement(!0,n,o,[],[],i,s.embeddedTemplateIndex),null},e.prototype._addProtoElement=function(e,t,r,n,i,o,a){var s=null;e&&(s=this.factory.createAppProtoElement(t,r,n,o,this.allStatements));var c=new I(t,r,n,i,o,a,s);this.protoElements.push(c)},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return t[e.name]=e.value,null},e.prototype.visitDirective=function(e,t){return t.targetDirectives.push(e.directive),_.templateVisitAll(this,e.hostEvents,t.hostEventTargetAndNames),e.exportAsVars.forEach(function(e){t.targetVariableNameAndValues.push([e.name,t.index])}),null},e.prototype.visitEvent=function(e,t){return t.set(e.fullName,e),null},e.prototype.visitDirectiveProperty=function(e,t){return null},e.prototype.visitElementProperty=function(e,t){return null},e}(),j=function(){function e(e,t,r,n,i){this.index=e,this.boundElementIndex=t,this.hostEventTargetAndNames=r,this.targetVariableNameAndValues=n,this.targetDirectives=i}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.length-1&&(r++,n++,"\n"!=e[r]||3!=++i););var o=e.substring(t,this.location.offset)+"[ERROR ->]"+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/core/linker/directive_lifecycle_reflector",["angular2/src/facade/lang","angular2/src/core/linker/interfaces"],!0,function(e,t,r){function n(e,t){if(!(t instanceof a.Type))return!1;var r=t.prototype;switch(e){case s.LifecycleHooks.AfterContentInit:return!!r.ngAfterContentInit;case s.LifecycleHooks.AfterContentChecked:return!!r.ngAfterContentChecked;case s.LifecycleHooks.AfterViewInit:return!!r.ngAfterViewInit;case s.LifecycleHooks.AfterViewChecked:return!!r.ngAfterViewChecked;case s.LifecycleHooks.OnChanges:return!!r.ngOnChanges;case s.LifecycleHooks.DoCheck:return!!r.ngDoCheck;case s.LifecycleHooks.OnDestroy:return!!r.ngOnDestroy;case s.LifecycleHooks.OnInit:return!!r.ngOnInit;default:return!1}}var i=System.global,o=i.define;i.define=void 0;var a=e("angular2/src/facade/lang"),s=e("angular2/src/core/linker/interfaces");return t.hasLifecycleHook=n,i.define=o,r.exports}),System.register("angular2/src/compiler/schema/dom_element_schema_registry",["angular2/src/core/di","angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/platform/dom/dom_adapter","angular2/src/compiler/html_tags","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=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/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]),
15
+ 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._latestReturnedValue=this._latestValue,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/radio_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(w.normalizeValidator)):null}function c(e){return h.isPresent(e)?m.Validators.composeAsync(e.map(w.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){h.hasConstructor(t,v.DefaultValueAccessor)?r=t:h.hasConstructor(t,_.CheckboxControlValueAccessor)||h.hasConstructor(t,y.NumberValueAccessor)||h.hasConstructor(t,b.SelectControlValueAccessor)||h.hasConstructor(t,C.RadioControlValueAccessor)?(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/radio_control_value_accessor"),w=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/radio_control_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/radio_control_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/radio_control_value_accessor"),m=e("angular2/src/common/forms/directives/ng_control_status"),v=e("angular2/src/common/forms/directives/select_control_value_accessor"),y=e("angular2/src/common/forms/directives/validators"),_=e("angular2/src/common/forms/directives/ng_control_name");t.NgControlName=_.NgControlName;var b=e("angular2/src/common/forms/directives/ng_form_control");t.NgFormControl=b.NgFormControl;var C=e("angular2/src/common/forms/directives/ng_model");t.NgModel=C.NgModel;var w=e("angular2/src/common/forms/directives/ng_control_group");t.NgControlGroup=w.NgControlGroup;var P=e("angular2/src/common/forms/directives/ng_form_model");t.NgFormModel=P.NgFormModel;var E=e("angular2/src/common/forms/directives/ng_form");t.NgForm=E.NgForm;var S=e("angular2/src/common/forms/directives/default_value_accessor");t.DefaultValueAccessor=S.DefaultValueAccessor;var R=e("angular2/src/common/forms/directives/checkbox_value_accessor");t.CheckboxControlValueAccessor=R.CheckboxControlValueAccessor;var x=e("angular2/src/common/forms/directives/radio_control_value_accessor");t.RadioControlValueAccessor=x.RadioControlValueAccessor,t.RadioButtonState=x.RadioButtonState;var O=e("angular2/src/common/forms/directives/number_value_accessor");t.NumberValueAccessor=O.NumberValueAccessor;var D=e("angular2/src/common/forms/directives/ng_control_status");t.NgControlStatus=D.NgControlStatus;var A=e("angular2/src/common/forms/directives/select_control_value_accessor");t.SelectControlValueAccessor=A.SelectControlValueAccessor,t.NgSelectOption=A.NgSelectOption;var T=e("angular2/src/common/forms/directives/validators");t.RequiredValidator=T.RequiredValidator,t.MinLengthValidator=T.MinLengthValidator,t.MaxLengthValidator=T.MaxLengthValidator;var I=e("angular2/src/common/forms/directives/ng_control");return t.NgControl=I.NgControl,t.FORM_DIRECTIVES=o.CONST_EXPR([a.NgControlName,l.NgControlGroup,s.NgFormControl,c.NgModel,u.NgFormModel,p.NgForm,v.NgSelectOption,d.DefaultValueAccessor,h.NumberValueAccessor,f.CheckboxControlValueAccessor,v.SelectControlValueAccessor,g.RadioControlValueAccessor,m.NgControlStatus,y.RequiredValidator,y.MinLengthValidator,y.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();return t=t.toLowerCase(),n.runOutsideAngular(function(){var r=new Hammer(e);r.get("pinch").set({enable:!0}),r.get("rotate").set({enable:!0});var i=function(e){n.run(function(){i(e)})};return r.on(t,i),function(){r.off(t,i)}})},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/exceptions","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=p.CssSelector.parse(t)[0].getMatchingElementTemplate();return y.create({type:new m({runtime:Object,name:"Host"+e.name,moduleUrl:e.moduleUrl,isHost:!0}),template:new v({template:r,templateUrl:"",styles:[],styleUrls:[],ngContentSelectors:[]}),changeDetection:l.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/exceptions"),c=e("angular2/src/facade/collection"),l=e("angular2/src/core/change_detection/change_detection"),u=e("angular2/src/core/metadata/view"),p=e("angular2/src/compiler/selector"),d=e("angular2/src/compiler/util"),f=e("angular2/src/core/linker/interfaces"),h=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))$/g,g=function(){function e(){}return e.fromJson=function(e){return b[e["class"]](e)},Object.defineProperty(e.prototype,"type",{get:function(){return s.unimplemented()},enumerable:!0,configurable:!0}),e}();t.CompileMetadataWithType=g;var m=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=m;var v=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:u.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)?u.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=v;var y=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,s=r.selector,l=r.exportAs,u=r.changeDetection,p=r.inputs,f=r.outputs,g=r.host,m=r.lifecycleHooks,v=r.template,y={},_={},b={};a.isPresent(g)&&c.StringMapWrapper.forEach(g,function(e,t){var r=a.RegExpWrapper.firstMatch(h,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(p)&&p.forEach(function(e){var t=d.splitAtColon(e,[e,e]);C[t[0]]=t[1]});var w={};return a.isPresent(f)&&f.forEach(function(e){var t=d.splitAtColon(e,[e,e]);w[t[0]]=t[1]}),new e({type:n,isComponent:a.normalizeBool(i),dynamicLoadable:a.normalizeBool(o),selector:s,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)?m.fromJson(t.type):t.type,changeDetection:a.isPresent(t.changeDetection)?l.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 f.LIFECYCLE_HOOKS_VALUES[e]}),template:a.isPresent(t.template)?v.fromJson(t.template):t.template})},e.prototype.toJson=function(){return{"class":"Directive",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}();t.CompileDirectiveMetadata=y,t.createHostComponentMeta=n;var _=function(){function e(e){var t=void 0===e?{}:e,r=t.type,n=t.name,i=t.pure;this.type=r,this.name=n,this.pure=a.normalizeBool(i)}return e.fromJson=function(t){return new e({type:a.isPresent(t.type)?m.fromJson(t.type):t.type,name:t.name,pure:t.pure})},e.prototype.toJson=function(){return{"class":"Pipe",type:a.isPresent(this.type)?this.type.toJson():null,name:this.name,pure:this.pure}},e}();t.CompilePipeMetadata=_;var b={Directive:y.fromJson,Pipe:_.fromJson};return i.define=o,r.exports}),System.register("angular2/src/compiler/change_detector_compiler",["angular2/src/compiler/source_module","angular2/src/core/change_detection/change_detection_jit_generator","angular2/src/core/change_detection/abstract_change_detector","angular2/src/core/change_detection/change_detection_util","angular2/src/core/change_detection/constants","angular2/src/compiler/change_definition_factory","angular2/src/facade/lang","angular2/src/core/change_detection/change_detection","angular2/src/transform/template_compiler/change_detector_codegen","angular2/src/compiler/util","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/compiler/source_module"),c=e("angular2/src/core/change_detection/change_detection_jit_generator"),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/compiler/change_definition_factory"),f=e("angular2/src/facade/lang"),h=e("angular2/src/core/change_detection/change_detection"),g=e("angular2/src/transform/template_compiler/change_detector_codegen"),m=e("angular2/src/compiler/util"),v=e("angular2/src/core/di"),y="AbstractChangeDetector",_="ChangeDetectionUtil",b="ChangeDetectorState";t.CHANGE_DETECTION_JIT_IMPORTS=f.CONST_EXPR({AbstractChangeDetector:l.AbstractChangeDetector,ChangeDetectionUtil:u.ChangeDetectionUtil,ChangeDetectorState:p.ChangeDetectorState});var C=s.moduleRef("package:angular2/src/core/change_detection/abstract_change_detector"+m.MODULE_SUFFIX),w=s.moduleRef("package:angular2/src/core/change_detection/change_detection_util"+m.MODULE_SUFFIX),P=s.moduleRef("package:angular2/src/core/change_detection/pregen_proto_change_detector"+m.MODULE_SUFFIX),E=s.moduleRef("package:angular2/src/core/change_detection/constants"+m.MODULE_SUFFIX),S=function(){function e(e){this._genConfig=e}return e.prototype.compileComponentRuntime=function(e,t,r){var n=this,i=d.createChangeDetectorDefinitions(e,t,this._genConfig,r);return i.map(function(e){return n._createChangeDetectorFactory(e)})},e.prototype._createChangeDetectorFactory=function(e){var t=new h.DynamicProtoChangeDetector(e);return function(){return t.instantiate()}},e.prototype.compileComponentCodeGen=function(e,t,r){var n=d.createChangeDetectorDefinitions(e,t,this._genConfig,r),i=[],o=0,a=n.map(function(t){var r,n;if(f.IS_DART){r=new g.Codegen(P);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,""+w+_,""+C+y,""+E+b),i.push("function() { return new "+r.typeName+"(); }"),n=r.generateSource();return o++,n});return new s.SourceExpressions(a,i)},e=o([v.Injectable(),a("design:paramtypes",[h.ChangeDetectorGenConfig])],e)}();return t.ChangeDetectionCompiler=S,n.define=i,r.exports}),System.register("angular2/src/compiler/style_compiler",["angular2/src/compiler/source_module","angular2/src/core/metadata/view","angular2/src/compiler/xhr","angular2/src/facade/lang","angular2/src/facade/async","angular2/src/compiler/shadow_css","angular2/src/compiler/url_resolver","angular2/src/compiler/style_url_resolver","angular2/src/compiler/util","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/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="%COMP%",y="_nghost-"+v,_="_ngcontent-"+v,b=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<t.length;a++){var c=this._createModuleUrl(t[a],r);o.push(s.moduleRef(c)+"STYLES")}var l=i+" ["+o.join(",")+"]";return new s.SourceExpression([],l)},e.prototype._styleModule=function(e,t,r){var n="\n "+r.declarations.join("\n")+"\n "+g.codeGenExportVariable("STYLES")+r.expression+";\n ";return new s.SourceModule(this._createModuleUrl(e,t),n)},e.prototype._shimIfNeeded=function(e,t){return t?this._shadowCss.shimCssText(e,_,y):e},e.prototype._createModuleUrl=function(e,t){return t?e+".shim"+g.MODULE_SUFFIX:""+e+g.MODULE_SUFFIX},e=o([m.Injectable(),a("design:paramtypes",[l.XHR,f.UrlResolver])],e)}();return t.StyleCompiler=b,n.define=i,r.exports}),System.register("angular2/src/compiler/view_compiler",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/compiler/template_ast","angular2/src/compiler/source_module","angular2/src/core/linker/view","angular2/src/core/linker/view_type","angular2/src/core/linker/element","angular2/src/core/metadata/view","angular2/src/compiler/util","angular2/src/core/di","angular2/src/compiler/proto_view_compiler"],!0,function(e,t,r){function n(e,t,r){return y.codeGenValueFn(["event"],e.expression+".triggerEventHandlers("+y.escapeValue(r)+", event, "+t+")")}function i(e,t){return"viewFactory_"+e.type.name+t}function o(e){return u.IS_DART?""+b.METADATA_MODULE_REF+e:""+e}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);
16
+ 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/template_ast"),f=e("angular2/src/compiler/source_module"),h=e("angular2/src/core/linker/view"),g=e("angular2/src/core/linker/view_type"),m=e("angular2/src/core/linker/element"),v=e("angular2/src/core/metadata/view"),y=e("angular2/src/compiler/util"),_=e("angular2/src/core/di"),b=e("angular2/src/compiler/proto_view_compiler");t.VIEW_JIT_IMPORTS=u.CONST_EXPR({AppView:h.AppView,AppElement:m.AppElement,flattenNestedViewRenderNodes:h.flattenNestedViewRenderNodes,checkSlotCount:h.checkSlotCount});var C=function(){function e(){}return e.prototype.compileComponentRuntime=function(e,t,r,n,i,o){var a=new P(e,r,n,i,o);return a.createViewFactory(t,0,[])},e.prototype.compileComponentCodeGen=function(e,t,r,n,i,o){var a=new w(e,r,n,i,o),s=[],c=a.createViewFactory(t,0,s);return new f.SourceExpression(s.map(function(e){return e.statement}),c.expression)},e=c([_.Injectable(),l("design:paramtypes",[])],e)}();t.ViewCompiler=C;var w=function(){function e(e,t,r,n,i){this.component=e,this.styles=t,this.protoViews=r,this.changeDetectorExpressions=n,this.componentViewFactory=i,this._nextVarId=0}return e.prototype._nextVar=function(e){return""+e+this._nextVarId++ +"_"+this.component.type.name},e.prototype._nextRenderVar=function(){return this._nextVar("render")},e.prototype._nextAppVar=function(){return this._nextVar("app")},e.prototype._nextDisposableVar=function(){return"disposable"+this._nextVarId++ +"_"+this.component.type.name},e.prototype.createText=function(e,t,r,n){var i=this._nextRenderVar(),o="var "+i+" = "+e.expression+".createText("+(u.isPresent(t)?t.expression:null)+", "+y.escapeSingleQuoteString(r)+");";return n.push(new y.Statement(o)),new y.Expression(i)},e.prototype.createElement=function(e,t,r,n,i){var o,a=this._nextRenderVar();o=u.isPresent(n)?n.expression+" == null ?\n "+e.expression+".createElement("+(u.isPresent(t)?t.expression:null)+", "+y.escapeSingleQuoteString(r)+") :\n "+e.expression+".selectRootElement("+n.expression+");":e.expression+".createElement("+(u.isPresent(t)?t.expression:null)+", "+y.escapeSingleQuoteString(r)+")";var s="var "+a+" = "+o+";";return i.push(new y.Statement(s)),new y.Expression(a)},e.prototype.createTemplateAnchor=function(e,t,r){var n=this._nextRenderVar(),i=e.expression+".createTemplateAnchor("+(u.isPresent(t)?t.expression:null)+");";return r.push(new y.Statement("var "+n+" = "+i)),new y.Expression(n)},e.prototype.createGlobalEventListener=function(e,t,r,i,o){var a=this._nextDisposableVar(),s=n(t,r,i.fullName);return o.push(new y.Statement("var "+a+" = "+e.expression+".listenGlobal("+y.escapeValue(i.target)+", "+y.escapeValue(i.name)+", "+s+");")),new y.Expression(a)},e.prototype.createElementEventListener=function(e,t,r,i,o,a){var s=this._nextDisposableVar(),c=n(t,r,o.fullName);return a.push(new y.Statement("var "+s+" = "+e.expression+".listen("+i.expression+", "+y.escapeValue(o.name)+", "+c+");")),new y.Expression(s)},e.prototype.setElementAttribute=function(e,t,r,n,i){i.push(new y.Statement(e.expression+".setElementAttribute("+t.expression+", "+y.escapeSingleQuoteString(r)+", "+y.escapeSingleQuoteString(n)+");"))},e.prototype.createAppElement=function(e,t,r,n,i,o){var a=this._nextAppVar(),s="new "+b.APP_EL_MODULE_REF+"AppElement("+e.expression+", "+t.expression+",\n "+(u.isPresent(n)?n.expression:null)+", "+r.expression+", "+(u.isPresent(i)?i.expression:null)+")";return o.push(new y.Statement("var "+a+" = "+s+";")),new y.Expression(a)},e.prototype.createAndSetComponentView=function(e,t,r,n,i,o,a){var s;s=this.component.type.isHost?r.expression+".projectableNodes":"["+o.map(function(e){return y.codeGenFlatArray(e)}).join(",")+"]",a.push(new y.Statement(this.componentViewFactory(i)+"("+e.expression+", "+t.expression+", "+n.expression+", "+s+", null, null, null);"))},e.prototype.getProjectedNodes=function(e,t){return new y.Expression(e.expression+"["+t+"]",!0)},e.prototype.appendProjectedNodes=function(e,t,r,n){n.push(new y.Statement(e.expression+".projectNodes("+t.expression+", "+b.APP_VIEW_MODULE_REF+"flattenNestedViewRenderNodes("+r.expression+"));"))},e.prototype.createViewFactory=function(e,t,r){var n=this.protoViews[t],a=this.component.type.isHost,s=0===t&&!a,c=new S(new y.Expression("renderer"),new y.Expression("viewManager"),new y.Expression("projectableNodes"),a?new y.Expression("rootSelector"):null,new y.Expression("view"),n,r,this);d.templateVisitAll(c,e,new E(s?new y.Expression("parentRenderNode"):null,null,null));var l=n.protoView.expression,u=i(this.component,t),p=this.changeDetectorExpressions.expressions[t],f=["parentRenderer","viewManager","containerEl","projectableNodes","rootSelector","dynamicallyCreatedProviders","rootInjector"],h=[],g="parentRenderer";if(0===t){var m=this._nextVar("renderType");r.push(new y.Statement("var "+m+" = null;"));var v=this._nextVar("styles");r.push(new y.Statement(y.CONST_VAR+" "+v+" = "+this.styles.expression+";"));var _=this.component.template.encapsulation;h.push("if ("+m+" == null) {\n "+m+" = viewManager.createRenderComponentType("+o(_)+", "+v+");\n }"),g="parentRenderer.renderComponent("+m+")"}var C="\n"+y.codeGenFnHeader(f,u)+"{\n "+h.join("\n")+"\n var renderer = "+g+";\n var view = new "+b.APP_VIEW_MODULE_REF+"AppView(\n "+l+", renderer, viewManager,\n projectableNodes,\n containerEl,\n dynamicallyCreatedProviders, rootInjector,\n "+p+"()\n );\n "+b.APP_VIEW_MODULE_REF+"checkSlotCount("+y.escapeValue(this.component.type.name)+", "+this.component.template.ngContentSelectors.length+", projectableNodes);\n "+(s?"var parentRenderNode = renderer.createViewRoot(view.containerAppElement.nativeElement);":"")+"\n "+c.renderStmts.map(function(e){return e.statement}).join("\n")+"\n "+c.appStmts.map(function(e){return e.statement}).join("\n")+"\n\n view.init("+y.codeGenFlatArray(c.rootNodesOrAppElements)+", "+y.codeGenArray(c.renderNodes)+", "+y.codeGenArray(c.appDisposables)+",\n "+y.codeGenArray(c.appElements)+");\n return view;\n}";return r.push(new y.Statement(C)),new y.Expression(u)},e}(),P=function(){function e(e,t,r,n,i){this.component=e,this.styles=t,this.protoViews=r,this.changeDetectorFactories=n,this.componentViewFactory=i}return e.prototype.createText=function(e,t,r,n){return e.createText(t,r)},e.prototype.createElement=function(e,t,r,n,i){var o;return o=u.isPresent(n)?e.selectRootElement(n):e.createElement(t,r)},e.prototype.createTemplateAnchor=function(e,t,r){return e.createTemplateAnchor(t)},e.prototype.createGlobalEventListener=function(e,t,r,n,i){return e.listenGlobal(n.target,n.name,function(e){return t.triggerEventHandlers(n.fullName,e,r)})},e.prototype.createElementEventListener=function(e,t,r,n,i,o){return e.listen(n,i.name,function(e){return t.triggerEventHandlers(i.fullName,e,r)})},e.prototype.setElementAttribute=function(e,t,r,n,i){e.setElementAttribute(t,r,n)},e.prototype.createAppElement=function(e,t,r,n,i,o){return new m.AppElement(e,t,n,r,i)},e.prototype.createAndSetComponentView=function(e,t,r,n,i,o,a){var s;if(this.component.type.isHost)s=r.projectableNodes;else{s=p.ListWrapper.createFixedSize(o.length);for(var c=0;c<o.length;c++)s[c]=y.flattenArray(o[c],[])}this.componentViewFactory(i)(e,t,n,s)},e.prototype.getProjectedNodes=function(e,t){return e[t]},e.prototype.appendProjectedNodes=function(e,t,r,n){e.projectNodes(t,h.flattenNestedViewRenderNodes(r))},e.prototype.createViewFactory=function(e,t,r){var n=this,i=this.protoViews[t],o=i.protoView.type===g.ViewType.COMPONENT,a=null;return function(r,s,c,l,p,f,g){void 0===p&&(p=null),void 0===f&&(f=null),void 0===g&&(g=null),h.checkSlotCount(n.component.type.name,n.component.template.ngContentSelectors.length,l);var m;0===t?(u.isBlank(a)&&(a=s.createRenderComponentType(n.component.template.encapsulation,n.styles)),m=r.renderComponent(a)):m=r;var v=n.changeDetectorFactories[t](),_=new h.AppView(i.protoView,m,s,l,c,f,g,v),b=new S(m,s,l,p,_,i,[],n),C=o?m.createViewRoot(c.nativeElement):null;return d.templateVisitAll(b,e,new E(C,null,null)),_.init(y.flattenArray(b.rootNodesOrAppElements,[]),b.renderNodes,b.appDisposables,b.appElements),_}},e}(),E=function(){function e(e,t,r){if(this.renderNode=e,this.appEl=t,this.component=r,u.isPresent(r)){this.contentNodesByNgContentIndex=p.ListWrapper.createFixedSize(r.template.ngContentSelectors.length);for(var n=0;n<this.contentNodesByNgContentIndex.length;n++)this.contentNodesByNgContentIndex[n]=[]}else this.contentNodesByNgContentIndex=null}return e.prototype.addContentNode=function(e,t){this.contentNodesByNgContentIndex[e].push(t)},e}(),S=function(){function e(e,t,r,n,i,o,a,s){this.renderer=e,this.viewManager=t,this.projectableNodes=r,this.rootSelector=n,this.view=i,this.protoView=o,this.targetStatements=a,this.factory=s,this.renderStmts=[],this.renderNodes=[],this.appStmts=[],this.appElements=[],this.appDisposables=[],this.rootNodesOrAppElements=[],this.elementCount=0}return e.prototype._addRenderNode=function(e,t,r,n){this.renderNodes.push(e),u.isPresent(n.component)?u.isPresent(r)&&n.addContentNode(r,u.isPresent(t)?t:e):u.isBlank(n.renderNode)&&this.rootNodesOrAppElements.push(u.isPresent(t)?t:e)},e.prototype._getParentRenderNode=function(e,t){return u.isPresent(t.component)&&t.component.template.encapsulation!==v.ViewEncapsulation.Native?null:t.renderNode},e.prototype.visitBoundText=function(e,t){return this._visitText("",e.ngContentIndex,t)},e.prototype.visitText=function(e,t){return this._visitText(e.value,e.ngContentIndex,t)},e.prototype._visitText=function(e,t,r){var n=this.factory.createText(this.renderer,this._getParentRenderNode(t,r),e,this.renderStmts);return this._addRenderNode(n,null,t,r),null},e.prototype.visitNgContent=function(e,t){var r=this.factory.getProjectedNodes(this.projectableNodes,e.index);return u.isPresent(t.component)?u.isPresent(e.ngContentIndex)&&t.addContentNode(e.ngContentIndex,r):u.isPresent(t.renderNode)?this.factory.appendProjectedNodes(this.renderer,t.renderNode,r,this.renderStmts):this.rootNodesOrAppElements.push(r),null},e.prototype.visitElement=function(e,t){var r=this,n=this.factory.createElement(this.renderer,this._getParentRenderNode(e.ngContentIndex,t),e.name,this.rootSelector,this.renderStmts),i=e.getComponent(),o=this.elementCount++,a=this.protoView.protoElements[o];a.renderEvents.forEach(function(e){var t;t=u.isPresent(e.target)?r.factory.createGlobalEventListener(r.renderer,r.view,a.boundElementIndex,e,r.renderStmts):r.factory.createElementEventListener(r.renderer,r.view,a.boundElementIndex,n,e,r.renderStmts),r.appDisposables.push(t)});for(var s=0;s<a.attrNameAndValues.length;s++){var c=a.attrNameAndValues[s][0],l=a.attrNameAndValues[s][1];this.factory.setElementAttribute(this.renderer,n,c,l,this.renderStmts)}var p=null;u.isPresent(a.appProtoEl)&&(p=this.factory.createAppElement(a.appProtoEl,this.view,n,t.appEl,null,this.appStmts),this.appElements.push(p)),this._addRenderNode(n,p,e.ngContentIndex,t);var f=new E(n,u.isPresent(p)?p:t.appEl,i);return d.templateVisitAll(this,e.children,f),u.isPresent(p)&&u.isPresent(i)&&this.factory.createAndSetComponentView(this.renderer,this.viewManager,this.view,p,i,f.contentNodesByNgContentIndex,this.appStmts),null},e.prototype.visitEmbeddedTemplate=function(e,t){var r=this.factory.createTemplateAnchor(this.renderer,this._getParentRenderNode(e.ngContentIndex,t),this.renderStmts),n=this.elementCount++,i=this.protoView.protoElements[n],o=this.factory.createViewFactory(e.children,i.embeddedTemplateIndex,this.targetStatements),a=this.factory.createAppElement(i.appProtoEl,this.view,r,t.appEl,o,this.appStmts);return this._addRenderNode(r,a,e.ngContentIndex,t),this.appElements.push(a),null},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitDirective=function(e,t){return null},e.prototype.visitEvent=function(e,t){return null},e.prototype.visitDirectiveProperty=function(e,t){return null},e.prototype.visitElementProperty=function(e,t){return null},e}();return a.define=s,r.exports}),System.register("angular2/src/compiler/html_lexer",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/compiler/parse_util","angular2/src/compiler/html_tags"],!0,function(e,t,r){function n(e,t){return new se(new P.ParseSourceFile(e,t)).tokenize()}function i(e){var t=e===D?"EOF":C.StringWrapper.fromCharCode(e);return'Unexpected character "'+t+'"'}function o(e){return'Unknown entity "'+e+'" - use the "&#<decimal>;" or "&#x<hex>;" syntax'}function a(e){return!s(e)||e===D}function s(e){return e>=A&&k>=e||e===ie}function c(e){return s(e)||e===z||e===F||e===L||e===V||e===K}function l(e){return(ee>e||e>re)&&(X>e||e>Y)&&(W>e||e>H)}function u(e){return e==U||e==D||!h(e)}function p(e){return e==U||e==D||!f(e)}function d(e){return e===q||e===D}function f(e){return e>=ee&&re>=e||e>=X&&Y>=e}function h(e){return e>=ee&&te>=e||e>=X&&Z>=e||e>=W&&H>=e}function g(e,t){return m(e)==m(t)}function m(e){return e>=ee&&re>=e?e-ee+X:e}function v(e){for(var t,r=[],n=0;n<e.length;n++){var i=e[n];C.isPresent(t)&&t.type==S.TEXT&&i.type==S.TEXT?(t.parts[0]+=i.parts[0],t.sourceSpan.end=i.sourceSpan.end):(t=i,r.push(t))}return r}var y=System.global,_=y.define;y.define=void 0;var b=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"),w=e("angular2/src/facade/collection"),P=e("angular2/src/compiler/parse_util"),E=e("angular2/src/compiler/html_tags");!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_VALUE=12]="ATTR_VALUE",e[e.DOC_TYPE=13]="DOC_TYPE",e[e.EOF=14]="EOF"}(t.HtmlTokenType||(t.HtmlTokenType={}));var S=t.HtmlTokenType,R=function(){function e(e,t,r){this.type=e,this.parts=t,this.sourceSpan=r}return e}();t.HtmlToken=R;var x=function(e){function t(t,r,n){e.call(this,n,t),this.tokenType=r}return b(t,e),t}(P.ParseError);t.HtmlTokenError=x;var O=function(){function e(e,t){this.tokens=e,this.errors=t}return e}();t.HtmlTokenizeResult=O,t.tokenizeHtml=n;var D=0,A=9,T=10,I=13,k=32,N=33,V=34,M=35,j=38,L=39,B=45,F=47,W=48,U=59,H=57,G=58,q=60,K=61,z=62,$=91,Q=93,X=65,Z=70,J=88,Y=90,ee=97,te=102,re=122,ne=120,ie=160,oe=/\r\n?/g,ae=function(){function e(e){this.error=e}return e}(),se=function(){function e(e){this.file=e,this.peek=-1,this.index=-1,this.line=0,this.column=-1,this.tokens=[],this.errors=[],this.input=e.content,this.length=e.content.length,this._advance()}return e.prototype._processCarriageReturns=function(e){return C.StringWrapper.replaceAll(e,oe,"\n")},e.prototype.tokenize=function(){for(;this.peek!==D;){var e=this._getLocation();try{this._attemptCharCode(q)?this._attemptCharCode(N)?this._attemptCharCode($)?this._consumeCdata(e):this._attemptCharCode(B)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(F)?this._consumeTagClose(e):this._consumeTagOpen(e):this._consumeText()}catch(t){if(!(t instanceof ae))throw t;this.errors.push(t.error)}}return this._beginToken(S.EOF),this._endToken([]),new O(v(this.tokens),this.errors)},e.prototype._getLocation=function(){return new P.ParseLocation(this.file,this.index,this.line,this.column)},e.prototype._beginToken=function(e,t){void 0===t&&(t=null),C.isBlank(t)&&(t=this._getLocation()),this.currentTokenStart=t,this.currentTokenType=e},e.prototype._endToken=function(e,t){void 0===t&&(t=null),C.isBlank(t)&&(t=this._getLocation());var r=new R(this.currentTokenType,e,new P.ParseSourceSpan(this.currentTokenStart,t));return this.tokens.push(r),this.currentTokenStart=null,this.currentTokenType=null,r},e.prototype._createError=function(e,t){var r=new x(e,this.currentTokenType,t);return this.currentTokenStart=null,this.currentTokenType=null,new ae(r)},e.prototype._advance=function(){if(this.index>=this.length)throw this._createError(i(D),this._getLocation());this.peek===T?(this.line++,this.column=0):this.peek!==T&&this.peek!==I&&this.column++,this.index++,this.peek=this.index>=this.length?D:C.StringWrapper.charCodeAt(this.input,this.index)},e.prototype._attemptCharCode=function(e){return this.peek===e?(this._advance(),!0):!1},e.prototype._attemptCharCodeCaseInsensitive=function(e){return g(this.peek,e)?(this._advance(),!0):!1},e.prototype._requireCharCode=function(e){var t=this._getLocation();if(!this._attemptCharCode(e))throw this._createError(i(this.peek),t)},e.prototype._attemptStr=function(e){for(var t=0;t<e.length;t++)if(!this._attemptCharCode(C.StringWrapper.charCodeAt(e,t)))return!1;return!0},e.prototype._attemptStrCaseInsensitive=function(e){for(var t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(C.StringWrapper.charCodeAt(e,t)))return!1;return!0},e.prototype._requireStr=function(e){var t=this._getLocation();if(!this._attemptStr(e))throw this._createError(i(this.peek),t)},e.prototype._attemptCharCodeUntilFn=function(e){for(;!e(this.peek);)this._advance()},e.prototype._requireCharCodeUntilFn=function(e,t){var r=this._getLocation();if(this._attemptCharCodeUntilFn(e),this.index-r.offset<t)throw this._createError(i(this.peek),r)},e.prototype._attemptUntilChar=function(e){for(;this.peek!==e;)this._advance()},e.prototype._readChar=function(e){if(e&&this.peek===j)return this._decodeEntity();var t=this.index;return this._advance(),this.input[t]},e.prototype._decodeEntity=function(){var e=this._getLocation();if(this._advance(),!this._attemptCharCode(M)){var t=this._savePosition();if(this._attemptCharCodeUntilFn(p),this.peek!=U)return this._restorePosition(t),"&";this._advance();var r=this.input.substring(e.offset+1,this.index-1),n=E.NAMED_ENTITIES[r];if(C.isBlank(n))throw this._createError(o(r),e);return n}var a=this._attemptCharCode(ne)||this._attemptCharCode(J),s=this._getLocation().offset;if(this._attemptCharCodeUntilFn(u),this.peek!=U)throw this._createError(i(this.peek),this._getLocation());this._advance();var c=this.input.substring(s,this.index-1);try{var l=C.NumberWrapper.parseInt(c,a?16:10);return C.StringWrapper.fromCharCode(l)}catch(d){var f=this.input.substring(e.offset+1,this.index-1);throw this._createError(o(f),e)}},e.prototype._consumeRawText=function(e,t,r){var n,i=this._getLocation();this._beginToken(e?S.ESCAPABLE_RAW_TEXT:S.RAW_TEXT,i);for(var o=[];n=this._getLocation(),!this._attemptCharCode(t)||!r();)for(this.index>n.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(S.COMMENT_START,e),this._requireCharCode(B),this._endToken([]);var r=this._consumeRawText(!1,B,function(){return t._attemptStr("->")});this._beginToken(S.COMMENT_END,r.sourceSpan.end),this._endToken([])},e.prototype._consumeCdata=function(e){var t=this;this._beginToken(S.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]);var r=this._consumeRawText(!1,Q,function(){return t._attemptStr("]>")});this._beginToken(S.CDATA_END,r.sourceSpan.end),this._endToken([])},e.prototype._consumeDocType=function(e){this._beginToken(S.DOC_TYPE,e),this._attemptUntilChar(z),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!==G&&!l(this.peek);)this._advance();var r;this.peek===G?(this._advance(),t=this.input.substring(e,this.index-1),r=this.index):r=e,this._requireCharCodeUntilFn(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.input.substring(n,this.index).toLowerCase(),this._attemptCharCodeUntilFn(a);this.peek!==F&&this.peek!==z;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(a),this._attemptCharCode(K)&&(this._attemptCharCodeUntilFn(a),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(a);this._consumeTagOpenEnd()}catch(o){if(o instanceof ae)return this._restorePosition(r),this._beginToken(S.TEXT,e),void this._endToken(["<"]);throw o}var s=E.getHtmlTagDefinition(t).contentType;s===E.HtmlTagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(t,!1):s===E.HtmlTagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(t,!0)},e.prototype._consumeRawTextWithTagClose=function(e,t){var r=this,n=this._consumeRawText(t,q,function(){return r._attemptCharCode(F)?(r._attemptCharCodeUntilFn(a),r._attemptStrCaseInsensitive(e)?(r._attemptCharCodeUntilFn(a),r._attemptCharCode(z)?!0:!1):!1):!1});this._beginToken(S.TAG_CLOSE,n.sourceSpan.end),this._endToken([null,e])},e.prototype._consumeTagOpenStart=function(e){this._beginToken(S.TAG_OPEN_START,e);var t=this._consumePrefixAndName();this._endToken(t)},e.prototype._consumeAttributeName=function(){this._beginToken(S.ATTR_NAME);var e=this._consumePrefixAndName();this._endToken(e)},e.prototype._consumeAttributeValue=function(){this._beginToken(S.ATTR_VALUE);var e;if(this.peek===L||this.peek===V){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._requireCharCodeUntilFn(c,1),e=this.input.substring(n,this.index)}this._endToken([this._processCarriageReturns(e)])},e.prototype._consumeTagOpenEnd=function(){var e=this._attemptCharCode(F)?S.TAG_OPEN_END_VOID:S.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(z),this._endToken([])},e.prototype._consumeTagClose=function(e){this._beginToken(S.TAG_CLOSE,e),this._attemptCharCodeUntilFn(a);var t;t=this._consumePrefixAndName(),this._attemptCharCodeUntilFn(a),this._requireCharCode(z),this._endToken(t)},e.prototype._consumeText=function(){var e=this._getLocation();this._beginToken(S.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];t<this.tokens.length&&(this.tokens=w.ListWrapper.slice(this.tokens,0,t))},e}();return y.define=_,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/pipe_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 h.isPresent(t)&&o(t,r),h.isPresent(e.directives)&&o(e.directives,r),r}function i(e,t){var r=[];return h.isPresent(t)&&o(t,r),h.isPresent(e.pipes)&&o(e.pipes,r),r}function o(e,t){for(var r=0;r<e.length;r++){var n=f.resolveForwardRef(e[r]);h.isArray(n)?o(n,t):t.push(n)}}function a(e){return h.isPresent(e)&&e instanceof h.Type}function s(e,t){var r=t.moduleId;if(h.isPresent(r)){var n=x.getUrlScheme(r);return h.isPresent(n)&&n.length>0?r:"package:"+r+R.MODULE_SUFFIX}return P.reflector.importUri(e)}var c=System.global,l=c.define;c.define=void 0;var u=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},p=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},d=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},f=e("angular2/src/core/di"),h=e("angular2/src/facade/lang"),g=e("angular2/src/facade/exceptions"),m=e("angular2/src/compiler/directive_metadata"),v=e("angular2/src/core/metadata/directives"),y=e("angular2/src/core/linker/directive_resolver"),_=e("angular2/src/core/linker/pipe_resolver"),b=e("angular2/src/core/linker/view_resolver"),C=e("angular2/src/core/linker/directive_lifecycle_reflector"),w=e("angular2/src/core/linker/interfaces"),P=e("angular2/src/core/reflection/reflection"),E=e("angular2/src/core/di"),S=e("angular2/src/core/platform_directives_and_pipes"),R=e("angular2/src/compiler/util"),x=e("angular2/src/compiler/url_resolver"),O=function(){function e(e,t,r,n,i){this._directiveResolver=e,this._pipeResolver=t,this._viewResolver=r,this._platformDirectives=n,this._platformPipes=i,this._directiveCache=new Map,this._pipeCache=new Map}return e.prototype.getDirectiveMetadata=function(e){var t=this._directiveCache.get(e);if(h.isBlank(t)){var r=this._directiveResolver.resolve(e),n=null,i=null,o=null;if(r instanceof v.ComponentMetadata){var a=r;n=s(e,a);var c=this._viewResolver.resolve(e);i=new m.CompileTemplateMetadata({encapsulation:c.encapsulation,template:c.template,templateUrl:c.templateUrl,styles:c.styles,styleUrls:c.styleUrls}),o=a.changeDetection}t=m.CompileDirectiveMetadata.create({selector:r.selector,exportAs:r.exportAs,isComponent:h.isPresent(i),dynamicLoadable:!0,type:new m.CompileTypeMetadata({name:h.stringify(e),moduleUrl:n,runtime:e}),template:i,changeDetection:o,inputs:r.inputs,outputs:r.outputs,host:r.host,lifecycleHooks:w.LIFECYCLE_HOOKS_VALUES.filter(function(t){return C.hasLifecycleHook(t,e)})}),this._directiveCache.set(e,t)}return t},e.prototype.getPipeMetadata=function(e){var t=this._pipeCache.get(e);if(h.isBlank(t)){var r=this._pipeResolver.resolve(e),n=P.reflector.importUri(e);t=new m.CompilePipeMetadata({type:new m.CompileTypeMetadata({name:h.stringify(e),moduleUrl:n,runtime:e}),name:r.name,pure:r.pure}),this._pipeCache.set(e,t)}return t},e.prototype.getViewDirectivesMetadata=function(e){for(var t=this,r=this._viewResolver.resolve(e),i=n(r,this._platformDirectives),o=0;o<i.length;o++)if(!a(i[o]))throw new g.BaseException("Unexpected directive value '"+h.stringify(i[o])+"' on the View of component '"+h.stringify(e)+"'");return i.map(function(e){return t.getDirectiveMetadata(e)})},e.prototype.getViewPipesMetadata=function(e){for(var t=this,r=this._viewResolver.resolve(e),n=i(r,this._platformPipes),o=0;o<n.length;o++)if(!a(n[o]))throw new g.BaseException("Unexpected piped value '"+h.stringify(n[o])+"' on the View of component '"+h.stringify(e)+"'");return n.map(function(e){return t.getPipeMetadata(e)})},e=u([E.Injectable(),d(3,E.Optional()),d(3,E.Inject(S.PLATFORM_DIRECTIVES)),d(4,E.Optional()),d(4,E.Inject(S.PLATFORM_PIPES)),p("design:paramtypes",[y.DirectiveResolver,_.PipeResolver,b.ViewResolver,Array,Array])],e)}();return t.RuntimeMetadataResolver=O,c.define=l,r.exports}),System.register("angular2/src/common/pipes",["angular2/src/common/pipes/async_pipe","angular2/src/common/pipes/uppercase_pipe","angular2/src/common/pipes/lowercase_pipe","angular2/src/common/pipes/json_pipe","angular2/src/common/pipes/slice_pipe","angular2/src/common/pipes/date_pipe","angular2/src/common/pipes/number_pipe","angular2/src/facade/lang","angular2/src/common/pipes/async_pipe","angular2/src/common/pipes/date_pipe","angular2/src/common/pipes/json_pipe","angular2/src/common/pipes/slice_pipe","angular2/src/common/pipes/lowercase_pipe","angular2/src/common/pipes/number_pipe","angular2/src/common/pipes/uppercase_pipe"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/common/pipes/async_pipe"),a=e("angular2/src/common/pipes/uppercase_pipe"),s=e("angular2/src/common/pipes/lowercase_pipe"),c=e("angular2/src/common/pipes/json_pipe"),l=e("angular2/src/common/pipes/slice_pipe"),u=e("angular2/src/common/pipes/date_pipe"),p=e("angular2/src/common/pipes/number_pipe"),d=e("angular2/src/facade/lang"),f=e("angular2/src/common/pipes/async_pipe");t.AsyncPipe=f.AsyncPipe;var h=e("angular2/src/common/pipes/date_pipe");t.DatePipe=h.DatePipe;var g=e("angular2/src/common/pipes/json_pipe");t.JsonPipe=g.JsonPipe;var m=e("angular2/src/common/pipes/slice_pipe");t.SlicePipe=m.SlicePipe;var v=e("angular2/src/common/pipes/lowercase_pipe");t.LowerCasePipe=v.LowerCasePipe;var y=e("angular2/src/common/pipes/number_pipe");t.NumberPipe=y.NumberPipe,t.DecimalPipe=y.DecimalPipe,t.PercentPipe=y.PercentPipe,t.CurrencyPipe=y.CurrencyPipe;var _=e("angular2/src/common/pipes/uppercase_pipe");return t.UpperCasePipe=_.UpperCasePipe,t.COMMON_PIPES=d.CONST_EXPR([o.AsyncPipe,a.UpperCasePipe,s.LowerCasePipe,c.JsonPipe,l.SlicePipe,p.DecimalPipe,p.PercentPipe,p.CurrencyPipe,u.DatePipe]),n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/ng_control_name",["angular2/src/facade/lang","angular2/src/facade/async","angular2/core","angular2/src/common/forms/directives/control_container","angular2/src/common/forms/directives/ng_control","angular2/src/common/forms/directives/control_value_accessor","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/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,
17
+ 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;i<n.length;i++)if(s.isPresent(this.getStyle(r,n[i]+"AnimationName"))){this._animationPrefix="-"+n[i].toLowerCase()+"-";break}var o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};a.StringMapWrapper.forEach(o,function(e,n){s.isPresent(t.getStyle(r,n))&&(t._transitionEnd=e)})}catch(c){this._animationPrefix=null,this._transitionEnd=null}}return o(t,e),t.prototype.getXHR=function(){return l.XHRImpl},t.prototype.getDistributedNodes=function(e){return e.getDistributedNodes()},t.prototype.resolveAndSetHref=function(e,t,r){e.href=null==r?t:t+"/../"+r},t.prototype.supportsDOMEvents=function(){return!0},t.prototype.supportsNativeShadowDOM=function(){return s.isFunction(this.defaultDoc().body.createShadowRoot)},t.prototype.getAnimationPrefix=function(){return s.isPresent(this._animationPrefix)?this._animationPrefix:""},t.prototype.getTransitionEnd=function(){return s.isPresent(this._transitionEnd)?this._transitionEnd:""},t.prototype.supportsAnimation=function(){return s.isPresent(this._animationPrefix)&&s.isPresent(this._transitionEnd)},t}(c.DomAdapter);return t.GenericBrowserDomAdapter=u,n.define=i,r.exports}),System.register("angular2/src/platform/browser/tools/tools",["angular2/src/facade/lang","angular2/src/platform/browser/tools/common_tools"],!0,function(e,t,r){function n(e){l.ng=new c.AngularTools(e)}function i(){delete l.ng}var o=System.global,a=o.define;o.define=void 0;var s=e("angular2/src/facade/lang"),c=e("angular2/src/platform/browser/tools/common_tools"),l=s.global;return t.enableDebugTools=n,t.disableDebugTools=i,o.define=a,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.index<this.tokens.length-1&&this.index++,this.peek=this.tokens[this.index],e},e.prototype._advanceIf=function(e){return this.peek.type===e?this._advance():null},e.prototype._consumeCdata=function(e){this._consumeText(this._advance()),this._advanceIf(h.HtmlTokenType.CDATA_END)},e.prototype._consumeComment=function(e){this._advanceIf(h.HtmlTokenType.RAW_TEXT),this._advanceIf(h.HtmlTokenType.COMMENT_END)},e.prototype._consumeText=function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var r=this._getParentElement();u.isPresent(r)&&0==r.children.length&&m.getHtmlTagDefinition(r.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new d.HtmlTextAst(t,e.sourceSpan))},e.prototype._closeVoidElement=function(){if(this.elementStack.length>0){var e=p.ListWrapper.last(this.elementStack);m.getHtmlTagDefinition(e.name).isVoid&&this.elementStack.pop()}},e.prototype._consumeStartTag=function(e){for(var t=e.parts[0],r=e.parts[1],n=[];this.peek.type===h.HtmlTokenType.ATTR_NAME;)n.push(this._consumeAttr(this._advance()));var o=i(t,r,this._getParentElement()),a=!1;this.peek.type===h.HtmlTokenType.TAG_OPEN_END_VOID?(this._advance(),a=!0,null!=m.getNsPrefix(o)||m.getHtmlTagDefinition(o).isVoid||this.errors.push(v.create(o,e.sourceSpan.start,'Only void and foreign elements can be self closed "'+e.parts[1]+'"'))):this.peek.type===h.HtmlTokenType.TAG_OPEN_END&&(this._advance(),a=!1);var s=this.peek.sourceSpan.start,c=new d.HtmlElementAst(o,n,[],new g.ParseSourceSpan(e.sourceSpan.start,s));this._pushElement(c),a&&this._popElement(o)},e.prototype._pushElement=function(e){if(this.elementStack.length>0){var t=p.ListWrapper.last(this.elementStack);m.getHtmlTagDefinition(t.name).isClosedByChild(e.name)&&this.elementStack.pop()}var r=m.getHtmlTagDefinition(e.name),t=this._getParentElement();if(r.requireExtraParent(u.isPresent(t)?t.name:null)){var n=new d.HtmlElementAst(r.parentToAdd,[],[e],e.sourceSpan);this._addToParent(n),this.elementStack.push(n),this.elementStack.push(e)}else this._addToParent(e),this.elementStack.push(e)},e.prototype._consumeEndTag=function(e){var t=i(e.parts[0],e.parts[1],this._getParentElement());m.getHtmlTagDefinition(t).isVoid?this.errors.push(v.create(t,e.sourceSpan.start,'Void elements do not have end tags "'+e.parts[1]+'"')):this._popElement(t)||this.errors.push(v.create(t,e.sourceSpan.start,'Unexpected closing tag "'+e.parts[1]+'"'))},e.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","angular2/src/common/forms/form_builder","angular2/src/common/forms/directives/radio_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=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,t.RadioButtonState=b.RadioButtonState;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");t.FormBuilder=P.FormBuilder;var E=e("angular2/src/common/forms/form_builder"),S=e("angular2/src/common/forms/directives/radio_control_value_accessor"),R=e("angular2/src/facade/lang");return t.FORM_PROVIDERS=R.CONST_EXPR([E.FormBuilder,S.RadioControlRegistry]),t.FORM_BINDINGS=t.FORM_PROVIDERS,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;n<t.length;n++)r[n]=t[n];return r},t.prototype.clearNodes=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},t.prototype.appendChild=function(e,t){e.appendChild(t)},t.prototype.removeChild=function(e,t){e.removeChild(t)},t.prototype.replaceChild=function(e,t,r){e.replaceChild(t,r)},t.prototype.remove=function(e){return e.parentNode&&e.parentNode.removeChild(e),e},t.prototype.insertBefore=function(e,t){e.parentNode.insertBefore(t,e)},t.prototype.insertAllBefore=function(e,t){t.forEach(function(t){return e.parentNode.insertBefore(t,e)})},t.prototype.insertAfter=function(e,t){e.parentNode.insertBefore(t,e.nextSibling)},t.prototype.setInnerHTML=function(e,t){e.innerHTML=t},t.prototype.getText=function(e){return e.textContent},t.prototype.setText=function(e,t){e.textContent=t},t.prototype.getValue=function(e){return e.value},t.prototype.setValue=function(e,t){e.value=t},t.prototype.getChecked=function(e){return e.checked},t.prototype.setChecked=function(e,t){e.checked=t},t.prototype.createComment=function(e){return document.createComment(e)},t.prototype.createTemplate=function(e){var t=document.createElement("template");return t.innerHTML=e,t},t.prototype.createElement=function(e,t){return void 0===t&&(t=document),t.createElement(e)},t.prototype.createElementNS=function(e,t,r){return void 0===r&&(r=document),r.createElementNS(e,t)},t.prototype.createTextNode=function(e,t){return void 0===t&&(t=document),t.createTextNode(e)},t.prototype.createScriptTag=function(e,t,r){void 0===r&&(r=document);var n=r.createElement("SCRIPT");return n.setAttribute(e,t),n},t.prototype.createStyleElement=function(e,t){void 0===t&&(t=document);var r=t.createElement("style");return this.appendChild(r,this.createTextNode(e)),r},t.prototype.createShadowRoot=function(e){return e.createShadowRoot()},t.prototype.getShadowRoot=function(e){return e.shadowRoot},t.prototype.getHost=function(e){return e.host},t.prototype.clone=function(e){return e.cloneNode(!0)},t.prototype.getElementsByClassName=function(e,t){return e.getElementsByClassName(t)},t.prototype.getElementsByTagName=function(e,t){return e.getElementsByTagName(t)},t.prototype.classList=function(e){return Array.prototype.slice.call(e.classList,0)},t.prototype.addClass=function(e,t){e.classList.add(t)},t.prototype.removeClass=function(e,t){e.classList.remove(t)},t.prototype.hasClass=function(e,t){return e.classList.contains(t)},t.prototype.setStyle=function(e,t,r){e.style[t]=r},t.prototype.removeStyle=function(e,t){e.style[t]=null},t.prototype.getStyle=function(e,t){return e.style[t]},t.prototype.hasStyle=function(e,t,r){void 0===r&&(r=null);var n=this.getStyle(e,t)||"";return r?n==r:n.length>0},t.prototype.tagName=function(e){return e.tagName},t.prototype.attributeMap=function(e){for(var t=new Map,r=e.attributes,n=0;n<r.length;n++){var i=r[n];t.set(i.name,i.value)}return t},t.prototype.hasAttribute=function(e,t){return e.hasAttribute(t)},t.prototype.getAttribute=function(e,t){return e.getAttribute(t)},t.prototype.setAttribute=function(e,t,r){e.setAttribute(t,r)},t.prototype.setAttributeNS=function(e,t,r,n){e.setAttributeNS(t,r,n)},t.prototype.removeAttribute=function(e,t){e.removeAttribute(t)},t.prototype.templateAwareRoot=function(e){return this.isTemplateElement(e)?this.content(e):e},t.prototype.createHtmlDocument=function(){return document.implementation.createHTMLDocument("fakeTitle")},t.prototype.defaultDoc=function(){return document},t.prototype.getBoundingClientRect=function(e){try{return e.getBoundingClientRect()}catch(t){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}},t.prototype.getTitle=function(){return document.title},t.prototype.setTitle=function(e){document.title=e||""},t.prototype.elementMatches=function(e,t){var r=!1;return e instanceof HTMLElement&&(e.matches?r=e.matches(t):e.msMatchesSelector?r=e.msMatchesSelector(t):e.webkitMatchesSelector&&(r=e.webkitMatchesSelector(t))),r},t.prototype.isTemplateElement=function(e){return e instanceof HTMLElement&&"TEMPLATE"==e.nodeName},t.prototype.isTextNode=function(e){return e.nodeType===Node.TEXT_NODE},t.prototype.isCommentNode=function(e){return e.nodeType===Node.COMMENT_NODE},t.prototype.isElementNode=function(e){return e.nodeType===Node.ELEMENT_NODE},t.prototype.hasShadowRoot=function(e){return e instanceof HTMLElement&&l.isPresent(e.shadowRoot)},t.prototype.isShadowRoot=function(e){return e instanceof DocumentFragment},t.prototype.importIntoDoc=function(e){var t=e;return this.isTemplateElement(e)&&(t=this.content(e)),document.importNode(t,!0)},t.prototype.adoptNode=function(e){return document.adoptNode(e)},t.prototype.getHref=function(e){return e.href},t.prototype.getEventKey=function(e){var t=e.key;if(l.isBlank(t)){if(t=e.keyIdentifier,l.isBlank(t))return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),e.location===f&&g.hasOwnProperty(t)&&(t=g[t]))}return h.hasOwnProperty(t)&&(t=h[t]),t},t.prototype.getGlobalEventTarget=function(e){return"window"==e?window:"document"==e?document:"body"==e?document.body:void 0},t.prototype.getHistory=function(){return window.history},t.prototype.getLocation=function(){return window.location},t.prototype.getBaseHref=function(){var e=n();return l.isBlank(e)?null:i(e)},t.prototype.resetBaseElement=function(){v=null},t.prototype.getUserAgent=function(){return window.navigator.userAgent},t.prototype.setData=function(e,t,r){this.setAttribute(e,"data-"+t,r)},t.prototype.getData=function(e,t){return this.getAttribute(e,"data-"+t)},t.prototype.getComputedStyle=function(e){return getComputedStyle(e)},t.prototype.setGlobalVar=function(e,t){l.setValueOnPath(l.global,e,t)},t.prototype.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)},t.prototype.cancelAnimationFrame=function(e){window.cancelAnimationFrame(e)},t.prototype.performanceNow=function(){return l.isPresent(window.performance)&&l.isPresent(window.performance.now)?window.performance.now():l.DateWrapper.toMillis(l.DateWrapper.now())},t}(p.GenericBrowserDomAdapter);t.BrowserDomAdapter=m;var v=null,y=null;return o.define=a,r.exports}),System.register("angular2/src/compiler/template_parser",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/core","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/core/change_detection/change_detection","angular2/src/compiler/html_parser","angular2/src/compiler/html_tags","angular2/src/compiler/parse_util","angular2/src/core/change_detection/parser/ast","angular2/src/compiler/template_ast","angular2/src/compiler/selector","angular2/src/compiler/schema/element_schema_registry","angular2/src/compiler/template_preparser","angular2/src/compiler/style_url_resolver","angular2/src/compiler/html_ast","angular2/src/compiler/util"],!0,function(e,t,r){function n(e){return d.StringWrapper.split(e.trim(),/\s+/g)}function i(e,t){var r=new w.CssSelector,i=y.splitNsName(e)[1];r.setElement(i);for(var o=0;o<t.length;o++){var a=t[o][0],s=y.splitNsName(a)[1],c=t[o][1];if(r.addAttribute(s,c),a.toLowerCase()==I){var l=n(c);l.forEach(function(e){return r.addClassName(e)})}}return r}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=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/core/change_detection/parser/ast"),C=e("angular2/src/compiler/template_ast"),w=e("angular2/src/compiler/selector"),P=e("angular2/src/compiler/schema/element_schema_registry"),E=e("angular2/src/compiler/template_preparser"),S=e("angular2/src/compiler/style_url_resolver"),R=e("angular2/src/compiler/html_ast"),x=e("angular2/src/compiler/util"),O=/^(?:(?:(?:(bind-)|(var-|#)|(on-)|(bindon-))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/g,D="template",A="template",T="*",I="class",k=".",N="attr",V="class",M="style",j=w.CssSelector.parse("*")[0];t.TEMPLATE_TRANSFORMS=h.CONST_EXPR(new f.OpaqueToken("TemplateTransforms"));var L=function(e){function t(t,r){e.call(this,r,t)}return s(t,e),t}(_.ParseError);t.TemplateParseError=L;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,n){var i=new F(t,r,this._exprParser,this._schemaRegistry),o=this._htmlParser.parse(e,n),a=R.htmlVisitAll(i,o.rootNodes,G),s=o.errors.concat(i.errors);if(s.length>0){var c=s.join("\n");throw new g.BaseException("Template parse errors:\n"+c)}return d.isPresent(this.transforms)&&this.transforms.forEach(function(e){a=C.templateVisitAll(e,a)}),a},e=c([f.Injectable(),u(3,f.Optional()),u(3,f.Inject(t.TEMPLATE_TRANSFORMS)),l("design:paramtypes",[m.Parser,P.ElementSchemaRegistry,v.HtmlParser,Array])],e)}();t.TemplateParser=B;var F=function(){function e(e,t,r,n){var i=this;this._exprParser=r,this._schemaRegistry=n,this.errors=[],this.directivesIndex=new Map,this.ngContentCount=0,this.selectorMatcher=new w.SelectorMatcher,p.ListWrapper.forEachWithIndex(e,function(e,t){var r=w.CssSelector.parse(e.selector);i.selectorMatcher.addSelectables(r,e),i.directivesIndex.set(e,t)}),this.pipesByName=new Map,t.forEach(function(e){return i.pipesByName.set(e.name,e)})}return e.prototype._reportError=function(e,t){this.errors.push(new L(e,t.start))},e.prototype._parseInterpolation=function(e,t){var r=t.start.toString();try{var n=this._exprParser.parseInterpolation(e,r);return this._checkPipes(n,t),n}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},e.prototype._parseAction=function(e,t){var r=t.start.toString();try{var n=this._exprParser.parseAction(e,r);return this._checkPipes(n,t),n}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},e.prototype._parseBinding=function(e,t){var r=t.start.toString();try{var n=this._exprParser.parseBinding(e,r);return this._checkPipes(n,t),n}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},e.prototype._parseTemplateBindings=function(e,t){var r=this,n=t.start.toString();try{var i=this._exprParser.parseTemplateBindings(e,n);return i.forEach(function(e){d.isPresent(e.expression)&&r._checkPipes(e.expression,t)}),i}catch(o){return this._reportError(""+o,t),[]}},e.prototype._checkPipes=function(e,t){var r=this;if(d.isPresent(e)){var n=new K;e.visit(n),n.pipes.forEach(function(e){r.pipesByName.has(e)||r._reportError("The pipe '"+e+"' could not be found",t)})}},e.prototype.visitText=function(e,t){var r=t.findNgContentIndex(j),n=this._parseInterpolation(e.value,e.sourceSpan);return d.isPresent(n)?new C.BoundTextAst(n,r,e.sourceSpan):new C.TextAst(e.value,r,e.sourceSpan)},e.prototype.visitAttr=function(e,t){return new C.AttrAst(e.name,e.value,e.sourceSpan)},e.prototype.visitElement=function(e,t){var r=this,n=e.name,o=E.preparseElement(e);if(o.type===E.PreparsedElementType.SCRIPT||o.type===E.PreparsedElementType.STYLE)return null;if(o.type===E.PreparsedElementType.STYLESHEET&&S.isStyleUrlResolvable(o.hrefAttr))return null;var a=[],s=[],c=[],l=[],u=[],p=[],f=[],h=!1,g=[];e.attrs.forEach(function(e){var t=r._parseAttr(e,a,s,l,c),n=r._parseInlineTemplateBinding(e,f,u,p);t||n||(g.push(r.visitAttr(e,null)),a.push([e.name,e.value])),n&&(h=!0)});var m,v=y.splitNsName(n.toLowerCase())[1],_=v==D,b=i(n,a),w=this._createDirectiveAsts(e.name,this._parseDirectives(this.selectorMatcher,b),s,_?[]:c,e.sourceSpan),P=this._createElementPropertyAsts(e.name,s,w),x=R.htmlVisitAll(o.nonBindable?q:this,e.children,H.create(w)),O=h?null:t.findNgContentIndex(b);if(o.type===E.PreparsedElementType.NG_CONTENT)d.isPresent(e.children)&&e.children.length>0&&this._reportError("<ng-content> element cannot have content. <ng-content> must be immediately followed by </ng-content>",e.sourceSpan),m=new C.NgContentAst(this.ngContentCount++,O,e.sourceSpan);else if(_)this._assertAllEventsPublishedByDirectives(w,l),this._assertNoComponentsNorElementBindingsOnTemplate(w,P,e.sourceSpan),m=new C.EmbeddedTemplateAst(g,l,c,w,x,O,e.sourceSpan);else{this._assertOnlyOneComponent(w,e.sourceSpan);var A=c.filter(function(e){return 0===e.value.length});m=new C.ElementAst(n,g,P,l,A,w,x,O,e.sourceSpan)}if(h){var T=i(D,f),I=this._createDirectiveAsts(e.name,this._parseDirectives(this.selectorMatcher,T),u,[],e.sourceSpan),k=this._createElementPropertyAsts(e.name,u,I);this._assertNoComponentsNorElementBindingsOnTemplate(I,k,e.sourceSpan),m=new C.EmbeddedTemplateAst([],[],p,I,[m],t.findNgContentIndex(T),e.sourceSpan)}return m},e.prototype._parseInlineTemplateBinding=function(e,t,r,n){var i=null;if(e.name==A)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<a.length;s++){var c=a[s];c.keyIsVar?(n.push(new C.VariableAst(c.key,c.name,e.sourceSpan)),t.push([c.key,c.name])):d.isPresent(c.expression)?this._parsePropertyAst(c.key,c.expression,e.sourceSpan,t,r):(t.push([c.key,""]),this._parseLiteralAttr(c.key,null,e.sourceSpan,r))}return!0}return!1},e.prototype._parseAttr=function(e,t,r,n,i){var o=this._normalizeAttributeName(e.name),a=e.value,s=d.RegExpWrapper.firstMatch(O,o),c=!1;if(d.isPresent(s))if(c=!0,d.isPresent(s[1]))this._parseProperty(s[5],a,e.sourceSpan,t,r);else if(d.isPresent(s[2])){var l=s[5];this._parseVariable(l,a,e.sourceSpan,i)}else d.isPresent(s[3])?this._parseEvent(s[5],a,e.sourceSpan,t,n):d.isPresent(s[4])?(this._parseProperty(s[5],a,e.sourceSpan,t,r),this._parseAssignmentEvent(s[5],a,e.sourceSpan,t,n)):d.isPresent(s[6])?(this._parseProperty(s[6],a,e.sourceSpan,t,r),this._parseAssignmentEvent(s[6],a,e.sourceSpan,t,n)):d.isPresent(s[7])?this._parseProperty(s[7],a,e.sourceSpan,t,r):d.isPresent(s[8])&&this._parseEvent(s[8],a,e.sourceSpan,t,n);else c=this._parsePropertyInterpolation(o,a,e.sourceSpan,t,r);return c||this._parseLiteralAttr(o,a,e.sourceSpan,r),c},e.prototype._normalizeAttributeName=function(e){return e.toLowerCase().startsWith("data-")?e.substring(5):e},e.prototype._parseVariable=function(e,t,r,n){
18
+ e.indexOf("-")>-1&&this._reportError('"-" is not allowed in variable names',r),n.push(new C.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 U(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=x.splitAtColon(e,[null,e]),a=o[0],s=o[1],c=this._parseAction(t,r);n.push([e,c.source]),i.push(new C.BoundEventAst(s,a,c,r))},e.prototype._parseLiteralAttr=function(e,t,r,n){n.push(new U(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 C.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 C.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(k);return 1===s.length?(o=this._schemaRegistry.getMappedPropName(s[0]),i=C.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]==N?(o=s[1],i=C.PropertyBindingType.Attribute):s[0]==V?(o=s[1],i=C.PropertyBindingType.Class):s[0]==M?(a=s.length>2?s[2]:null,o=s[1],i=C.PropertyBindingType.Style):(this._reportError("Invalid property name '"+t+"'",n),i=null),new C.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}(),W=function(){function e(){}return e.prototype.visitElement=function(e,t){var r=E.preparseElement(e);if(r.type===E.PreparsedElementType.SCRIPT||r.type===E.PreparsedElementType.STYLE||r.type===E.PreparsedElementType.STYLESHEET)return null;var n=e.attrs.map(function(e){return[e.name,e.value]}),o=i(e.name,n),a=t.findNgContentIndex(o),s=R.htmlVisitAll(this,e.children,G);return new C.ElementAst(e.name,R.htmlVisitAll(this,e.attrs),[],[],[],[],s,a,e.sourceSpan)},e.prototype.visitAttr=function(e,t){return new C.AttrAst(e.name,e.value,e.sourceSpan)},e.prototype.visitText=function(e,t){var r=t.findNgContentIndex(j);return new C.TextAst(e.value,r,e.sourceSpan)},e}(),U=function(){function e(e,t,r,n){this.name=e,this.expression=t,this.isLiteral=r,this.sourceSpan=n}return e}();t.splitClasses=n;var H=function(){function e(e,t){this.ngContentIndexMatcher=e,this.wildcardNgContentIndex=t}return e.create=function(t){if(0===t.length||!t[0].directive.isComponent)return G;for(var r=new w.SelectorMatcher,n=t[0].directive.template.ngContentSelectors,i=null,o=0;o<n.length;o++){var a=n[o];d.StringWrapper.equals(a,"*")?i=o:r.addSelectables(w.CssSelector.parse(n[o]),o)}return new e(r,i)},e.prototype.findNgContentIndex=function(e){var t=[];return this.ngContentIndexMatcher.match(e,function(e,r){t.push(r)}),p.ListWrapper.sort(t),d.isPresent(this.wildcardNgContentIndex)&&t.push(this.wildcardNgContentIndex),t.length>0?t[0]:null},e}(),G=new H(new w.SelectorMatcher,null),q=new W,K=function(e){function t(){e.apply(this,arguments),this.pipes=new Set}return s(t,e),t.prototype.visitPipe=function(e){return this.pipes.add(e.name),e.exp.visit(this),this.visitAll(e.args),null},t}(b.RecursiveAstVisitor);return t.PipeCollector=K,o.define=a,r.exports}),System.register("angular2/common",["angular2/src/common/pipes","angular2/src/common/directives","angular2/src/common/forms","angular2/src/common/common_directives"],!0,function(e,t,r){function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}var i=System.global,o=i.define;return i.define=void 0,n(e("angular2/src/common/pipes")),n(e("angular2/src/common/directives")),n(e("angular2/src/common/forms")),n(e("angular2/src/common/common_directives")),i.define=o,r.exports}),System.register("angular2/src/compiler/template_compiler",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/facade/async","angular2/src/compiler/directive_metadata","angular2/src/compiler/template_ast","angular2/src/core/di","angular2/src/compiler/source_module","angular2/src/compiler/change_detector_compiler","angular2/src/compiler/style_compiler","angular2/src/compiler/view_compiler","angular2/src/compiler/proto_view_compiler","angular2/src/compiler/template_parser","angular2/src/compiler/template_normalizer","angular2/src/compiler/runtime_metadata","angular2/src/core/linker/view","angular2/src/core/change_detection/change_detection","angular2/src/core/linker/resolved_metadata_cache","angular2/src/compiler/util"],!0,function(e,t,r){function n(e){if(!e.isComponent)throw new g.BaseException("Could not compile '"+e.type.name+"' because it is not a component.")}function i(e){var t=e.substring(0,e.length-I.MODULE_SUFFIX.length);return t+".template"+I.MODULE_SUFFIX}function o(e){return"hostViewFactory_"+e.name}function a(e){return C.moduleRef(i(e.type.moduleUrl))+"viewFactory_"+e.type.name+"0"}function s(e){var t={};return e.forEach(function(e){m.StringMapWrapper.forEach(e,function(e,r){t[r]=e})}),t}function c(e){var t=[];return e.forEach(function(e){var r=t.filter(function(t){return t.type.name==e.type.name&&t.type.moduleUrl==e.type.moduleUrl&&t.type.runtime==e.type.runtime}).length>0;r||t.push(e)}),t}function l(e,t){var r=new j;return _.templateVisitAll(r,e),t.filter(function(e){return m.SetWrapper.has(r.collector.pipes,e.name)})}var u=System.global,p=u.define;u.define=void 0;var d=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},f=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},h=e("angular2/src/facade/lang"),g=e("angular2/src/facade/exceptions"),m=e("angular2/src/facade/collection"),v=e("angular2/src/facade/async"),y=e("angular2/src/compiler/directive_metadata"),_=e("angular2/src/compiler/template_ast"),b=e("angular2/src/core/di"),C=e("angular2/src/compiler/source_module"),w=e("angular2/src/compiler/change_detector_compiler"),P=e("angular2/src/compiler/style_compiler"),E=e("angular2/src/compiler/view_compiler"),S=e("angular2/src/compiler/proto_view_compiler"),R=e("angular2/src/compiler/template_parser"),x=e("angular2/src/compiler/template_normalizer"),O=e("angular2/src/compiler/runtime_metadata"),D=e("angular2/src/core/linker/view"),A=e("angular2/src/core/change_detection/change_detection"),T=e("angular2/src/core/linker/resolved_metadata_cache"),I=e("angular2/src/compiler/util");t.METADATA_CACHE_MODULE_REF=C.moduleRef("package:angular2/src/core/linker/resolved_metadata_cache"+I.MODULE_SUFFIX);var k=function(){function e(e,t,r,n,i,o,a,s,c){this._runtimeMetadataResolver=e,this._templateNormalizer=t,this._templateParser=r,this._styleCompiler=n,this._cdCompiler=i,this._protoViewCompiler=o,this._viewCompiler=a,this._resolvedMetadataCache=s,this._genConfig=c,this._hostCacheKeys=new Map,this._compiledTemplateCache=new Map,this._compiledTemplateDone=new Map}return e.prototype.normalizeDirectiveMetadata=function(e){return e.isComponent?this._templateNormalizer.normalizeTemplate(e.type,e.template).then(function(t){return new y.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._runtimeMetadataResolver.getDirectiveMetadata(e),r=this._hostCacheKeys.get(e);if(h.isBlank(r)){r=new Object,this._hostCacheKeys.set(e,r),n(t);var i=y.createHostComponentMeta(t.type,t.selector);this._compileComponentRuntime(r,i,[t],[],[])}return this._compiledTemplateDone.get(r).then(function(e){return new D.HostViewFactory(t.selector,e.viewFactory)})},e.prototype.clearCache=function(){this._styleCompiler.clearCache(),this._compiledTemplateCache.clear(),this._compiledTemplateDone.clear(),this._hostCacheKeys.clear()},e.prototype.compileTemplatesCodeGen=function(e){var t=this;if(0===e.length)throw new g.BaseException("No components given");var r=[];e.forEach(function(e){var i=e.component;if(n(i),t._compileComponentCodeGen(i,e.directives,e.pipes,r),i.dynamicLoadable){var a=y.createHostComponentMeta(i.type,i.selector),s=t._compileComponentCodeGen(a,[i],[],r),c=h.IS_DART?"const":"new",l=c+" "+S.APP_VIEW_MODULE_REF+"HostViewFactory('"+i.selector+"',"+s+")",u=o(i.type);r.push(""+I.codeGenExportVariable(u)+l+";")}});var a=e[0].component.type.moduleUrl;return new C.SourceModule(""+i(a),r.join("\n"))},e.prototype.compileStylesheetCodeGen=function(e,t){return this._styleCompiler.compileStylesheetCodeGen(e,t)},e.prototype._compileComponentRuntime=function(e,t,r,n,i){var o=this,a=c(r),s=c(n),u=this._compiledTemplateCache.get(e),p=this._compiledTemplateDone.get(e);return h.isBlank(u)&&(u=new V,this._compiledTemplateCache.set(e,u),p=v.PromiseWrapper.all([this._styleCompiler.compileComponentRuntime(t.template)].concat(a.map(function(e){return o.normalizeDirectiveMetadata(e)}))).then(function(e){var r=e.slice(1),n=e[0],a=o._templateParser.parse(t.template.template,r,s,t.type.name),c=[],p=M.findUsedDirectives(a);return p.components.forEach(function(e){return o._compileNestedComponentRuntime(e,i,c)}),v.PromiseWrapper.all(c).then(function(e){var r=l(a,s);return u.init(o._createViewFactoryRuntime(t,a,p.directives,n,r)),u})}),this._compiledTemplateDone.set(e,p)),u},e.prototype._compileNestedComponentRuntime=function(e,t,r){var n=m.ListWrapper.clone(t),i=e.type.runtime,o=this._runtimeMetadataResolver.getViewDirectivesMetadata(e.type.runtime),a=this._runtimeMetadataResolver.getViewPipesMetadata(e.type.runtime),s=m.ListWrapper.contains(n,i);n.push(i),this._compileComponentRuntime(i,e,o,a,n),s||r.push(this._compiledTemplateDone.get(i))},e.prototype._createViewFactoryRuntime=function(e,t,r,n,i){var o=this;if(h.IS_DART||!this._genConfig.useJit){var a=this._cdCompiler.compileComponentRuntime(e.type,e.changeDetection,t),c=this._protoViewCompiler.compileProtoViewRuntime(this._resolvedMetadataCache,e,t,i);return this._viewCompiler.compileComponentRuntime(e,t,n,c.protoViews,a,function(e){return o._getNestedComponentViewFactory(e)})}var l=[],u=this._createViewFactoryCodeGen("resolvedMetadataCache",e,new C.SourceExpression([],"styles"),t,i,l),p={exports:{},styles:n,resolvedMetadataCache:this._resolvedMetadataCache};r.forEach(function(t){p[t.type.name]=t.type.runtime,t.isComponent&&t.type.runtime!==e.type.runtime&&(p["viewFactory_"+t.type.name+"0"]=o._getNestedComponentViewFactory(t))}),i.forEach(function(e){return p[e.type.name]=e.type.runtime});var d=C.SourceModule.getSourceWithoutImports(l.join("\n"));return h.evalExpression("viewFactory_"+e.type.name,u,d,s([p,w.CHANGE_DETECTION_JIT_IMPORTS,S.PROTO_VIEW_JIT_IMPORTS,E.VIEW_JIT_IMPORTS]))},e.prototype._getNestedComponentViewFactory=function(e){return this._compiledTemplateCache.get(e.type.runtime).viewFactory},e.prototype._compileComponentCodeGen=function(e,r,n,i){var o=c(r),a=c(n),s=this._styleCompiler.compileComponentCodeGen(e.template),u=this._templateParser.parse(e.template.template,o,a,e.type.name),p=l(u,a);return this._createViewFactoryCodeGen(t.METADATA_CACHE_MODULE_REF+"CODEGEN_RESOLVED_METADATA_CACHE",e,s,u,p,i)},e.prototype._createViewFactoryCodeGen=function(e,t,r,n,i,o){var s=this._cdCompiler.compileComponentCodeGen(t.type,t.changeDetection,n),c=this._protoViewCompiler.compileProtoViewCodeGen(new I.Expression(e),t,n,i),l=this._viewCompiler.compileComponentCodeGen(t,n,r,c.protoViews,s,a);return I.addAll(s.declarations,o),I.addAll(c.declarations,o),I.addAll(l.declarations,o),l.expression},e=d([b.Injectable(),f("design:paramtypes",[O.RuntimeMetadataResolver,x.TemplateNormalizer,R.TemplateParser,P.StyleCompiler,w.ChangeDetectionCompiler,S.ProtoViewCompiler,E.ViewCompiler,T.ResolvedMetadataCache,A.ChangeDetectorGenConfig])],e)}();t.TemplateCompiler=k;var N=function(){function e(e,t,r){this.component=e,this.directives=t,this.pipes=r}return e}();t.NormalizedComponentWithViewDirectives=N;var V=function(){function e(){this.viewFactory=null}return e.prototype.init=function(e){this.viewFactory=e},e}(),M=function(){function e(){this.directives=[],this.components=[]}return e.findUsedDirectives=function(t){var r=new e;return _.templateVisitAll(r,t),r},e.prototype.visitBoundText=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitElement=function(e,t){return _.templateVisitAll(this,e.directives),_.templateVisitAll(this,e.children),null},e.prototype.visitEmbeddedTemplate=function(e,t){return _.templateVisitAll(this,e.directives),_.templateVisitAll(this,e.children),null},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitDirective=function(e,t){return e.directive.isComponent&&this.components.push(e.directive),this.directives.push(e.directive),null},e.prototype.visitEvent=function(e,t){return null},e.prototype.visitDirectiveProperty=function(e,t){return null},e.prototype.visitElementProperty=function(e,t){return null},e}(),j=function(){function e(){this.collector=new R.PipeCollector}return e.prototype.visitBoundText=function(e,t){return e.value.visit(this.collector),null},e.prototype.visitText=function(e,t){return null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitElement=function(e,t){return _.templateVisitAll(this,e.inputs),_.templateVisitAll(this,e.outputs),_.templateVisitAll(this,e.directives),_.templateVisitAll(this,e.children),null},e.prototype.visitEmbeddedTemplate=function(e,t){return _.templateVisitAll(this,e.outputs),_.templateVisitAll(this,e.directives),_.templateVisitAll(this,e.children),null},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitDirective=function(e,t){return _.templateVisitAll(this,e.inputs),_.templateVisitAll(this,e.hostEvents),_.templateVisitAll(this,e.hostProperties),null},e.prototype.visitEvent=function(e,t){return e.handler.visit(this.collector),null},e.prototype.visitDirectiveProperty=function(e,t){return e.value.visit(this.collector),null},e.prototype.visitElementProperty=function(e,t){return e.value.visit(this.collector),null},e}();return u.define=p,r.exports}),System.register("angular2/src/compiler/runtime_compiler",["angular2/src/core/linker/compiler","angular2/src/core/linker/view_ref","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/view_ref"),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){e.call(this),this._templateCompiler=t}return o(t,e),t.prototype.compileInHost=function(e){return this._templateCompiler.compileHostComponentRuntime(e).then(function(e){return new l.HostViewFactoryRef_(e)})},t.prototype.clearCache=function(){e.prototype.clearCache.call(this),this._templateCompiler.clearCache()},t=a([p.Injectable(),s("design:paramtypes",[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/view_compiler","angular2/src/compiler/proto_view_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 E.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/view_compiler"),w=e("angular2/src/compiler/proto_view_compiler"),P=e("angular2/src/compiler/template_compiler"),E=e("angular2/src/core/change_detection/change_detection"),S=e("angular2/src/core/linker/compiler"),R=e("angular2/src/compiler/runtime_compiler"),x=e("angular2/src/compiler/schema/element_schema_registry"),O=e("angular2/src/compiler/schema/dom_element_schema_registry"),D=e("angular2/src/compiler/url_resolver"),A=e("angular2/src/core/change_detection/change_detection");return t.COMPILER_PROVIDERS=f.CONST_EXPR([A.Lexer,A.Parser,m.HtmlParser,g.TemplateParser,v.TemplateNormalizer,y.RuntimeMetadataResolver,D.DEFAULT_PACKAGE_URL_PROVIDER,b.StyleCompiler,w.ProtoViewCompiler,C.ViewCompiler,_.ChangeDetectionCompiler,new h.Provider(E.ChangeDetectorGenConfig,{useFactory:i,deps:[]}),P.TemplateCompiler,new h.Provider(R.RuntimeCompiler,{useClass:s.RuntimeCompiler_}),new h.Provider(S.Compiler,{useExisting:R.RuntimeCompiler}),O.DomElementSchemaRegistry,new h.Provider(x.ElementSchemaRegistry,{useExisting:O.DomElementSchemaRegistry}),D.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/platform/common_dom","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/platform/common_dom"),O=e("angular2/src/platform/dom/dom_tokens");t.DOCUMENT=O.DOCUMENT;var D=e("angular2/src/platform/browser/title");t.Title=D.Title;var A=e("angular2/platform/common_dom");t.ELEMENT_PROBE_PROVIDERS=A.ELEMENT_PROBE_PROVIDERS,t.ELEMENT_PROBE_PROVIDERS_PROD_MODE=A.ELEMENT_PROBE_PROVIDERS_PROD_MODE,t.inspectNativeElement=A.inspectNativeElement,t.By=A.By;var T=e("angular2/src/platform/browser/browser_adapter");t.BrowserDomAdapter=T.BrowserDomAdapter;var I=e("angular2/src/platform/browser/tools/tools");return t.enableDebugTools=I.enableDebugTools,t.disableDebugTools=I.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.DomRootRenderer,{useClass:y.DomRootRenderer_}),new l.Provider(u.RootRenderer,{useExisting:y.DomRootRenderer}),new l.Provider(b.SharedStylesHost,{useExisting:_.DomSharedStylesHost}),_.DomSharedStylesHost,d.Testability,C.BrowserDetails,w.AnimationBuilder,R.EventManager,x.ELEMENT_PROBE_PROVIDERS]),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_PROVIDERS=s.ELEMENT_PROBE_PROVIDERS,t.ELEMENT_PROBE_PROVIDERS_PROD_MODE=s.ELEMENT_PROBE_PROVIDERS_PROD_MODE,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});
@@ -0,0 +1,1091 @@
1
+ "format register";
2
+ System.register("angular2/src/http/interfaces", [], true, function(require, exports, module) {
3
+ var global = System.global,
4
+ __define = global.define;
5
+ global.define = undefined;
6
+ var ConnectionBackend = (function() {
7
+ function ConnectionBackend() {}
8
+ return ConnectionBackend;
9
+ })();
10
+ exports.ConnectionBackend = ConnectionBackend;
11
+ var Connection = (function() {
12
+ function Connection() {}
13
+ return Connection;
14
+ })();
15
+ exports.Connection = Connection;
16
+ global.define = __define;
17
+ return module.exports;
18
+ });
19
+
20
+ System.register("angular2/src/http/headers", ["angular2/src/facade/lang", "angular2/src/facade/exceptions", "angular2/src/facade/collection"], true, function(require, exports, module) {
21
+ var global = System.global,
22
+ __define = global.define;
23
+ global.define = undefined;
24
+ var lang_1 = require("angular2/src/facade/lang");
25
+ var exceptions_1 = require("angular2/src/facade/exceptions");
26
+ var collection_1 = require("angular2/src/facade/collection");
27
+ var Headers = (function() {
28
+ function Headers(headers) {
29
+ var _this = this;
30
+ if (headers instanceof Headers) {
31
+ this._headersMap = headers._headersMap;
32
+ return ;
33
+ }
34
+ this._headersMap = new collection_1.Map();
35
+ if (lang_1.isBlank(headers)) {
36
+ return ;
37
+ }
38
+ collection_1.StringMapWrapper.forEach(headers, function(v, k) {
39
+ _this._headersMap.set(k, collection_1.isListLikeIterable(v) ? v : [v]);
40
+ });
41
+ }
42
+ Headers.fromResponseHeaderString = function(headersString) {
43
+ return headersString.trim().split('\n').map(function(val) {
44
+ return val.split(':');
45
+ }).map(function(_a) {
46
+ var key = _a[0],
47
+ parts = _a.slice(1);
48
+ return ([key.trim(), parts.join(':').trim()]);
49
+ }).reduce(function(headers, _a) {
50
+ var key = _a[0],
51
+ value = _a[1];
52
+ return !headers.set(key, value) && headers;
53
+ }, new Headers());
54
+ };
55
+ Headers.prototype.append = function(name, value) {
56
+ var mapName = this._headersMap.get(name);
57
+ var list = collection_1.isListLikeIterable(mapName) ? mapName : [];
58
+ list.push(value);
59
+ this._headersMap.set(name, list);
60
+ };
61
+ Headers.prototype.delete = function(name) {
62
+ this._headersMap.delete(name);
63
+ };
64
+ Headers.prototype.forEach = function(fn) {
65
+ this._headersMap.forEach(fn);
66
+ };
67
+ Headers.prototype.get = function(header) {
68
+ return collection_1.ListWrapper.first(this._headersMap.get(header));
69
+ };
70
+ Headers.prototype.has = function(header) {
71
+ return this._headersMap.has(header);
72
+ };
73
+ Headers.prototype.keys = function() {
74
+ return collection_1.MapWrapper.keys(this._headersMap);
75
+ };
76
+ Headers.prototype.set = function(header, value) {
77
+ var list = [];
78
+ if (collection_1.isListLikeIterable(value)) {
79
+ var pushValue = value.join(',');
80
+ list.push(pushValue);
81
+ } else {
82
+ list.push(value);
83
+ }
84
+ this._headersMap.set(header, list);
85
+ };
86
+ Headers.prototype.values = function() {
87
+ return collection_1.MapWrapper.values(this._headersMap);
88
+ };
89
+ Headers.prototype.toJSON = function() {
90
+ var serializableHeaders = {};
91
+ this._headersMap.forEach(function(values, name) {
92
+ var list = [];
93
+ collection_1.iterateListLike(values, function(val) {
94
+ return list = collection_1.ListWrapper.concat(list, val.split(','));
95
+ });
96
+ serializableHeaders[name] = list;
97
+ });
98
+ return serializableHeaders;
99
+ };
100
+ Headers.prototype.getAll = function(header) {
101
+ var headers = this._headersMap.get(header);
102
+ return collection_1.isListLikeIterable(headers) ? headers : [];
103
+ };
104
+ Headers.prototype.entries = function() {
105
+ throw new exceptions_1.BaseException('"entries" method is not implemented on Headers class');
106
+ };
107
+ return Headers;
108
+ })();
109
+ exports.Headers = Headers;
110
+ global.define = __define;
111
+ return module.exports;
112
+ });
113
+
114
+ System.register("angular2/src/http/enums", [], true, function(require, exports, module) {
115
+ var global = System.global,
116
+ __define = global.define;
117
+ global.define = undefined;
118
+ (function(RequestMethod) {
119
+ RequestMethod[RequestMethod["Get"] = 0] = "Get";
120
+ RequestMethod[RequestMethod["Post"] = 1] = "Post";
121
+ RequestMethod[RequestMethod["Put"] = 2] = "Put";
122
+ RequestMethod[RequestMethod["Delete"] = 3] = "Delete";
123
+ RequestMethod[RequestMethod["Options"] = 4] = "Options";
124
+ RequestMethod[RequestMethod["Head"] = 5] = "Head";
125
+ RequestMethod[RequestMethod["Patch"] = 6] = "Patch";
126
+ })(exports.RequestMethod || (exports.RequestMethod = {}));
127
+ var RequestMethod = exports.RequestMethod;
128
+ (function(ReadyState) {
129
+ ReadyState[ReadyState["Unsent"] = 0] = "Unsent";
130
+ ReadyState[ReadyState["Open"] = 1] = "Open";
131
+ ReadyState[ReadyState["HeadersReceived"] = 2] = "HeadersReceived";
132
+ ReadyState[ReadyState["Loading"] = 3] = "Loading";
133
+ ReadyState[ReadyState["Done"] = 4] = "Done";
134
+ ReadyState[ReadyState["Cancelled"] = 5] = "Cancelled";
135
+ })(exports.ReadyState || (exports.ReadyState = {}));
136
+ var ReadyState = exports.ReadyState;
137
+ (function(ResponseType) {
138
+ ResponseType[ResponseType["Basic"] = 0] = "Basic";
139
+ ResponseType[ResponseType["Cors"] = 1] = "Cors";
140
+ ResponseType[ResponseType["Default"] = 2] = "Default";
141
+ ResponseType[ResponseType["Error"] = 3] = "Error";
142
+ ResponseType[ResponseType["Opaque"] = 4] = "Opaque";
143
+ })(exports.ResponseType || (exports.ResponseType = {}));
144
+ var ResponseType = exports.ResponseType;
145
+ global.define = __define;
146
+ return module.exports;
147
+ });
148
+
149
+ System.register("angular2/src/http/url_search_params", ["angular2/src/facade/lang", "angular2/src/facade/collection"], true, function(require, exports, module) {
150
+ var global = System.global,
151
+ __define = global.define;
152
+ global.define = undefined;
153
+ var lang_1 = require("angular2/src/facade/lang");
154
+ var collection_1 = require("angular2/src/facade/collection");
155
+ function paramParser(rawParams) {
156
+ if (rawParams === void 0) {
157
+ rawParams = '';
158
+ }
159
+ var map = new collection_1.Map();
160
+ if (rawParams.length > 0) {
161
+ var params = rawParams.split('&');
162
+ params.forEach(function(param) {
163
+ var split = param.split('=');
164
+ var key = split[0];
165
+ var val = split[1];
166
+ var list = lang_1.isPresent(map.get(key)) ? map.get(key) : [];
167
+ list.push(val);
168
+ map.set(key, list);
169
+ });
170
+ }
171
+ return map;
172
+ }
173
+ var URLSearchParams = (function() {
174
+ function URLSearchParams(rawParams) {
175
+ if (rawParams === void 0) {
176
+ rawParams = '';
177
+ }
178
+ this.rawParams = rawParams;
179
+ this.paramsMap = paramParser(rawParams);
180
+ }
181
+ URLSearchParams.prototype.clone = function() {
182
+ var clone = new URLSearchParams();
183
+ clone.appendAll(this);
184
+ return clone;
185
+ };
186
+ URLSearchParams.prototype.has = function(param) {
187
+ return this.paramsMap.has(param);
188
+ };
189
+ URLSearchParams.prototype.get = function(param) {
190
+ var storedParam = this.paramsMap.get(param);
191
+ if (collection_1.isListLikeIterable(storedParam)) {
192
+ return collection_1.ListWrapper.first(storedParam);
193
+ } else {
194
+ return null;
195
+ }
196
+ };
197
+ URLSearchParams.prototype.getAll = function(param) {
198
+ var mapParam = this.paramsMap.get(param);
199
+ return lang_1.isPresent(mapParam) ? mapParam : [];
200
+ };
201
+ URLSearchParams.prototype.set = function(param, val) {
202
+ var mapParam = this.paramsMap.get(param);
203
+ var list = lang_1.isPresent(mapParam) ? mapParam : [];
204
+ collection_1.ListWrapper.clear(list);
205
+ list.push(val);
206
+ this.paramsMap.set(param, list);
207
+ };
208
+ URLSearchParams.prototype.setAll = function(searchParams) {
209
+ var _this = this;
210
+ searchParams.paramsMap.forEach(function(value, param) {
211
+ var mapParam = _this.paramsMap.get(param);
212
+ var list = lang_1.isPresent(mapParam) ? mapParam : [];
213
+ collection_1.ListWrapper.clear(list);
214
+ list.push(value[0]);
215
+ _this.paramsMap.set(param, list);
216
+ });
217
+ };
218
+ URLSearchParams.prototype.append = function(param, val) {
219
+ var mapParam = this.paramsMap.get(param);
220
+ var list = lang_1.isPresent(mapParam) ? mapParam : [];
221
+ list.push(val);
222
+ this.paramsMap.set(param, list);
223
+ };
224
+ URLSearchParams.prototype.appendAll = function(searchParams) {
225
+ var _this = this;
226
+ searchParams.paramsMap.forEach(function(value, param) {
227
+ var mapParam = _this.paramsMap.get(param);
228
+ var list = lang_1.isPresent(mapParam) ? mapParam : [];
229
+ for (var i = 0; i < value.length; ++i) {
230
+ list.push(value[i]);
231
+ }
232
+ _this.paramsMap.set(param, list);
233
+ });
234
+ };
235
+ URLSearchParams.prototype.replaceAll = function(searchParams) {
236
+ var _this = this;
237
+ searchParams.paramsMap.forEach(function(value, param) {
238
+ var mapParam = _this.paramsMap.get(param);
239
+ var list = lang_1.isPresent(mapParam) ? mapParam : [];
240
+ collection_1.ListWrapper.clear(list);
241
+ for (var i = 0; i < value.length; ++i) {
242
+ list.push(value[i]);
243
+ }
244
+ _this.paramsMap.set(param, list);
245
+ });
246
+ };
247
+ URLSearchParams.prototype.toString = function() {
248
+ var paramsList = [];
249
+ this.paramsMap.forEach(function(values, k) {
250
+ values.forEach(function(v) {
251
+ return paramsList.push(k + '=' + v);
252
+ });
253
+ });
254
+ return paramsList.join('&');
255
+ };
256
+ URLSearchParams.prototype.delete = function(param) {
257
+ this.paramsMap.delete(param);
258
+ };
259
+ return URLSearchParams;
260
+ })();
261
+ exports.URLSearchParams = URLSearchParams;
262
+ global.define = __define;
263
+ return module.exports;
264
+ });
265
+
266
+ System.register("angular2/src/http/static_response", ["angular2/src/facade/lang", "angular2/src/facade/exceptions", "angular2/src/http/http_utils"], true, function(require, exports, module) {
267
+ var global = System.global,
268
+ __define = global.define;
269
+ global.define = undefined;
270
+ var lang_1 = require("angular2/src/facade/lang");
271
+ var exceptions_1 = require("angular2/src/facade/exceptions");
272
+ var http_utils_1 = require("angular2/src/http/http_utils");
273
+ var Response = (function() {
274
+ function Response(responseOptions) {
275
+ this._body = responseOptions.body;
276
+ this.status = responseOptions.status;
277
+ this.statusText = responseOptions.statusText;
278
+ this.headers = responseOptions.headers;
279
+ this.type = responseOptions.type;
280
+ this.url = responseOptions.url;
281
+ }
282
+ Response.prototype.blob = function() {
283
+ throw new exceptions_1.BaseException('"blob()" method not implemented on Response superclass');
284
+ };
285
+ Response.prototype.json = function() {
286
+ var jsonResponse;
287
+ if (http_utils_1.isJsObject(this._body)) {
288
+ jsonResponse = this._body;
289
+ } else if (lang_1.isString(this._body)) {
290
+ jsonResponse = lang_1.Json.parse(this._body);
291
+ }
292
+ return jsonResponse;
293
+ };
294
+ Response.prototype.text = function() {
295
+ return this._body.toString();
296
+ };
297
+ Response.prototype.arrayBuffer = function() {
298
+ throw new exceptions_1.BaseException('"arrayBuffer()" method not implemented on Response superclass');
299
+ };
300
+ return Response;
301
+ })();
302
+ exports.Response = Response;
303
+ global.define = __define;
304
+ return module.exports;
305
+ });
306
+
307
+ System.register("angular2/src/http/base_response_options", ["angular2/core", "angular2/src/facade/lang", "angular2/src/http/headers", "angular2/src/http/enums"], true, function(require, exports, module) {
308
+ var global = System.global,
309
+ __define = global.define;
310
+ global.define = undefined;
311
+ var __extends = (this && this.__extends) || function(d, b) {
312
+ for (var p in b)
313
+ if (b.hasOwnProperty(p))
314
+ d[p] = b[p];
315
+ function __() {
316
+ this.constructor = d;
317
+ }
318
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
319
+ };
320
+ var __decorate = (this && this.__decorate) || function(decorators, target, key, desc) {
321
+ var c = arguments.length,
322
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
323
+ d;
324
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
325
+ r = Reflect.decorate(decorators, target, key, desc);
326
+ else
327
+ for (var i = decorators.length - 1; i >= 0; i--)
328
+ if (d = decorators[i])
329
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
330
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
331
+ };
332
+ var __metadata = (this && this.__metadata) || function(k, v) {
333
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
334
+ return Reflect.metadata(k, v);
335
+ };
336
+ var core_1 = require("angular2/core");
337
+ var lang_1 = require("angular2/src/facade/lang");
338
+ var headers_1 = require("angular2/src/http/headers");
339
+ var enums_1 = require("angular2/src/http/enums");
340
+ var ResponseOptions = (function() {
341
+ function ResponseOptions(_a) {
342
+ var _b = _a === void 0 ? {} : _a,
343
+ body = _b.body,
344
+ status = _b.status,
345
+ headers = _b.headers,
346
+ statusText = _b.statusText,
347
+ type = _b.type,
348
+ url = _b.url;
349
+ this.body = lang_1.isPresent(body) ? body : null;
350
+ this.status = lang_1.isPresent(status) ? status : null;
351
+ this.headers = lang_1.isPresent(headers) ? headers : null;
352
+ this.statusText = lang_1.isPresent(statusText) ? statusText : null;
353
+ this.type = lang_1.isPresent(type) ? type : null;
354
+ this.url = lang_1.isPresent(url) ? url : null;
355
+ }
356
+ ResponseOptions.prototype.merge = function(options) {
357
+ return new ResponseOptions({
358
+ body: lang_1.isPresent(options) && lang_1.isPresent(options.body) ? options.body : this.body,
359
+ status: lang_1.isPresent(options) && lang_1.isPresent(options.status) ? options.status : this.status,
360
+ headers: lang_1.isPresent(options) && lang_1.isPresent(options.headers) ? options.headers : this.headers,
361
+ statusText: lang_1.isPresent(options) && lang_1.isPresent(options.statusText) ? options.statusText : this.statusText,
362
+ type: lang_1.isPresent(options) && lang_1.isPresent(options.type) ? options.type : this.type,
363
+ url: lang_1.isPresent(options) && lang_1.isPresent(options.url) ? options.url : this.url
364
+ });
365
+ };
366
+ return ResponseOptions;
367
+ })();
368
+ exports.ResponseOptions = ResponseOptions;
369
+ var BaseResponseOptions = (function(_super) {
370
+ __extends(BaseResponseOptions, _super);
371
+ function BaseResponseOptions() {
372
+ _super.call(this, {
373
+ status: 200,
374
+ statusText: 'Ok',
375
+ type: enums_1.ResponseType.Default,
376
+ headers: new headers_1.Headers()
377
+ });
378
+ }
379
+ BaseResponseOptions = __decorate([core_1.Injectable(), __metadata('design:paramtypes', [])], BaseResponseOptions);
380
+ return BaseResponseOptions;
381
+ })(ResponseOptions);
382
+ exports.BaseResponseOptions = BaseResponseOptions;
383
+ global.define = __define;
384
+ return module.exports;
385
+ });
386
+
387
+ System.register("angular2/src/http/backends/browser_xhr", ["angular2/core"], true, function(require, exports, module) {
388
+ var global = System.global,
389
+ __define = global.define;
390
+ global.define = undefined;
391
+ var __decorate = (this && this.__decorate) || function(decorators, target, key, desc) {
392
+ var c = arguments.length,
393
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
394
+ d;
395
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
396
+ r = Reflect.decorate(decorators, target, key, desc);
397
+ else
398
+ for (var i = decorators.length - 1; i >= 0; i--)
399
+ if (d = decorators[i])
400
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
401
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
402
+ };
403
+ var __metadata = (this && this.__metadata) || function(k, v) {
404
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
405
+ return Reflect.metadata(k, v);
406
+ };
407
+ var core_1 = require("angular2/core");
408
+ var BrowserXhr = (function() {
409
+ function BrowserXhr() {}
410
+ BrowserXhr.prototype.build = function() {
411
+ return (new XMLHttpRequest());
412
+ };
413
+ BrowserXhr = __decorate([core_1.Injectable(), __metadata('design:paramtypes', [])], BrowserXhr);
414
+ return BrowserXhr;
415
+ })();
416
+ exports.BrowserXhr = BrowserXhr;
417
+ global.define = __define;
418
+ return module.exports;
419
+ });
420
+
421
+ System.register("angular2/src/http/backends/browser_jsonp", ["angular2/core", "angular2/src/facade/lang"], true, function(require, exports, module) {
422
+ var global = System.global,
423
+ __define = global.define;
424
+ global.define = undefined;
425
+ var __decorate = (this && this.__decorate) || function(decorators, target, key, desc) {
426
+ var c = arguments.length,
427
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
428
+ d;
429
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
430
+ r = Reflect.decorate(decorators, target, key, desc);
431
+ else
432
+ for (var i = decorators.length - 1; i >= 0; i--)
433
+ if (d = decorators[i])
434
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
435
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
436
+ };
437
+ var __metadata = (this && this.__metadata) || function(k, v) {
438
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
439
+ return Reflect.metadata(k, v);
440
+ };
441
+ var core_1 = require("angular2/core");
442
+ var lang_1 = require("angular2/src/facade/lang");
443
+ var _nextRequestId = 0;
444
+ exports.JSONP_HOME = '__ng_jsonp__';
445
+ var _jsonpConnections = null;
446
+ function _getJsonpConnections() {
447
+ if (_jsonpConnections === null) {
448
+ _jsonpConnections = lang_1.global[exports.JSONP_HOME] = {};
449
+ }
450
+ return _jsonpConnections;
451
+ }
452
+ var BrowserJsonp = (function() {
453
+ function BrowserJsonp() {}
454
+ BrowserJsonp.prototype.build = function(url) {
455
+ var node = document.createElement('script');
456
+ node.src = url;
457
+ return node;
458
+ };
459
+ BrowserJsonp.prototype.nextRequestID = function() {
460
+ return "__req" + _nextRequestId++;
461
+ };
462
+ BrowserJsonp.prototype.requestCallback = function(id) {
463
+ return exports.JSONP_HOME + "." + id + ".finished";
464
+ };
465
+ BrowserJsonp.prototype.exposeConnection = function(id, connection) {
466
+ var connections = _getJsonpConnections();
467
+ connections[id] = connection;
468
+ };
469
+ BrowserJsonp.prototype.removeConnection = function(id) {
470
+ var connections = _getJsonpConnections();
471
+ connections[id] = null;
472
+ };
473
+ BrowserJsonp.prototype.send = function(node) {
474
+ document.body.appendChild((node));
475
+ };
476
+ BrowserJsonp.prototype.cleanup = function(node) {
477
+ if (node.parentNode) {
478
+ node.parentNode.removeChild((node));
479
+ }
480
+ };
481
+ BrowserJsonp = __decorate([core_1.Injectable(), __metadata('design:paramtypes', [])], BrowserJsonp);
482
+ return BrowserJsonp;
483
+ })();
484
+ exports.BrowserJsonp = BrowserJsonp;
485
+ global.define = __define;
486
+ return module.exports;
487
+ });
488
+
489
+ System.register("angular2/src/http/http_utils", ["angular2/src/facade/lang", "angular2/src/http/enums", "angular2/src/facade/exceptions", "angular2/src/facade/lang"], true, function(require, exports, module) {
490
+ var global = System.global,
491
+ __define = global.define;
492
+ global.define = undefined;
493
+ var lang_1 = require("angular2/src/facade/lang");
494
+ var enums_1 = require("angular2/src/http/enums");
495
+ var exceptions_1 = require("angular2/src/facade/exceptions");
496
+ function normalizeMethodName(method) {
497
+ if (lang_1.isString(method)) {
498
+ var originalMethod = method;
499
+ method = method.replace(/(\w)(\w*)/g, function(g0, g1, g2) {
500
+ return g1.toUpperCase() + g2.toLowerCase();
501
+ });
502
+ method = enums_1.RequestMethod[method];
503
+ if (typeof method !== 'number')
504
+ throw exceptions_1.makeTypeError("Invalid request method. The method \"" + originalMethod + "\" is not supported.");
505
+ }
506
+ return method;
507
+ }
508
+ exports.normalizeMethodName = normalizeMethodName;
509
+ exports.isSuccess = function(status) {
510
+ return (status >= 200 && status < 300);
511
+ };
512
+ function getResponseURL(xhr) {
513
+ if ('responseURL' in xhr) {
514
+ return xhr.responseURL;
515
+ }
516
+ if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
517
+ return xhr.getResponseHeader('X-Request-URL');
518
+ }
519
+ return ;
520
+ }
521
+ exports.getResponseURL = getResponseURL;
522
+ var lang_2 = require("angular2/src/facade/lang");
523
+ exports.isJsObject = lang_2.isJsObject;
524
+ global.define = __define;
525
+ return module.exports;
526
+ });
527
+
528
+ System.register("angular2/src/http/base_request_options", ["angular2/src/facade/lang", "angular2/src/http/headers", "angular2/src/http/enums", "angular2/core", "angular2/src/http/url_search_params", "angular2/src/http/http_utils"], true, function(require, exports, module) {
529
+ var global = System.global,
530
+ __define = global.define;
531
+ global.define = undefined;
532
+ var __extends = (this && this.__extends) || function(d, b) {
533
+ for (var p in b)
534
+ if (b.hasOwnProperty(p))
535
+ d[p] = b[p];
536
+ function __() {
537
+ this.constructor = d;
538
+ }
539
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
540
+ };
541
+ var __decorate = (this && this.__decorate) || function(decorators, target, key, desc) {
542
+ var c = arguments.length,
543
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
544
+ d;
545
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
546
+ r = Reflect.decorate(decorators, target, key, desc);
547
+ else
548
+ for (var i = decorators.length - 1; i >= 0; i--)
549
+ if (d = decorators[i])
550
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
551
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
552
+ };
553
+ var __metadata = (this && this.__metadata) || function(k, v) {
554
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
555
+ return Reflect.metadata(k, v);
556
+ };
557
+ var lang_1 = require("angular2/src/facade/lang");
558
+ var headers_1 = require("angular2/src/http/headers");
559
+ var enums_1 = require("angular2/src/http/enums");
560
+ var core_1 = require("angular2/core");
561
+ var url_search_params_1 = require("angular2/src/http/url_search_params");
562
+ var http_utils_1 = require("angular2/src/http/http_utils");
563
+ var RequestOptions = (function() {
564
+ function RequestOptions(_a) {
565
+ var _b = _a === void 0 ? {} : _a,
566
+ method = _b.method,
567
+ headers = _b.headers,
568
+ body = _b.body,
569
+ url = _b.url,
570
+ search = _b.search;
571
+ this.method = lang_1.isPresent(method) ? http_utils_1.normalizeMethodName(method) : null;
572
+ this.headers = lang_1.isPresent(headers) ? headers : null;
573
+ this.body = lang_1.isPresent(body) ? body : null;
574
+ this.url = lang_1.isPresent(url) ? url : null;
575
+ this.search = lang_1.isPresent(search) ? (lang_1.isString(search) ? new url_search_params_1.URLSearchParams((search)) : (search)) : null;
576
+ }
577
+ RequestOptions.prototype.merge = function(options) {
578
+ return new RequestOptions({
579
+ method: lang_1.isPresent(options) && lang_1.isPresent(options.method) ? options.method : this.method,
580
+ headers: lang_1.isPresent(options) && lang_1.isPresent(options.headers) ? options.headers : this.headers,
581
+ body: lang_1.isPresent(options) && lang_1.isPresent(options.body) ? options.body : this.body,
582
+ url: lang_1.isPresent(options) && lang_1.isPresent(options.url) ? options.url : this.url,
583
+ search: lang_1.isPresent(options) && lang_1.isPresent(options.search) ? (lang_1.isString(options.search) ? new url_search_params_1.URLSearchParams((options.search)) : (options.search).clone()) : this.search
584
+ });
585
+ };
586
+ return RequestOptions;
587
+ })();
588
+ exports.RequestOptions = RequestOptions;
589
+ var BaseRequestOptions = (function(_super) {
590
+ __extends(BaseRequestOptions, _super);
591
+ function BaseRequestOptions() {
592
+ _super.call(this, {
593
+ method: enums_1.RequestMethod.Get,
594
+ headers: new headers_1.Headers()
595
+ });
596
+ }
597
+ BaseRequestOptions = __decorate([core_1.Injectable(), __metadata('design:paramtypes', [])], BaseRequestOptions);
598
+ return BaseRequestOptions;
599
+ })(RequestOptions);
600
+ exports.BaseRequestOptions = BaseRequestOptions;
601
+ global.define = __define;
602
+ return module.exports;
603
+ });
604
+
605
+ System.register("angular2/src/http/backends/xhr_backend", ["angular2/src/http/enums", "angular2/src/http/static_response", "angular2/src/http/headers", "angular2/src/http/base_response_options", "angular2/core", "angular2/src/http/backends/browser_xhr", "angular2/src/facade/lang", "rxjs/Observable", "angular2/src/http/http_utils"], true, function(require, exports, module) {
606
+ var global = System.global,
607
+ __define = global.define;
608
+ global.define = undefined;
609
+ var __decorate = (this && this.__decorate) || function(decorators, target, key, desc) {
610
+ var c = arguments.length,
611
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
612
+ d;
613
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
614
+ r = Reflect.decorate(decorators, target, key, desc);
615
+ else
616
+ for (var i = decorators.length - 1; i >= 0; i--)
617
+ if (d = decorators[i])
618
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
619
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
620
+ };
621
+ var __metadata = (this && this.__metadata) || function(k, v) {
622
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
623
+ return Reflect.metadata(k, v);
624
+ };
625
+ var enums_1 = require("angular2/src/http/enums");
626
+ var static_response_1 = require("angular2/src/http/static_response");
627
+ var headers_1 = require("angular2/src/http/headers");
628
+ var base_response_options_1 = require("angular2/src/http/base_response_options");
629
+ var core_1 = require("angular2/core");
630
+ var browser_xhr_1 = require("angular2/src/http/backends/browser_xhr");
631
+ var lang_1 = require("angular2/src/facade/lang");
632
+ var Observable_1 = require("rxjs/Observable");
633
+ var http_utils_1 = require("angular2/src/http/http_utils");
634
+ var XHRConnection = (function() {
635
+ function XHRConnection(req, browserXHR, baseResponseOptions) {
636
+ var _this = this;
637
+ this.request = req;
638
+ this.response = new Observable_1.Observable(function(responseObserver) {
639
+ var _xhr = browserXHR.build();
640
+ _xhr.open(enums_1.RequestMethod[req.method].toUpperCase(), req.url);
641
+ var onLoad = function() {
642
+ var body = lang_1.isPresent(_xhr.response) ? _xhr.response : _xhr.responseText;
643
+ var headers = headers_1.Headers.fromResponseHeaderString(_xhr.getAllResponseHeaders());
644
+ var url = http_utils_1.getResponseURL(_xhr);
645
+ var status = _xhr.status === 1223 ? 204 : _xhr.status;
646
+ if (status === 0) {
647
+ status = body ? 200 : 0;
648
+ }
649
+ var responseOptions = new base_response_options_1.ResponseOptions({
650
+ body: body,
651
+ status: status,
652
+ headers: headers,
653
+ url: url
654
+ });
655
+ if (lang_1.isPresent(baseResponseOptions)) {
656
+ responseOptions = baseResponseOptions.merge(responseOptions);
657
+ }
658
+ var response = new static_response_1.Response(responseOptions);
659
+ if (http_utils_1.isSuccess(status)) {
660
+ responseObserver.next(response);
661
+ responseObserver.complete();
662
+ return ;
663
+ }
664
+ responseObserver.error(response);
665
+ };
666
+ var onError = function(err) {
667
+ var responseOptions = new base_response_options_1.ResponseOptions({
668
+ body: err,
669
+ type: enums_1.ResponseType.Error
670
+ });
671
+ if (lang_1.isPresent(baseResponseOptions)) {
672
+ responseOptions = baseResponseOptions.merge(responseOptions);
673
+ }
674
+ responseObserver.error(new static_response_1.Response(responseOptions));
675
+ };
676
+ if (lang_1.isPresent(req.headers)) {
677
+ req.headers.forEach(function(values, name) {
678
+ return _xhr.setRequestHeader(name, values.join(','));
679
+ });
680
+ }
681
+ _xhr.addEventListener('load', onLoad);
682
+ _xhr.addEventListener('error', onError);
683
+ _xhr.send(_this.request.text());
684
+ return function() {
685
+ _xhr.removeEventListener('load', onLoad);
686
+ _xhr.removeEventListener('error', onError);
687
+ _xhr.abort();
688
+ };
689
+ });
690
+ }
691
+ return XHRConnection;
692
+ })();
693
+ exports.XHRConnection = XHRConnection;
694
+ var XHRBackend = (function() {
695
+ function XHRBackend(_browserXHR, _baseResponseOptions) {
696
+ this._browserXHR = _browserXHR;
697
+ this._baseResponseOptions = _baseResponseOptions;
698
+ }
699
+ XHRBackend.prototype.createConnection = function(request) {
700
+ return new XHRConnection(request, this._browserXHR, this._baseResponseOptions);
701
+ };
702
+ XHRBackend = __decorate([core_1.Injectable(), __metadata('design:paramtypes', [browser_xhr_1.BrowserXhr, base_response_options_1.ResponseOptions])], XHRBackend);
703
+ return XHRBackend;
704
+ })();
705
+ exports.XHRBackend = XHRBackend;
706
+ global.define = __define;
707
+ return module.exports;
708
+ });
709
+
710
+ System.register("angular2/src/http/backends/jsonp_backend", ["angular2/src/http/interfaces", "angular2/src/http/enums", "angular2/src/http/static_response", "angular2/src/http/base_response_options", "angular2/core", "angular2/src/http/backends/browser_jsonp", "angular2/src/facade/exceptions", "angular2/src/facade/lang", "rxjs/Observable"], true, function(require, exports, module) {
711
+ var global = System.global,
712
+ __define = global.define;
713
+ global.define = undefined;
714
+ var __extends = (this && this.__extends) || function(d, b) {
715
+ for (var p in b)
716
+ if (b.hasOwnProperty(p))
717
+ d[p] = b[p];
718
+ function __() {
719
+ this.constructor = d;
720
+ }
721
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
722
+ };
723
+ var __decorate = (this && this.__decorate) || function(decorators, target, key, desc) {
724
+ var c = arguments.length,
725
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
726
+ d;
727
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
728
+ r = Reflect.decorate(decorators, target, key, desc);
729
+ else
730
+ for (var i = decorators.length - 1; i >= 0; i--)
731
+ if (d = decorators[i])
732
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
733
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
734
+ };
735
+ var __metadata = (this && this.__metadata) || function(k, v) {
736
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
737
+ return Reflect.metadata(k, v);
738
+ };
739
+ var interfaces_1 = require("angular2/src/http/interfaces");
740
+ var enums_1 = require("angular2/src/http/enums");
741
+ var static_response_1 = require("angular2/src/http/static_response");
742
+ var base_response_options_1 = require("angular2/src/http/base_response_options");
743
+ var core_1 = require("angular2/core");
744
+ var browser_jsonp_1 = require("angular2/src/http/backends/browser_jsonp");
745
+ var exceptions_1 = require("angular2/src/facade/exceptions");
746
+ var lang_1 = require("angular2/src/facade/lang");
747
+ var Observable_1 = require("rxjs/Observable");
748
+ var JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';
749
+ var JSONP_ERR_WRONG_METHOD = 'JSONP requests must use GET request method.';
750
+ var JSONPConnection = (function() {
751
+ function JSONPConnection() {}
752
+ return JSONPConnection;
753
+ })();
754
+ exports.JSONPConnection = JSONPConnection;
755
+ var JSONPConnection_ = (function(_super) {
756
+ __extends(JSONPConnection_, _super);
757
+ function JSONPConnection_(req, _dom, baseResponseOptions) {
758
+ var _this = this;
759
+ _super.call(this);
760
+ this._dom = _dom;
761
+ this.baseResponseOptions = baseResponseOptions;
762
+ this._finished = false;
763
+ if (req.method !== enums_1.RequestMethod.Get) {
764
+ throw exceptions_1.makeTypeError(JSONP_ERR_WRONG_METHOD);
765
+ }
766
+ this.request = req;
767
+ this.response = new Observable_1.Observable(function(responseObserver) {
768
+ _this.readyState = enums_1.ReadyState.Loading;
769
+ var id = _this._id = _dom.nextRequestID();
770
+ _dom.exposeConnection(id, _this);
771
+ var callback = _dom.requestCallback(_this._id);
772
+ var url = req.url;
773
+ if (url.indexOf('=JSONP_CALLBACK&') > -1) {
774
+ url = lang_1.StringWrapper.replace(url, '=JSONP_CALLBACK&', "=" + callback + "&");
775
+ } else if (url.lastIndexOf('=JSONP_CALLBACK') === url.length - '=JSONP_CALLBACK'.length) {
776
+ url = url.substring(0, url.length - '=JSONP_CALLBACK'.length) + ("=" + callback);
777
+ }
778
+ var script = _this._script = _dom.build(url);
779
+ var onLoad = function(event) {
780
+ if (_this.readyState === enums_1.ReadyState.Cancelled)
781
+ return ;
782
+ _this.readyState = enums_1.ReadyState.Done;
783
+ _dom.cleanup(script);
784
+ if (!_this._finished) {
785
+ var responseOptions_1 = new base_response_options_1.ResponseOptions({
786
+ body: JSONP_ERR_NO_CALLBACK,
787
+ type: enums_1.ResponseType.Error,
788
+ url: url
789
+ });
790
+ if (lang_1.isPresent(baseResponseOptions)) {
791
+ responseOptions_1 = baseResponseOptions.merge(responseOptions_1);
792
+ }
793
+ responseObserver.error(new static_response_1.Response(responseOptions_1));
794
+ return ;
795
+ }
796
+ var responseOptions = new base_response_options_1.ResponseOptions({
797
+ body: _this._responseData,
798
+ url: url
799
+ });
800
+ if (lang_1.isPresent(_this.baseResponseOptions)) {
801
+ responseOptions = _this.baseResponseOptions.merge(responseOptions);
802
+ }
803
+ responseObserver.next(new static_response_1.Response(responseOptions));
804
+ responseObserver.complete();
805
+ };
806
+ var onError = function(error) {
807
+ if (_this.readyState === enums_1.ReadyState.Cancelled)
808
+ return ;
809
+ _this.readyState = enums_1.ReadyState.Done;
810
+ _dom.cleanup(script);
811
+ var responseOptions = new base_response_options_1.ResponseOptions({
812
+ body: error.message,
813
+ type: enums_1.ResponseType.Error
814
+ });
815
+ if (lang_1.isPresent(baseResponseOptions)) {
816
+ responseOptions = baseResponseOptions.merge(responseOptions);
817
+ }
818
+ responseObserver.error(new static_response_1.Response(responseOptions));
819
+ };
820
+ script.addEventListener('load', onLoad);
821
+ script.addEventListener('error', onError);
822
+ _dom.send(script);
823
+ return function() {
824
+ _this.readyState = enums_1.ReadyState.Cancelled;
825
+ script.removeEventListener('load', onLoad);
826
+ script.removeEventListener('error', onError);
827
+ if (lang_1.isPresent(script)) {
828
+ _this._dom.cleanup(script);
829
+ }
830
+ };
831
+ });
832
+ }
833
+ JSONPConnection_.prototype.finished = function(data) {
834
+ this._finished = true;
835
+ this._dom.removeConnection(this._id);
836
+ if (this.readyState === enums_1.ReadyState.Cancelled)
837
+ return ;
838
+ this._responseData = data;
839
+ };
840
+ return JSONPConnection_;
841
+ })(JSONPConnection);
842
+ exports.JSONPConnection_ = JSONPConnection_;
843
+ var JSONPBackend = (function(_super) {
844
+ __extends(JSONPBackend, _super);
845
+ function JSONPBackend() {
846
+ _super.apply(this, arguments);
847
+ }
848
+ return JSONPBackend;
849
+ })(interfaces_1.ConnectionBackend);
850
+ exports.JSONPBackend = JSONPBackend;
851
+ var JSONPBackend_ = (function(_super) {
852
+ __extends(JSONPBackend_, _super);
853
+ function JSONPBackend_(_browserJSONP, _baseResponseOptions) {
854
+ _super.call(this);
855
+ this._browserJSONP = _browserJSONP;
856
+ this._baseResponseOptions = _baseResponseOptions;
857
+ }
858
+ JSONPBackend_.prototype.createConnection = function(request) {
859
+ return new JSONPConnection_(request, this._browserJSONP, this._baseResponseOptions);
860
+ };
861
+ JSONPBackend_ = __decorate([core_1.Injectable(), __metadata('design:paramtypes', [browser_jsonp_1.BrowserJsonp, base_response_options_1.ResponseOptions])], JSONPBackend_);
862
+ return JSONPBackend_;
863
+ })(JSONPBackend);
864
+ exports.JSONPBackend_ = JSONPBackend_;
865
+ global.define = __define;
866
+ return module.exports;
867
+ });
868
+
869
+ System.register("angular2/src/http/static_request", ["angular2/src/http/headers", "angular2/src/http/http_utils", "angular2/src/facade/lang"], true, function(require, exports, module) {
870
+ var global = System.global,
871
+ __define = global.define;
872
+ global.define = undefined;
873
+ var headers_1 = require("angular2/src/http/headers");
874
+ var http_utils_1 = require("angular2/src/http/http_utils");
875
+ var lang_1 = require("angular2/src/facade/lang");
876
+ var Request = (function() {
877
+ function Request(requestOptions) {
878
+ var url = requestOptions.url;
879
+ this.url = requestOptions.url;
880
+ if (lang_1.isPresent(requestOptions.search)) {
881
+ var search = requestOptions.search.toString();
882
+ if (search.length > 0) {
883
+ var prefix = '?';
884
+ if (lang_1.StringWrapper.contains(this.url, '?')) {
885
+ prefix = (this.url[this.url.length - 1] == '&') ? '' : '&';
886
+ }
887
+ this.url = url + prefix + search;
888
+ }
889
+ }
890
+ this._body = requestOptions.body;
891
+ this.method = http_utils_1.normalizeMethodName(requestOptions.method);
892
+ this.headers = new headers_1.Headers(requestOptions.headers);
893
+ }
894
+ Request.prototype.text = function() {
895
+ return lang_1.isPresent(this._body) ? this._body.toString() : '';
896
+ };
897
+ return Request;
898
+ })();
899
+ exports.Request = Request;
900
+ global.define = __define;
901
+ return module.exports;
902
+ });
903
+
904
+ System.register("angular2/src/http/http", ["angular2/src/facade/lang", "angular2/src/facade/exceptions", "angular2/core", "angular2/src/http/interfaces", "angular2/src/http/static_request", "angular2/src/http/base_request_options", "angular2/src/http/enums"], true, function(require, exports, module) {
905
+ var global = System.global,
906
+ __define = global.define;
907
+ global.define = undefined;
908
+ var __extends = (this && this.__extends) || function(d, b) {
909
+ for (var p in b)
910
+ if (b.hasOwnProperty(p))
911
+ d[p] = b[p];
912
+ function __() {
913
+ this.constructor = d;
914
+ }
915
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
916
+ };
917
+ var __decorate = (this && this.__decorate) || function(decorators, target, key, desc) {
918
+ var c = arguments.length,
919
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
920
+ d;
921
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
922
+ r = Reflect.decorate(decorators, target, key, desc);
923
+ else
924
+ for (var i = decorators.length - 1; i >= 0; i--)
925
+ if (d = decorators[i])
926
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
927
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
928
+ };
929
+ var __metadata = (this && this.__metadata) || function(k, v) {
930
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
931
+ return Reflect.metadata(k, v);
932
+ };
933
+ var lang_1 = require("angular2/src/facade/lang");
934
+ var exceptions_1 = require("angular2/src/facade/exceptions");
935
+ var core_1 = require("angular2/core");
936
+ var interfaces_1 = require("angular2/src/http/interfaces");
937
+ var static_request_1 = require("angular2/src/http/static_request");
938
+ var base_request_options_1 = require("angular2/src/http/base_request_options");
939
+ var enums_1 = require("angular2/src/http/enums");
940
+ function httpRequest(backend, request) {
941
+ return backend.createConnection(request).response;
942
+ }
943
+ function mergeOptions(defaultOpts, providedOpts, method, url) {
944
+ var newOptions = defaultOpts;
945
+ if (lang_1.isPresent(providedOpts)) {
946
+ return newOptions.merge(new base_request_options_1.RequestOptions({
947
+ method: providedOpts.method || method,
948
+ url: providedOpts.url || url,
949
+ search: providedOpts.search,
950
+ headers: providedOpts.headers,
951
+ body: providedOpts.body
952
+ }));
953
+ }
954
+ if (lang_1.isPresent(method)) {
955
+ return newOptions.merge(new base_request_options_1.RequestOptions({
956
+ method: method,
957
+ url: url
958
+ }));
959
+ } else {
960
+ return newOptions.merge(new base_request_options_1.RequestOptions({url: url}));
961
+ }
962
+ }
963
+ var Http = (function() {
964
+ function Http(_backend, _defaultOptions) {
965
+ this._backend = _backend;
966
+ this._defaultOptions = _defaultOptions;
967
+ }
968
+ Http.prototype.request = function(url, options) {
969
+ var responseObservable;
970
+ if (lang_1.isString(url)) {
971
+ responseObservable = httpRequest(this._backend, new static_request_1.Request(mergeOptions(this._defaultOptions, options, enums_1.RequestMethod.Get, url)));
972
+ } else if (url instanceof static_request_1.Request) {
973
+ responseObservable = httpRequest(this._backend, url);
974
+ } else {
975
+ throw exceptions_1.makeTypeError('First argument must be a url string or Request instance.');
976
+ }
977
+ return responseObservable;
978
+ };
979
+ Http.prototype.get = function(url, options) {
980
+ return httpRequest(this._backend, new static_request_1.Request(mergeOptions(this._defaultOptions, options, enums_1.RequestMethod.Get, url)));
981
+ };
982
+ Http.prototype.post = function(url, body, options) {
983
+ return httpRequest(this._backend, new static_request_1.Request(mergeOptions(this._defaultOptions.merge(new base_request_options_1.RequestOptions({body: body})), options, enums_1.RequestMethod.Post, url)));
984
+ };
985
+ Http.prototype.put = function(url, body, options) {
986
+ return httpRequest(this._backend, new static_request_1.Request(mergeOptions(this._defaultOptions.merge(new base_request_options_1.RequestOptions({body: body})), options, enums_1.RequestMethod.Put, url)));
987
+ };
988
+ Http.prototype.delete = function(url, options) {
989
+ return httpRequest(this._backend, new static_request_1.Request(mergeOptions(this._defaultOptions, options, enums_1.RequestMethod.Delete, url)));
990
+ };
991
+ Http.prototype.patch = function(url, body, options) {
992
+ return httpRequest(this._backend, new static_request_1.Request(mergeOptions(this._defaultOptions.merge(new base_request_options_1.RequestOptions({body: body})), options, enums_1.RequestMethod.Patch, url)));
993
+ };
994
+ Http.prototype.head = function(url, options) {
995
+ return httpRequest(this._backend, new static_request_1.Request(mergeOptions(this._defaultOptions, options, enums_1.RequestMethod.Head, url)));
996
+ };
997
+ Http = __decorate([core_1.Injectable(), __metadata('design:paramtypes', [interfaces_1.ConnectionBackend, base_request_options_1.RequestOptions])], Http);
998
+ return Http;
999
+ })();
1000
+ exports.Http = Http;
1001
+ var Jsonp = (function(_super) {
1002
+ __extends(Jsonp, _super);
1003
+ function Jsonp(backend, defaultOptions) {
1004
+ _super.call(this, backend, defaultOptions);
1005
+ }
1006
+ Jsonp.prototype.request = function(url, options) {
1007
+ var responseObservable;
1008
+ if (lang_1.isString(url)) {
1009
+ url = new static_request_1.Request(mergeOptions(this._defaultOptions, options, enums_1.RequestMethod.Get, url));
1010
+ }
1011
+ if (url instanceof static_request_1.Request) {
1012
+ if (url.method !== enums_1.RequestMethod.Get) {
1013
+ exceptions_1.makeTypeError('JSONP requests must use GET request method.');
1014
+ }
1015
+ responseObservable = httpRequest(this._backend, url);
1016
+ } else {
1017
+ throw exceptions_1.makeTypeError('First argument must be a url string or Request instance.');
1018
+ }
1019
+ return responseObservable;
1020
+ };
1021
+ Jsonp = __decorate([core_1.Injectable(), __metadata('design:paramtypes', [interfaces_1.ConnectionBackend, base_request_options_1.RequestOptions])], Jsonp);
1022
+ return Jsonp;
1023
+ })(Http);
1024
+ exports.Jsonp = Jsonp;
1025
+ global.define = __define;
1026
+ return module.exports;
1027
+ });
1028
+
1029
+ System.register("angular2/http", ["angular2/core", "angular2/src/http/http", "angular2/src/http/backends/xhr_backend", "angular2/src/http/backends/jsonp_backend", "angular2/src/http/backends/browser_xhr", "angular2/src/http/backends/browser_jsonp", "angular2/src/http/base_request_options", "angular2/src/http/base_response_options", "angular2/src/http/static_request", "angular2/src/http/static_response", "angular2/src/http/interfaces", "angular2/src/http/backends/browser_xhr", "angular2/src/http/base_request_options", "angular2/src/http/base_response_options", "angular2/src/http/backends/xhr_backend", "angular2/src/http/backends/jsonp_backend", "angular2/src/http/http", "angular2/src/http/headers", "angular2/src/http/enums", "angular2/src/http/url_search_params"], true, function(require, exports, module) {
1030
+ var global = System.global,
1031
+ __define = global.define;
1032
+ global.define = undefined;
1033
+ var core_1 = require("angular2/core");
1034
+ var http_1 = require("angular2/src/http/http");
1035
+ var xhr_backend_1 = require("angular2/src/http/backends/xhr_backend");
1036
+ var jsonp_backend_1 = require("angular2/src/http/backends/jsonp_backend");
1037
+ var browser_xhr_1 = require("angular2/src/http/backends/browser_xhr");
1038
+ var browser_jsonp_1 = require("angular2/src/http/backends/browser_jsonp");
1039
+ var base_request_options_1 = require("angular2/src/http/base_request_options");
1040
+ var base_response_options_1 = require("angular2/src/http/base_response_options");
1041
+ var static_request_1 = require("angular2/src/http/static_request");
1042
+ exports.Request = static_request_1.Request;
1043
+ var static_response_1 = require("angular2/src/http/static_response");
1044
+ exports.Response = static_response_1.Response;
1045
+ var interfaces_1 = require("angular2/src/http/interfaces");
1046
+ exports.Connection = interfaces_1.Connection;
1047
+ exports.ConnectionBackend = interfaces_1.ConnectionBackend;
1048
+ var browser_xhr_2 = require("angular2/src/http/backends/browser_xhr");
1049
+ exports.BrowserXhr = browser_xhr_2.BrowserXhr;
1050
+ var base_request_options_2 = require("angular2/src/http/base_request_options");
1051
+ exports.BaseRequestOptions = base_request_options_2.BaseRequestOptions;
1052
+ exports.RequestOptions = base_request_options_2.RequestOptions;
1053
+ var base_response_options_2 = require("angular2/src/http/base_response_options");
1054
+ exports.BaseResponseOptions = base_response_options_2.BaseResponseOptions;
1055
+ exports.ResponseOptions = base_response_options_2.ResponseOptions;
1056
+ var xhr_backend_2 = require("angular2/src/http/backends/xhr_backend");
1057
+ exports.XHRBackend = xhr_backend_2.XHRBackend;
1058
+ exports.XHRConnection = xhr_backend_2.XHRConnection;
1059
+ var jsonp_backend_2 = require("angular2/src/http/backends/jsonp_backend");
1060
+ exports.JSONPBackend = jsonp_backend_2.JSONPBackend;
1061
+ exports.JSONPConnection = jsonp_backend_2.JSONPConnection;
1062
+ var http_2 = require("angular2/src/http/http");
1063
+ exports.Http = http_2.Http;
1064
+ exports.Jsonp = http_2.Jsonp;
1065
+ var headers_1 = require("angular2/src/http/headers");
1066
+ exports.Headers = headers_1.Headers;
1067
+ var enums_1 = require("angular2/src/http/enums");
1068
+ exports.ResponseType = enums_1.ResponseType;
1069
+ exports.ReadyState = enums_1.ReadyState;
1070
+ exports.RequestMethod = enums_1.RequestMethod;
1071
+ var url_search_params_1 = require("angular2/src/http/url_search_params");
1072
+ exports.URLSearchParams = url_search_params_1.URLSearchParams;
1073
+ exports.HTTP_PROVIDERS = [core_1.provide(http_1.Http, {
1074
+ useFactory: function(xhrBackend, requestOptions) {
1075
+ return new http_1.Http(xhrBackend, requestOptions);
1076
+ },
1077
+ deps: [xhr_backend_1.XHRBackend, base_request_options_1.RequestOptions]
1078
+ }), browser_xhr_1.BrowserXhr, core_1.provide(base_request_options_1.RequestOptions, {useClass: base_request_options_1.BaseRequestOptions}), core_1.provide(base_response_options_1.ResponseOptions, {useClass: base_response_options_1.BaseResponseOptions}), xhr_backend_1.XHRBackend];
1079
+ exports.HTTP_BINDINGS = exports.HTTP_PROVIDERS;
1080
+ exports.JSONP_PROVIDERS = [core_1.provide(http_1.Jsonp, {
1081
+ useFactory: function(jsonpBackend, requestOptions) {
1082
+ return new http_1.Jsonp(jsonpBackend, requestOptions);
1083
+ },
1084
+ deps: [jsonp_backend_1.JSONPBackend, base_request_options_1.RequestOptions]
1085
+ }), browser_jsonp_1.BrowserJsonp, core_1.provide(base_request_options_1.RequestOptions, {useClass: base_request_options_1.BaseRequestOptions}), core_1.provide(base_response_options_1.ResponseOptions, {useClass: base_response_options_1.BaseResponseOptions}), core_1.provide(jsonp_backend_1.JSONPBackend, {useClass: jsonp_backend_1.JSONPBackend_})];
1086
+ exports.JSON_BINDINGS = exports.JSONP_PROVIDERS;
1087
+ global.define = __define;
1088
+ return module.exports;
1089
+ });
1090
+
1091
+ //# sourceMappingURLDisabled=http.dev.js.map