UNPKG

@angular/cdk

Version:

Angular Material Component Development Kit

45 lines 4.85 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("@angular/cdk/platform",["exports","@angular/core","@angular/common"],t):t(((e=e||self).ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.platform={}),e.ng.core,e.ng.common)}(this,(function(e,t,r){"use strict"; /** * @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 */var n;try{n="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(e){n=!1}var o,i,s,a,l,u=function(){function e(e){this._platformId=e,this.isBrowser=this._platformId?r.isPlatformBrowser(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!n)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}return e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:Object,decorators:[{type:t.Optional},{type:t.Inject,args:[t.PLATFORM_ID]}]}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function r(){return new e(t.ɵɵinject(t.PLATFORM_ID,8))},token:e,providedIn:"root"}),e}(),d=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{}]}],e}(),c=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"]; /** * @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 p(){if(null==i&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return i=!0}}))}finally{i=i||!1}return i}( /** * @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 */ s=e.RtlScrollAxisType||(e.RtlScrollAxisType={}))[s.NORMAL=0]="NORMAL",s[s.NEGATED=1]="NEGATED",s[s.INVERTED=2]="INVERTED", /** * @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 */ e.Platform=u,e.PlatformModule=d,e._supportsShadowDom=function f(){if(null==l){var e="undefined"!=typeof document?document.head:null;l=!(!e||!e.createShadowRoot&&!e.attachShadow)}return l},e.getRtlScrollAxisType=function h(){if("object"!=typeof document||!document)return e.RtlScrollAxisType.NORMAL;if(!a){var t=document.createElement("div"),r=t.style;t.dir="rtl",r.height="1px",r.width="1px",r.overflow="auto",r.visibility="hidden",r.pointerEvents="none",r.position="absolute";var n=document.createElement("div"),o=n.style;o.width="2px",o.height="1px",t.appendChild(n),document.body.appendChild(t),a=e.RtlScrollAxisType.NORMAL,0===t.scrollLeft&&(t.scrollLeft=1,a=0===t.scrollLeft?e.RtlScrollAxisType.NEGATED:e.RtlScrollAxisType.INVERTED),t.parentNode.removeChild(t)}return a} /** * @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 */,e.getSupportedInputTypes=function m(){if(o)return o;if("object"!=typeof document||!document)return o=new Set(c);var e=document.createElement("input");return o=new Set(c.filter((function(t){return e.setAttribute("type",t),e.type===t})))} /** * @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 */,e.normalizePassiveListenerOptions=function g(e){return p()?e:!!e.capture},e.supportsPassiveEventListeners=p,e.supportsScrollBehavior=function y(){return!!("object"==typeof document&&"scrollBehavior"in document.documentElement.style)},Object.defineProperty(e,"__esModule",{value:!0})}));