UNPKG

ngx-tree-select

Version:

Angular component for select with tree items.

1 lines 236 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define(["@angular/core","@angular/forms","@angular/common"],e):"object"==typeof exports?exports.ngxTreeSelect=e(require("@angular/core"),require("@angular/forms"),require("@angular/common")):t.ngxTreeSelect=e(t["@angular/core"],t["@angular/forms"],t["@angular/common"])}(this,function(t,e,r){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=169)}([function(t,e,r){"use strict";var n=r(9),i=r(172),o=r(28),s=r(43),c=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,o=i.toSubscriber(t,e,r);if(n?n.call(o,this.source):o.add(this.source?this._subscribe(o):this._trySubscribe(o)),o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.syncErrorThrown=!0,t.syncErrorValue=e,t.error(e)}},t.prototype.forEach=function(t,e){var r=this;if(e||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?e=n.root.Rx.config.Promise:n.root.Promise&&(e=n.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,n){var i;i=r.subscribe(function(e){if(i)try{t(e)}catch(t){n(t),i.unsubscribe()}else t(e)},n,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[o.observable]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return 0===t.length?this:s.pipeFromArray(t)(this)},t.prototype.toPromise=function(t){var e=this;if(t||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?t=n.root.Rx.config.Promise:n.root.Promise&&(t=n.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})},t.create=function(e){return new t(e)},t}();e.Observable=c},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(26),o=r(5),s=r(65),c=r(27),u=function(t){function e(r,n,i){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=s.empty;break;case 1:if(!r){this.destination=s.empty;break}if("object"==typeof r){r instanceof e?(this.destination=r,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new a(this,r));break}default:this.syncErrorThrowable=!0,this.destination=new a(this,r,n,i)}}return n(e,t),e.prototype[c.rxSubscriber]=function(){return this},e.create=function(t,r,n){var i=new e(t,r,n);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this,e=t._parent,r=t._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=e,this._parents=r,this},e}(o.Subscription);e.Subscriber=u;var a=function(t){function e(e,r,n,o){t.call(this),this._parentSubscriber=e;var c,u=this;i.isFunction(r)?c=r:r&&(c=r.next,n=r.error,o=r.complete,r!==s.empty&&(u=Object.create(r),i.isFunction(u.unsubscribe)&&this.add(u.unsubscribe.bind(u)),u.unsubscribe=this.unsubscribe.bind(this))),this._context=u,this._next=c,this._error=n,this._complete=o}return n(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var r=function(){return t._complete.call(t._context)};e.syncErrorThrowable?(this.__tryOrSetError(e,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,r){try{e.call(this._context,r)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(u)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(){t.apply(this,arguments)}return n(e,t),e.prototype.notifyNext=function(t,e,r,n,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(r(1).Subscriber);e.OuterSubscriber=i},function(t,e,r){"use strict";var n=r(9),i=r(67),o=r(68),s=r(63),c=r(0),u=r(17),a=r(181),h=r(28);e.subscribeToResult=function(t,e,r,l){var p=new a.InnerSubscriber(t,r,l);if(p.closed)return null;if(e instanceof c.Observable)return e._isScalar?(p.next(e.value),p.complete(),null):(p.syncErrorThrowable=!0,e.subscribe(p));if(i.isArrayLike(e)){for(var f=0,b=e.length;f<b&&!p.closed;f++)p.next(e[f]);p.closed||p.complete()}else{if(o.isPromise(e))return e.then(function(t){p.closed||(p.next(t),p.complete())},function(t){return p.error(t)}).then(null,function(t){n.root.setTimeout(function(){throw t})}),p;if(e&&"function"==typeof e[u.iterator])for(var d=e[u.iterator]();;){var v=d.next();if(v.done){p.complete();break}if(p.next(v.value),p.closed)break}else if(e&&"function"==typeof e[h.observable]){var y=e[h.observable]();if("function"==typeof y.subscribe)return y.subscribe(new a.InnerSubscriber(t,r,l));p.error(new TypeError("Provided object does not correctly implement Symbol.observable"))}else{var m="You provided "+(s.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";p.error(new TypeError(m))}}return null}},function(t,e,r){"use strict";var n=r(21),i=r(22);e.async=new i.AsyncScheduler(n.AsyncAction)},function(t,e,r){"use strict";function n(t){return t.reduce(function(t,e){return t.concat(e instanceof a.UnsubscriptionError?e.errors:e)},[])}var i=r(11),o=r(63),s=r(26),c=r(8),u=r(7),a=r(64),h=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var r=this,h=r._parent,l=r._parents,p=r._unsubscribe,f=r._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var b=-1,d=l?l.length:0;h;)h.remove(this),h=++b<d&&l[b]||null;if(s.isFunction(p)&&(y=c.tryCatch(p).call(this))===u.errorObject&&(e=!0,t=t||(u.errorObject.e instanceof a.UnsubscriptionError?n(u.errorObject.e.errors):[u.errorObject.e])),i.isArray(f))for(b=-1,d=f.length;++b<d;){var v=f[b];if(o.isObject(v)){var y=c.tryCatch(v.unsubscribe).call(v);if(y===u.errorObject){e=!0,t=t||[];var m=u.errorObject.e;m instanceof a.UnsubscriptionError?t=t.concat(n(m.errors)):t.push(m)}}}if(e)throw new a.UnsubscriptionError(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var r=e;switch(typeof e){case"function":r=new t(e);case"object":if(r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if("function"!=typeof r._addParent){var n=r;(r=new t)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(r),r._addParent(this),r},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var r=e.indexOf(t);-1!==r&&e.splice(r,1)}},t.prototype._addParent=function(t){var e=this,r=e._parent,n=e._parents;r&&r!==t?n?-1===n.indexOf(t)&&n.push(t):this._parents=[t]:this._parent=t},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();e.Subscription=h},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(0),o=r(1),s=r(5),c=r(29),u=r(66),a=r(27),h=function(t){function e(e){t.call(this,e),this.destination=e}return n(e,t),e}(o.Subscriber);e.SubjectSubscriber=h;var l=function(t){function e(){t.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return n(e,t),e.prototype[a.rxSubscriber]=function(){return new h(this)},e.prototype.lift=function(t){var e=new p(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;if(!this.isStopped)for(var e=this.observers,r=e.length,n=e.slice(),i=0;i<r;i++)n[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,r=e.length,n=e.slice(),i=0;i<r;i++)n[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new c.ObjectUnsubscribedError;this.isStopped=!0;for(var t=this.observers,e=t.length,r=t.slice(),n=0;n<e;n++)r[n].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new c.ObjectUnsubscribedError;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(t.complete(),s.Subscription.EMPTY):(this.observers.push(t),new u.SubjectSubscription(this,t))},e.prototype.asObservable=function(){var t=new i.Observable;return t.source=this,t},e.create=function(t,e){return new p(t,e)},e}(i.Observable);e.Subject=l;var p=function(t){function e(e,r){t.call(this),this.destination=e,this.source=r}return n(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):s.Subscription.EMPTY},e}(l);e.AnonymousSubject=p},function(t,e,r){"use strict";e.errorObject={e:{}}},function(t,e,r){"use strict";function n(){try{return i.apply(this,arguments)}catch(t){return o.errorObject.e=t,o.errorObject}}var i,o=r(7);e.tryCatch=function(t){return i=t,n}},function(t,e,r){"use strict";(function(t){var r="undefined"!=typeof window&&window,n="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,i=r||void 0!==t&&t||n;e.root=i,function(){if(!i)throw new Error("RxJS could not find any global context (window, self, global)")}()}).call(e,r(42))},function(t,e,r){"use strict";e.isScheduler=function(t){return t&&"function"==typeof t.schedule}},function(t,e,r){"use strict";e.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(0),o=r(45),s=r(13),c=r(10),u=function(t){function e(e,r){t.call(this),this.array=e,this.scheduler=r,r||1!==e.length||(this._isScalar=!0,this.value=e[0])}return n(e,t),e.create=function(t,r){return new e(t,r)},e.of=function(){for(var t=[],r=0;r<arguments.length;r++)t[r-0]=arguments[r];var n=t[t.length-1];c.isScheduler(n)?t.pop():n=null;var i=t.length;return i>1?new e(t,n):1===i?new o.ScalarObservable(t[0],n):new s.EmptyObservable(n)},e.dispatch=function(t){var e=t.array,r=t.index,n=t.count,i=t.subscriber;r>=n?i.complete():(i.next(e[r]),i.closed||(t.index=r+1,this.schedule(t)))},e.prototype._subscribe=function(t){var r=this.array,n=r.length,i=this.scheduler;if(i)return i.schedule(e.dispatch,0,{array:r,index:0,count:n,subscriber:t});for(var o=0;o<n&&!t.closed;o++)t.next(r[o]);t.complete()},e}(i.Observable);e.ArrayObservable=u},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(e){t.call(this),this.scheduler=e}return n(e,t),e.create=function(t){return new e(t)},e.dispatch=function(t){t.subscriber.complete()},e.prototype._subscribe=function(t){var r=this.scheduler;if(r)return r.schedule(e.dispatch,0,{subscriber:t});t.complete()},e}(r(0).Observable);e.EmptyObservable=i},function(e,r){e.exports=t},function(t,e,r){"use strict";var n=r(115);e.multicast=function(t,e){return function(r){var o;if(o="function"==typeof t?t:function(){return t},"function"==typeof e)return r.lift(new i(o,e));var s=Object.create(r,n.connectableObservableDescriptor);return s.source=r,s.subjectFactory=o,s}};var i=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var r=this.selector,n=this.subjectFactory(),i=r(n).subscribe(t);return i.add(e.subscribe(n)),i},t}();e.MulticastOperator=i},function(t,e,r){"use strict";r.d(e,"a",function(){return n});var n=function(){function t(){}return t.None="None",t.Selection="Selection",t.All="All",t}()},function(t,e,r){"use strict";function n(t){var e=t.Symbol;if("function"==typeof e)return e.iterator||(e.iterator=e("iterator polyfill")),e.iterator;var r=t.Set;if(r&&"function"==typeof(new r)["@@iterator"])return"@@iterator";var n=t.Map;if(n)for(var i=Object.getOwnPropertyNames(n.prototype),o=0;o<i.length;++o){var s=i[o];if("entries"!==s&&"size"!==s&&n.prototype[s]===n.prototype.entries)return s}return"@@iterator"}var i=r(9);e.symbolIteratorPonyfill=n,e.iterator=n(i.root),e.$$iterator=e.iterator},function(t,e,r){"use strict";var n=r(0),i=function(){function t(t,e,r){this.kind=t,this.value=e,this.error=r,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,r){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return r&&r()}},t.prototype.accept=function(t,e,r){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,r)},t.prototype.toObservable=function(){switch(this.kind){case"N":return n.Observable.of(this.value);case"E":return n.Observable.throw(this.error);case"C":return n.Observable.empty()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();e.Notification=i},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(3),o=r(2);e.mergeMap=function(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),function(n){return"number"==typeof e&&(r=e,e=null),n.lift(new s(t,e,r))}};var s=function(){function t(t,e,r){void 0===r&&(r=Number.POSITIVE_INFINITY),this.project=t,this.resultSelector=e,this.concurrent=r}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.project,this.resultSelector,this.concurrent))},t}();e.MergeMapOperator=s;var c=function(t){function e(e,r,n,i){void 0===i&&(i=Number.POSITIVE_INFINITY),t.call(this,e),this.project=r,this.resultSelector=n,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return n(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,r)},e.prototype._innerSub=function(t,e,r){this.add(i.subscribeToResult(this,t,e,r))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},e.prototype.notifyNext=function(t,e,r,n,i){this.resultSelector?this._notifyResultSelector(t,e,r,n):this.destination.next(e)},e.prototype._notifyResultSelector=function(t,e,r,n){var i;try{i=this.resultSelector(t,e,r,n)}catch(t){return void this.destination.error(t)}this.destination.next(i)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(o.OuterSubscriber);e.MergeMapSubscriber=c},function(t,e,r){"use strict";var n=r(11);e.isNumeric=function(t){return!n.isArray(t)&&t-parseFloat(t)+1>=0}},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(9),o=function(t){function e(e,r){t.call(this,e,r),this.scheduler=e,this.work=r,this.pending=!1}return n(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t,this.pending=!0;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,e)),this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),i.root.setInterval(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){return void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending?e:i.root.clearInterval(e)&&void 0||void 0},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r=!1,n=void 0;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,r=e.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(r(211).Action);e.AsyncAction=o},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(){t.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=void 0}return n(e,t),e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var r;this.active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}}},e}(r(212).Scheduler);e.AsyncScheduler=i},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(1);e.map=function(t,e){return function(r){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new o(t,e))}};var o=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.thisArg))},t}();e.MapOperator=o;var s=function(t){function e(e,r,n){t.call(this,e),this.project=r,this.count=0,this.thisArg=n||this}return n(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.Subscriber)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(){var e=t.call(this,"argument out of range");this.name=e.name="ArgumentOutOfRangeError",this.stack=e.stack,this.message=e.message}return n(e,t),e}(Error);e.ArgumentOutOfRangeError=i},function(t,e,r){"use strict";var n=r(57),i=r(58),o=r(52),s=r(43);e.reduce=function(t,e){return arguments.length>=2?function(r){return s.pipe(n.scan(t,e),i.takeLast(1),o.defaultIfEmpty(e))(r)}:function(e){return s.pipe(n.scan(function(e,r,n){return t(e,r,n+1)}),i.takeLast(1))(e)}}},function(t,e,r){"use strict";e.isFunction=function(t){return"function"==typeof t}},function(t,e,r){"use strict";var n=r(9).root.Symbol;e.rxSubscriber="function"==typeof n&&"function"==typeof n.for?n.for("rxSubscriber"):"@@rxSubscriber",e.$$rxSubscriber=e.rxSubscriber},function(t,e,r){"use strict";function n(t){var e,r=t.Symbol;return"function"==typeof r?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}var i=r(9);e.getSymbolObservable=n,e.observable=n(i.root),e.$$observable=e.observable},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(){var e=t.call(this,"object unsubscribed");this.name=e.name="ObjectUnsubscribedError",this.stack=e.stack,this.message=e.message}return n(e,t),e}(Error);e.ObjectUnsubscribedError=i},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(6),o=r(5),s=function(t){function e(){t.apply(this,arguments),this.value=null,this.hasNext=!1,this.hasCompleted=!1}return n(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),o.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),o.Subscription.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(i.Subject);e.AsyncSubject=s},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(12),o=r(11),s=r(2),c=r(3),u={};e.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var r=null;return"function"==typeof t[t.length-1]&&(r=t.pop()),1===t.length&&o.isArray(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(new i.ArrayObservable([e].concat(t)),new a(r))}};var a=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.project))},t}();e.CombineLatestOperator=a;var h=function(t){function e(e,r){t.call(this,e),this.project=r,this.active=0,this.values=[],this.observables=[]}return n(e,t),e.prototype._next=function(t){this.values.push(u),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var r=0;r<e;r++){var n=t[r];this.add(c.subscribeToResult(this,n,n,r))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,r,n,i){var o=this.values,s=o[r],c=this.toRespond?s===u?--this.toRespond:this.toRespond:0;o[r]=e,0===c&&(this.project?this._tryProject(o):this.destination.next(o.slice()))},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(s.OuterSubscriber);e.CombineLatestSubscriber=h},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(1),o=r(18);e.observeOn=function(t,e){return void 0===e&&(e=0),function(r){return r.lift(new s(t,e))}};var s=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.scheduler,this.delay))},t}();e.ObserveOnOperator=s;var c=function(t){function e(e,r,n){void 0===n&&(n=0),t.call(this,e),this.scheduler=r,this.delay=n}return n(e,t),e.dispatch=function(t){var e=t.notification,r=t.destination;e.observe(r),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new u(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(o.Notification.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(o.Notification.createError(t))},e.prototype._complete=function(){this.scheduleMessage(o.Notification.createComplete())},e}(i.Subscriber);e.ObserveOnSubscriber=c;var u=function(){return function(t,e){this.notification=t,this.destination=e}}();e.ObserveOnMessage=u},function(t,e,r){"use strict";var n=r(19),i=r(73);e.mergeAll=function(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),n.mergeMap(i.identity,null,t)}},function(t,e,r){"use strict";e.isDate=function(t){return t instanceof Date&&!isNaN(+t)}},function(t,e,r){"use strict";function n(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var r=t[t.length-1];return"function"==typeof r&&t.pop(),new o.ArrayObservable(t).lift(new l(r))}var i=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(12),s=r(11),c=r(1),u=r(2),a=r(3),h=r(17);e.zip=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){return e.lift.call(n.apply(void 0,[e].concat(t)))}},e.zipStatic=n;var l=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new p(t,this.project))},t}();e.ZipOperator=l;var p=function(t){function e(e,r,n){void 0===n&&(n=Object.create(null)),t.call(this,e),this.iterators=[],this.active=0,this.project="function"==typeof r?r:null,this.values=n}return i(e,t),e.prototype._next=function(t){var e=this.iterators;s.isArray(t)?e.push(new b(t)):"function"==typeof t[h.iterator]?e.push(new f(t[h.iterator]())):e.push(new d(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(0!==e){this.active=e;for(var r=0;r<e;r++){var n=t[r];n.stillUnsubscribed?this.add(n.subscribe(n,r)):this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,r=this.destination,n=0;n<e;n++)if("function"==typeof(s=t[n]).hasValue&&!s.hasValue())return;for(var i=!1,o=[],n=0;n<e;n++){var s=t[n],c=s.next();if(s.hasCompleted()&&(i=!0),c.done)return void r.complete();o.push(c.value)}this.project?this._tryProject(o):r.next(o),i&&r.complete()},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(c.Subscriber);e.ZipSubscriber=p;var f=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}(),b=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[h.iterator]=function(){return this},t.prototype.next=function(t){var e=this.index++,r=this.array;return e<this.length?{value:r[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),d=function(t){function e(e,r,n){t.call(this,e),this.parent=r,this.observable=n,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}return i(e,t),e.prototype[h.iterator]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,r,n,i){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return a.subscribeToResult(this,this.observable,this,e)},e}(u.OuterSubscriber)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(6),o=r(77),s=r(5),c=r(32),u=r(29),a=r(66),h=function(t){function e(e,r,n){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===r&&(r=Number.POSITIVE_INFINITY),t.call(this),this.scheduler=n,this._events=[],this._bufferSize=e<1?1:e,this._windowTime=r<1?1:r}return n(e,t),e.prototype.next=function(e){var r=this._getNow();this._events.push(new l(r,e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,r=this._trimBufferThenGetEvents(),n=this.scheduler;if(this.closed)throw new u.ObjectUnsubscribedError;this.hasError?e=s.Subscription.EMPTY:this.isStopped?e=s.Subscription.EMPTY:(this.observers.push(t),e=new a.SubjectSubscription(this,t)),n&&t.add(t=new c.ObserveOnSubscriber(t,n));for(var i=r.length,o=0;o<i&&!t.closed;o++)t.next(r[o].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||o.queue).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,r=this._windowTime,n=this._events,i=n.length,o=0;o<i&&!(t-n[o].time<r);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&n.splice(0,o),n},e}(i.Subject);e.ReplaySubject=h;var l=function(){return function(t,e){this.time=t,this.value=e}}()},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(){var e=t.call(this,"no elements in sequence");this.name=e.name="EmptyError",this.stack=e.stack,this.message=e.message}return n(e,t),e}(Error);e.EmptyError=i},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(2),o=r(3);e.defaultThrottleConfig={leading:!0,trailing:!1},e.throttle=function(t,r){return void 0===r&&(r=e.defaultThrottleConfig),function(e){return e.lift(new s(t,r.leading,r.trailing))}};var s=function(){function t(t,e,r){this.durationSelector=t,this.leading=e,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.durationSelector,this.leading,this.trailing))},t}(),c=function(t){function e(e,r,n,i){t.call(this,e),this.destination=e,this.durationSelector=r,this._leading=n,this._trailing=i,this._hasTrailingValue=!1}return n(e,t),e.prototype._next=function(t){if(this.throttled)this._trailing&&(this._hasTrailingValue=!0,this._trailingValue=t);else{var e=this.tryDurationSelector(t);e&&this.add(this.throttled=o.subscribeToResult(this,e)),this._leading&&(this.destination.next(t),this._trailing&&(this._hasTrailingValue=!0,this._trailingValue=t))}},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype._unsubscribe=function(){var t=this,e=t.throttled;t._trailingValue,t._hasTrailingValue,t._trailing;this._trailingValue=null,this._hasTrailingValue=!1,e&&(this.remove(e),this.throttled=null,e.unsubscribe())},e.prototype._sendTrailing=function(){var t=this,e=t.destination,r=t.throttled,n=t._trailing,i=t._trailingValue,o=t._hasTrailingValue;r&&n&&o&&(e.next(i),this._trailingValue=null,this._hasTrailingValue=!1)},e.prototype.notifyNext=function(t,e,r,n,i){this._sendTrailing(),this._unsubscribe()},e.prototype.notifyComplete=function(){this._sendTrailing(),this._unsubscribe()},e}(i.OuterSubscriber)},function(t,e,r){"use strict";r.d(e,"a",function(){return o});var n=r(14),i=(r.n(n),r(16)),o=function(){function t(){this.expandMode=i.a.None}return t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[]},t}()},function(t,e,r){"use strict";r.d(e,"a",function(){return a}),r.d(e,"b",function(){return h});var n=r(14),i=(r.n(n),r(62)),o=(r.n(i),r(41)),s=r(39),c=r(16),u=function(){},a={provide:i.NG_VALUE_ACCESSOR,useExisting:Object(n.forwardRef)(function(){return h}),multi:!0},h=function(){function t(t,e){var r=this;this.svc=t,this.defaultOpts=e,this.onTouchedCallback=u,this.showMoreLink=!1,this.moreLoaded=!1,this.disabled=!1,this.placeholder="",this.filterPlaceholder="Type here for filtering items...",this.allowFilter=!0,this._isOpen=!1,this.onChangeCallback=u,this.haveFocus=!1,this.inputFocus=!1,this.clickedOutside=this.clickedOutside.bind(this),this.svc.modelChanged$.subscribe(function(t){r.onChangeCallback(t)}),this.maxVisibleItemCount=e.maxVisibleItemCount||0,this.allowParentSelection=void 0===e.allowParentSelection||null===e.allowParentSelection||e.allowParentSelection,this.allowFilter=void 0===e.allowFilter||null===e.allowFilter||e.allowFilter,this.filterCaseSensitive=void 0!==e.filterCaseSensitive&&null!==e.filterCaseSensitive&&e.filterCaseSensitive,this.filterPlaceholder=e.filterPlaceholder||"Type here for filtering items...",this.idField=e.idField||"id",this.textField=e.textField||"id",this.childrenField=e.childrenField||"",this.expandMode=e.expandMode||c.a.None}return Object.defineProperty(t.prototype,"items",{set:function(t){this.svc.setItems(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"idField",{set:function(t){this.svc.setConfiguration(function(e){return e.idProperty=t},!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textField",{set:function(t){this.svc.setConfiguration(function(e){return e.textProperty=t},!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"allowParentSelection",{get:function(){return this.svc.Configuration.allowParentSelection},set:function(t){this.svc.setConfiguration(function(e){return e.allowParentSelection=t},!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"restructureWhenChildSameName",{get:function(){return this.svc.Configuration.restructureWhenChildSameName},set:function(t){this.svc.setConfiguration(function(e){return e.restructureWhenChildSameName=t},!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"childrenField",{set:function(t){this.svc.setConfiguration(function(e){return e.childProperty=t},!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"multiple",{get:function(){return this.svc.Configuration.allowMultiple},set:function(t){this.svc.setConfiguration(function(e){return e.allowMultiple=t},!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filterCaseSensitive",{get:function(){return this.svc.Configuration.filterCaseSensitive},set:function(t){this.svc.setConfiguration(function(e){return e.filterCaseSensitive=t},!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expandMode",{get:function(){return this.svc.Configuration.expandMode},set:function(t){this.svc.setConfiguration(function(e){return e.expandMode=t},!0),this.svc.setExpand()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxVisibleItemCount",{get:function(){return this.svc.Configuration.maxVisibleItemCount},set:function(t){this.svc.setConfiguration(function(e){return e.maxVisibleItemCount=t},!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"internalItems",{get:function(){return this.svc.getInternalItems()||[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selection",{get:function(){return this.showMoreLink=this.maxVisibleItemCount>0&&this.svc.getInternalSelection().length-this.maxVisibleItemCount>0,this.svc.getInternalSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filter",{get:function(){return this.svc.Configuration.filter},set:function(t){this.svc.setConfiguration(function(e){return e.filter=t},!1);for(var e=0,r=this.internalItems;e<r.length;e++){var n=r[e];this.ProcessMatchFilterTreeItem(n,this.svc.Configuration.filter)}this.svc.setExpand()},enumerable:!0,configurable:!0}),t.prototype.keyUp=function(t){},t.prototype.toggle=function(t){t.preventDefault(),this.haveFocus=!0,this.svc.toggleOpen()},t.prototype.removeItem=function(t,e){t.stopPropagation(),this.svc.toggleItemSelection(e)},Object.defineProperty(t.prototype,"isOpen",{get:function(){return this.svc.Configuration.isOpen},enumerable:!0,configurable:!0}),t.prototype.clickedOutside=function(){this.inputFocus||((!this.haveFocus&&this.isOpen||this.haveFocus&&!this.isOpen)&&this.onTouched(),this.haveFocus=!1)},t.prototype.onTouched=function(){this.svc.close(),this.onTouchedCallback()},t.prototype.setInputFocus=function(){this.inputFocus=!0},t.prototype.setInputFocusOut=function(){this.inputFocus=!1},t.prototype.writeValue=function(t){this.svc.setSelection(t)},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.setDisabledState=function(t){this.disabled=t},t.prototype.loadMore=function(t){t.stopPropagation(),this.moreLoaded=!this.moreLoaded},t.prototype.ProcessMatchFilterTreeItem=function(t,e){var r=!1;if(t&&t.children&&t.children.length>0)for(var n=0,i=t.children;n<i.length;n++){var o=i[n];r=this.ProcessMatchFilterTreeItem(o,e)||r}return t.matchFilter=this.filterCaseSensitive?t.id.indexOf(e)>-1||t.text.indexOf(e)>-1||r:t.id.toLowerCase().indexOf(e.toLowerCase())>-1||t.text.toLowerCase().indexOf(e.toLowerCase())>-1||r,t.matchFilter},t.decorators=[{type:n.Component,args:[{selector:"tree-select",templateUrl:"./tree-select.component.html",providers:[a,o.a],styleUrls:["./tree-select.component.scss"]}]}],t.ctorParameters=function(){return[{type:o.a},{type:s.a}]},t.propDecorators={disabled:[{type:n.Input}],placeholder:[{type:n.Input}],filterPlaceholder:[{type:n.Input}],allowFilter:[{type:n.Input}],items:[{type:n.Input}],idField:[{type:n.Input}],textField:[{type:n.Input}],allowParentSelection:[{type:n.Input}],restructureWhenChildSameName:[{type:n.Input}],childrenField:[{type:n.Input}],multiple:[{type:n.Input}],filterCaseSensitive:[{type:n.Input}],expandMode:[{type:n.Input}],maxVisibleItemCount:[{type:n.Input}]},t}()},function(t,e,r){"use strict";r.d(e,"a",function(){return u});var n=r(171),i=(r.n(n),r(467)),o=r(468),s=r(14),c=(r.n(s),r(16)),u=function(){function t(){this.modelChanged$=new n.Subject,this._options=new o.a}return t.prototype.close=function(){this.Configuration.isOpen&&this.setConfiguration(function(t){return t.isOpen=!1},!1)},t.prototype.open=function(){this.Configuration.isOpen||this.setConfiguration(function(t){return t.isOpen=!0},!1)},t.prototype.toggleOpen=function(){this.setConfiguration(function(t){return t.isOpen=!t.isOpen},!1)},t.prototype.setItems=function(t){this.setConfiguration(function(e){return e.items=t},!0),this.setExpand()},t.prototype.getInternalItems=function(){return this._items},t.prototype.setSelection=function(t){this.setConfiguration(function(e){return e.model=t},!0),this.setExpand()},t.prototype.setSelectedItemOrChild=function(t,e){for(var r=0,n=t;r<n.length;r++){var i=n[r];i.hasChild?(i.id===e&&(i.selected=!0),this.setSelectedItemOrChild(i.children,e)):i.id===e&&(i.selected=!0)}},t.prototype.getSelection=function(){if(this.Configuration.allowMultiple)return this.getInternalSelection().map(function(t){return t.data});var t=this.getInternalSelection();return t&&t.length>0?t[0].data:null},t.prototype.getInternalSelection=function(){var t=this.getSelectedItems(this._items);if(t&&t.length>0)for(var e=0,r=this._options.maxVisibleItemCount?this._options.maxVisibleItemCount:0,n=0,i=t;n<i.length;n++){var o=i[n];o.isVisible=(e<r||0===r)&&(!o.hasChild||o.children.every(function(t){return!1===t.selected})),o.isVisible&&r>0&&e++}return t},t.prototype.toggleItemSelection=function(t){var e=this;this.Configuration.allowMultiple||this.setAllUnselected(this._items),t.selected=!t.selected,this.setConfiguration(function(t){return t.model=e.getSelection()},!1),this.Configuration.closeOnSelection&&this.setConfiguration(function(t){return t.isOpen=!1},!1)},t.prototype.setAllUnselected=function(t){for(var e=0,r=t;e<r.length;e++){var n=r[e];n.hasChild?(n.selected=!1,this.setAllUnselected(n.children)):n.selected=!1}},t.prototype.setConfiguration=function(t,e){var r=this._options.model;t(this._options),this._options.isValid()&&this.reconfigure(e),!e&&(r&&this._options.model!==r||!r&&this._options.model)&&this.modelChanged$.next(this._options.model)},Object.defineProperty(t.prototype,"Configuration",{get:function(){return this._options},enumerable:!0,configurable:!0}),t.prototype.setExpand=function(){this.setExpandForList(this._items)},t.prototype.setExpandForList=function(t){if(t)for(var e=0,r=t;e<r.length;e++){var n=r[e];this.setExpandForList(n.children),n.isOpen=this._options.filterExpandMode===c.a.All,this._options.filterExpandMode===c.a.Selection&&n.children&&(n.isOpen=n.children.some(function(t){return t.isOpen||t.selected}))}},t.prototype.toSelectableItems=function(t){var e=this;if(t&&Array.isArray(t)){var r=1;return t.map(function(t){var n;return t[e._options.idProperty]&&""!==t[e._options.idProperty]&&t[e._options.textProperty]?n=new i.a((t[e._options.idProperty]||"").toString(),t[e._options.textProperty],t,e):(n=new i.a(r.toString(),t,t,e),r++),e._options.isHierarchy()&&(n.children=e.toSelectableItems(t[e._options.childProperty])),n})}return[]},t.prototype.getSelectedItems=function(t){if(this.Configuration.isValid()){for(var e=[],r=0,n=t;r<n.length;r++){var i=n[r];i.hasChild&&!0===i.selected?e=i.children.every(function(t){return!1===t.selected})?e.concat([i]):e.concat(this.getSelectedItems(i.children)):i.hasChild?e=e.concat(this.getSelectedItems(i.children)):!0===i.selected&&(e=e.concat([i]))}return e}return[]},t.prototype.reconfigure=function(t){var e=this;if(this.Configuration.isValid()){this.checkConfig(),t&&(this._items=this.toSelectableItems(this.Configuration.items));var r=[];this.getModel().forEach(function(t){r=r.concat(e.getItemForModel(t,e._items))}),r.forEach(function(t){return t._selected=!0})}},t.prototype.checkConfig=function(){this.Configuration.allowMultiple&&this.Configuration.closeOnSelection?this.Configuration.closeOnSelection=!1:this.Configuration.allowMultiple||this.Configuration.closeOnSelection||(this.Configuration.closeOnSelection=!0)},t.prototype.getModel=function(){return this.Configuration.model?Array.isArray(this.Configuration.model)?this.Configuration.model:[this.Configuration.model]:[]},t.prototype.getItemForModel=function(t,e){for(var r=[],n=0,i=e;n<i.length;n++){var o=i[n];t&&("object"!=typeof t?o.data===t&&r.push(o):(t[this.Configuration.idProperty]&&o.id===(t[this.Configuration.idProperty]||"").toString()&&r.push(o),this.Configuration.isHierarchy()&&o.children&&o.children.length>0&&(r=r.concat(this.getItemForModel(t,o.children)))))}return r},t.decorators=[{type:s.Injectable}],t.ctorParameters=function(){return[]},t}()},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";function n(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:i.noop}var i=r(44);e.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return n(t)},e.pipeFromArray=n},function(t,e,r){"use strict";e.noop=function(){}},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=function(t){function e(e,r){t.call(this),this.value=e,this.scheduler=r,this._isScalar=!0,r&&(this._isScalar=!1)}return n(e,t),e.create=function(t,r){return new e(t,r)},e.dispatch=function(t){var e=t.done,r=t.value,n=t.subscriber;e?n.complete():(n.next(r),n.closed||(t.done=!0,this.schedule(t)))},e.prototype._subscribe=function(t){var r=this.value,n=this.scheduler;if(n)return n.schedule(e.dispatch,0,{done:!1,value:r,subscriber:t});t.next(r),t.closed||t.complete()},e}(r(0).Observable);e.ScalarObservable=i},function(t,e,r){"use strict";var n=r(10),i=r(69),o=r(70),s=r(47);e.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return 1===t.length||2===t.length&&n.isScheduler(t[1])?o.from(t[0]):s.concatAll()(i.of.apply(void 0,t))}},function(t,e,r){"use strict";var n=r(33);e.concatAll=function(){return n.mergeAll(1)}},function(t,e,r){"use strict";function n(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var r=Number.POSITIVE_INFINITY,n=null,u=t[t.length-1];return c.isScheduler(u)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(r=t.pop())):"number"==typeof u&&(r=t.pop()),null===n&&1===t.length&&t[0]instanceof i.Observable?t[0]:s.mergeAll(r)(new o.ArrayObservable(t,n))}var i=r(0),o=r(12),s=r(33),c=r(10);e.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){return e.lift.call(n.apply(void 0,[e].concat(t)))}},e.mergeStatic=n},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(11),o=r(12),s=r(2),c=r(3);e.race=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];if(1===t.length){if(!i.isArray(t[0]))return t[0];t=t[0]}return new o.ArrayObservable(t).lift(new u)};var u=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new a(t))},t}();e.RaceOperator=u;var a=function(t){function e(e){t.call(this,e),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}return n(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var r=0;r<e&&!this.hasFirst;r++){var n=t[r],i=c.subscribeToResult(this,n,n,r);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},e.prototype.notifyNext=function(t,e,r,n,i){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==r){var s=this.subscriptions[o];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(e)},e}(s.OuterSubscriber);e.RaceSubscriber=a},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(71),o=r(11),s=r(2),c=r(3);e.onErrorResumeNext=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return 1===t.length&&o.isArray(t[0])&&(t=t[0]),function(e){return e.lift(new u(t))}},e.onErrorResumeNextStatic=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var r=null;return 1===t.length&&o.isArray(t[0])&&(t=t[0]),r=t.shift(),new i.FromObservable(r,null).lift(new u(t))};var u=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.nextSources))},t}(),a=function(t){function e(e,r){t.call(this,e),this.destination=e,this.nextSources=r}