angular2-text-mask
Version:
Angular 2 directive for input text masking
2 lines • 118 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define(["@angular/core","@angular/forms"],e):"object"==typeof exports?exports.angular2TextMask=e(require("@angular/core"),require("@angular/forms")):t.angular2TextMask=e(t.ng.core,t.ng.forms)}(this,function(t,e){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var n=this&&this.__decorate||function(t,e,r,n){var o,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},o=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},i=r(1),s=r(70),a=r(89),u=r(69),c=function(){function t(t,e){this.renderer=t,this.element=e,this.textMaskConfig={mask:"",guide:!0,placeholderChar:"_",pipe:void 0,keepCharPositions:!1,onReject:void 0,onAccept:void 0},this._onTouched=function(){},this._onChange=function(t){}}return t.prototype.ngOnInit=function(){"INPUT"===this.element.nativeElement.tagName?this.inputElement=this.element.nativeElement:this.inputElement=this.element.nativeElement.getElementsByTagName("INPUT")[0],this.textMaskInputElement=u["default"](Object.assign({inputElement:this.inputElement},this.textMaskConfig))},t.prototype.writeValue=function(t){void 0!==this.textMaskInputElement&&this.textMaskInputElement.update(t)},t.prototype.registerOnChange=function(t){this._onChange=t},t.prototype.registerOnTouched=function(t){this._onTouched=t},t.prototype.onInput=function(t){this.textMaskInputElement.update(t.target.value),this._onChange(t.target.value)},t.prototype.setDisabledState=function(t){this.renderer.setElementProperty(this.element.nativeElement,"disabled",t)},n([i.Input("textMask"),o("design:type",Object)],t.prototype,"textMaskConfig",void 0),t=n([i.Directive({host:{"(input)":"onInput($event)","(blur)":"_onTouched()"},selector:"[textMask]",providers:[{provide:a.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return t}),multi:!0}]}),o("design:paramtypes",[i.Renderer,i.ElementRef])],t)}();e.MaskedInputDirective=c;var l=function(){function t(){}return t=n([i.NgModule({declarations:[c],exports:[c],imports:[s.CommonModule]}),o("design:paramtypes",[])],t)}();e.TextMaskModule=l},function(e,r){e.exports=t},function(t,e){(function(t){"use strict";function r(t){Zone.current.scheduleMicroTask("scheduleMicrotask",t)}function n(t){return t.name?t.name:"undefined"==typeof t?"undefined":T(t)}function o(t){return void 0!==t&&null!==t}function i(t){return void 0===t||null===t}function s(t){return"boolean"==typeof t}function a(t){return"number"==typeof t}function u(t){return"string"==typeof t}function c(t){return"function"==typeof t}function l(t){return c(t)}function p(t){return"object"===("undefined"==typeof t?"undefined":T(t))&&null!==t}function f(t){return p(t)&&Object.getPrototypeOf(t)===F}function h(t){return o(t)&&c(t.then)}function d(t){return Array.isArray(t)}function y(t){return t instanceof e.Date&&!isNaN(t.valueOf())}function g(){}function m(t){if("string"==typeof t)return t;if(void 0===t||null===t)return""+t;if(t.overriddenName)return t.overriddenName;if(t.name)return t.name;var e=t.toString(),r=e.indexOf("\n");return r===-1?e:e.substring(0,r)}function v(t){return t}function b(t,e){return t}function _(t,e){return t[e]}function C(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}function S(t){return t}function P(t){return i(t)?null:t}function E(t){return!i(t)&&t}function w(t){return null!==t&&("function"==typeof t||"object"===("undefined"==typeof t?"undefined":T(t)))}function O(t){console.log(t)}function V(t){console.warn(t)}function A(t,e,r){for(var n=e.split("."),i=t;n.length>1;){var s=n.shift();i=i.hasOwnProperty(s)&&o(i[s])?i[s]:i[s]={}}void 0!==i&&null!==i||(i={}),i[n.shift()]=r}function N(){if(i($))if(o(D.Symbol)&&o(Symbol.iterator))$=Symbol.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),e=0;e<t.length;++e){var r=t[e];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&($=r)}return $}function M(t,e,r,n){var o=r+"\nreturn "+e+"\n//# sourceURL="+t,i=[],s=[];for(var a in n)i.push(a),s.push(n[a]);return(new(Function.bind.apply(Function,[void 0].concat(i.concat(o))))).apply(void 0,s)}function R(t){return!w(t)}function x(t,e){return t.constructor===e}function I(t){return L.encodeURI(t)}function j(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}var D,T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},k=function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)};D="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:t:window,e.scheduleMicroTask=r;var L=D;e.global=L,e.Type=Function,e.getTypeNameForDebugging=n,e.Math=L.Math,e.Date=L.Date,L.assert=function(t){},e.isPresent=o,e.isBlank=i,e.isBoolean=s,e.isNumber=a,e.isString=u,e.isFunction=c,e.isType=l,e.isStringMap=p;var F=Object.getPrototypeOf({});e.isStrictStringMap=f,e.isPromise=h,e.isArray=d,e.isDate=y,e.noop=g,e.stringify=m,e.serializeEnum=v,e.deserializeEnum=b,e.resolveEnumToken=_;var G=function(){function t(){}return t.fromCharCode=function(t){return String.fromCharCode(t)},t.charCodeAt=function(t,e){return t.charCodeAt(e)},t.split=function(t,e){return t.split(e)},t.equals=function(t,e){return t===e},t.stripLeft=function(t,e){if(t&&t.length){for(var r=0,n=0;n<t.length&&t[n]==e;n++)r++;t=t.substring(r)}return t},t.stripRight=function(t,e){if(t&&t.length){for(var r=t.length,n=t.length-1;n>=0&&t[n]==e;n--)r--;t=t.substring(0,r)}return t},t.replace=function(t,e,r){return t.replace(e,r)},t.replaceAll=function(t,e,r){return t.replace(e,r)},t.slice=function(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=null),t.slice(e,null===r?void 0:r)},t.replaceAllMapped=function(t,e,r){return t.replace(e,function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return t.splice(-2,2),r(t)})},t.contains=function(t,e){return t.indexOf(e)!=-1},t.compare=function(t,e){return t<e?-1:t>e?1:0},t}();e.StringWrapper=G;var W=function(){function t(t){void 0===t&&(t=[]),this.parts=t}return t.prototype.add=function(t){this.parts.push(t)},t.prototype.toString=function(){return this.parts.join("")},t}();e.StringJoiner=W;var B=function(t){function e(e){t.call(this),this.message=e}return k(e,t),e.prototype.toString=function(){return this.message},e}(Error);e.NumberParseError=B;var U=function(){function t(){}return t.toFixed=function(t,e){return t.toFixed(e)},t.equal=function(t,e){return t===e},t.parseIntAutoRadix=function(t){var e=parseInt(t);if(isNaN(e))throw new B("Invalid integer literal when parsing "+t);return e},t.parseInt=function(t,e){if(10==e){if(/^(\-|\+)?[0-9]+$/.test(t))return parseInt(t,e)}else if(16==e){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(t))return parseInt(t,e)}else{var r=parseInt(t,e);if(!isNaN(r))return r}throw new B("Invalid integer literal when parsing "+t+" in base "+e)},t.parseFloat=function(t){return parseFloat(t)},Object.defineProperty(t,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),t.isNumeric=function(t){return!isNaN(t-parseFloat(t))},t.isNaN=function(t){return isNaN(t)},t.isInteger=function(t){return Number.isInteger(t)},t}();e.NumberWrapper=U,e.RegExp=L.RegExp;var H=function(){function t(){}return t.apply=function(t,e){return t.apply(null,e)},t.bind=function(t,e){return t.bind(e)},t}();e.FunctionWrapper=H,e.looseIdentical=C,e.getMapKey=S,e.normalizeBlank=P,e.normalizeBool=E,e.isJsObject=w,e.print=O,e.warn=V;var z=function(){function t(){}return t.parse=function(t){return L.JSON.parse(t)},t.stringify=function(t){return L.JSON.stringify(t,null,2)},t}();e.Json=z;var q=function(){function t(){}return t.create=function(t,r,n,o,i,s,a){return void 0===r&&(r=1),void 0===n&&(n=1),void 0===o&&(o=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=0),new e.Date(t,r-1,n,o,i,s,a)},t.fromISOString=function(t){return new e.Date(t)},t.fromMillis=function(t){return new e.Date(t)},t.toMillis=function(t){return t.getTime()},t.now=function(){return new e.Date},t.toJson=function(t){return t.toJSON()},t}();e.DateWrapper=q,e.setValueOnPath=A;var $=null;e.getSymbolIterator=N,e.evalExpression=M,e.isPrimitive=R,e.hasConstructor=x,e.escape=I,e.escapeRegExp=j}).call(e,function(){return this}())},function(t,e,r){"use strict";function n(t,e){if(a.isPresent(t))for(var r=0;r<t.length;r++){var o=t[r];a.isArray(o)?n(o,e):e.push(o)}return e}function o(t){return!!a.isJsObject(t)&&(a.isArray(t)||!(t instanceof e.Map)&&a.getSymbolIterator()in t)}function i(t,e,r){for(var n=t[a.getSymbolIterator()](),o=e[a.getSymbolIterator()]();;){var i=n.next(),s=o.next();if(i.done&&s.done)return!0;if(i.done||s.done)return!1;if(!r(i.value,s.value))return!1}}function s(t,e){if(a.isArray(t))for(var r=0;r<t.length;r++)e(t[r]);else for(var n,o=t[a.getSymbolIterator()]();!(n=o.next()).done;)e(n.value)}var a=r(2);e.Map=a.global.Map,e.Set=a.global.Set;var u=function(){try{if(1===new e.Map([[1,2]]).size)return function(t){return new e.Map(t)}}catch(t){}return function(t){for(var r=new e.Map,n=0;n<t.length;n++){var o=t[n];r.set(o[0],o[1])}return r}}(),c=function(){try{if(new e.Map(new e.Map))return function(t){return new e.Map(t)}}catch(t){}return function(t){var r=new e.Map;return t.forEach(function(t,e){r.set(e,t)}),r}}(),l=function(){return(new e.Map).keys().next?function(t){for(var e,r=t.keys();!(e=r.next()).done;)t.set(e.value,null)}:function(t){t.forEach(function(e,r){t.set(r,null)})}}(),p=function(){try{if((new e.Map).values().next)return function(t,e){return e?Array.from(t.values()):Array.from(t.keys())}}catch(t){}return function(t,e){var r=d.createFixedSize(t.size),n=0;return t.forEach(function(t,o){r[n]=e?t:o,n++}),r}}(),f=function(){function t(){}return t.clone=function(t){return c(t)},t.createFromStringMap=function(t){var r=new e.Map;for(var n in t)r.set(n,t[n]);return r},t.toStringMap=function(t){var e={};return t.forEach(function(t,r){return e[r]=t}),e},t.createFromPairs=function(t){return u(t)},t.clearValues=function(t){l(t)},t.iterable=function(t){return t},t.keys=function(t){return p(t,!1)},t.values=function(t){return p(t,!0)},t}();e.MapWrapper=f;var h=function(){function t(){}return t.create=function(){return{}},t.contains=function(t,e){return t.hasOwnProperty(e)},t.get=function(t,e){return t.hasOwnProperty(e)?t[e]:void 0},t.set=function(t,e,r){t[e]=r},t.keys=function(t){return Object.keys(t)},t.values=function(t){return Object.keys(t).map(function(e){return t[e]})},t.isEmpty=function(t){for(var e in t)return!1;return!0},t["delete"]=function(t,e){delete t[e]},t.forEach=function(t,e){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];e(t[o],o)}},t.merge=function(t,e){for(var r={},n=0,o=Object.keys(t);n<o.length;n++){var i=o[n];r[i]=t[i]}for(var s=0,a=Object.keys(e);s<a.length;s++){var i=a[s];r[i]=e[i]}return r},t.equals=function(t,e){var r=Object.keys(t),n=Object.keys(e);if(r.length!=n.length)return!1;for(var o,i=0;i<r.length;i++)if(o=r[i],t[o]!==e[o])return!1;return!0},t}();e.StringMapWrapper=h;var d=function(){function t(){}return t.createFixedSize=function(t){return new Array(t)},t.createGrowableSize=function(t){return new Array(t)},t.clone=function(t){return t.slice(0)},t.forEachWithIndex=function(t,e){for(var r=0;r<t.length;r++)e(t[r],r)},t.first=function(t){return t?t[0]:null},t.last=function(t){return t&&0!=t.length?t[t.length-1]:null},t.indexOf=function(t,e,r){return void 0===r&&(r=0),t.indexOf(e,r)},t.contains=function(t,e){return t.indexOf(e)!==-1},t.reversed=function(e){var r=t.clone(e);return r.reverse()},t.concat=function(t,e){return t.concat(e)},t.insert=function(t,e,r){t.splice(e,0,r)},t.removeAt=function(t,e){var r=t[e];return t.splice(e,1),r},t.removeAll=function(t,e){for(var r=0;r<e.length;++r){var n=t.indexOf(e[r]);t.splice(n,1)}},t.remove=function(t,e){var r=t.indexOf(e);return r>-1&&(t.splice(r,1),!0)},t.clear=function(t){t.length=0},t.isEmpty=function(t){return 0==t.length},t.fill=function(t,e,r,n){void 0===r&&(r=0),void 0===n&&(n=null),t.fill(e,r,null===n?t.length:n)},t.equals=function(t,e){if(t.length!=e.length)return!1;for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0},t.slice=function(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=null),t.slice(e,null===r?void 0:r)},t.splice=function(t,e,r){return t.splice(e,r)},t.sort=function(t,e){a.isPresent(e)?t.sort(e):t.sort()},t.toString=function(t){return t.toString()},t.toJSON=function(t){return JSON.stringify(t)},t.maximum=function(t,e){if(0==t.length)return null;for(var r=null,n=-(1/0),o=0;o<t.length;o++){var i=t[o];if(!a.isBlank(i)){var s=e(i);s>n&&(r=i,n=s)}}return r},t.flatten=function(t){var e=[];return n(t,e),e},t.addAll=function(t,e){for(var r=0;r<e.length;r++)t.push(e[r])},t}();e.ListWrapper=d,e.isListLikeIterable=o,e.areIterablesEqual=i,e.iterateListLike=s;var y=function(){var t=new e.Set([1,2,3]);return 3===t.size?function(t){return new e.Set(t)}:function(t){var r=new e.Set(t);if(r.size!==t.length)for(var n=0;n<t.length;n++)r.add(t[n]);return r}}(),g=function(){function t(){}return t.createFromList=function(t){return y(t)},t.has=function(t,e){return t.has(e)},t["delete"]=function(t,e){t["delete"](e)},t}();e.SetWrapper=g},function(t,e,r){"use strict";var n=r(1);e.NG_VALUE_ACCESSOR=new n.OpaqueToken("NgValueAccessor")},function(t,e,r){"use strict";function n(t){return l.isPromise(t)?t:u.toPromise.call(t)}function o(t,e){return e.map(function(e){return e(t)})}function i(t,e){return e.map(function(e){return e(t)})}function s(t){var e=t.reduce(function(t,e){return l.isPresent(e)?c.StringMapWrapper.merge(t,e):t},{});return c.StringMapWrapper.isEmpty(e)?null:e}var a=r(1),u=r(81),c=r(3),l=r(2);e.NG_VALIDATORS=new a.OpaqueToken("NgValidators"),e.NG_ASYNC_VALIDATORS=new a.OpaqueToken("NgAsyncValidators");var p=function(){function t(){}return t.required=function(t){return l.isBlank(t.value)||l.isString(t.value)&&""==t.value?{required:!0}:null},t.minLength=function(e){return function(r){if(l.isPresent(t.required(r)))return null;var n=r.value;return n.length<e?{minlength:{requiredLength:e,actualLength:n.length}}:null}},t.maxLength=function(e){return function(r){if(l.isPresent(t.required(r)))return null;var n=r.value;return n.length>e?{maxlength:{requiredLength:e,actualLength:n.length}}:null}},t.pattern=function(e){return function(r){if(l.isPresent(t.required(r)))return null;var n=new RegExp("^"+e+"$"),o=r.value;return n.test(o)?null:{pattern:{requiredPattern:"^"+e+"$",actualValue:o}}}},t.nullValidator=function(t){return null},t.compose=function(t){if(l.isBlank(t))return null;var e=t.filter(l.isPresent);return 0==e.length?null:function(t){return s(o(t,e))}},t.composeAsync=function(t){if(l.isBlank(t))return null;var e=t.filter(l.isPresent);return 0==e.length?null:function(t){var r=i(t,e).map(n);return Promise.all(r).then(s)}},t}();e.Validators=p},function(t,e,r){"use strict";var n=function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(7),i=r(2),s=function(t){function e(e,r){t.call(this,"Invalid argument '"+r+"' for pipe '"+i.stringify(e)+"'")}return n(e,t),e}(o.BaseException);e.InvalidPipeArgumentException=s},function(t,e,r){"use strict";function n(t){return new TypeError(t)}function o(){throw new c("unimplemented")}var i=function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},s=r(47),a=r(48),u=r(48);e.ExceptionHandler=u.ExceptionHandler;var c=function(t){function e(e){void 0===e&&(e="--"),t.call(this,e),this.message=e,this.stack=new Error(e).stack}return i(e,t),e.prototype.toString=function(){return this.message},e}(Error);e.BaseException=c;var l=function(t){function e(e,r,n,o){t.call(this,e),this._wrapperMessage=e,this._originalException=r,this._originalStack=n,this._context=o,this._wrapperStack=new Error(e).stack}return i(e,t),Object.defineProperty(e.prototype,"wrapperMessage",{get:function(){return this._wrapperMessage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wrapperStack",{get:function(){return this._wrapperStack},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"originalException",{get:function(){return this._originalException},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"originalStack",{get:function(){return this._originalStack},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){return a.ExceptionHandler.exceptionToString(this)},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.message},e}(s.BaseWrappedException);e.WrappedException=l,e.makeTypeError=n,e.unimplemented=o},function(t,e,r){"use strict";var n=function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(7),i=r(21),s=function(t){function e(){t.apply(this,arguments),this.name=null,this.valueAccessor=null}return n(e,t),Object.defineProperty(e.prototype,"validator",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),e}(i.AbstractControlDirective);e.NgControl=s},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},o=function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(63),s=r(35);e.Observable=s.Observable;var a=r(63);e.Subject=a.Subject;var u=function(t){function e(e){void 0===e&&(e=!1),t.call(this),this.__isAsync=e}return o(e,t),e.prototype.emit=function(e){t.prototype.next.call(this,e)},e.prototype.next=function(e){t.prototype.next.call(this,e)},e.prototype.subscribe=function(e,r,o){var i,s=function(t){return null},a=function(){return null};return e&&"object"===("undefined"==typeof e?"undefined":n(e))?(i=this.__isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(s=this.__isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(a=this.__isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(i=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},r&&(s=this.__isAsync?function(t){setTimeout(function(){return r(t)})}:function(t){r(t)}),o&&(a=this.__isAsync?function(){setTimeout(function(){return o()})}:function(){o()})),t.prototype.subscribe.call(this,i,s,a)},e}(i.Subject);e.EventEmitter=u},function(t,e,r){"use strict";function n(t,e){var r=p.ListWrapper.clone(e.path);return r.push(t),r}function o(t,e){h.isBlank(t)&&s(e,"Cannot find control with"),h.isBlank(e.valueAccessor)&&s(e,"No value accessor for form control with"),t.validator=d.Validators.compose([t.validator,e.validator]),t.asyncValidator=d.Validators.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),e.valueAccessor.registerOnChange(function(r){e.viewToModelUpdate(r),t.updateValue(r,{emitModelToViewChange:!1}),t.markAsDirty()}),t.registerOnChange(function(t){return e.valueAccessor.writeValue(t)}),e.valueAccessor.registerOnTouched(function(){return t.markAsTouched()})}function i(t,e){h.isBlank(t)&&s(e,"Cannot find control with"),t.validator=d.Validators.compose([t.validator,e.validator]),t.asyncValidator=d.Validators.composeAsync([t.asyncValidator,e.asyncValidator])}function s(t,e){var r;throw r=t.path.length>1?"path: '"+t.path.join(" -> ")+"'":t.path[0]?"name: '"+t.path+"'":"unspecified name",new f.BaseException(e+" "+r)}function a(t){return h.isPresent(t)?d.Validators.compose(t.map(m.normalizeValidator)):null}function u(t){return h.isPresent(t)?d.Validators.composeAsync(t.map(m.normalizeAsyncValidator)):null}function c(t,e){if(!p.StringMapWrapper.contains(t,"model"))return!1;var r=t.model;return!!r.isFirstChange()||!h.looseIdentical(e,r.currentValue)}function l(t,e){if(h.isBlank(e))return null;var r,n,o;return e.forEach(function(e){h.hasConstructor(e,g.DefaultValueAccessor)?r=e:h.hasConstructor(e,y.CheckboxControlValueAccessor)||h.hasConstructor(e,v.NumberValueAccessor)||h.hasConstructor(e,_.SelectControlValueAccessor)||h.hasConstructor(e,C.SelectMultipleControlValueAccessor)||h.hasConstructor(e,b.RadioControlValueAccessor)?(h.isPresent(n)&&s(t,"More than one built-in value accessor matches form control with"),n=e):(h.isPresent(o)&&s(t,"More than one custom value accessor matches form control with"),o=e)}),h.isPresent(o)?o:h.isPresent(n)?n:h.isPresent(r)?r:(s(t,"No valid value accessor for form control with"),null)}var p=r(3),f=r(7),h=r(2),d=r(5),y=r(13),g=r(14),m=r(73),v=r(29),b=r(15),_=r(16),C=r(30);e.controlPath=n,e.setUpControl=o,e.setUpControlGroup=i,e.composeValidators=a,e.composeAsyncValidators=u,e.isPropertyUpdated=c,e.selectValueAccessor=l},function(t,e,r){"use strict";var n=function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(21),i=function(t){function e(){t.apply(this,arguments)}return n(e,t),Object.defineProperty(e.prototype,"formDirective",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),e}(o.AbstractControlDirective);e.ControlContainer=i},function(t,e){(function(t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},n={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};e.root=n["undefined"==typeof self?"undefined":r(self)]&&self||n["undefined"==typeof window?"undefined":r(window)]&&window;var o=n["undefined"==typeof t?"undefined":r(t)]&&t;!o||o.global!==o&&o.window!==o||(e.root=o)}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(1),o=r(4);e.CHECKBOX_VALUE_ACCESSOR={provide:o.NG_VALUE_ACCESSOR,useExisting:n.forwardRef(function(){return i}),multi:!0};var i=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setElementProperty(this._elementRef.nativeElement,"checked",t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.decorators=[{type:n.Directive,args:[{selector:"input[type=checkbox][ngControl],input[type=checkbox][ngFormControl],input[type=checkbox][ngModel]",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},providers:[e.CHECKBOX_VALUE_ACCESSOR]}]}],t.ctorParameters=[{type:n.Renderer},{type:n.ElementRef}],t}();e.CheckboxControlValueAccessor=i},function(t,e,r){"use strict";var n=r(1),o=r(2),i=r(4);e.DEFAULT_VALUE_ACCESSOR={provide:i.NG_VALUE_ACCESSOR,useExisting:n.forwardRef(function(){return s}),multi:!0};var s=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){var e=o.isBlank(t)?"":t;this._renderer.setElementProperty(this._elementRef.nativeElement,"value",e)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.decorators=[{type:n.Directive,args:[{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()"},providers:[e.DEFAULT_VALUE_ACCESSOR]}]}],t.ctorParameters=[{type:n.Renderer},{type:n.ElementRef}],t}();e.DefaultValueAccessor=s},function(t,e,r){"use strict";var n=r(1),o=r(3),i=r(2),s=r(4),a=r(8);e.RADIO_VALUE_ACCESSOR={provide:s.NG_VALUE_ACCESSOR,useExisting:n.forwardRef(function(){return l}),multi:!0};var u=function(){function t(){this._accessors=[]}return t.prototype.add=function(t,e){this._accessors.push([t,e])},t.prototype.remove=function(t){for(var e=-1,r=0;r<this._accessors.length;++r)this._accessors[r][1]===t&&(e=r);o.ListWrapper.removeAt(this._accessors,e)},t.prototype.select=function(t){var e=this;this._accessors.forEach(function(r){e._isSameGroup(r,t)&&r[1]!==t&&r[1].fireUncheck()})},t.prototype._isSameGroup=function(t,e){return t[0].control.root===e._control.control.root&&t[1].name===e.name},t.decorators=[{type:n.Injectable}],t}();e.RadioControlRegistry=u;var c=function(){function t(t,e){this.checked=t,this.value=e}return t}();e.RadioButtonState=c;var l=function(){function t(t,e,r,n){this._renderer=t,this._elementRef=e,this._registry=r,this._injector=n,this.onChange=function(){},this.onTouched=function(){}}return t.prototype.ngOnInit=function(){this._control=this._injector.get(a.NgControl),this._registry.add(this._control,this)},t.prototype.ngOnDestroy=function(){this._registry.remove(this)},t.prototype.writeValue=function(t){this._state=t,i.isPresent(t)&&t.checked&&this._renderer.setElementProperty(this._elementRef.nativeElement,"checked",!0)},t.prototype.registerOnChange=function(t){var e=this;this._fn=t,this.onChange=function(){t(new c((!0),e._state.value)),e._registry.select(e)}},t.prototype.fireUncheck=function(){this._fn(new c((!1),this._state.value))},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.decorators=[{type:n.Directive,args:[{selector:"input[type=radio][ngControl],input[type=radio][ngFormControl],input[type=radio][ngModel]",host:{"(change)":"onChange()","(blur)":"onTouched()"},providers:[e.RADIO_VALUE_ACCESSOR]}]}],t.ctorParameters=[{type:n.Renderer},{type:n.ElementRef},{type:u},{type:n.Injector}],t.propDecorators={name:[{type:n.Input}]},t}();e.RadioControlValueAccessor=l},function(t,e,r){"use strict";function n(t,e){return a.isBlank(t)?""+e:(a.isPrimitive(e)||(e="Object"),a.StringWrapper.slice(t+": "+e,0,50))}function o(t){return t.split(":")[0]}var i=r(1),s=r(3),a=r(2),u=r(4);e.SELECT_VALUE_ACCESSOR={provide:u.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return c}),multi:!0};var c=function(){function t(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this.value=t;var e=n(this._getOptionId(t),t);this._renderer.setElementProperty(this._elementRef.nativeElement,"value",e)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(r){e.value=r,t(e._getOptionValue(r))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype._registerOption=function(){return(this._idCounter++).toString()},t.prototype._getOptionId=function(t){for(var e=0,r=s.MapWrapper.keys(this._optionMap);e<r.length;e++){var n=r[e];if(a.looseIdentical(this._optionMap.get(n),t))return n}return null},t.prototype._getOptionValue=function(t){var e=this._optionMap.get(o(t));return a.isPresent(e)?e:t},t.decorators=[{type:i.Directive,args:[{selector:"select:not([multiple])[ngControl],select:not([multiple])[ngFormControl],select:not([multiple])[ngModel]",host:{"(change)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[e.SELECT_VALUE_ACCESSOR]}]}],t.ctorParameters=[{type:i.Renderer},{type:i.ElementRef}],t}();e.SelectControlValueAccessor=c;var l=function(){function t(t,e,r){this._element=t,this._renderer=e,this._select=r,a.isPresent(this._select)&&(this.id=this._select._registerOption())}return Object.defineProperty(t.prototype,"ngValue",{set:function(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(n(this.id,t)),this._select.writeValue(this._select.value))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{set:function(t){this._setElementValue(t),a.isPresent(this._select)&&this._select.writeValue(this._select.value)},enumerable:!0,configurable:!0}),t.prototype._setElementValue=function(t){this._renderer.setElementProperty(this._element.nativeElement,"value",t)},t.prototype.ngOnDestroy=function(){a.isPresent(this._select)&&(this._select._optionMap["delete"](this.id),this._select.writeValue(this._select.value))},t.decorators=[{type:i.Directive,args:[{selector:"option"}]}],t.ctorParameters=[{type:i.ElementRef},{type:i.Renderer},{type:c,decorators:[{type:i.Optional},{type:i.Host}]}],t.propDecorators={ngValue:[{type:i.Input,args:["ngValue"]}],value:[{type:i.Input,args:["value"]}]},t}();e.NgSelectOption=l},function(t,e,r){"use strict";function n(t){return t instanceof p}function o(t,e){return l.isBlank(e)?null:(e instanceof Array||(e=e.split("/")),e instanceof Array&&c.ListWrapper.isEmpty(e)?null:e.reduce(function(t,e){if(t instanceof h)return l.isPresent(t.controls[e])?t.controls[e]:null;if(t instanceof d){var r=e;return l.isPresent(t.at(r))?t.at(r):null}return null},t))}function i(t){return l.isPromise(t)?a.PromiseObservable.create(t):t}var s=function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},a=r(80),u=r(9),c=r(3),l=r(2);e.VALID="VALID",e.INVALID="INVALID",e.PENDING="PENDING",e.isControl=n;var p=function(){function t(t,e){this.validator=t,this.asyncValidator=e,this._pristine=!0,this._touched=!1}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this._status===e.VALID},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this._errors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pristine",{get:function(){return this._pristine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return!this.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"touched",{get:function(){return this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"untouched",{get:function(){return!this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valueChanges",{get:function(){return this._valueChanges},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"statusChanges",{get:function(){return this._statusChanges},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pending",{get:function(){return this._status==e.PENDING},enumerable:!0,configurable:!0}),t.prototype.markAsTouched=function(){this._touched=!0},t.prototype.markAsDirty=function(t){var e=(void 0===t?{}:t).onlySelf;e=l.normalizeBool(e),this._pristine=!1,l.isPresent(this._parent)&&!e&&this._parent.markAsDirty({onlySelf:e})},t.prototype.markAsPending=function(t){var r=(void 0===t?{}:t).onlySelf;r=l.normalizeBool(r),
this._status=e.PENDING,l.isPresent(this._parent)&&!r&&this._parent.markAsPending({onlySelf:r})},t.prototype.setParent=function(t){this._parent=t},t.prototype.updateValueAndValidity=function(t){var r=void 0===t?{}:t,n=r.onlySelf,o=r.emitEvent;n=l.normalizeBool(n),o=!l.isPresent(o)||o,this._updateValue(),this._errors=this._runValidator(),this._status=this._calculateStatus(),this._status!=e.VALID&&this._status!=e.PENDING||this._runAsyncValidator(o),o&&(this._valueChanges.emit(this._value),this._statusChanges.emit(this._status)),l.isPresent(this._parent)&&!n&&this._parent.updateValueAndValidity({onlySelf:n,emitEvent:o})},t.prototype._runValidator=function(){return l.isPresent(this.validator)?this.validator(this):null},t.prototype._runAsyncValidator=function(t){var r=this;if(l.isPresent(this.asyncValidator)){this._status=e.PENDING,this._cancelExistingSubscription();var n=i(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe({next:function(e){return r.setErrors(e,{emitEvent:t})}})}},t.prototype._cancelExistingSubscription=function(){l.isPresent(this._asyncValidationSubscription)&&this._asyncValidationSubscription.unsubscribe()},t.prototype.setErrors=function(t,e){var r=(void 0===e?{}:e).emitEvent;r=!l.isPresent(r)||r,this._errors=t,this._status=this._calculateStatus(),r&&this._statusChanges.emit(this._status),l.isPresent(this._parent)&&this._parent._updateControlsErrors()},t.prototype.find=function(t){return o(this,t)},t.prototype.getError=function(t,e){void 0===e&&(e=null);var r=l.isPresent(e)&&!c.ListWrapper.isEmpty(e)?this.find(e):this;return l.isPresent(r)&&l.isPresent(r._errors)?c.StringMapWrapper.get(r._errors,t):null},t.prototype.hasError=function(t,e){return void 0===e&&(e=null),l.isPresent(this.getError(t,e))},Object.defineProperty(t.prototype,"root",{get:function(){for(var t=this;l.isPresent(t._parent);)t=t._parent;return t},enumerable:!0,configurable:!0}),t.prototype._updateControlsErrors=function(){this._status=this._calculateStatus(),l.isPresent(this._parent)&&this._parent._updateControlsErrors()},t.prototype._initObservables=function(){this._valueChanges=new u.EventEmitter,this._statusChanges=new u.EventEmitter},t.prototype._calculateStatus=function(){return l.isPresent(this._errors)?e.INVALID:this._anyControlsHaveStatus(e.PENDING)?e.PENDING:this._anyControlsHaveStatus(e.INVALID)?e.INVALID:e.VALID},t}();e.AbstractControl=p;var f=function(t){function e(e,r,n){void 0===e&&(e=null),void 0===r&&(r=null),void 0===n&&(n=null),t.call(this,r,n),this._value=e,this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}return s(e,t),e.prototype.updateValue=function(t,e){var r=void 0===e?{}:e,n=r.onlySelf,o=r.emitEvent,i=r.emitModelToViewChange;i=!l.isPresent(i)||i,this._value=t,l.isPresent(this._onChange)&&i&&this._onChange(this._value),this.updateValueAndValidity({onlySelf:n,emitEvent:o})},e.prototype._updateValue=function(){},e.prototype._anyControlsHaveStatus=function(t){return!1},e.prototype.registerOnChange=function(t){this._onChange=t},e}(p);e.Control=f;var h=function(t){function e(e,r,n,o){void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=null),t.call(this,n,o),this.controls=e,this._optionals=l.isPresent(r)?r:{},this._initObservables(),this._setParentForControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return s(e,t),e.prototype.registerControl=function(t,e){this.controls[t]=e,e.setParent(this)},e.prototype.addControl=function(t,e){this.registerControl(t,e),this.updateValueAndValidity()},e.prototype.removeControl=function(t){c.StringMapWrapper["delete"](this.controls,t),this.updateValueAndValidity()},e.prototype.include=function(t){c.StringMapWrapper.set(this._optionals,t,!0),this.updateValueAndValidity()},e.prototype.exclude=function(t){c.StringMapWrapper.set(this._optionals,t,!1),this.updateValueAndValidity()},e.prototype.contains=function(t){var e=c.StringMapWrapper.contains(this.controls,t);return e&&this._included(t)},e.prototype._setParentForControls=function(){var t=this;c.StringMapWrapper.forEach(this.controls,function(e,r){e.setParent(t)})},e.prototype._updateValue=function(){this._value=this._reduceValue()},e.prototype._anyControlsHaveStatus=function(t){var e=this,r=!1;return c.StringMapWrapper.forEach(this.controls,function(n,o){r=r||e.contains(o)&&n.status==t}),r},e.prototype._reduceValue=function(){return this._reduceChildren({},function(t,e,r){return t[r]=e.value,t})},e.prototype._reduceChildren=function(t,e){var r=this,n=t;return c.StringMapWrapper.forEach(this.controls,function(t,o){r._included(o)&&(n=e(n,t,o))}),n},e.prototype._included=function(t){var e=c.StringMapWrapper.contains(this._optionals,t);return!e||c.StringMapWrapper.get(this._optionals,t)},e}(p);e.ControlGroup=h;var d=function(t){function e(e,r,n){void 0===r&&(r=null),void 0===n&&(n=null),t.call(this,r,n),this.controls=e,this._initObservables(),this._setParentForControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return s(e,t),e.prototype.at=function(t){return this.controls[t]},e.prototype.push=function(t){this.controls.push(t),t.setParent(this),this.updateValueAndValidity()},e.prototype.insert=function(t,e){c.ListWrapper.insert(this.controls,t,e),e.setParent(this),this.updateValueAndValidity()},e.prototype.removeAt=function(t){c.ListWrapper.removeAt(this.controls,t),this.updateValueAndValidity()},Object.defineProperty(e.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),e.prototype._updateValue=function(){this._value=this.controls.map(function(t){return t.value})},e.prototype._anyControlsHaveStatus=function(t){return this.controls.some(function(e){return e.status==t})},e.prototype._setParentForControls=function(){var t=this;this.controls.forEach(function(e){e.setParent(t)})},e}(p);e.ControlArray=d},function(t,e,r){"use strict";var n=r(1),o=function(){function t(){}return t}();e.LocationStrategy=o,e.APP_BASE_HREF=new n.OpaqueToken("appBaseHref")},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.placeholderChar="_"},function(t,e,r){"use strict";var n=r(1),o=r(3),i=r(2),s=new Object,a=!1,u=function(){function t(t,e){this._viewContainerRef=t,this._templateRef=e}return t.prototype.create=function(){this._viewContainerRef.createEmbeddedView(this._templateRef)},t.prototype.destroy=function(){this._viewContainerRef.clear()},t}();e.SwitchView=u;var c=function(){function t(){this._useDefault=!1,this._valueViews=new Map,this._activeViews=[]}return Object.defineProperty(t.prototype,"ngSwitch",{set:function(t){this._emptyAllActiveViews(),this._useDefault=!1;var e=this._valueViews.get(t);i.isBlank(e)&&(this._useDefault=!0,e=i.normalizeBlank(this._valueViews.get(s))),this._activateViews(e),this._switchValue=t},enumerable:!0,configurable:!0}),t.prototype._onCaseValueChanged=function(t,e,r){this._deregisterView(t,r),this._registerView(e,r),t===this._switchValue?(r.destroy(),o.ListWrapper.remove(this._activeViews,r)):e===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(s)))},t.prototype._emptyAllActiveViews=function(){for(var t=this._activeViews,e=0;e<t.length;e++)t[e].destroy();this._activeViews=[]},t.prototype._activateViews=function(t){if(i.isPresent(t)){for(var e=0;e<t.length;e++)t[e].create();this._activeViews=t}},t.prototype._registerView=function(t,e){var r=this._valueViews.get(t);i.isBlank(r)&&(r=[],this._valueViews.set(t,r)),r.push(e)},t.prototype._deregisterView=function(t,e){if(t!==s){var r=this._valueViews.get(t);1==r.length?this._valueViews["delete"](t):o.ListWrapper.remove(r,e)}},t.decorators=[{type:n.Directive,args:[{selector:"[ngSwitch]"}]}],t.propDecorators={ngSwitch:[{type:n.Input}]},t}();e.NgSwitch=c;var l=function(){function t(t,e,r){this._value=s,this._switch=r,this._view=new u(t,e)}return Object.defineProperty(t.prototype,"ngSwitchCase",{set:function(t){this._switch._onCaseValueChanged(this._value,t,this._view),this._value=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngSwitchWhen",{set:function(t){a||(a=!0,console.warn("*ngSwitchWhen is deprecated and will be removed. Use *ngSwitchCase instead")),this._switch._onCaseValueChanged(this._value,t,this._view),this._value=t},enumerable:!0,configurable:!0}),t.decorators=[{type:n.Directive,args:[{selector:"[ngSwitchCase],[ngSwitchWhen]"}]}],t.ctorParameters=[{type:n.ViewContainerRef},{type:n.TemplateRef},{type:c,decorators:[{type:n.Host}]}],t.propDecorators={ngSwitchCase:[{type:n.Input}],ngSwitchWhen:[{type:n.Input}]},t}();e.NgSwitchCase=l;var p=function(){function t(t,e,r){r._registerView(s,new u(t,e))}return t.decorators=[{type:n.Directive,args:[{selector:"[ngSwitchDefault]"}]}],t.ctorParameters=[{type:n.ViewContainerRef},{type:n.TemplateRef},{type:c,decorators:[{type:n.Host}]}],t}();e.NgSwitchDefault=p},function(t,e,r){"use strict";var n=r(7),o=r(2),i=function(){function t(){}return Object.defineProperty(t.prototype,"control",{get:function(){return n.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return o.isPresent(this.control)?this.control.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return o.isPresent(this.control)?this.control.valid:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return o.isPresent(this.control)?this.control.errors:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pristine",{get:function(){return o.isPresent(this.control)?this.control.pristine:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return o.isPresent(this.control)?this.control.dirty:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"touched",{get:function(){return o.isPresent(this.control)?this.control.touched:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"untouched",{get:function(){return o.isPresent(this.control)?this.control.untouched:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),t}();e.AbstractControlDirective=i},function(t,e,r){"use strict";var n=function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(1),i=r(5),s=r(11),a=r(10);e.controlGroupProvider={provide:s.ControlContainer,useExisting:o.forwardRef(function(){return u})};var u=function(t){function r(e,r,n){t.call(this),this._validators=r,this._asyncValidators=n,this._parent=e}return n(r,t),r.prototype.ngOnInit=function(){this.formDirective.addControlGroup(this)},r.prototype.ngOnDestroy=function(){this.formDirective.removeControlGroup(this)},Object.defineProperty(r.prototype,"control",{get:function(){return this.formDirective.getControlGroup(this)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"path",{get:function(){return a.controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"formDirective",{get:function(){return this._parent.formDirective},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"validator",{get:function(){return a.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"asyncValidator",{get:function(){return a.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),r.decorators=[{type:o.Directive,args:[{selector:"[ngControlGroup]",providers:[e.controlGroupProvider],inputs:["name: ngControlGroup"],exportAs:"ngForm"}]}],r.ctorParameters=[{type:s.ControlContainer,decorators:[{type:o.Host},{type:o.SkipSelf}]},{type:Array,decorators:[{type:o.Optional},{type:o.Self},{type:o.Inject,args:[i.NG_VALIDATORS]}]},{type:Array,decorators:[{type:o.Optional},{type:o.Self},{type:o.Inject,args:[i.NG_ASYNC_VALIDATORS]}]}],r}(s.ControlContainer);e.NgControlGroup=u},function(t,e,r){"use strict";var n=function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(1),i=r(9),s=r(5),a=r(11),u=r(4),c=r(8),l=r(10);e.controlNameBinding={provide:c.NgControl,useExisting:o.forwardRef(function(){return p})};var p=function(t){function r(e,r,n,o){t.call(this),this._parent=e,this._validators=r,this._asyncValidators=n,this.update=new i.EventEmitter,this._added=!1,this.valueAccessor=l.selectValueAccessor(this,o)}return n(r,t),r.prototype.ngOnChanges=function(t){this._added||(this.formDirective.addControl(this),this._added=!0),l.isPropertyUpdated(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))},r.prototype.ngOnDestroy=function(){this.formDirective.removeControl(this)},r.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},Object.defineProperty(r.prototype,"path",{get:function(){return l.controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"formDirective",{get:function(){return this._parent.formDirective},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"validator",{get:function(){return l.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"asyncValidator",{get:function(){return l.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"control",{get:function(){return this.formDirective.getControl(this)},enumerable:!0,configurable:!0}),r.decorators=[{type:o.Directive,args:[{selector:"[ngControl]",providers:[e.controlNameBinding],inputs:["name: ngControl","model: ngModel"],outputs:["update: ngModelChange"],exportAs:"ngForm"}]}],r.ctorParameters=[{type:a.ControlContainer,decorators:[{type:o.Host},{type:o.SkipSelf}]},{type:Array,decorators:[{type:o.Optional},{type:o.Self},{type:o.Inject,args:[s.NG_VALIDATORS]}]},{type:Array,decorators:[{type:o.Optional},{type:o.Self},{type:o.Inject,args:[s.NG_ASYNC_VALIDATORS]}]},{type:Array,decorators:[{type:o.Optional},{type:o.Self},{type:o.Inject,args:[u.NG_VALUE_ACCESSOR]}]}],r}(c.NgControl);e.NgControlName=p},function(t,e,r){"use strict";var n=r(1),o=r(2),i=r(8),s=function(){function t(t){this._cd=t}return Object.defineProperty(t.prototype,"ngClassUntouched",{get:function(){return!!o.isPresent(this._cd.control)&&this._cd.control.untouched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassTouched",{get:function(){return!!o.isPresent(this._cd.control)&&this._cd.control.touched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassPristine",{get:function(){return!!o.isPresent(this._cd.control)&&this._cd.control.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassDirty",{get:function(){return!!o.isPresent(this._cd.control)&&this._cd.control.dirty},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassValid",{get:function(){return!!o.isPresent(this._cd.control)&&this._cd.control.valid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassInvalid",{get:function(){return!!o.isPresent(this._cd.control)&&!this._cd.control.valid},enumerable:!0,configurable:!0}),t.decorators=[{type:n.Directive,args:[{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"}}]}],t.ctorParameters=[{type:i.NgControl,decorators:[{type:n.Self}]}],t}();e.NgControlStatus=s},function(t,e,r){"use strict";var n=function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(1),i=r(9),s=r(3),a=r(2),u=r(17),c=r(5),l=r(11),p=r(10);e.formDirectiveProvider={provide:l.ControlContainer,useExisting:o.forwardRef(function(){return d})};var f=!1,h=Promise.resolve(null),d=function(t){function r(e,r){t.call(this),this._submitted=!1,this.ngSubmit=new i.EventEmitter,this._displayWarning(),this.form=new u.ControlGroup({},null,p.composeValidators(e),p.composeAsyncValidators(r))}return n(r,t),r.prototype._displayWarning=function(){f||(f=!0,console.warn("\n *It looks like you're using the old forms module. This will be opt-in in the next RC, and\n will eventually be removed in favor of the new forms module. For more information, see:\n https://docs.google.com/document/d/1RIezQqE4aEhBRmArIAS1mRIZtWFf6JxN_7B4meyWK0Y/preview\n "))},Object.defineProperty(r.prototype,"submitted",{get:function(){return this._submitted},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),r.prototype.addControl=function(t){var e=this;h.then(function(){var r=e._findContainer(t.path),n=new u.Control;p.setUpControl(n,t),r.registerControl(t.name,n),n.updateValueAndValidity({emitEvent:!1})})},r.prototype.getControl=function(t){return this.form.find(t.path)},r.prototype.removeControl=function(t){var e=this;h.then(function(){var r=e._findContainer(t.path);a.isPresent(r)&&r.removeControl(t.name)})},r.prototype.addControlGroup=function(t){var e=this;h.then(function(){var r=e._findContainer(t.path),n=new u.ControlGroup({});p.setUpControlGroup(n,t),r