text: /**
   * @license
   * Copyright Google LLC All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/material/core"),require("@angular/cdk/bidi")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/material/core","@angular/cdk/bidi"],e):e((t.ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.gridList=t.ng.material.gridList||{}),t.ng.core,t.ng.material.core,t.ng.cdk.bidi)}(this,function(t,e,i,r){"use strict";function n(t,e){function i(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function o(t){return""+(t||"")}function a(t){return"string"==typeof t?parseInt(t,10):t}function s(t){return"calc("+t+")"}function l(t){return t.match(/px|em|rem/)?t:t+"px"}var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},h=function(){function t(t,e){this._renderer=t,this._element=e,this._rowspan=1,this._colspan=1}return Object.defineProperty(t.prototype,"rowspan",{get:function(){return this._rowspan},set:function(t){this._rowspan=a(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"colspan",{get:function(){return this._colspan},set:function(t){this._colspan=a(t)},enumerable:!0,configurable:!0}),t.prototype._setStyle=function(t,e){this._renderer.setStyle(this._element.nativeElement,t,e)},t.decorators=[{type:e.Component,args:[{selector:"mat-grid-tile",exportAs:"matGridTile",host:{class:"mat-grid-tile"},template:'<figure class="mat-figure"><ng-content></ng-content></figure>',styles:[".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-footer,.mat-grid-tile .mat-grid-tile-header{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-footer>*,.mat-grid-tile .mat-grid-tile-header>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-tile-footer.mat-2-line,.mat-grid-tile .mat-grid-tile-header.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},t.propDecorators={rowspan:[{type:e.Input}],colspan:[{type:e.Input}]},t}(),c=function(){function t(t,e){this._renderer=t,this._element=e}return t.prototype.ngAfterContentInit=function(){this._lineSetter=new i.MatLineSetter(this._lines,this._renderer,this._element)},t.decorators=[{type:e.Component,args:[{selector:"mat-grid-tile-header, mat-grid-tile-footer",template:'<ng-content select="[mat-grid-avatar], [matGridAvatar]"></ng-content><div class="mat-grid-list-text"><ng-content select="[mat-line], [matLine]"></ng-content></div><ng-content></ng-content>',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},t.propDecorators={_lines:[{type:e.ContentChildren,args:[i.MatLine]}]},t}(),g=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-grid-avatar], [matGridAvatar]",host:{class:"mat-grid-avatar"}}]}],t.ctorParameters=function(){return[]},t}(),d=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-grid-tile-header",host:{class:"mat-grid-tile-header"}}]}],t.ctorParameters=function(){return[]},t}(),u=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"mat-grid-tile-footer",host:{class:"mat-grid-tile-footer"}}]}],t.ctorParameters=function(){return[]},t}(),f=function(){function t(t,e){var i=this;this.columnIndex=0,this.rowIndex=0,this.tracker=new Array(t),this.tracker.fill(0,0,this.tracker.length),this.positions=e.map(function(t){return i._trackTile(t)})}return Object.defineProperty(t.prototype,"rowCount",{get:function(){return this.rowIndex+1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowspan",{get:function(){var t=Math.max.apply(Math,this.tracker);return t>1?this.rowCount+t-1:this.rowCount},enumerable:!0,configurable:!0}),t.prototype._trackTile=function(t){var e=this._findMatchingGap(t.colspan);return this._markTilePosition(e,t),this.columnIndex=e+t.colspan,new m(this.rowIndex,e)},t.prototype._findMatchingGap=function(t){if(t>this.tracker.length)throw Error("mat-grid-list: tile with colspan "+t+' is wider than grid with cols="'+this.tracker.length+'".');var e=-1,i=-1;do{this.columnIndex+t>this.tracker.length?this._nextRow():(e=this.tracker.indexOf(0,this.columnIndex),-1!=e?(i=this._findGapEndIndex(e),this.columnIndex=e+1):this._nextRow())}while(i-e<t);return e},t.prototype._nextRow=function(){this.columnIndex=0,this.rowIndex++;for(var t=0;t<this.tracker.length;t++)this.tracker[t]=Math.max(0,this.tracker[t]-1)},t.prototype._findGapEndIndex=function(t){for(var e=t+1;e<this.tracker.length;e++)if(0!=this.tracker[e])return e;return this.tracker.length},t.prototype._markTilePosition=function(t,e){for(var i=0;i<e.colspan;i++)this.tracker[t+i]=e.rowspan},t}(),m=function(){function t(t,e){this.row=t,this.col=e}return t}(),y=function(){function t(){this._rows=0,this._rowspan=0}return t.prototype.init=function(t,e,i,r){this._gutterSize=l(t),this._rows=e.rowCount,this._rowspan=e.rowspan,this._cols=i,this._direction=r},t.prototype.getBaseTileSize=function(t,e){return"("+t+"% - ("+this._gutterSize+" * "+e+"))"},t.prototype.getTilePosition=function(t,e){return 0===e?"0":s("("+t+" + "+this._gutterSize+") * "+e)},t.prototype.getTileSize=function(t,e){return"("+t+" * "+e+") + ("+(e-1)+" * "+this._gutterSize+")"},t.prototype.setStyle=function(t,e,i){var r=100/this._cols,n=(this._cols-1)/this._cols;this.setColStyles(t,i,r,n),this.setRowStyles(t,e,r,n)},t.prototype.setColStyles=function(t,e,i,r){var n=this.getBaseTileSize(i,r),o="ltr"===this._direction?"left":"right";t._setStyle(o,this.getTilePosition(n,e)),t._setStyle("width",s(this.getTileSize(n,t.colspan)))},t.prototype.getGutterSpan=function(){return this._gutterSize+" * ("+this._rowspan+" - 1)"},t.prototype.getTileSpan=function(t){return this._rowspan+" * "+this.getTileSize(t,1)},t.prototype.getComputedHeight=function(){return null},t}(),_=function(t){function e(e){var i=t.call(this)||this;return i.fixedRowHeight=e,i}return n(e,t),e.prototype.init=function(e,i,r,n){t.prototype.init.call(this,e,i,r,n),this.fixedRowHeight=l(this.fixedRowHeight)},e.prototype.setRowStyles=function(t,e){t._setStyle("top",this.getTilePosition(this.fixedRowHeight,e)),t._setStyle("height",s(this.getTileSize(this.fixedRowHeight,t.rowspan)))},e.prototype.getComputedHeight=function(){return["height",s(this.getTileSpan(this.fixedRowHeight)+" + "+this.getGutterSpan())]},e.prototype.reset=function(t){t._setListStyle(["height",null]),t._tiles.forEach(function(t){t._setStyle("top",null),t._setStyle("height",null)})},e}(y),w=function(t){function e(e){var i=t.call(this)||this;return i._parseRatio(e),i}return n(e,t),e.prototype.setRowStyles=function(t,e,i,r){var n=i/this.rowHeightRatio;this.baseTileHeight=this.getBaseTileSize(n,r),t._setStyle("margin-top",this.getTilePosition(this.baseTileHeight,e)),t._setStyle("padding-top",s(this.getTileSize(this.baseTileHeight,t.rowspan)))},e.prototype.getComputedHeight=function(){return["padding-bottom",s(this.getTileSpan(this.baseTileHeight)+" + "+this.getGutterSpan())]},e.prototype.reset=function(t){t._setListStyle(["padding-bottom",null]),t._tiles.forEach(function(t){t._setStyle("margin-top",null),t._setStyle("padding-top",null)})},e.prototype._parseRatio=function(t){var e=t.split(":");if(2!==e.length)throw Error('mat-grid-list: invalid ratio given for row-height: "'+t+'"');this.rowHeightRatio=parseFloat(e[0])/parseFloat(e[1])},e}(y),S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.setRowStyles=function(t,e){var i=100/this._rowspan,r=(this._rows-1)/this._rows,n=this.getBaseTileSize(i,r);t._setStyle("top",this.getTilePosition(n,e)),t._setStyle("height",s(this.getTileSize(n,t.rowspan)))},e.prototype.reset=function(t){t._tiles.forEach(function(t){t._setStyle("top",null),t._setStyle("height",null)})},e}(y),x=function(){function t(t,e,i){this._renderer=t,this._element=e,this._dir=i,this._gutter="1px"}return Object.defineProperty(t.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=a(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gutterSize",{get:function(){return this._gutter},set:function(t){this._gutter=o(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowHeight",{set:function(t){var e=o(t);e!==this._rowHeight&&(this._rowHeight=e,this._setTileStyler(this._rowHeight))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._checkCols(),this._checkRowHeight()},t.prototype.ngAfterContentChecked=function(){this._layoutTiles()},t.prototype._checkCols=function(){if(!this.cols)throw Error('mat-grid-list: must pass in number of columns. Example: <mat-grid-list cols="3">')},t.prototype._checkRowHeight=function(){this._rowHeight||this._setTileStyler("1:1")},t.prototype._setTileStyler=function(t){this._tileStyler&&this._tileStyler.reset(this),"fit"===t?this._tileStyler=new S:t&&t.indexOf(":")>-1?this._tileStyler=new w(t):this._tileStyler=new _(t)},t.prototype._layoutTiles=function(){var t=this,e=new f(this.cols,this._tiles),i=this._dir?this._dir.value:"ltr";this._tileStyler.init(this.gutterSize,e,this.cols,i),this._tiles.forEach(function(i,r){var n=e.positions[r];t._tileStyler.setStyle(i,n.row,n.col)}),this._setListStyle(this._tileStyler.getComputedHeight())},t.prototype._setListStyle=function(t){t&&this._renderer.setStyle(this._element.nativeElement,t[0],t[1])},t.decorators=[{type:e.Component,args:[{selector:"mat-grid-list",exportAs:"matGridList",template:"<div><ng-content></ng-content></div>",styles:[".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-footer,.mat-grid-tile .mat-grid-tile-header{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-footer>*,.mat-grid-tile .mat-grid-tile-header>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-tile-footer.mat-2-line,.mat-grid-tile .mat-grid-tile-header.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}"],host:{class:"mat-grid-list"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:r.Directionality,decorators:[{type:e.Optional}]}]},t.propDecorators={_tiles:[{type:e.ContentChildren,args:[h]}],cols:[{type:e.Input}],gutterSize:[{type:e.Input}],rowHeight:[{type:e.Input}]},t}(),b=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[i.MatLineModule,i.MatCommonModule],exports:[x,h,c,i.MatLineModule,i.MatCommonModule,d,u,g],declarations:[x,h,c,d,u,g]}]}],t.ctorParameters=function(){return[]},t}();t.MatGridListModule=b,t.MatGridList=x,t.MatGridTile=h,t.MatGridTileText=c,t.MatGridAvatarCssMatStyler=g,t.MatGridTileHeaderCssMatStyler=d,t.MatGridTileFooterCssMatStyler=u,Object.defineProperty(t,"__esModule",{value:!0})});
  //# sourceMappingURL=/usr/local/google/home/jelbourn/material2/dist/bundles/material-grid-list.umd.min.js.map