blob: 578e05b5c8743caf33f1e0c012af83c5d2777f11 [file] [log] [blame]
/**
* @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/cdk/platform"),require("rxjs"),require("rxjs/operators"),require("@angular/cdk/coercion")):"function"==typeof define&&define.amd?define("@angular/cdk/layout",["exports","@angular/core","@angular/cdk/platform","rxjs","rxjs/operators","@angular/cdk/coercion"],e):e((t.ng=t.ng||{},t.ng.cdk=t.ng.cdk||{},t.ng.cdk.layout={}),t.ng.core,t.ng.cdk.platform,t.rxjs,t.rxjs.operators,t.ng.cdk.coercion)}(this,function(t,e,n,r,a,i){"use strict";function o(t){if(!p.has(t))try{s||(s=document.createElement("style"),s.setAttribute("type","text/css"),document.head.appendChild(s)),s.sheet&&(s.sheet.insertRule("@media "+t+" {.fx-query-test{ }}",0),p.add(t))}catch(t){console.error(t)}}function c(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}function d(t){return t.map(function(t){return t.split(",")}).reduce(function(t,e){return t.concat(e)}).map(function(t){return t.trim()})}var s,u=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{}]}],t}(),p=new Set,m=function(){function t(t){this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):c}return t.prototype.matchMedia=function(t){return this._platform.WEBKIT&&o(t),this._matchMedia(t)},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:n.Platform}]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.Platform))},token:t,providedIn:"root"}),t}(),h=function(){function t(t,e){this._mediaMatcher=t,this._zone=e,this._queries=new Map,this._destroySubject=new r.Subject}return t.prototype.ngOnDestroy=function(){this._destroySubject.next(),this._destroySubject.complete()},t.prototype.isMatched=function(t){var e=this;return d(i.coerceArray(t)).some(function(t){return e._registerQuery(t).mql.matches})},t.prototype.observe=function(t){var e=this,n=d(i.coerceArray(t)),o=n.map(function(t){return e._registerQuery(t).observable}),c=r.combineLatest(o);return c=r.concat(c.pipe(a.take(1)),c.pipe(a.skip(1),a.debounceTime(0))),c.pipe(a.map(function(t){var e={matches:!1,breakpoints:{}};return t.forEach(function(t){e.matches=e.matches||t.matches,e.breakpoints[t.query]=t.matches}),e}))},t.prototype._registerQuery=function(t){var e=this;if(this._queries.has(t))return this._queries.get(t);var n=this._mediaMatcher.matchMedia(t),i=new r.Observable(function(t){var r=function(n){return e._zone.run(function(){return t.next(n)})};return n.addListener(r),function(){n.removeListener(r)}}).pipe(a.startWith(n),a.map(function(e){return{query:t,matches:e.matches}}),a.takeUntil(this._destroySubject)),o={observable:i,mql:n};return this._queries.set(t,o),o},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:m},{type:e.NgZone}]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(m),e.ɵɵinject(e.NgZone))},token:t,providedIn:"root"}),t}(),f={XSmall:"(max-width: 599.99px)",Small:"(min-width: 600px) and (max-width: 959.99px)",Medium:"(min-width: 960px) and (max-width: 1279.99px)",Large:"(min-width: 1280px) and (max-width: 1919.99px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.99px) and (orientation: portrait), (max-width: 959.99px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.99px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.99px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};t.LayoutModule=u,t.BreakpointObserver=h,t.Breakpoints=f,t.MediaMatcher=m,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=cdk-layout.umd.min.js.map