text: !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@angular/core"],i):i((t.ng=t.ng||{},t.ng.grid=t.ng.grid||{}),t.ng.core)}(this,function(t,i){"use strict";var e=function(){function t(t,i){this._ngEl=t,this._renderer=i}return t.prototype.registerGrid=function(t){this._ngGrid=t},t.prototype.ngOnInit=function(){this._renderer.setElementClass(this._ngEl.nativeElement,"grid-placeholder",!0),this._ngGrid.autoStyle&&this._renderer.setElementStyle(this._ngEl.nativeElement,"position","absolute")},t.prototype.setSize=function(t){this._size=t,this._recalculateDimensions()},t.prototype.setGridPosition=function(t){this._position=t,this._recalculatePosition()},t.prototype.setCascadeMode=function(t){switch(this._cascadeMode=t,t){case"up":case"left":default:this._renderer.setElementStyle(this._ngEl.nativeElement,"left","0px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"top","0px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"right",null),this._renderer.setElementStyle(this._ngEl.nativeElement,"bottom",null);break;case"right":this._renderer.setElementStyle(this._ngEl.nativeElement,"right","0px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"top","0px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"left",null),this._renderer.setElementStyle(this._ngEl.nativeElement,"bottom",null);break;case"down":this._renderer.setElementStyle(this._ngEl.nativeElement,"left","0px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"bottom","0px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"right",null),this._renderer.setElementStyle(this._ngEl.nativeElement,"top",null)}},t.prototype._setDimensions=function(t,i){this._renderer.setElementStyle(this._ngEl.nativeElement,"width",t+"px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"height",i+"px")},t.prototype._setPosition=function(t,i){switch(this._cascadeMode){case"up":case"left":default:this._renderer.setElementStyle(this._ngEl.nativeElement,"transform","translate("+t+"px, "+i+"px)");break;case"right":this._renderer.setElementStyle(this._ngEl.nativeElement,"transform","translate("+-t+"px, "+i+"px)");break;case"down":this._renderer.setElementStyle(this._ngEl.nativeElement,"transform","translate("+t+"px, "+-i+"px)")}},t.prototype._recalculatePosition=function(){var t=(this._ngGrid.colWidth+this._ngGrid.marginLeft+this._ngGrid.marginRight)*(this._position.col-1)+this._ngGrid.marginLeft,i=(this._ngGrid.rowHeight+this._ngGrid.marginTop+this._ngGrid.marginBottom)*(this._position.row-1)+this._ngGrid.marginTop;this._setPosition(t,i)},t.prototype._recalculateDimensions=function(){var t=this._ngGrid.colWidth*this._size.x+(this._ngGrid.marginLeft+this._ngGrid.marginRight)*(this._size.x-1),i=this._ngGrid.rowHeight*this._size.y+(this._ngGrid.marginTop+this._ngGrid.marginBottom)*(this._size.y-1);this._setDimensions(t,i)},t.decorators=[{type:i.Component,args:[{selector:"ng-grid-placeholder",template:""}]}],t.ctorParameters=function(){return[{type:i.ElementRef},{type:i.Renderer}]},t}(),s=function(){function t(e,s,n,o,r){this._differs=e,this._ngEl=s,this._renderer=n,this.componentFactoryResolver=o,this._containerRef=r,this.onDragStart=new i.EventEmitter,this.onDrag=new i.EventEmitter,this.onDragStop=new i.EventEmitter,this.onResizeStart=new i.EventEmitter,this.onResize=new i.EventEmitter,this.onResizeStop=new i.EventEmitter,this.onItemChange=new i.EventEmitter,this.colWidth=250,this.rowHeight=250,this.minCols=1,this.minRows=1,this.marginTop=10,this.marginRight=10,this.marginBottom=10,this.marginLeft=10,this.isDragging=!1,this.isResizing=!1,this.autoStyle=!0,this.resizeEnable=!0,this.dragEnable=!0,this.cascade="up",this.minWidth=100,this.minHeight=100,this._items=[],this._draggingItem=null,this._resizingItem=null,this._resizeDirection=null,this._itemGrid={},this._maxCols=0,this._maxRows=0,this._visibleCols=0,this._visibleRows=0,this._setWidth=250,this._setHeight=250,this._posOffset=null,this._adding=!1,this._placeholderRef=null,this._fixToGrid=!1,this._autoResize=!1,this._destroyed=!1,this._maintainRatio=!1,this._preferNew=!1,this._zoomOnDrag=!1,this._limitToScreen=!1,this._curMaxRow=0,this._curMaxCol=0,this._dragReady=!1,this._resizeReady=!1,this._config=t.CONST_DEFAULT_CONFIG}return Object.defineProperty(t.prototype,"config",{set:function(t){this.setConfig(t),null==this._differ&&null!=t&&(this._differ=this._differs.find(this._config).create(null))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._renderer.setElementClass(this._ngEl.nativeElement,"grid",!0),this.autoStyle&&this._renderer.setElementStyle(this._ngEl.nativeElement,"position","relative"),this.setConfig(this._config)},t.prototype.ngOnDestroy=function(){this._destroyed=!0},t.prototype.setConfig=function(t){this._config=t;var i=!1;for(var e in t){var s=t[e],n=s?parseInt(s):0;switch(e){case"margins":this.setMargins(s);break;case"col_width":this.colWidth=Math.max(n,1);break;case"row_height":this.rowHeight=Math.max(n,1);break;case"auto_style":this.autoStyle=!!s;break;case"auto_resize":this._autoResize=!!s;break;case"draggable":this.dragEnable=!!s;break;case"resizable":this.resizeEnable=!!s;break;case"max_rows":i=i||this._maxRows!=n,this._maxRows=n<0?0:n;break;case"max_cols":i=i||this._maxCols!=n,this._maxCols=n<0?0:n;break;case"visible_rows":this._visibleRows=Math.max(n,0);break;case"visible_cols":this._visibleCols=Math.max(n,0);break;case"min_rows":this.minRows=Math.max(n,1);break;case"min_cols":this.minCols=Math.max(n,1);break;case"min_height":this.minHeight=Math.max(n,1);break;case"min_width":this.minWidth=Math.max(n,1);break;case"zoom_on_drag":this._zoomOnDrag=!!s;break;case"cascade":this.cascade!=s&&(this.cascade=s,this._cascadeGrid());break;case"fix_to_grid":this._fixToGrid=!!s;break;case"maintain_ratio":this._maintainRatio=!!s;break;case"prefer_new":this._preferNew=!!s;break;case"limit_to_screen":this._limitToScreen=!!s}}if(this._maintainRatio&&(this.colWidth&&this.rowHeight?this._aspectRatio=this.colWidth/this.rowHeight:this._maintainRatio=!1),i){if(this._maxCols>0&&this._maxRows>0)switch(this.cascade){case"left":case"right":this._maxCols=0;break;case"up":case"down":default:this._maxRows=0}for(var o=0,r=this._items;o<r.length;o++){var h=r[o],a=h.getGridPosition(),l=h.getSize();if(this._removeFromGrid(h),this._maxCols>0&&l.x>this._maxCols?(l.x=this._maxCols,h.setSize(l)):this._maxRows>0&&l.y>this._maxRows&&(l.y=this._maxRows,h.setSize(l)),this._hasGridCollision(a,l)||!this._isWithinBounds(a,l)){var g=this._fixGridPosition(a,l);h.setGridPosition(g)}this._addToGrid(h)}this._cascadeGrid()}this._calculateRowHeight(),this._calculateColWidth();var _=this._maxCols*this.colWidth,m=this._maxRows*this.rowHeight;_>0&&this.minWidth>_&&(this.minWidth=.75*this.colWidth),m>0&&this.minHeight>m&&(this.minHeight=.75*this.rowHeight),this.minWidth>this.colWidth&&(this.minCols=Math.max(this.minCols,Math.ceil(this.minWidth/this.colWidth))),this.minHeight>this.rowHeight&&(this.minRows=Math.max(this.minRows,Math.ceil(this.minHeight/this.rowHeight))),this._maxCols>0&&this.minCols>this._maxCols&&(this.minCols=1),this._maxRows>0&&this.minRows>this._maxRows&&(this.minRows=1),this._updateRatio();for(var d=0,c=this._items;d<c.length;d++){var h=c[d];this._removeFromGrid(h),h.setCascadeMode(this.cascade)}this._updateLimit();for(var u=0,p=this._items;u<p.length;u++){var h=p[u];h.recalculateSelf(),this._addToGrid(h)}this._cascadeGrid(),this._updateSize()},t.prototype.getItemPosition=function(t){return this._items[t].getGridPosition()},t.prototype.getItemSize=function(t){return this._items[t].getSize()},t.prototype.ngDoCheck=function(){if(null!=this._differ){var t=this._differ.diff(this._config);if(null!=t)return this._applyChanges(t),!0}return!1},t.prototype.setMargins=function(t){this.marginTop=Math.max(parseInt(t[0]),0),this.marginRight=t.length>=2?Math.max(parseInt(t[1]),0):this.marginTop,this.marginBottom=t.length>=3?Math.max(parseInt(t[2]),0):this.marginTop,this.marginBottom=t.length>=3?Math.max(parseInt(t[2]),0):this.marginTop,this.marginLeft=t.length>=4?Math.max(parseInt(t[3]),0):this.marginRight},t.prototype.enableDrag=function(){this.dragEnable=!0},t.prototype.disableDrag=function(){this.dragEnable=!1},t.prototype.enableResize=function(){this.resizeEnable=!0},t.prototype.disableResize=function(){this.resizeEnable=!1},t.prototype.addItem=function(t){if(t.setCascadeMode(this.cascade),!this._preferNew){var i=this._fixGridPosition(t.getGridPosition(),t.getSize());t.savePosition(i)}this._items.push(t),this._addToGrid(t),t.recalculateSelf(),t.onCascadeEvent(),this._emitOnItemChange()},t.prototype.removeItem=function(t){this._removeFromGrid(t);for(var i=0;i<this._items.length;i++)this._items[i]==t&&this._items.splice(i,1);this._destroyed||(this._cascadeGrid(),this._updateSize(),this._items.forEach(function(t){return t.recalculateSelf()}),this._emitOnItemChange())},t.prototype.updateItem=function(t){this._removeFromGrid(t),this._addToGrid(t),this._cascadeGrid(),this._updateSize(),t.onCascadeEvent()},t.prototype.triggerCascade=function(){this._cascadeGrid(null,null,!1)},t.prototype.resizeEventHandler=function(t){this._calculateColWidth(),this._calculateRowHeight(),this._updateRatio();for(var i=0,e=this._items;i<e.length;i++){var s=e[i];this._removeFromGrid(s)}this._updateLimit();for(var n=0,o=this._items;n<o.length;n++){var s=o[n];this._addToGrid(s),s.recalculateSelf()}this._updateSize()},t.prototype.mouseDownEventHandler=function(t){var i=this._getMousePosition(t),e=this._getItemFromPosition(i);return null!=e&&(this.resizeEnable&&e.canResize(t)?this._resizeReady=!0:this.dragEnable&&e.canDrag(t)&&(this._dragReady=!0)),!0},t.prototype.mouseUpEventHandler=function(t){return this.isDragging?(this._dragStop(t),!1):this.isResizing?(this._resizeStop(t),!1):((this._dragReady||this._resizeReady)&&(this._dragReady=!1,this._resizeReady=!1),!0)},t.prototype.mouseMoveEventHandler=function(t){if(this._resizeReady)return this._resizeStart(t),!1;if(this._dragReady)return this._dragStart(t),!1;if(this.isDragging)return this._drag(t),!1;if(this.isResizing)return this._resize(t),!1;var i=this._getMousePosition(t),e=this._getItemFromPosition(i);return e&&e.onMouseMove(t),!0},t.prototype._calculateColWidth=function(){if(this._autoResize&&(this._maxCols>0||this._visibleCols>0)){var t=this._maxCols>0?this._maxCols:this._visibleCols,i=this._ngEl.nativeElement.getBoundingClientRect().width,e=Math.floor(i/t);e-=this.marginLeft+this.marginRight,e>0&&(this.colWidth=e),(this.colWidth<this.minWidth||this.minCols>this._config.min_cols)&&(this.minCols=Math.max(this._config.min_cols,Math.ceil(this.minWidth/this.colWidth)))}},t.prototype._calculateRowHeight=function(){if(this._autoResize&&(this._maxRows>0||this._visibleRows>0)){var t=this._maxRows>0?this._maxRows:this._visibleRows,i=window.innerHeight-this.marginTop-this.marginBottom,e=Math.max(Math.floor(i/t),this.minHeight);e-=this.marginTop+this.marginBottom,e>0&&(this.rowHeight=e),(this.rowHeight<this.minHeight||this.minRows>this._config.min_rows)&&(this.minRows=Math.max(this._config.min_rows,Math.ceil(this.minHeight/this.rowHeight)))}},t.prototype._updateRatio=function(){this._autoResize&&this._maintainRatio&&(this._maxCols>0&&this._visibleRows<=0?this.rowHeight=this.colWidth/this._aspectRatio:this._maxRows>0&&this._visibleCols<=0?this.colWidth=this._aspectRatio*this.rowHeight:0==this._maxCols&&0==this._maxRows&&(this._visibleCols>0?this.rowHeight=this.colWidth/this._aspectRatio:this._visibleRows>0&&(this.colWidth=this._aspectRatio*this.rowHeight)))},t.prototype._updateLimit=function(){!this._autoResize&&this._limitToScreen&&this._limitGrid(this._getContainerColumns())},t.prototype._applyChanges=function(t){var i=this;t.forEachAddedItem(function(t){i._config[t.key]=t.currentValue}),t.forEachChangedItem(function(t){i._config[t.key]=t.currentValue}),t.forEachRemovedItem(function(t){delete i._config[t.key]}),this.setConfig(this._config)},t.prototype._resizeStart=function(t){if(this.resizeEnable){var i=this._getMousePosition(t),e=this._getItemFromPosition(i);e&&(e.startMoving(),this._resizingItem=e,this._resizeDirection=e.canResize(t),this._removeFromGrid(e),this._createPlaceholder(e),this.isResizing=!0,this._resizeReady=!1,this.onResizeStart.emit(e),e.onResizeStartEvent())}},t.prototype._dragStart=function(t){if(this.dragEnable){var i=this._getMousePosition(t),e=this._getItemFromPosition(i);if(e){var s=e.getPosition(),n={left:i.left-s.left,top:i.top-s.top};e.startMoving(),this._draggingItem=e,this._posOffset=n,this._removeFromGrid(e),this._createPlaceholder(e),this.isDragging=!0,this._dragReady=!1,this.onDragStart.emit(e),e.onDragStartEvent(),this._zoomOnDrag&&this._zoomOut()}}},t.prototype._zoomOut=function(){this._renderer.setElementStyle(this._ngEl.nativeElement,"transform","scale(0.5, 0.5)")},t.prototype._resetZoom=function(){this._renderer.setElementStyle(this._ngEl.nativeElement,"transform","")},t.prototype._drag=function(t){if(this.isDragging){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty();var i=this._getMousePosition(t),e=i.left-this._posOffset.left,s=i.top-this._posOffset.top,n=this._draggingItem.getGridPosition(),o=this._calculateGridPosition(e,s),r=this._draggingItem.getSize();this._isWithinBoundsX(o,r)||(o.col=this._maxCols-(r.x-1)),this._isWithinBoundsY(o,r)||(o.row=this._maxRows-(r.y-1)),!this._autoResize&&this._limitToScreen&&o.col+r.x-1>this._getContainerColumns()&&(o.col=this._getContainerColumns()-(r.x-1)),o.col==n.col&&o.row==n.row||(this._draggingItem.setGridPosition(o,this._fixToGrid),this._placeholderRef.instance.setGridPosition(o),["up","down","left","right"].indexOf(this.cascade)>=0&&(this._fixGridCollisions(o,r,!0),this._cascadeGrid(o,r))),this._fixToGrid||this._draggingItem.setPosition(e,s),this.onDrag.emit(this._draggingItem),this._draggingItem.onDragEvent()}},t.prototype._resize=function(t){if(this.isResizing){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty();var i=this._getMousePosition(t),e=this._resizingItem.getPosition(),s=this._resizingItem.getDimensions(),n="height"==this._resizeDirection?s.width:i.left-e.left+10,o="width"==this._resizeDirection?s.height:i.top-e.top+10;n<this.minWidth&&(n=this.minWidth),o<this.minHeight&&(o=this.minHeight),n<this._resizingItem.minWidth&&(n=this._resizingItem.minWidth),o<this._resizingItem.minHeight&&(o=this._resizingItem.minHeight);var r=this._calculateGridSize(n,o),h=this._resizingItem.getSize(),a=this._resizingItem.getGridPosition();this._isWithinBoundsX(a,r)||(r.x=this._maxCols-a.col+1),this._isWithinBoundsY(a,r)||(r.y=this._maxRows-a.row+1),r=this._resizingItem.fixResize(r),r.x==h.x&&r.y==h.y||(this._resizingItem.setSize(r,!1),this._placeholderRef.instance.setSize(r),["up","down","left","right"].indexOf(this.cascade)>=0&&(this._fixGridCollisions(a,r,!0),this._cascadeGrid(a,r))),this._fixToGrid||this._resizingItem.setDimensions(n,o);var l=this._maxGridSize(e.left+n+2*t.movementX,e.top+o+2*t.movementY);"height"==this._resizeDirection&&(l.x=a.col+h.x),"width"==this._resizeDirection&&(l.y=a.row+h.y),this.onResize.emit(this._resizingItem),this._resizingItem.onResizeEvent()}},t.prototype._dragStop=function(t){if(this.isDragging){this.isDragging=!1;var i=this._draggingItem.getGridPosition();this._draggingItem.savePosition(i),this._addToGrid(this._draggingItem),this._cascadeGrid(),this._draggingItem.stopMoving(),this._draggingItem.onDragStopEvent(),this.onDragStop.emit(this._draggingItem),this._draggingItem=null,this._posOffset=null,this._placeholderRef.destroy(),this._emitOnItemChange(),this._zoomOnDrag&&this._resetZoom()}},t.prototype._resizeStop=function(t){if(this.isResizing){this.isResizing=!1;var i=this._resizingItem.getSize();this._resizingItem.setSize(i),this._addToGrid(this._resizingItem),this._cascadeGrid(),this._resizingItem.stopMoving(),this._resizingItem.onResizeStopEvent(),this.onResizeStop.emit(this._resizingItem),this._resizingItem=null,this._resizeDirection=null,this._placeholderRef.destroy(),this._emitOnItemChange()}},t.prototype._maxGridSize=function(t,i){var e=Math.ceil(t/(this.colWidth+this.marginLeft+this.marginRight)),s=Math.ceil(i/(this.rowHeight+this.marginTop+this.marginBottom));return{x:e,y:s}},t.prototype._calculateGridSize=function(t,i){t+=this.marginLeft+this.marginRight,i+=this.marginTop+this.marginBottom;var e=Math.max(this.minCols,Math.round(t/(this.colWidth+this.marginLeft+this.marginRight))),s=Math.max(this.minRows,Math.round(i/(this.rowHeight+this.marginTop+this.marginBottom)));return this._isWithinBoundsX({col:1,row:1},{x:e,y:s})||(e=this._maxCols),this._isWithinBoundsY({col:1,row:1},{x:e,y:s})||(s=this._maxRows),{x:e,y:s}},t.prototype._calculateGridPosition=function(t,i){var e=Math.max(1,Math.round(t/(this.colWidth+this.marginLeft+this.marginRight))+1),s=Math.max(1,Math.round(i/(this.rowHeight+this.marginTop+this.marginBottom))+1);return this._isWithinBoundsX({col:e,row:s},{x:1,y:1})||(e=this._maxCols),this._isWithinBoundsY({col:e,row:s},{x:1,y:1})||(s=this._maxRows),{col:e,row:s}},t.prototype._hasGridCollision=function(t,i){var e=this._getCollisions(t,i);return null!=e&&0!=e.length&&e.some(function(t){return!(null===t)})},t.prototype._getCollisions=function(t,i){for(var e=[],s=0;s<i.y;s++)if(null!=this._itemGrid[t.row+s])for(var n=0;n<i.x;n++)if(null!=this._itemGrid[t.row+s][t.col+n]){var o=this._itemGrid[t.row+s][t.col+n];e.indexOf(o)<0&&e.push(o);var r=o.getGridPosition(),h=o.getSize();n=r.col+h.x-t.col}return e},t.prototype._fixGridCollisions=function(t,i,e){for(void 0===e&&(e=!1);this._hasGridCollision(t,i);){var s=this._getCollisions(t,i);this._removeFromGrid(s[0]);var n=s[0].getGridPosition(),o=s[0].getSize();switch(this.cascade){case"up":case"down":default:var r=n.row;n.row=t.row+i.y,this._isWithinBoundsY(n,o)||(n.col=t.col+i.x,n.row=r);break;case"left":case"right":var h=n.col;n.col=t.col+i.x,this._isWithinBoundsX(n,o)||(n.col=h,n.row=t.row+i.y)}e?s[0].savePosition(n):s[0].setGridPosition(n),this._fixGridCollisions(n,o,e),this._addToGrid(s[0]),s[0].onCascadeEvent()}},t.prototype._limitGrid=function(t){var i=this._items.slice();i.sort(function(t,i){var e=t.getSavedPosition(),s=i.getSavedPosition();return e.row==s.row?e.col==s.col?0:e.col<s.col?-1:1:e.row<s.row?-1:1});for(var e={},s={},n=1;n<=t;n++)e[n]=1,s[n]=1;for(var o=1;i.length>0;){for(var r=[],h={start:1,end:1,length:0},a=1;a<=t;a++)e[a]<=o?(0==h.length&&(h.start=a),h.length++,h.end=a+1):h.length>0&&(r.push(h),h={start:a,end:a,length:0});h.length>0&&r.push(h);for(var l=r.map(function(t){return t.length}),g=[];i.length>0;){var _=i[0];if(_.row>o)break;var m=!1;for(var d in l){if(_.sizex<=l[d]){l[d]-=_.sizex,m=!0;break}_.sizex>l[d]&&(l[d]=0)}if(!m)break;g.push(i.shift())}if(g.length>0){for(var c=[],u=t,n=g.length-1;n>=0;n--){for(var p=1,f=r.length-1;f>=0;f--)if(!(r[f].start>u||r[f].start>t-g[n].sizex||r[f].length<g[n].sizex||u<r[f].end&&u-r[f].start<g[n].sizex)){p=(u<r[f].end?u:r[f].end)-g[n].sizex;break}c[n]=Math.min(p,g[n].row==o?g[n].col:1),u=c[n]}for(var y=1,v=0;g.length>0;){for(var _=g.shift(),f=0;f<r.length;f++)if(!(r[f].length<_.sizex||y>r[f].end||y>r[f].start&&r[f].end-y<_.sizex)){y<r[f].start&&(y=r[f].start);break}_.setGridPosition({col:Math.max(y,c[v]),row:o}),y=_.currentCol+_.sizex,v++;for(var n=_.currentCol;n<_.currentCol+_.sizex;n++)e[n]=_.currentRow+_.sizey}}else if(0===g.length&&1===r.length&&r[0].length>=t){var _=i.shift();_.setGridPosition({col:1,row:o});for(var n=_.currentCol;n<_.currentCol+_.sizex;n++)e[n]=_.currentRow+_.sizey}var E=0;for(var d in e)e[d]>o&&(0==E||e[d]<E)&&(E=e[d]);o=E<=o?o+1:E}},t.prototype._cascadeGrid=function(t,i,e){if(void 0===e&&(e=!0),!this._destroyed){if(t&&!i)throw new Error("Cannot cascade with only position and not dimensions");switch(this.isDragging&&this._draggingItem&&!t&&!i?(t=this._draggingItem.getGridPosition(),i=this._draggingItem.getSize()):this.isResizing&&this._resizingItem&&!t&&!i&&(t=this._resizingItem.getGridPosition(),i=this._resizingItem.getSize()),this.cascade){case"up":case"down":for(var s=[0],n=1;n<=this._curMaxCol;n++)s[n]=1;for(var o=1;o<=this._curMaxRow;o++)if(void 0!=this._itemGrid[o])for(var r=1;r<=this._curMaxCol&&void 0!=this._itemGrid[o];r++)if(!(o<s[r])&&null!=this._itemGrid[o][r]){var h=this._itemGrid[o][r];if(h.isFixed)continue;var a=h.getSize(),l=h.getGridPosition();if(l.col!=r||l.row!=o)continue;for(var g=s[r],n=1;n<a.x;n++)g=Math.max(s[r+n],g);t&&r+a.x>t.col&&r<t.col+i.x&&(o>=t.row&&o<t.row+i.y||a.y>t.row-g&&o>=t.row+i.y&&g<t.row+i.y)&&(g=Math.max(g,t.row+i.y));var _={col:r,row:g};g!=l.row&&this._isWithinBoundsY(_,a)&&(this._removeFromGrid(h),e?h.savePosition(_):h.setGridPosition(_),h.onCascadeEvent(),this._addToGrid(h));for(var n=0;n<a.x;n++)s[r+n]=g+a.y}break;case"left":case"right":for(var m=[0],n=1;n<=this._curMaxRow;n++)m[n]=1;for(var o=1;o<=this._curMaxRow;o++)if(void 0!=this._itemGrid[o])for(var r=1;r<=this._curMaxCol&&void 0!=this._itemGrid[o];r++)if(!(r<m[o])&&null!=this._itemGrid[o][r]){var h=this._itemGrid[o][r],a=h.getSize(),l=h.getGridPosition();if(l.col!=r||l.row!=o)continue;for(var g=m[o],n=1;n<a.y;n++)g=Math.max(m[o+n],g);t&&o+a.y>t.row&&o<t.row+i.y&&(r>=t.col&&r<t.col+i.x||a.x>t.col-g&&r>=t.col+i.x&&g<t.col+i.x)&&(g=Math.max(g,t.col+i.x));var _={col:g,row:o};g!=l.col&&this._isWithinBoundsX(_,a)&&(this._removeFromGrid(h),e?h.savePosition(_):h.setGridPosition(_),h.onCascadeEvent(),this._addToGrid(h));for(var n=0;n<a.y;n++)m[o+n]=g+a.x}}}},t.prototype._fixGridPosition=function(t,i){for(;this._hasGridCollision(t,i)||!this._isWithinBounds(t,i);){if(this._hasGridCollision(t,i))switch(this.cascade){case"up":case"down":default:t.row++;break;case"left":case"right":t.col++}this._isWithinBoundsY(t,i)||(t.col++,t.row=1),this._isWithinBoundsX(t,i)||(t.row++,t.col=1)}return t},t.prototype._isWithinBoundsX=function(t,i){return 0==this._maxCols||t.col+i.x-1<=this._maxCols},t.prototype._isWithinBoundsY=function(t,i){return 0==this._maxRows||t.row+i.y-1<=this._maxRows},t.prototype._isWithinBounds=function(t,i){return this._isWithinBoundsX(t,i)&&this._isWithinBoundsY(t,i)},t.prototype._addToGrid=function(t){var i=t.getGridPosition(),e=t.getSize();this._hasGridCollision(i,e)&&(this._fixGridCollisions(i,e),i=t.getGridPosition());for(var s=0;s<e.y;s++){null==this._itemGrid[i.row+s]&&(this._itemGrid[i.row+s]={});for(var n=0;n<e.x;n++)this._itemGrid[i.row+s][i.col+n]=t,this._updateSize(i.col+e.x-1,i.row+e.y-1)}},t.prototype._removeFromGrid=function(t){for(var i in this._itemGrid)for(var e in this._itemGrid[i])this._itemGrid[i][e]==t&&delete this._itemGrid[i][e]},t.prototype._updateSize=function(t,i){if(!this._destroyed){t=void 0==t?this._getMaxCol():t,i=void 0==i?this._getMaxRow():i;var e=Math.max(this._curMaxCol,t),s=Math.max(this._curMaxRow,i);e==this._curMaxCol&&s==this._curMaxRow||(this._curMaxCol=e,this._curMaxRow=s),this._renderer.setElementStyle(this._ngEl.nativeElement,"width","100%"),this._renderer.setElementStyle(this._ngEl.nativeElement,"height",this._getMaxRow()*(this.rowHeight+this.marginTop+this.marginBottom)+"px")}},t.prototype._getMaxRow=function(){return Math.max.apply(null,this._items.map(function(t){return t.getGridPosition().row+t.getSize().y-1}))},t.prototype._getMaxCol=function(){return Math.max.apply(null,this._items.map(function(t){return t.getGridPosition().col+t.getSize().x-1}))},t.prototype._getMousePosition=function(t){(window.TouchEvent&&t instanceof TouchEvent||t.touches||t.changedTouches)&&(t=t.touches.length>0?t.touches[0]:t.changedTouches[0]);var i=this._ngEl.nativeElement.getBoundingClientRect(),e=t.clientX-i.left,s=t.clientY-i.top;return"down"==this.cascade&&(s=i.top+i.height-t.clientY),"right"==this.cascade&&(e=i.left+i.width-t.clientX),this.isDragging&&this._zoomOnDrag&&(e*=2,s*=2),{left:e,top:s}},t.prototype._getAbsoluteMousePosition=function(t){return(window.TouchEvent&&t instanceof TouchEvent||t.touches||t.changedTouches)&&(t=t.touches.length>0?t.touches[0]:t.changedTouches[0]),{left:t.clientX,top:t.clientY}},t.prototype._getContainerColumns=function(){var t=this._ngEl.nativeElement.getBoundingClientRect().width;return Math.floor(t/(this.colWidth+this.marginLeft+this.marginRight))},t.prototype._getItemFromPosition=function(t){for(var i=0,e=this._items;i<e.length;i++){var s=e[i],n=s.getDimensions(),o=s.getPosition();if(t.left>o.left+this.marginLeft&&t.left<o.left+this.marginLeft+n.width&&t.top>o.top+this.marginTop&&t.top<o.top+this.marginTop+n.height)return s}return null},t.prototype._createPlaceholder=function(t){var i=t.getGridPosition(),s=t.getSize(),n=this.componentFactoryResolver.resolveComponentFactory(e),o=t.containerRef.createComponent(n);this._placeholderRef=o;var r=o.instance;r.registerGrid(this),r.setCascadeMode(this.cascade),r.setGridPosition({col:i.col,row:i.row}),r.setSize({x:s.x,y:s.y})},t.prototype._emitOnItemChange=function(){this.onItemChange.emit(this._items.map(function(t){return t.getEventOutput()}))},t.CONST_DEFAULT_CONFIG={margins:[10],draggable:!0,resizable:!0,max_cols:0,max_rows:0,visible_cols:0,visible_rows:0,col_width:250,row_height:250,cascade:"up",min_width:100,min_height:100,fix_to_grid:!1,auto_style:!0,auto_resize:!1,maintain_ratio:!1,prefer_new:!1,zoom_on_drag:!1},t.decorators=[{type:i.Directive,args:[{selector:"[ngGrid]",inputs:["config: ngGrid"],host:{"(mousedown)":"mouseDownEventHandler($event)","(mousemove)":"mouseMoveEventHandler($event)","(mouseup)":"mouseUpEventHandler($event)","(touchstart)":"mouseDownEventHandler($event)","(touchmove)":"mouseMoveEventHandler($event)","(touchend)":"mouseUpEventHandler($event)","(window:resize)":"resizeEventHandler($event)","(document:mousemove)":"mouseMoveEventHandler($event)","(document:mouseup)":"mouseUpEventHandler($event)"}}]}],t.ctorParameters=function(){return[{type:i.KeyValueDiffers},{type:i.ElementRef},{type:i.Renderer},{type:i.ComponentFactoryResolver},{type:i.ViewContainerRef}]},t.propDecorators={onDragStart:[{type:i.Output}],onDrag:[{type:i.Output}],onDragStop:[{type:i.Output}],onResizeStart:[{type:i.Output}],onResize:[{type:i.Output}],onResizeStop:[{type:i.Output}],onItemChange:[{type:i.Output}]},t}(),n=function(){function t(e,s,n,o,r){this._differs=e,this._ngEl=s,this._renderer=n,this._ngGrid=o,this.containerRef=r,this.onItemChange=new i.EventEmitter(!1),this.onDragStart=new i.EventEmitter,this.onDrag=new i.EventEmitter,this.onDragStop=new i.EventEmitter,this.onDragAny=new i.EventEmitter,this.onResizeStart=new i.EventEmitter,this.onResize=new i.EventEmitter,this.onResizeStop=new i.EventEmitter,this.onResizeAny=new i.EventEmitter,this.onChangeStart=new i.EventEmitter,this.onChange=new i.EventEmitter,this.onChangeStop=new i.EventEmitter,this.onChangeAny=new i.EventEmitter,this.ngGridItemChange=new i.EventEmitter,this.isFixed=!1,this.isDraggable=!0,this.isResizable=!0,this.minWidth=0,this.minHeight=0,this._position={col:1,row:1},this._currentPosition={col:1,row:1},this._size={x:1,y:1},this._config=t.CONST_DEFAULT_CONFIG,this._added=!1,this._maxCols=0,this._minCols=0,this._maxRows=0,this._minRows=0}return Object.defineProperty(t.prototype,"config",{set:function(i){var e=t.CONST_DEFAULT_CONFIG;for(var s in e)null==i[s]&&(i[s]=e[s]);this.setConfig(i),null==this._differ&&null!=i&&(this._differ=this._differs.find(this._config).create(null)),this._added||(this._added=!0,this._ngGrid.addItem(this)),this._recalculateDimensions(),this._recalculatePosition()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sizex",{get:function(){return this._size.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sizey",{get:function(){return this._size.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"col",{get:function(){return this._position.col},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this._position.row},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentCol",{get:function(){return this._currentPosition.col},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentRow",{get:function(){return this._currentPosition.row},enumerable:!0,configurable:!0}),t.prototype.onResizeStartEvent=function(){var t=this.getEventOutput();this.onResizeStart.emit(t),this.onResizeAny.emit(t),this.onChangeStart.emit(t),this.onChangeAny.emit(t)},t.prototype.onResizeEvent=function(){var t=this.getEventOutput();this.onResize.emit(t),this.onResizeAny.emit(t),this.onChange.emit(t),this.onChangeAny.emit(t)},t.prototype.onResizeStopEvent=function(){var t=this.getEventOutput();this.onResizeStop.emit(t),this.onResizeAny.emit(t),this.onChangeStop.emit(t),this.onChangeAny.emit(t),this._config.sizex=this._size.x,this._config.sizey=this._size.y,this.ngGridItemChange.emit(this._config)},t.prototype.onDragStartEvent=function(){var t=this.getEventOutput();this.onDragStart.emit(t),this.onDragAny.emit(t),this.onChangeStart.emit(t),this.onChangeAny.emit(t)},t.prototype.onDragEvent=function(){var t=this.getEventOutput();this.onDrag.emit(t),this.onDragAny.emit(t),this.onChange.emit(t),this.onChangeAny.emit(t)},t.prototype.onDragStopEvent=function(){var t=this.getEventOutput();this.onDragStop.emit(t),this.onDragAny.emit(t),this.onChangeStop.emit(t),this.onChangeAny.emit(t),this._config.col=this._position.col,this._config.row=this._position.row,this.ngGridItemChange.emit(this._config)},t.prototype.onCascadeEvent=function(){this._config.sizex=this._size.x,this._config.sizey=this._size.y,this._config.col=this._position.col,this._config.row=this._position.row,this.ngGridItemChange.emit(this._config)},t.prototype.ngOnInit=function(){this._renderer.setElementClass(this._ngEl.nativeElement,"grid-item",!0),this._ngGrid.autoStyle&&this._renderer.setElementStyle(this._ngEl.nativeElement,"position","absolute"),this._recalculateDimensions(),this._recalculatePosition(),this._added||(this._added=!0,this._ngGrid.addItem(this))},t.prototype.canDrag=function(t){return!!this.isDraggable&&(!this._dragHandle||this.findHandle(this._dragHandle,t.target))},t.prototype.findHandle=function(t,i){for(var e=i;e&&e!=this._ngEl.nativeElement;){if(this.elementMatches(e,t))return!0;e=e.parentElement}return!1},t.prototype.canResize=function(t){if(!this.isResizable)return null;if(this._resizeHandle)return this.findHandle(this._resizeHandle,t.target)?"both":null;var i=this._getMousePosition(t);return i.left<this._elemWidth&&i.left>this._elemWidth-this._borderSize&&i.top<this._elemHeight&&i.top>this._elemHeight-this._borderSize?"both":i.left<this._elemWidth&&i.left>this._elemWidth-this._borderSize?"width":i.top<this._elemHeight&&i.top>this._elemHeight-this._borderSize?"height":null},t.prototype.onMouseMove=function(t){if(this._ngGrid.autoStyle)if(this._ngGrid.resizeEnable&&!this._resizeHandle&&this.isResizable){var i=this._getMousePosition(t);i.left<this._elemWidth&&i.left>this._elemWidth-this._borderSize&&i.top<this._elemHeight&&i.top>this._elemHeight-this._borderSize?this._renderer.setElementStyle(this._ngEl.nativeElement,"cursor","nwse-resize"):i.left<this._elemWidth&&i.left>this._elemWidth-this._borderSize?this._renderer.setElementStyle(this._ngEl.nativeElement,"cursor","ew-resize"):i.top<this._elemHeight&&i.top>this._elemHeight-this._borderSize?this._renderer.setElementStyle(this._ngEl.nativeElement,"cursor","ns-resize"):this._ngGrid.dragEnable&&this.canDrag(t)?this._renderer.setElementStyle(this._ngEl.nativeElement,"cursor","move"):this._renderer.setElementStyle(this._ngEl.nativeElement,"cursor","default")}else this._ngGrid.resizeEnable&&this.canResize(t)?this._renderer.setElementStyle(this._ngEl.nativeElement,"cursor","nwse-resize"):this._ngGrid.dragEnable&&this.canDrag(t)?this._renderer.setElementStyle(this._ngEl.nativeElement,"cursor","move"):this._renderer.setElementStyle(this._ngEl.nativeElement,"cursor","default");
  },t.prototype.ngOnDestroy=function(){this._added&&this._ngGrid.removeItem(this)},t.prototype.getElement=function(){return this._ngEl},t.prototype.getDragHandle=function(){return this._dragHandle},t.prototype.getResizeHandle=function(){return this._resizeHandle},t.prototype.getDimensions=function(){return{width:this._elemWidth,height:this._elemHeight}},t.prototype.getSize=function(){return this._size},t.prototype.getPosition=function(){return{left:this._elemLeft,top:this._elemTop}},t.prototype.getGridPosition=function(){return this._currentPosition},t.prototype.getSavedPosition=function(){return this._position},t.prototype.setConfig=function(i){this._config=i,this._payload=i.payload,this._position.col=this._currentPosition.col=i.col?i.col:t.CONST_DEFAULT_CONFIG.col,this._position.row=this._currentPosition.row=i.row?i.row:t.CONST_DEFAULT_CONFIG.row,this._size.x=i.sizex?i.sizex:t.CONST_DEFAULT_CONFIG.sizex,this._size.y=i.sizey?i.sizey:t.CONST_DEFAULT_CONFIG.sizey,this._dragHandle=i.dragHandle,this._resizeHandle=i.resizeHandle,this._borderSize=i.borderSize,this.isDraggable=!!i.draggable,this.isResizable=!!i.resizable,this.isFixed=!!i.fixed,this._maxCols=!isNaN(i.maxCols)&&isFinite(i.maxCols)?i.maxCols:0,this._minCols=!isNaN(i.minCols)&&isFinite(i.minCols)?i.minCols:0,this._maxRows=!isNaN(i.maxRows)&&isFinite(i.maxRows)?i.maxRows:0,this._minRows=!isNaN(i.minRows)&&isFinite(i.minRows)?i.minRows:0,this.minWidth=!isNaN(i.minWidth)&&isFinite(i.minWidth)?i.minWidth:0,this.minHeight=!isNaN(i.minHeight)&&isFinite(i.minHeight)?i.minHeight:0,this._minCols>0&&this._maxCols>0&&this._minCols>this._maxCols&&(this._minCols=0),this._minRows>0&&this._maxRows>0&&this._minRows>this._maxRows&&(this._minRows=0),this._added&&this._ngGrid.updateItem(this),this._size=this.fixResize(this._size),this._recalculatePosition(),this._recalculateDimensions()},t.prototype.ngDoCheck=function(){if(null!=this._differ){var t=this._differ.diff(this._config);if(null!=t)return this._applyChanges(t),!0}return!1},t.prototype.setSize=function(t,i){void 0===i&&(i=!0),t=this.fixResize(t),this._size=t,i&&this._recalculateDimensions(),this.onItemChange.emit(this.getEventOutput())},t.prototype.setGridPosition=function(t,i){void 0===i&&(i=!0),this._currentPosition=t,i&&this._recalculatePosition(),this.onItemChange.emit(this.getEventOutput())},t.prototype.savePosition=function(t){this._position=t,this._currentPosition=t,this._recalculatePosition(),this.onItemChange.emit(this.getEventOutput())},t.prototype.getEventOutput=function(){return{payload:this._payload,col:this._currentPosition.col,row:this._currentPosition.row,sizex:this._size.x,sizey:this._size.y,width:this._elemWidth,height:this._elemHeight,left:this._elemLeft,top:this._elemTop}},t.prototype.setPosition=function(t,i){switch(this._cascadeMode){case"up":case"left":default:this._renderer.setElementStyle(this._ngEl.nativeElement,"transform","translate("+t+"px, "+i+"px)");break;case"right":this._renderer.setElementStyle(this._ngEl.nativeElement,"transform","translate("+-t+"px, "+i+"px)");break;case"down":this._renderer.setElementStyle(this._ngEl.nativeElement,"transform","translate("+t+"px, "+-i+"px)")}this._elemLeft=t,this._elemTop=i},t.prototype.setCascadeMode=function(t){switch(this._cascadeMode=t,t){case"up":case"left":default:this._renderer.setElementStyle(this._ngEl.nativeElement,"left","0px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"top","0px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"right",null),this._renderer.setElementStyle(this._ngEl.nativeElement,"bottom",null);break;case"right":this._renderer.setElementStyle(this._ngEl.nativeElement,"right","0px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"top","0px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"left",null),this._renderer.setElementStyle(this._ngEl.nativeElement,"bottom",null);break;case"down":this._renderer.setElementStyle(this._ngEl.nativeElement,"left","0px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"bottom","0px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"right",null),this._renderer.setElementStyle(this._ngEl.nativeElement,"top",null)}},t.prototype.setDimensions=function(t,i){t<this.minWidth&&(t=this.minWidth),i<this.minHeight&&(i=this.minHeight),this._renderer.setElementStyle(this._ngEl.nativeElement,"width",t+"px"),this._renderer.setElementStyle(this._ngEl.nativeElement,"height",i+"px"),this._elemWidth=t,this._elemHeight=i},t.prototype.startMoving=function(){this._renderer.setElementClass(this._ngEl.nativeElement,"moving",!0);var t=window.getComputedStyle(this._ngEl.nativeElement);this._ngGrid.autoStyle&&this._renderer.setElementStyle(this._ngEl.nativeElement,"z-index",(parseInt(t.getPropertyValue("z-index"))+1).toString())},t.prototype.stopMoving=function(){this._renderer.setElementClass(this._ngEl.nativeElement,"moving",!1);var t=window.getComputedStyle(this._ngEl.nativeElement);this._ngGrid.autoStyle&&this._renderer.setElementStyle(this._ngEl.nativeElement,"z-index",(parseInt(t.getPropertyValue("z-index"))-1).toString())},t.prototype.recalculateSelf=function(){this._recalculatePosition(),this._recalculateDimensions()},t.prototype.fixResize=function(t){this._maxCols>0&&t.x>this._maxCols&&(t.x=this._maxCols),this._maxRows>0&&t.y>this._maxRows&&(t.y=this._maxRows),this._minCols>0&&t.x<this._minCols&&(t.x=this._minCols),this._minRows>0&&t.y<this._minRows&&(t.y=this._minRows);var i=t.x*this._ngGrid.colWidth+(this._ngGrid.marginLeft+this._ngGrid.marginRight)*(t.x-1);i<this.minWidth&&(t.x=Math.ceil((this.minWidth+this._ngGrid.marginRight+this._ngGrid.marginLeft)/(this._ngGrid.colWidth+this._ngGrid.marginRight+this._ngGrid.marginLeft)));var e=t.y*this._ngGrid.rowHeight+(this._ngGrid.marginTop+this._ngGrid.marginBottom)*(t.y-1);return e<this.minHeight&&(t.y=Math.ceil((this.minHeight+this._ngGrid.marginBottom+this._ngGrid.marginTop)/(this._ngGrid.rowHeight+this._ngGrid.marginBottom+this._ngGrid.marginTop))),t},t.prototype.elementMatches=function(t,i){if(t.matches)return t.matches(i);if(t.oMatchesSelector)return t.oMatchesSelector(i);if(t.msMatchesSelector)return t.msMatchesSelector(i);if(t.mozMatchesSelector)return t.mozMatchesSelector(i);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(i);for(var e=(t.document||t.ownerDocument).querySelectorAll(i),s=e.length;--s>=0&&e.item(s)!==t;);return s>-1},t.prototype._recalculatePosition=function(){var t=(this._ngGrid.colWidth+this._ngGrid.marginLeft+this._ngGrid.marginRight)*(this._currentPosition.col-1)+this._ngGrid.marginLeft,i=(this._ngGrid.rowHeight+this._ngGrid.marginTop+this._ngGrid.marginBottom)*(this._currentPosition.row-1)+this._ngGrid.marginTop;this.setPosition(t,i)},t.prototype._recalculateDimensions=function(){this._size.x<this._ngGrid.minCols&&(this._size.x=this._ngGrid.minCols),this._size.y<this._ngGrid.minRows&&(this._size.y=this._ngGrid.minRows);var t=this._ngGrid.colWidth*this._size.x+(this._ngGrid.marginLeft+this._ngGrid.marginRight)*(this._size.x-1),i=this._ngGrid.rowHeight*this._size.y+(this._ngGrid.marginTop+this._ngGrid.marginBottom)*(this._size.y-1),e=Math.max(this.minWidth,this._ngGrid.minWidth,t),s=Math.max(this.minHeight,this._ngGrid.minHeight,i);this.setDimensions(e,s)},t.prototype._getMousePosition=function(t){if(t.originalEvent&&t.originalEvent.touches){var i=t.originalEvent;t=i.touches.length?i.touches[0]:i.changedTouches.length?i.changedTouches[0]:t}else t.touches&&(t=t.touches.length?t.touches[0]:t.changedTouches.length?t.changedTouches[0]:t);var e=this._ngEl.nativeElement.getBoundingClientRect();return{left:t.clientX-e.left,top:t.clientY-e.top}},t.prototype._applyChanges=function(t){var i=this;t.forEachAddedItem(function(t){i._config[t.key]=t.currentValue}),t.forEachChangedItem(function(t){i._config[t.key]=t.currentValue}),t.forEachRemovedItem(function(t){delete i._config[t.key]}),this.setConfig(this._config)},t.CONST_DEFAULT_CONFIG={col:1,row:1,sizex:1,sizey:1,dragHandle:null,resizeHandle:null,fixed:!1,draggable:!0,resizable:!0,borderSize:25},t.decorators=[{type:i.Directive,args:[{selector:"[ngGridItem]",inputs:["config: ngGridItem"]}]}],t.ctorParameters=function(){return[{type:i.KeyValueDiffers},{type:i.ElementRef},{type:i.Renderer},{type:s},{type:i.ViewContainerRef}]},t.propDecorators={onItemChange:[{type:i.Output}],onDragStart:[{type:i.Output}],onDrag:[{type:i.Output}],onDragStop:[{type:i.Output}],onDragAny:[{type:i.Output}],onResizeStart:[{type:i.Output}],onResize:[{type:i.Output}],onResizeStop:[{type:i.Output}],onResizeAny:[{type:i.Output}],onChangeStart:[{type:i.Output}],onChange:[{type:i.Output}],onChangeStop:[{type:i.Output}],onChangeAny:[{type:i.Output}],ngGridItemChange:[{type:i.Output}]},t}(),o=function(){function t(){}return t.decorators=[{type:i.NgModule,args:[{declarations:[s,n,e],entryComponents:[e],exports:[s,n]}]}],t.ctorParameters=function(){return[]},t}();t.NgGrid=s,t.NgGridItem=n,t.NgGridPlaceholder=e,t.NgGridModule=o,Object.defineProperty(t,"__esModule",{value:!0})});