UNPKG

ng-split-areas

Version:

Splitting views in Angular horizontally / vertically with configurable size-restrictions

1 lines 65.5 kB
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common"],factory):factory((global.ng=global.ng||{},global.ng.ngSplitAreas={}),global.ng.core,global.ng.common)}(this,function(exports,core,common){"use strict";function __decorate(decorators,target,key,desc){var d,c=arguments.length,r=c<3?target:null===desc?desc=Object.getOwnPropertyDescriptor(target,key):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r}function __metadata(metadataKey,metadataValue){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(metadataKey,metadataValue)}function __extends$1(d,b){function __(){this.constructor=d}extendStatics$1(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}function isFunction(x){return"function"==typeof x}function hostReportError(err){setTimeout(function(){throw err},0)}function isObject(x){return null!==x&&"object"==typeof x}function UnsubscriptionErrorImpl(errors){return Error.call(this),this.message=errors?errors.length+" errors occurred during unsubscription:\n"+errors.map(function(err,i){return i+1+") "+err.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=errors,this}function flattenUnsubscriptionErrors(errors){return errors.reduce(function(errs,err){return errs.concat(err instanceof UnsubscriptionError?err.errors:err)},[])}function canReportError(observer){for(;observer;){var _a=observer,closed_1=_a.closed,destination=_a.destination,isStopped=_a.isStopped;if(closed_1||isStopped)return!1;observer=destination&&destination instanceof Subscriber?destination:null}return!0}function toSubscriber(nextOrObserver,error,complete){if(nextOrObserver){if(nextOrObserver instanceof Subscriber)return nextOrObserver;if(nextOrObserver[rxSubscriber])return nextOrObserver[rxSubscriber]()}return nextOrObserver||error||complete?new Subscriber(nextOrObserver,error,complete):new Subscriber(empty)}function noop(){}function pipeFromArray(fns){return fns?1===fns.length?fns[0]:function(input){return fns.reduce(function(prev,fn){return fn(prev)},input)}:noop}function getPromiseCtor(promiseCtor){if(promiseCtor||(promiseCtor=config.Promise||Promise),!promiseCtor)throw new Error("no Promise impl found");return promiseCtor}function ObjectUnsubscribedErrorImpl(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}function ArgumentOutOfRangeErrorImpl(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}function EmptyErrorImpl(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}function debounceTime(dueTime,scheduler){return void 0===scheduler&&(scheduler=async),function(source){return source.lift(new DebounceTimeOperator(dueTime,scheduler))}}function dispatchNext$2(subscriber){subscriber.debouncedNext()}var extendStatics$1=function(d,b){return(extendStatics$1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)},_enable_super_gross_mode_that_will_cause_bad_things=!1,config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value&&(new Error).stack,_enable_super_gross_mode_that_will_cause_bad_things=value},get useDeprecatedSynchronousErrorHandling(){return _enable_super_gross_mode_that_will_cause_bad_things}},empty={closed:!0,next:function(value){},error:function(err){if(config.useDeprecatedSynchronousErrorHandling)throw err;hostReportError(err)},complete:function(){}},isArray=Array.isArray||function(x){return x&&"number"==typeof x.length};UnsubscriptionErrorImpl.prototype=Object.create(Error.prototype);var UnsubscriptionError=UnsubscriptionErrorImpl,Subscription=function(){function Subscription(unsubscribe){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,unsubscribe&&(this._unsubscribe=unsubscribe)}return Subscription.prototype.unsubscribe=function(){var errors;if(!this.closed){var _a=this,_parentOrParents=_a._parentOrParents,_unsubscribe=_a._unsubscribe,_subscriptions=_a._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,_parentOrParents instanceof Subscription)_parentOrParents.remove(this);else if(null!==_parentOrParents)for(index=0;index<_parentOrParents.length;++index)_parentOrParents[index].remove(this);if(isFunction(_unsubscribe))try{_unsubscribe.call(this)}catch(e){errors=e instanceof UnsubscriptionError?flattenUnsubscriptionErrors(e.errors):[e]}if(isArray(_subscriptions))for(var index=-1,len=_subscriptions.length;++index<len;){var sub=_subscriptions[index];if(isObject(sub))try{sub.unsubscribe()}catch(e){errors=errors||[],e instanceof UnsubscriptionError?errors=errors.concat(flattenUnsubscriptionErrors(e.errors)):errors.push(e)}}if(errors)throw new UnsubscriptionError(errors)}},Subscription.prototype.add=function(teardown){var subscription=teardown;if(!teardown)return Subscription.EMPTY;switch(typeof teardown){case"function":subscription=new Subscription(teardown);case"object":if(subscription===this||subscription.closed||"function"!=typeof subscription.unsubscribe)return subscription;if(this.closed)return subscription.unsubscribe(),subscription;if(!(subscription instanceof Subscription)){var tmp=subscription;(subscription=new Subscription)._subscriptions=[tmp]}break;default:throw new Error("unrecognized teardown "+teardown+" added to Subscription.")}var _parentOrParents=subscription._parentOrParents;if(null===_parentOrParents)subscription._parentOrParents=this;else if(_parentOrParents instanceof Subscription){if(_parentOrParents===this)return subscription;subscription._parentOrParents=[_parentOrParents,this]}else{if(-1!==_parentOrParents.indexOf(this))return subscription;_parentOrParents.push(this)}var subscriptions=this._subscriptions;return null===subscriptions?this._subscriptions=[subscription]:subscriptions.push(subscription),subscription},Subscription.prototype.remove=function(subscription){var subscriptions=this._subscriptions;if(subscriptions){var subscriptionIndex=subscriptions.indexOf(subscription);-1!==subscriptionIndex&&subscriptions.splice(subscriptionIndex,1)}},Subscription.EMPTY=function(empty){return empty.closed=!0,empty}(new Subscription),Subscription}(),rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),Subscriber=function(_super){function Subscriber(destinationOrNext,error,complete){var _this=_super.call(this)||this;switch(_this.syncErrorValue=null,_this.syncErrorThrown=!1,_this.syncErrorThrowable=!1,_this.isStopped=!1,arguments.length){case 0:_this.destination=empty;break;case 1:if(!destinationOrNext){_this.destination=empty;break}if("object"==typeof destinationOrNext){destinationOrNext instanceof Subscriber?(_this.syncErrorThrowable=destinationOrNext.syncErrorThrowable,_this.destination=destinationOrNext,destinationOrNext.add(_this)):(_this.syncErrorThrowable=!0,_this.destination=new SafeSubscriber(_this,destinationOrNext));break}default:_this.syncErrorThrowable=!0,_this.destination=new SafeSubscriber(_this,destinationOrNext,error,complete)}return _this}return __extends$1(Subscriber,_super),Subscriber.prototype[rxSubscriber]=function(){return this},Subscriber.create=function(next,error,complete){var subscriber=new Subscriber(next,error,complete);return subscriber.syncErrorThrowable=!1,subscriber},Subscriber.prototype.next=function(value){this.isStopped||this._next(value)},Subscriber.prototype.error=function(err){this.isStopped||(this.isStopped=!0,this._error(err))},Subscriber.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},Subscriber.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,_super.prototype.unsubscribe.call(this))},Subscriber.prototype._next=function(value){this.destination.next(value)},Subscriber.prototype._error=function(err){this.destination.error(err),this.unsubscribe()},Subscriber.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},Subscriber.prototype._unsubscribeAndRecycle=function(){var _parentOrParents=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=_parentOrParents,this},Subscriber}(Subscription),SafeSubscriber=function(_super){function SafeSubscriber(_parentSubscriber,observerOrNext,error,complete){var _this=_super.call(this)||this;_this._parentSubscriber=_parentSubscriber;var next,context=_this;return isFunction(observerOrNext)?next=observerOrNext:observerOrNext&&(next=observerOrNext.next,error=observerOrNext.error,complete=observerOrNext.complete,observerOrNext!==empty&&(isFunction((context=Object.create(observerOrNext)).unsubscribe)&&_this.add(context.unsubscribe.bind(context)),context.unsubscribe=_this.unsubscribe.bind(_this))),_this._context=context,_this._next=next,_this._error=error,_this._complete=complete,_this}return __extends$1(SafeSubscriber,_super),SafeSubscriber.prototype.next=function(value){if(!this.isStopped&&this._next){var _parentSubscriber=this._parentSubscriber;config.useDeprecatedSynchronousErrorHandling&&_parentSubscriber.syncErrorThrowable?this.__tryOrSetError(_parentSubscriber,this._next,value)&&this.unsubscribe():this.__tryOrUnsub(this._next,value)}},SafeSubscriber.prototype.error=function(err){if(!this.isStopped){var _parentSubscriber=this._parentSubscriber,useDeprecatedSynchronousErrorHandling=config.useDeprecatedSynchronousErrorHandling;if(this._error)useDeprecatedSynchronousErrorHandling&&_parentSubscriber.syncErrorThrowable?(this.__tryOrSetError(_parentSubscriber,this._error,err),this.unsubscribe()):(this.__tryOrUnsub(this._error,err),this.unsubscribe());else if(_parentSubscriber.syncErrorThrowable)useDeprecatedSynchronousErrorHandling?(_parentSubscriber.syncErrorValue=err,_parentSubscriber.syncErrorThrown=!0):hostReportError(err),this.unsubscribe();else{if(this.unsubscribe(),useDeprecatedSynchronousErrorHandling)throw err;hostReportError(err)}}},SafeSubscriber.prototype.complete=function(){var _this=this;if(!this.isStopped){var _parentSubscriber=this._parentSubscriber;if(this._complete){var wrappedComplete=function(){return _this._complete.call(_this._context)};config.useDeprecatedSynchronousErrorHandling&&_parentSubscriber.syncErrorThrowable?(this.__tryOrSetError(_parentSubscriber,wrappedComplete),this.unsubscribe()):(this.__tryOrUnsub(wrappedComplete),this.unsubscribe())}else this.unsubscribe()}},SafeSubscriber.prototype.__tryOrUnsub=function(fn,value){try{fn.call(this._context,value)}catch(err){if(this.unsubscribe(),config.useDeprecatedSynchronousErrorHandling)throw err;hostReportError(err)}},SafeSubscriber.prototype.__tryOrSetError=function(parent,fn,value){if(!config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{fn.call(this._context,value)}catch(err){return config.useDeprecatedSynchronousErrorHandling?(parent.syncErrorValue=err,parent.syncErrorThrown=!0,!0):(hostReportError(err),!0)}return!1},SafeSubscriber.prototype._unsubscribe=function(){var _parentSubscriber=this._parentSubscriber;this._context=null,this._parentSubscriber=null,_parentSubscriber.unsubscribe()},SafeSubscriber}(Subscriber),observable="function"==typeof Symbol&&Symbol.observable||"@@observable",Observable=function(){function Observable(subscribe){this._isScalar=!1,subscribe&&(this._subscribe=subscribe)}return Observable.prototype.lift=function(operator){var observable$$1=new Observable;return observable$$1.source=this,observable$$1.operator=operator,observable$$1},Observable.prototype.subscribe=function(observerOrNext,error,complete){var operator=this.operator,sink=toSubscriber(observerOrNext,error,complete);if(operator?sink.add(operator.call(sink,this.source)):sink.add(this.source||config.useDeprecatedSynchronousErrorHandling&&!sink.syncErrorThrowable?this._subscribe(sink):this._trySubscribe(sink)),config.useDeprecatedSynchronousErrorHandling&&sink.syncErrorThrowable&&(sink.syncErrorThrowable=!1,sink.syncErrorThrown))throw sink.syncErrorValue;return sink},Observable.prototype._trySubscribe=function(sink){try{return this._subscribe(sink)}catch(err){config.useDeprecatedSynchronousErrorHandling&&(sink.syncErrorThrown=!0,sink.syncErrorValue=err),canReportError(sink)?sink.error(err):console.warn(err)}},Observable.prototype.forEach=function(next,promiseCtor){var _this=this;return new(promiseCtor=getPromiseCtor(promiseCtor))(function(resolve,reject){var subscription;subscription=_this.subscribe(function(value){try{next(value)}catch(err){reject(err),subscription&&subscription.unsubscribe()}},reject,resolve)})},Observable.prototype._subscribe=function(subscriber){var source=this.source;return source&&source.subscribe(subscriber)},Observable.prototype[observable]=function(){return this},Observable.prototype.pipe=function(){for(var operations=[],_i=0;_i<arguments.length;_i++)operations[_i]=arguments[_i];return 0===operations.length?this:pipeFromArray(operations)(this)},Observable.prototype.toPromise=function(promiseCtor){var _this=this;return new(promiseCtor=getPromiseCtor(promiseCtor))(function(resolve,reject){var value;_this.subscribe(function(x){return value=x},function(err){return reject(err)},function(){return resolve(value)})})},Observable.create=function(subscribe){return new Observable(subscribe)},Observable}();ObjectUnsubscribedErrorImpl.prototype=Object.create(Error.prototype);var NotificationKind,ObjectUnsubscribedError=ObjectUnsubscribedErrorImpl,SubjectSubscription=function(_super){function SubjectSubscription(subject,subscriber){var _this=_super.call(this)||this;return _this.subject=subject,_this.subscriber=subscriber,_this.closed=!1,_this}return __extends$1(SubjectSubscription,_super),SubjectSubscription.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var subject=this.subject,observers=subject.observers;if(this.subject=null,observers&&0!==observers.length&&!subject.isStopped&&!subject.closed){var subscriberIndex=observers.indexOf(this.subscriber);-1!==subscriberIndex&&observers.splice(subscriberIndex,1)}}},SubjectSubscription}(Subscription),SubjectSubscriber=function(_super){function SubjectSubscriber(destination){var _this=_super.call(this,destination)||this;return _this.destination=destination,_this}return __extends$1(SubjectSubscriber,_super),SubjectSubscriber}(Subscriber),Subject=function(_super){function Subject(){var _this=_super.call(this)||this;return _this.observers=[],_this.closed=!1,_this.isStopped=!1,_this.hasError=!1,_this.thrownError=null,_this}return __extends$1(Subject,_super),Subject.prototype[rxSubscriber]=function(){return new SubjectSubscriber(this)},Subject.prototype.lift=function(operator){var subject=new AnonymousSubject(this,this);return subject.operator=operator,subject},Subject.prototype.next=function(value){if(this.closed)throw new ObjectUnsubscribedError;if(!this.isStopped)for(var observers=this.observers,len=observers.length,copy=observers.slice(),i=0;i<len;i++)copy[i].next(value)},Subject.prototype.error=function(err){if(this.closed)throw new ObjectUnsubscribedError;this.hasError=!0,this.thrownError=err,this.isStopped=!0;for(var observers=this.observers,len=observers.length,copy=observers.slice(),i=0;i<len;i++)copy[i].error(err);this.observers.length=0},Subject.prototype.complete=function(){if(this.closed)throw new ObjectUnsubscribedError;this.isStopped=!0;for(var observers=this.observers,len=observers.length,copy=observers.slice(),i=0;i<len;i++)copy[i].complete();this.observers.length=0},Subject.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},Subject.prototype._trySubscribe=function(subscriber){if(this.closed)throw new ObjectUnsubscribedError;return _super.prototype._trySubscribe.call(this,subscriber)},Subject.prototype._subscribe=function(subscriber){if(this.closed)throw new ObjectUnsubscribedError;return this.hasError?(subscriber.error(this.thrownError),Subscription.EMPTY):this.isStopped?(subscriber.complete(),Subscription.EMPTY):(this.observers.push(subscriber),new SubjectSubscription(this,subscriber))},Subject.prototype.asObservable=function(){var observable=new Observable;return observable.source=this,observable},Subject.create=function(destination,source){return new AnonymousSubject(destination,source)},Subject}(Observable),AnonymousSubject=function(_super){function AnonymousSubject(destination,source){var _this=_super.call(this)||this;return _this.destination=destination,_this.source=source,_this}return __extends$1(AnonymousSubject,_super),AnonymousSubject.prototype.next=function(value){var destination=this.destination;destination&&destination.next&&destination.next(value)},AnonymousSubject.prototype.error=function(err){var destination=this.destination;destination&&destination.error&&this.destination.error(err)},AnonymousSubject.prototype.complete=function(){var destination=this.destination;destination&&destination.complete&&this.destination.complete()},AnonymousSubject.prototype._subscribe=function(subscriber){return this.source?this.source.subscribe(subscriber):Subscription.EMPTY},AnonymousSubject}(Subject),AsyncAction=function(_super){function AsyncAction(scheduler,work){var _this=_super.call(this,scheduler,work)||this;return _this.scheduler=scheduler,_this.work=work,_this.pending=!1,_this}return __extends$1(AsyncAction,_super),AsyncAction.prototype.schedule=function(state,delay){if(void 0===delay&&(delay=0),this.closed)return this;this.state=state;var id=this.id,scheduler=this.scheduler;return null!=id&&(this.id=this.recycleAsyncId(scheduler,id,delay)),this.pending=!0,this.delay=delay,this.id=this.id||this.requestAsyncId(scheduler,this.id,delay),this},AsyncAction.prototype.requestAsyncId=function(scheduler,id,delay){return void 0===delay&&(delay=0),setInterval(scheduler.flush.bind(scheduler,this),delay)},AsyncAction.prototype.recycleAsyncId=function(scheduler,id,delay){if(void 0===delay&&(delay=0),null!==delay&&this.delay===delay&&!1===this.pending)return id;clearInterval(id)},AsyncAction.prototype.execute=function(state,delay){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var error=this._execute(state,delay);if(error)return error;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},AsyncAction.prototype._execute=function(state,delay){var errored=!1,errorValue=void 0;try{this.work(state)}catch(e){errored=!0,errorValue=!!e&&e||new Error(e)}if(errored)return this.unsubscribe(),errorValue},AsyncAction.prototype._unsubscribe=function(){var id=this.id,scheduler=this.scheduler,actions=scheduler.actions,index=actions.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==index&&actions.splice(index,1),null!=id&&(this.id=this.recycleAsyncId(scheduler,id,null)),this.delay=null},AsyncAction}(function(_super){function Action(scheduler,work){return _super.call(this)||this}return __extends$1(Action,_super),Action.prototype.schedule=function(state,delay){return void 0===delay&&(delay=0),this},Action}(Subscription)),Scheduler=function(){function Scheduler(SchedulerAction,now){void 0===now&&(now=Scheduler.now),this.SchedulerAction=SchedulerAction,this.now=now}return Scheduler.prototype.schedule=function(work,delay,state){return void 0===delay&&(delay=0),new this.SchedulerAction(this,work).schedule(state,delay)},Scheduler.now=function(){return Date.now()},Scheduler}(),AsyncScheduler=function(_super){function AsyncScheduler(SchedulerAction,now){void 0===now&&(now=Scheduler.now);var _this=_super.call(this,SchedulerAction,function(){return AsyncScheduler.delegate&&AsyncScheduler.delegate!==_this?AsyncScheduler.delegate.now():now()})||this;return _this.actions=[],_this.active=!1,_this.scheduled=void 0,_this}return __extends$1(AsyncScheduler,_super),AsyncScheduler.prototype.schedule=function(work,delay,state){return void 0===delay&&(delay=0),AsyncScheduler.delegate&&AsyncScheduler.delegate!==this?AsyncScheduler.delegate.schedule(work,delay,state):_super.prototype.schedule.call(this,work,delay,state)},AsyncScheduler.prototype.flush=function(action){var actions=this.actions;if(this.active)actions.push(action);else{var error;this.active=!0;do{if(error=action.execute(action.state,action.delay))break}while(action=actions.shift());if(this.active=!1,error){for(;action=actions.shift();)action.unsubscribe();throw error}}},AsyncScheduler}(Scheduler);NotificationKind||(NotificationKind={});var async=new AsyncScheduler(AsyncAction);ArgumentOutOfRangeErrorImpl.prototype=Object.create(Error.prototype);EmptyErrorImpl.prototype=Object.create(Error.prototype);var DebounceTimeOperator=function(){function DebounceTimeOperator(dueTime,scheduler){this.dueTime=dueTime,this.scheduler=scheduler}return DebounceTimeOperator.prototype.call=function(subscriber,source){return source.subscribe(new DebounceTimeSubscriber(subscriber,this.dueTime,this.scheduler))},DebounceTimeOperator}(),DebounceTimeSubscriber=function(_super){function DebounceTimeSubscriber(destination,dueTime,scheduler){var _this=_super.call(this,destination)||this;return _this.dueTime=dueTime,_this.scheduler=scheduler,_this.debouncedSubscription=null,_this.lastValue=null,_this.hasValue=!1,_this}return __extends$1(DebounceTimeSubscriber,_super),DebounceTimeSubscriber.prototype._next=function(value){this.clearDebounce(),this.lastValue=value,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(dispatchNext$2,this.dueTime,this))},DebounceTimeSubscriber.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},DebounceTimeSubscriber.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var lastValue=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(lastValue)}},DebounceTimeSubscriber.prototype.clearDebounce=function(){var debouncedSubscription=this.debouncedSubscription;null!==debouncedSubscription&&(this.remove(debouncedSubscription),debouncedSubscription.unsubscribe(),this.debouncedSubscription=null)},DebounceTimeSubscriber}(Subscriber),AreaSizeCalculation=function(){function AreaSizeCalculation(){}return AreaSizeCalculation.modifyAreaSizes=function(areas,sourceAreaIndex,totalSize,containerSizePixel,gutterSizePxPerVisibleComponent,direction){var result=totalSize;if(0===result)return result;if(!areas||0===areas.length)return result;if(areas.length<=1)return result;if("right"===direction){if(sourceAreaIndex+1===areas.length)return result;for(i=sourceAreaIndex+1;i<areas.length;i++){currentArea=areas[i];if(0===(result=AreaSizeCalculation.modifyAreaSize(currentArea,result,containerSizePixel,gutterSizePxPerVisibleComponent)))break}}else if("left"===direction){if(0===sourceAreaIndex)return result;for(var i=sourceAreaIndex-1;i>=0;i--){var currentArea=areas[i];if(0===(result=AreaSizeCalculation.modifyAreaSize(currentArea,result,containerSizePixel,gutterSizePxPerVisibleComponent)))break}}return result},AreaSizeCalculation.modifyAreaSize=function(area,sizeToBeModified,containerSize,gutterSizePxPerVisibleComponent){var result=sizeToBeModified;return sizeToBeModified<0?result+=this.subtractSizeFromArea(area,Math.abs(sizeToBeModified),containerSize,gutterSizePxPerVisibleComponent):result-=this.addSizeToArea(area,sizeToBeModified,containerSize,gutterSizePxPerVisibleComponent),result},AreaSizeCalculation.subtractSizeFromArea=function(area,sizeToBeSubtracted,containerSize,gutterSizePxPerVisibleComponent){var result=0;if(0===area.size)return result;var maxSizeToBeTakenAway=area.size;if(area.minSizePx){var minSizeInPcntOfCurrentContainer=Math.ceil(area.minSizePx+gutterSizePxPerVisibleComponent)/containerSize;maxSizeToBeTakenAway=area.size-minSizeInPcntOfCurrentContainer}if(maxSizeToBeTakenAway<=0)return result;var sizeToBeTakenAway=sizeToBeSubtracted;return sizeToBeTakenAway>maxSizeToBeTakenAway&&(sizeToBeTakenAway=maxSizeToBeTakenAway),area.size-=sizeToBeTakenAway,result=sizeToBeTakenAway},AreaSizeCalculation.addSizeToArea=function(area,sizeToBeAdded,containerSize,gutterSizePxPerVisibleComponent){var result=0;if(0===area.size)return result;var maxSizeToBeAdded=Number.MAX_VALUE;if(area.maxSizePx){var maxSizePcnt=Math.ceil(area.maxSizePx+gutterSizePxPerVisibleComponent)/containerSize;maxSizeToBeAdded=area.size>=maxSizePcnt?0:maxSizePcnt-area.size}return 0===maxSizeToBeAdded?result:(sizeToBeAdded>maxSizeToBeAdded&&(sizeToBeAdded=maxSizeToBeAdded),area.size+=sizeToBeAdded,result=sizeToBeAdded)},AreaSizeCalculation.prototype.calculate=function(opts){opts.calculationSource&&opts.calculationSource.isDragAndDrop?this.handleDragAndDrop(opts):opts.calculationSource&&opts.calculationSource.isWindowResize?this.handleWindowResize(opts):this.handleNormalLayout(opts)},AreaSizeCalculation.prototype.handleDragAndDrop=function(opts){var areaDragAndDrop=opts.calculationSource,draggedAreas=[areaDragAndDrop.areaA,areaDragAndDrop.areaB],draggedAreasSizePx=(areaDragAndDrop.areaA.size+areaDragAndDrop.areaB.size)*(opts.containerSizePx?opts.containerSizePx:0);areaDragAndDrop.areaA.size>0&&areaDragAndDrop.areaB.size>0&&areaDragAndDrop.offsetPixel&&areaDragAndDrop.areaA.minSizePx&&areaDragAndDrop.areaB.minSizePx&&areaDragAndDrop.areaA.minSizePx+areaDragAndDrop.areaB.minSizePx>draggedAreasSizePx-(opts.gutterSizePx?opts.gutterSizePx:0)&&(areaDragAndDrop.offsetPixel>0?(areaDragAndDrop.areaA.size+=areaDragAndDrop.areaB.size,areaDragAndDrop.areaB.size=0):areaDragAndDrop.offsetPixel<0&&(areaDragAndDrop.areaB.size+=areaDragAndDrop.areaA.size,areaDragAndDrop.areaA.size=0)),this.checkAndFixSizePxRestrictions({containerSizePx:draggedAreasSizePx,displayedAreas:draggedAreas,gutterSizePx:opts.gutterSizePx})},AreaSizeCalculation.prototype.handleWindowResize=function(opts){this.checkAndFixSizePxRestrictions(opts)},AreaSizeCalculation.prototype.handleNormalLayout=function(opts){this.checkAndFixSizePxRestrictions(opts)},AreaSizeCalculation.prototype.checkAndFixSizePxRestrictions=function(opts){this.checkAndFixSizePxRestrictedAreas(opts,"min"),this.checkAndFixSizePxRestrictedAreas(opts,"max")},AreaSizeCalculation.prototype.checkAndFixSizePxRestrictedAreas=function(opts,restrictionProperty){var _this=this;if(!(opts.displayedAreas.length<=1)){var containerSizePixel=opts.containerSizePx?opts.containerSizePx:0,displayedAreasWithSizeGreaterZero=opts.displayedAreas.filter(function(a){return 0!==a.size}),totalGutterSizePx=(opts.displayedAreas.length-1)*(opts.gutterSizePx?opts.gutterSizePx:0),gutterSizePxPerVisibleComponent=displayedAreasWithSizeGreaterZero.length>1?totalGutterSizePx/displayedAreasWithSizeGreaterZero.length:totalGutterSizePx;displayedAreasWithSizeGreaterZero.forEach(function(area,index){var newAreaSize=area.size;switch(restrictionProperty){case"min":area.size*containerSizePixel<Math.ceil(area.minSizePx+gutterSizePxPerVisibleComponent)&&(newAreaSize=Math.ceil(area.minSizePx+gutterSizePxPerVisibleComponent)/containerSizePixel);break;case"max":area.size*containerSizePixel>Math.ceil(area.maxSizePx+gutterSizePxPerVisibleComponent)&&(newAreaSize=Math.ceil(area.maxSizePx+gutterSizePxPerVisibleComponent)/containerSizePixel)}if(newAreaSize!==area.size){var sizeDiffToBeModifiedOnOtherAreas=area.size-newAreaSize;area.size=newAreaSize,0!==sizeDiffToBeModifiedOnOtherAreas&&0!==_this.addAvailableSpaceToAreas(displayedAreasWithSizeGreaterZero,index,sizeDiffToBeModifiedOnOtherAreas,containerSizePixel,gutterSizePxPerVisibleComponent)&&(area.size+=sizeDiffToBeModifiedOnOtherAreas)}})}},AreaSizeCalculation.prototype.addAvailableSpaceToAreas=function(areas,sourceAreaIndex,availableSpace,containerSizePixel,gutterSizePxPerVisibleComponent){var result=AreaSizeCalculation.modifyAreaSizes(areas,sourceAreaIndex,availableSpace,containerSizePixel,gutterSizePxPerVisibleComponent,"right");return 0!==result&&(result=AreaSizeCalculation.modifyAreaSizes(areas,sourceAreaIndex,result,containerSizePixel,gutterSizePxPerVisibleComponent,"left")),result},AreaSizeCalculation}(),Area=function(){function Area(area){this.sizeChanged=new core.EventEmitter,area&&(this._size=area.size,this.comp=area.comp,this.maxSizePx=area.maxSizePx,this.minSizePx=area.minSizePx,this.order=area.order)}return Object.defineProperty(Area.prototype,"size",{get:function(){return this._size},set:function(value){var previousValue=this._size;this._size=value,previousValue!==value&&this.sizeChanged.next(value)},enumerable:!0,configurable:!0}),Area}(),SplitComponent=function(){function SplitComponent(ngZone,elRef,cdRef,renderer){this.ngZone=ngZone,this.elRef=elRef,this.cdRef=cdRef,this.renderer=renderer,this._direction="horizontal",this._useTransition=!1,this._disabled=!1,this._width=null,this._height=null,this._gutterSize=11,this._gutterColor="",this._gutterImageH="",this._gutterImageV="",this._dir="ltr",this.dragStart=new core.EventEmitter(!1),this.dragProgress=new core.EventEmitter(!1),this.dragEnd=new core.EventEmitter(!1),this.gutterClick=new core.EventEmitter(!1),this.currentSizeChange=new core.EventEmitter,this.transitionEndInternal=new Subject,this.transitionEnd=this.transitionEndInternal.asObservable().pipe(debounceTime(20)),this.defaultAreaSizeCalculation=new AreaSizeCalculation,this.isViewInitialized=!1,this.isDragging=!1,this.draggingWithoutMove=!1,this.currentGutterNum=0,this.displayedAreas=[],this.hidedAreas=[],this.dragListeners=[],this.dragStartValues={sizePixelContainer:0,sizePixelA:0,sizePixelB:0,sizePercentA:0,sizePercentB:0},this.setMinSizeOnContainer=!1}return Object.defineProperty(SplitComponent.prototype,"direction",{get:function(){return this._direction},set:function(v){var _this=this;v="vertical"===v?"vertical":"horizontal",this._direction=v,this.displayedAreas.concat(this.hidedAreas).forEach(function(area){area.comp.setStyleVisibleAndDir(area.comp.visible,_this.isDragging,_this.direction)}),this.build(!1,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"useTransition",{get:function(){return this._useTransition},set:function(v){v="boolean"==typeof v?v:"false"!==v,this._useTransition=v},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"disabled",{get:function(){return this._disabled},set:function(v){v="boolean"==typeof v?v:"false"!==v,this._disabled=v,this.cdRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"width",{get:function(){return this._width},set:function(v){v=Number(v),this._width=!isNaN(v)&&v>0?v:null,this.build(!1,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"height",{get:function(){return this._height},set:function(v){v=Number(v),this._height=!isNaN(v)&&v>0?v:null,this.build(!1,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"gutterSize",{get:function(){return this._gutterSize},set:function(v){v=Number(v),this._gutterSize=!isNaN(v)&&v>0?v:11,this.build(!1,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"gutterColor",{get:function(){return this._gutterColor},set:function(v){this._gutterColor="string"==typeof v&&""!==v?v:"",this.cdRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"gutterImageH",{get:function(){return this._gutterImageH},set:function(v){this._gutterImageH="string"==typeof v&&""!==v?v:"",this.cdRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"gutterImageV",{get:function(){return this._gutterImageV},set:function(v){this._gutterImageV="string"==typeof v&&""!==v?v:"",this.cdRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"dir",{get:function(){return this._dir},set:function(v){v="rtl"===v?"rtl":"ltr",this._dir=v},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"cssFlexdirection",{get:function(){return"horizontal"===this.direction?"row":"column"},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"cssWidth",{get:function(){return this.width?this.width+"px":"100%"},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"cssHeight",{get:function(){return this.height?this.height+"px":"100%"},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"cssMinwidth",{get:function(){return"horizontal"===this.direction?this.getNbGutters()*this.gutterSize+"px":null},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"cssMinheight",{get:function(){return"vertical"===this.direction?this.getNbGutters()*this.gutterSize+"px":null},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"areaSizeCalculation",{get:function(){return this._areaSizeCalculation},set:function(v){this._areaSizeCalculation=v},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"areaSizeCalculationToBeUsed",{get:function(){return this.areaSizeCalculation?this.areaSizeCalculation:this.defaultAreaSizeCalculation},enumerable:!0,configurable:!0}),SplitComponent.prototype.addArea=function(comp){var _this=this,newArea=new Area({comp:comp,minSizePx:comp.minSizePx,maxSizePx:comp.maxSizePx,order:0,size:0});newArea.sizeChanged.subscribe(function(newSize){return _this.fireSizeChanged(newArea,100*newSize)}),!0===comp.visible?this.displayedAreas.push(newArea):this.hidedAreas.push(newArea),comp.setStyleVisibleAndDir(comp.visible,this.isDragging,this.direction),this.build(!0,!0)},SplitComponent.prototype.removeArea=function(comp){if(this.displayedAreas.some(function(a){return a.comp===comp})){area=this.displayedAreas.find(function(a){return a.comp===comp});this.displayedAreas.splice(this.displayedAreas.indexOf(area),1),this.build(!0,!0)}else if(this.hidedAreas.some(function(a){return a.comp===comp})){var area=this.hidedAreas.find(function(a){return a.comp===comp});this.hidedAreas.splice(this.hidedAreas.indexOf(area),1)}},SplitComponent.prototype.updateArea=function(comp,resetOrders,resetSizes){var item=this.displayedAreas.find(function(a){return a.comp===comp});item&&(item.minSizePx=comp.minSizePx,item.maxSizePx=comp.maxSizePx,this.build(resetOrders,resetSizes))},SplitComponent.prototype.showArea=function(comp){var _a,area=this.hidedAreas.find(function(a){return a.comp===comp});if(area){comp.setStyleVisibleAndDir(comp.visible,this.isDragging,this.direction);var areas=this.hidedAreas.splice(this.hidedAreas.indexOf(area),1);(_a=this.displayedAreas).push.apply(_a,areas),this.build(!0,!0)}},SplitComponent.prototype.hideArea=function(comp){var _a,area=this.displayedAreas.find(function(a){return a.comp===comp});if(area){comp.setStyleVisibleAndDir(comp.visible,this.isDragging,this.direction);var areas=this.displayedAreas.splice(this.displayedAreas.indexOf(area),1);areas.forEach(function(currentArea){currentArea.order=0,currentArea.size=0}),(_a=this.hidedAreas).push.apply(_a,areas),this.build(!0,!0)}},Object.defineProperty(SplitComponent.prototype,"containerMinWidth",{get:function(){if(this.setMinSizeOnContainer)return"horizontal"!==this.direction?0:this.getMinSizeOfAllDisplayedComponentsPlusGutterSize()},enumerable:!0,configurable:!0}),Object.defineProperty(SplitComponent.prototype,"containerMinHeight",{get:function(){if(this.setMinSizeOnContainer)return"vertical"!==this.direction?0:this.getMinSizeOfAllDisplayedComponentsPlusGutterSize()},enumerable:!0,configurable:!0}),SplitComponent.prototype.ngAfterViewInit=function(){this.isViewInitialized=!0},SplitComponent.prototype.getMinSizeOfAllDisplayedComponentsPlusGutterSize=function(){return this.displayedAreas&&0!==this.displayedAreas.length?this.getMinSizeOfAllDisplayedComponents()+this.gutterSize*(this.displayedAreas.length-1):0},SplitComponent.prototype.getMinSizeOfAllDisplayedComponents=function(){if(!this.displayedAreas||0===this.displayedAreas.length)return 0;var result=0;return this.displayedAreas.forEach(function(area){area.minSizePx&&(result+=area.minSizePx)}),result},SplitComponent.prototype.getNbGutters=function(){return this.displayedAreas.length-1},SplitComponent.prototype.build=function(resetOrders,resetSizes){var _this=this;if(this.stopDragging(),!0===resetOrders&&(this.displayedAreas.every(function(a){return null!==a.comp.order})&&this.displayedAreas.sort(function(a,b){return a.comp.order-b.comp.order}),this.displayedAreas.forEach(function(area,i){area.order=2*i,area.comp.setStyleOrder(area.order)})),!0===resetSizes){var totalUserSize=this.displayedAreas.reduce(function(total,s){return s.comp.size?total+s.comp.size:total},0);if(this.displayedAreas.every(function(a){return null!==a.comp.size})&&totalUserSize>.999&&totalUserSize<1.001)this.displayedAreas.forEach(function(area){area.size=area.comp.size});else{var size_1=1/this.displayedAreas.length;this.displayedAreas.forEach(function(area){area.size=size_1})}}var percentToDispatch=0,containerSizePixel=this.containerSizePx;if(this.displayedAreas.forEach(function(area){area.size*containerSizePixel<_this.gutterSize&&(percentToDispatch+=area.size,area.size=0)}),percentToDispatch>0&&this.displayedAreas.length>0){var nbAreasNotZero=this.displayedAreas.filter(function(a){return 0!==a.size}).length;if(nbAreasNotZero>0){var percentToAdd_1=percentToDispatch/nbAreasNotZero;this.displayedAreas.filter(function(a){return 0!==a.size}).forEach(function(area){area.size+=percentToAdd_1})}else this.displayedAreas[this.displayedAreas.length-1].size=1}this.areaSizeCalculationToBeUsed.calculate(this.createAreaSizeCalculationOptions()),this.refreshStyleSizes(),this.cdRef.markForCheck()},SplitComponent.prototype.createAreaSizeCalculationOptions=function(calculationSource){return{calculationSource:calculationSource,containerSizePx:this.containerSizePx,displayedAreas:this.displayedAreas,gutterSizePx:this.gutterSize}},Object.defineProperty(SplitComponent.prototype,"containerSizePx",{get:function(){this.getNbGutters(),this.gutterSize;return"horizontal"===this.direction?this.width?this.width:this.elRef.nativeElement.offsetWidth:this.height?this.height:this.elRef.nativeElement.offsetHeight},enumerable:!0,configurable:!0}),SplitComponent.prototype.refreshStyleSizes=function(){var _this=this,sumGutterSize=this.getNbGutters()*this.gutterSize;this.displayedAreas.forEach(function(area){area.comp.setStyleFlexbasis("calc( "+100*area.size+"% - "+area.size*sumGutterSize+"px )",_this.isDragging)})},SplitComponent.prototype.startDragging=function(startEvent,gutterOrder,gutterNum){var _this=this;if(startEvent.preventDefault(),this.currentGutterNum=gutterNum,this.draggingWithoutMove=!0,this.ngZone.runOutsideAngular(function(){_this.dragListeners.push(_this.renderer.listen("document","mouseup",function(e){return _this.stopDragging()})),_this.dragListeners.push(_this.renderer.listen("document","touchend",function(e){return _this.stopDragging()})),_this.dragListeners.push(_this.renderer.listen("document","touchcancel",function(e){return _this.stopDragging()}))}),!this.disabled){var areaA=this.displayedAreas.find(function(a){return a.order===gutterOrder-1}),areaB=this.displayedAreas.find(function(a){return a.order===gutterOrder+1});if(areaA&&areaB){var prop="horizontal"===this.direction?"offsetWidth":"offsetHeight";this.dragStartValues.sizePixelContainer=this.elRef.nativeElement[prop],this.dragStartValues.sizePixelA=areaA.comp.getSizePixel(prop),this.dragStartValues.sizePixelB=areaB.comp.getSizePixel(prop),this.dragStartValues.sizePercentA=areaA.size,this.dragStartValues.sizePercentB=areaB.size;var start;if(startEvent instanceof MouseEvent)start={x:startEvent.screenX,y:startEvent.screenY};else{if(!(startEvent instanceof TouchEvent))return;start={x:startEvent.touches[0].screenX,y:startEvent.touches[0].screenY}}this.ngZone.runOutsideAngular(function(){_this.dragListeners.push(_this.renderer.listen("document","mousemove",function(e){return _this.dragEvent(e,start,areaA,areaB)})),_this.dragListeners.push(_this.renderer.listen("document","touchmove",function(e){return _this.dragEvent(e,start,areaA,areaB)}))}),areaA.comp.lockEvents(),areaB.comp.lockEvents(),this.isDragging=!0,this.notify("start")}}},SplitComponent.prototype.dragEvent=function(event,start,areaA,areaB){if(this.isDragging){var end;if(event instanceof MouseEvent)end={x:event.screenX,y:event.screenY};else{if(!(event instanceof TouchEvent))return;end={x:event.touches[0].screenX,y:event.touches[0].screenY}}this.draggingWithoutMove=!1,this.drag(start,end,areaA,areaB)}},SplitComponent.prototype.drag=function(start,end,areaA,areaB){var offsetPixel="horizontal"===this.direction?start.x-end.x:start.y-end.y;"rtl"===this.dir&&(offsetPixel=-offsetPixel);var newSizePixelA=this.dragStartValues.sizePixelA-offsetPixel,newSizePixelB=this.dragStartValues.sizePixelB+offsetPixel;newSizePixelA<this.gutterSize&&newSizePixelB<this.gutterSize||(newSizePixelA<this.gutterSize?(newSizePixelB+=newSizePixelA,newSizePixelA=0):newSizePixelB<this.gutterSize&&(newSizePixelA+=newSizePixelB,newSizePixelB=0),0===newSizePixelA?(areaB.size+=areaA.size,areaA.size=0):0===newSizePixelB?(areaA.size+=areaB.size,areaB.size=0):0===this.dragStartValues.sizePercentA?(areaB.size=this.dragStartValues.sizePercentB/this.dragStartValues.sizePixelB*newSizePixelB,areaA.size=this.dragStartValues.sizePercentB-areaB.size):0===this.dragStartValues.sizePercentB?(areaA.size=this.dragStartValues.sizePercentA/this.dragStartValues.sizePixelA*newSizePixelA,areaB.size=this.dragStartValues.sizePercentA-areaA.size):(areaA.size=this.dragStartValues.sizePercentA/this.dragStartValues.sizePixelA*newSizePixelA,areaB.size=this.dragStartValues.sizePercentA+this.dragStartValues.sizePercentB-areaA.size),this.areaSizeCalculationToBeUsed.calculate(this.createAreaSizeCalculationOptions({areaA:areaA,areaB:areaB,isDragAndDrop:!0,offsetPixel:offsetPixel})),this.refreshStyleSizes(),this.notify("progress"))},SplitComponent.prototype.stopDragging=function(){if(!1!==this.isDragging||!1!==this.draggingWithoutMove){for(this.displayedAreas.forEach(function(area){area.comp.unlockEvents()});this.dragListeners.length>0;){var fct=this.dragListeners.pop();fct&&fct()}!0===this.draggingWithoutMove?this.notify("click"):this.notify("end"),this.isDragging=!1,this.draggingWithoutMove=!1,this.triggerWindowResize()}},SplitComponent.prototype.notify=function(type){var areasSize=this.displayedAreas.map(function(a){return 100*a.size});switch(type){case"start":return this.dragStart.emit({gutterNum:this.currentGutterNum,sizes:areasSize});case"progress":return this.dragProgress.emit({gutterNum:this.currentGutterNum,sizes:areasSize});case"end":return this.dragEnd.emit({gutterNum:this.currentGutterNum,sizes:areasSize});case"click":return this.gutterClick.emit({gutterNum:this.currentGutterNum,sizes:areasSize});case"transitionEnd":return this.transitionEndInternal.next(areasSize)}},SplitComponent.prototype.moveGutterMax=function(gutterOrderIndex){this.moveGutterToPosition(gutterOrderIndex,Number.MAX_VALUE)},SplitComponent.prototype.moveGutterMin=function(gutterOrderIndex){this.moveGutterToPosition(gutterOrderIndex,0)},SplitComponent.prototype.moveGutterToPosition=function(gutterOrderIndex,positionInPx){var areaA=this.displayedAreas.find(function(a){return a.order===gutterOrderIndex-1}),areaB=this.displayedAreas.find(function(a){return a.order===gutterOrderIndex+1});if(areaA&&areaB){var sizePixelA=areaA.comp.getSizePixel("horizontal"===this.direction?"offsetWidth":"offsetHeight"),sizePixelB=areaB.comp.getSizePixel("horizontal"===this.direction?"offsetWidth":"offsetHeight"),totalSizePx=sizePixelA+sizePixelB,totalSizePcnt=areaA.size+areaB.size,newSizePixelA=sizePixelA,newSizePixelB=sizePixelB,isLeftSideSizing=positionInPx>=0;if(isLeftSideSizing)newSizePixelB=totalSizePx-(newSizePixelA=positionInPx<totalSizePx?positionInPx:totalSizePx);else{var absolutePositionInPx=Math.abs(positionInPx);newSizePixelA=totalSizePx-(newSizePixelB=absolutePositionInPx<totalSizePx?absolutePositionInPx:totalSizePx)}if(!(newSizePixelA<this.gutterSize&&newSizePixelB<this.gutterSize)){newSizePixelA<this.gutterSize?(newSizePixelB+=newSizePixelA,newSizePixelA=0):newSizePixelB<this.gutterSize&&(newSizePixelA+=newSizePixelB,newSizePixelB=0),areaA.size=newSizePixelA/totalSizePx*totalSizePcnt,areaB.size=newSizePixelB/totalSizePx*totalSizePcnt;var draggedAreas=[];draggedAreas=isLeftSideSizing?[areaA,areaB]:[areaB,areaA];var pseudoDragOffset=sizePixelA-newSizePixelA;this.areaSizeCalculationToBeUsed.calculate(this.createAreaSizeCalculationOptions({areaA:draggedAreas[0],areaB:draggedAreas[1],isDragAndDrop:!0,offsetPixel:pseudoDragOffset})),this.refreshStyleSizes(),this.triggerWindowResize()}}},SplitComponent.prototype.ngOnDestroy=function(){this.stopDragging()},SplitComponent.prototype.handleWindowResize=function(){this.lastCheckedContainerSizePx!==this.containerSizePx&&(this.lastCheckedContainerSizePx=this.containerSizePx,this.areaSizeCalculationToBeUsed.calculate(this.createAreaSizeCalculationOptions({isWindowResize:!0})),this.refreshStyleSizes(),this.cdRef.markForCheck(),this.triggerWindowResize())},SplitComponent.prototype.fireSizeChanged=function(area,newSize){this.currentSizeChange.next({size:newSize,areaOrder:area.order})},SplitComponent.prototype.triggerWindowResize=function(){this.lastCheckedContainerSizePx=this.containerSizePx;try{var event=document.createEvent("HTMLEvents");event.initEvent("resize",!0,!1),window.dispatchEvent(event)}catch(error){console.warn("triggerWindowResize",error)}},__decorate([core.Input(),__metadata("design:type",String),__metadata("design:paramtypes",[String])],SplitComponent.prototype,"direction",null),__decorate([core.Input(),__metadata("design:type",Boolean),__metadata("design:paramtypes",[Boolean])],SplitComponent.prototype,"useTransition",null),__decorate([core.Input(),__metadata("design:type",Boolean),__metadata("design:paramtypes",[Boolean])],SplitComponent.prototype,"disabled",null),__decorate([core.Input(),__metadata("design:type",Number),__metadata("design:paramtypes",[Number])],SplitComponent.prototype,"width",null),__decorate([core.Input(),__metadata("design:type",Number),__metadata("design:paramtypes",[Number])],SplitComponent.prototype,"height",null),__decorate([core.Input(),__metadata("design:type",Number),__metadata("design:paramtypes",[Number])],SplitComponent.prototype,"gutterSize",null),__decorate([core.Input(),__metadata("design:type",String),__metadata("design:paramtypes",[String])],SplitComponent.prototype,"gutterColor",null),__decorate([core.Input(),__metadata("design:type",String),__metadata("design:paramtypes",[String])],SplitComponent.prototype,"gutterImageH",null),__decorate([core.Input(),__metadata("design:type",String),__metadata("design:paramtypes",[String])],SplitComponent.prototype,"gutterImageV",null),__decorate([core.Input(),__metadata("design:type",String),__metadata("design:paramtypes",[String])],SplitComponent.prototype,"dir",null),__decorate([core.Output(),__metadata("design:type",Object)],SplitComponent.prototype,"dragStart",void 0),__decorate([core.Output(),__metadata("design:type",Object)],SplitComponent.prototype,"dragProgress",void 0),__decorate([core.Output(),__metadata("design:type",Object)],SplitComponent.prototype,"dragEnd",void 0),__decorate([core.Output(),__metadata("design:type",Object)],SplitComponent.prototype,"gutterClick",void 0),__decorate([core.Output(),__metadata("design:type",Object)],SplitComponent.prototype,"currentSizeChange",void 0),__decorate([core.Output(),__metadata("design:type",Object)],SplitComponent.prototype,"transitionEnd",void 0),__decorate([core.HostBinding("style.flex-direction"),__metadata("design:type",Object),__metadata("design:paramtypes",[])],SplitComponent.prototype,"cssFlexdirection",null),__decorate([core.HostBinding("style.width"),__metadata("design:type",Object),__metadata("design:paramtypes",[])],SplitComponent.prototype,"cssWidth",null),__decorate([core.HostBinding("style.height"),__metadata("design:type",Object),__metadata("design:paramtypes",[])],SplitComponent.prototype,"cssHeight",null),__decorate([core.HostBinding("style.min-width"),__metadata("design:type",Object),__metadata("design:paramtypes",[])],SplitComponent.prototype,"cssMinwidth",null),__decorate([core.HostBinding("style.min-height"),__metadata("design:type",Object),__metadata("design:paramtypes",[])],SplitComponent.prototype,"cssMinheight",null),__decorate([core.Input(),__metadata("design:type",Object),__metadata("design:paramtypes",[Object])],SplitComponent.prototype,"areaSizeCalculation",null),__decorate([core.HostBinding("style.min-width.px"),__metadata("design:type",Number),__metadata("design:paramtypes",[])],SplitComponent.prototype,"containerMinWidth",null),__decorate([core.HostBinding("style.min-height.px"),__metadata("design:type",Number),__metadata("design:paramtypes",[])],SplitComponent.prototype,"containerMinHeight",null),__decorate([core.Input(),__metadata("design:type",Boolean)],SplitComponent.prototype,"setMinSizeOnContainer",void 0),__decorate([core.HostListener("window:resize"),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],SplitComponent.prototype,"handleWindowResize",null),SplitComponent=__decorate([core.Component({selector:"split",changeDetection:core.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: flex;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n overflow: hidden;\n /* \n Important to keep following rules even if overrided later by 'HostBinding' \n because if [width] & [height] not provided, when build() is executed,\n 'HostBinding' hasn't been applied yet so code:\n