angular-docs-cn/aio/dist/default~code-code-example-m...

2 lines
65 KiB
JavaScript

!function(){function t(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],n=!0,o=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(n=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);n=!0);}catch(c){o=!0,s=c}finally{try{n||null==a.return||a.return()}finally{if(o)throw s}}return i}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=i(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,s=function(){};return{s:s,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,c=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw r}}}}function i(t,e){if(t){if("string"==typeof t)return n(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function o(t,e,i){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(i):o.value}})(t,e,i||t)}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var i,n=l(t);if(e){var o=l(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return c(this,i)}}function c(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?h(t):e}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e,i){return e&&f(t.prototype,e),i&&f(t,i),t}(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+rOU":function(t,e,i){"use strict";i.d(e,"a",function(){return v}),i.d(e,"b",function(){return m}),i.d(e,"c",function(){return g}),i.d(e,"d",function(){return f}),i.d(e,"e",function(){return y}),i.d(e,"f",function(){return b}),i.d(e,"g",function(){return _});var n=i("fXoL"),r=i("ofXK"),c=function(){function t(){u(this,t)}return d(t,[{key:"attach",value:function(t){return this._attachedHost=t,t.attach(this)}},{key:"detach",value:function(){var t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}},{key:"setAttachedHost",value:function(t){this._attachedHost=t}},{key:"isAttached",get:function(){return null!=this._attachedHost}}]),t}(),f=function(t){s(i,t);var e=a(i);function i(t,n,o,s){var r;return u(this,i),(r=e.call(this)).component=t,r.viewContainerRef=n,r.injector=o,r.componentFactoryResolver=s,r}return i}(c),_=function(t){s(i,t);var e=a(i);function i(t,n,o){var s;return u(this,i),(s=e.call(this)).templateRef=t,s.viewContainerRef=n,s.context=o,s}return d(i,[{key:"attach",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.context;return this.context=e,o(l(i.prototype),"attach",this).call(this,t)}},{key:"detach",value:function(){return this.context=void 0,o(l(i.prototype),"detach",this).call(this)}},{key:"origin",get:function(){return this.templateRef.elementRef}}]),i}(c),p=function(t){s(i,t);var e=a(i);function i(t){var o;return u(this,i),(o=e.call(this)).element=t instanceof n.l?t.nativeElement:t,o}return i}(c),v=function(){function t(){u(this,t),this._isDisposed=!1,this.attachDomPortal=null}return d(t,[{key:"hasAttached",value:function(){return!!this._attachedPortal}},{key:"attach",value:function(t){return t instanceof f?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof _?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof p?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}},{key:"detach",value:function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}},{key:"dispose",value:function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}},{key:"setDisposeFn",value:function(t){this._disposeFn=t}},{key:"_invokeDisposeFn",value:function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}]),t}(),y=function(t){s(i,t);var e=a(i);function i(t,n,s,r,a){var c,f;return u(this,i),(f=e.call(this)).outletElement=t,f._componentFactoryResolver=n,f._appRef=s,f._defaultInjector=r,f.attachDomPortal=function(t){var e=t.element,n=f._document.createComment("dom-portal");e.parentNode.insertBefore(n,e),f.outletElement.appendChild(e),o((c=h(f),l(i.prototype)),"setDisposeFn",c).call(c,function(){n.parentNode&&n.parentNode.replaceChild(e,n)})},f._document=a,f}return d(i,[{key:"attachComponentPortal",value:function(t){var e,i=this,n=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(n,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(function(){return e.destroy()})):(e=n.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn(function(){i._appRef.detachView(e.hostView),e.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(e)),e}},{key:"attachTemplatePortal",value:function(t){var e=this,i=t.viewContainerRef,n=i.createEmbeddedView(t.templateRef,t.context);return n.rootNodes.forEach(function(t){return e.outletElement.appendChild(t)}),n.detectChanges(),this.setDisposeFn(function(){var t=i.indexOf(n);-1!==t&&i.remove(t)}),n}},{key:"dispose",value:function(){o(l(i.prototype),"dispose",this).call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}},{key:"_getComponentRootNode",value:function(t){return t.hostView.rootNodes[0]}}]),i}(v),m=function(){var t=function(t){s(i,t);var e=a(i);function i(t,n){return u(this,i),e.call(this,t,n)}return i}(_);return t.\u0275fac=function(e){return new(e||t)(n.Ob(n.N),n.Ob(n.R))},t.\u0275dir=n.Jb({type:t,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[n.zb]}),t}(),g=function(){var t=function(t){s(i,t);var e=a(i);function i(t,s,r){var a,c;return u(this,i),(c=e.call(this))._componentFactoryResolver=t,c._viewContainerRef=s,c._isInitialized=!1,c.attached=new n.n,c.attachDomPortal=function(t){var e=t.element,n=c._document.createComment("dom-portal");t.setAttachedHost(h(c)),e.parentNode.insertBefore(n,e),c._getRootNode().appendChild(e),o((a=h(c),l(i.prototype)),"setDisposeFn",a).call(a,function(){n.parentNode&&n.parentNode.replaceChild(e,n)})},c._document=r,c}return d(i,[{key:"ngOnInit",value:function(){this._isInitialized=!0}},{key:"ngOnDestroy",value:function(){o(l(i.prototype),"dispose",this).call(this),this._attachedPortal=null,this._attachedRef=null}},{key:"attachComponentPortal",value:function(t){t.setAttachedHost(this);var e=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,n=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),s=e.createComponent(n,e.length,t.injector||e.injector);return e!==this._viewContainerRef&&this._getRootNode().appendChild(s.hostView.rootNodes[0]),o(l(i.prototype),"setDisposeFn",this).call(this,function(){return s.destroy()}),this._attachedPortal=t,this._attachedRef=s,this.attached.emit(s),s}},{key:"attachTemplatePortal",value:function(t){var e=this;t.setAttachedHost(this);var n=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return o(l(i.prototype),"setDisposeFn",this).call(this,function(){return e._viewContainerRef.clear()}),this._attachedPortal=t,this._attachedRef=n,this.attached.emit(n),n}},{key:"_getRootNode",value:function(){var t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}},{key:"portal",get:function(){return this._attachedPortal},set:function(t){(!this.hasAttached()||t||this._isInitialized)&&(this.hasAttached()&&o(l(i.prototype),"detach",this).call(this),t&&o(l(i.prototype),"attach",this).call(this,t),this._attachedPortal=t)}},{key:"attachedRef",get:function(){return this._attachedRef}}]),i}(v);return t.\u0275fac=function(e){return new(e||t)(n.Ob(n.j),n.Ob(n.R),n.Ob(r.d))},t.\u0275dir=n.Jb({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[n.zb]}),t}(),b=function(){var t=function t(){u(this,t)};return t.\u0275mod=n.Mb({type:t}),t.\u0275inj=n.Lb({factory:function(e){return new(e||t)}}),t}()},"6CTB":function(t,e,i){"use strict";i.d(e,"a",function(){return y});var n,o=i("fXoL"),s=i("vkgz"),r=i("dNgK"),a=i("vVVL"),c=i("ofXK"),h=function(){function t(e,i){u(this,t),this._document=i;var n=this._textarea=this._document.createElement("textarea"),o=n.style;o.position="fixed",o.top=o.opacity="0",o.left="-999em",n.setAttribute("aria-hidden","true"),n.value=e,this._document.body.appendChild(n)}return d(t,[{key:"copy",value:function(){var t=this._textarea,e=!1;try{if(t){var i=this._document.activeElement;t.select(),t.setSelectionRange(0,t.value.length),e=this._document.execCommand("copy"),i&&i.focus()}}catch(n){}return e}},{key:"destroy",value:function(){var t=this._textarea;t&&(t.parentNode&&t.parentNode.removeChild(t),this._textarea=void 0)}}]),t}(),l=((n=function(){function t(e){u(this,t),this._document=e}return d(t,[{key:"copy",value:function(t){var e=this.beginCopy(t),i=e.copy();return e.destroy(),i}},{key:"beginCopy",value:function(t){return new h(t,this._document)}}]),t}()).\u0275fac=function(t){return new(t||n)(o.Xb(c.d))},n.\u0275prov=Object(o.Kb)({factory:function(){return new n(Object(o.Xb)(c.d))},token:n,providedIn:"root"}),n),f=i("vHPH"),_=["codeContainer"];function p(t,e){if(1&t){var i=o.Ub();o.Tb(0,"button",3),o.ac("click",function(){return o.sc(i),o.ec().doCopy()}),o.Ac(1,"\n "),o.Tb(2,"span",4),o.Ac(3,"content_copy"),o.Sb(),o.Ac(4,"\n "),o.Sb()}if(2&t){var n=o.ec();o.Db("aria-label",n.ariaLabel)}}var v,y=((v=function(){function t(e,i,n,s){u(this,t),this.snackbar=e,this.pretty=i,this.clipboard=n,this.logger=s,this.ariaLabel="",this.codeFormatted=new o.n}return d(t,[{key:"ngOnChanges",value:function(){this.code&&this.formatDisplayedCode()}},{key:"formatDisplayedCode",value:function(){var t,e,i,n=this,o=(t=this.code,e=Number.MAX_VALUE,(i=t.split("\n")).forEach(function(t){var i=t.search(/\S/);-1!==i&&(e=Math.min(i,e))}),i.map(function(t){return t.substr(e)}).join("\n").trim());this.setCodeHtml(o),this.codeText=this.getCodeText(),this.pretty.formatCode(o,this.language,this.getLinenums()).pipe(Object(s.a)(function(){return n.codeFormatted.emit()})).subscribe(function(t){return n.setCodeHtml(t)},function(){})}},{key:"showMissingCodeMessage",value:function(){var t=this.path?this.path+(this.region?"#"+this.region:""):"";this.setCodeHtml('<p class="code-missing">The code sample is missing'.concat(t?" for\n"+t:".","</p>"))}},{key:"setCodeHtml",value:function(t){this.codeContainer.nativeElement.innerHTML=t}},{key:"getCodeText",value:function(){return this.codeContainer.nativeElement.textContent}},{key:"doCopy",value:function(){var t=this.codeText;this.clipboard.copy(t)?(this.logger.log("Copied code to clipboard:",t),this.snackbar.open("Code Copied","",{duration:800})):(this.logger.error(new Error('ERROR copying code to clipboard: "'.concat(t,'"'))),this.snackbar.open("Copy failed. Please try again!","",{duration:800}))}},{key:"getLinenums",value:function(){var t="boolean"==typeof this.linenums?this.linenums:"true"===this.linenums||"false"!==this.linenums&&("string"==typeof this.linenums?parseInt(this.linenums,10):this.linenums);return null!=t&&!isNaN(t)&&t}},{key:"code",set:function(t){this._code=t,this._code&&this._code.trim()?this.formatDisplayedCode():this.showMissingCodeMessage()},get:function(){return this._code}},{key:"header",set:function(t){this._header=t,this.ariaLabel=this.header?"Copy code snippet from "+this.header:""},get:function(){return this._header}}]),t}()).\u0275fac=function(t){return new(t||v)(o.Ob(r.a),o.Ob(a.a),o.Ob(l),o.Ob(f.a))},v.\u0275cmp=o.Ib({type:v,selectors:[["aio-code"]],viewQuery:function(t,e){var i;1&t&&o.Ec(_,3),2&t&&o.oc(i=o.bc())&&(e.codeContainer=i.first)},inputs:{hideCopy:"hideCopy",language:"language",linenums:"linenums",path:"path",region:"region",header:"header"},outputs:{codeFormatted:"codeFormatted"},features:[o.Ab],decls:7,vars:4,consts:[["class","material-icons copy-button no-print","title","Copy code snippet",3,"click",4,"ngIf"],[1,"animated","fadeIn"],["codeContainer",""],["title","Copy code snippet",1,"material-icons","copy-button","no-print",3,"click"],["aria-hidden","true"]],template:function(t,e){1&t&&(o.Tb(0,"pre"),o.Ac(1," "),o.zc(2,p,5,1,"button",0),o.Ac(3,"\n "),o.Pb(4,"code",1,2),o.Ac(6,"\n "),o.Sb()),2&t&&(o.Fb("prettyprint lang-",e.language,""),o.Cb(2),o.jc("ngIf",!e.hideCopy))},directives:[c.k],encapsulation:2}),v)},V90o:function(t,e,i){"use strict";i.d(e,"a",function(){return a});var n=i("ofXK"),o=i("dNgK"),s=i("vVVL"),r=i("fXoL"),a=function(){var t=function t(){u(this,t)};return t.\u0275mod=r.Mb({type:t}),t.\u0275inj=r.Lb({factory:function(e){return new(e||t)},providers:[s.a],imports:[[n.c,o.b]]}),t}()},dNgK:function(i,n,r){"use strict";r.d(n,"a",function(){return Nt}),r.d(n,"b",function(){return Ht});var c=r("vxfF"),h=r("fXoL"),f=r("nLfN"),_=r("cH1L"),p=r("ofXK"),v=r("8LU1"),y=r("+rOU"),m=r("XNiG"),g=r("quSY"),b=r("VRyK"),k=r("IzEk"),w=r("1G5W"),O=r("7o/Q");r("FtGj");var C=Object(f.f)(),R=function(){function t(e,i){u(this,t),this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=i}return d(t,[{key:"attach",value:function(){}},{key:"enable",value:function(){if(this._canBeEnabled()){var t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=Object(v.c)(-this._previousScrollPosition.left),t.style.top=Object(v.c)(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}},{key:"disable",value:function(){if(this._isEnabled){var t=this._document.documentElement,e=t.style,i=this._document.body.style,n=e.scrollBehavior||"",o=i.scrollBehavior||"";this._isEnabled=!1,e.left=this._previousHTMLStyles.left,e.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),C&&(e.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),C&&(e.scrollBehavior=n,i.scrollBehavior=o)}}},{key:"_canBeEnabled",value:function(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;var t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width}}]),t}(),x=function(){function t(e,i,n,o){var s=this;u(this,t),this._scrollDispatcher=e,this._ngZone=i,this._viewportRuler=n,this._config=o,this._scrollSubscription=null,this._detach=function(){s.disable(),s._overlayRef.hasAttached()&&s._ngZone.run(function(){return s._overlayRef.detach()})}}return d(t,[{key:"attach",value:function(t){this._overlayRef=t}},{key:"enable",value:function(){var t=this;if(!this._scrollSubscription){var e=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(function(){var e=t._viewportRuler.getViewportScrollPosition().top;Math.abs(e-t._initialScrollPosition)>t._config.threshold?t._detach():t._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),t}(),S=function(){function t(){u(this,t)}return d(t,[{key:"enable",value:function(){}},{key:"disable",value:function(){}},{key:"attach",value:function(){}}]),t}();function P(t,e){return e.some(function(e){return t.bottom<e.top||t.top>e.bottom||t.right<e.left||t.left>e.right})}function E(t,e){return e.some(function(e){return t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right})}var j,A,B,X,D,L=function(){function t(e,i,n,o){u(this,t),this._scrollDispatcher=e,this._viewportRuler=i,this._ngZone=n,this._config=o,this._scrollSubscription=null}return d(t,[{key:"attach",value:function(t){this._overlayRef=t}},{key:"enable",value:function(){var t=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(function(){if(t._overlayRef.updatePosition(),t._config&&t._config.autoClose){var e=t._overlayRef.overlayElement.getBoundingClientRect(),i=t._viewportRuler.getViewportSize(),n=i.width,o=i.height;P(e,[{width:n,height:o,bottom:o,right:n,top:0,left:0}])&&(t.disable(),t._ngZone.run(function(){return t._overlayRef.detach()}))}}))}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),t}(),I=((j=function t(e,i,n,o){var s=this;u(this,t),this._scrollDispatcher=e,this._viewportRuler=i,this._ngZone=n,this.noop=function(){return new S},this.close=function(t){return new x(s._scrollDispatcher,s._ngZone,s._viewportRuler,t)},this.block=function(){return new R(s._viewportRuler,s._document)},this.reposition=function(t){return new L(s._scrollDispatcher,s._viewportRuler,s._ngZone,t)},this._document=o}).\u0275fac=function(t){return new(t||j)(h.Xb(c.c),h.Xb(c.e),h.Xb(h.A),h.Xb(p.d))},j.\u0275prov=Object(h.Kb)({factory:function(){return new j(Object(h.Xb)(c.c),Object(h.Xb)(c.e),Object(h.Xb)(h.A),Object(h.Xb)(p.d))},token:j,providedIn:"root"}),j),M=function t(e){if(u(this,t),this.scrollStrategy=new S,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e)for(var i=0,n=Object.keys(e);i<n.length;i++){var o=n[i];void 0!==e[o]&&(this[o]=e[o])}},T=function t(e,i,n,o,s){u(this,t),this.offsetX=n,this.offsetY=o,this.panelClass=s,this.originX=e.originX,this.originY=e.originY,this.overlayX=i.overlayX,this.overlayY=i.overlayY},F=function t(e,i){u(this,t),this.connectionPair=e,this.scrollableViewProperties=i},H=((X=function(){function t(e){u(this,t),this._attachedOverlays=[],this._document=e}return d(t,[{key:"ngOnDestroy",value:function(){this.detach()}},{key:"add",value:function(t){this.remove(t),this._attachedOverlays.push(t)}},{key:"remove",value:function(t){var e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this.detach()}}]),t}()).\u0275fac=function(t){return new(t||X)(h.Xb(p.d))},X.\u0275prov=Object(h.Kb)({factory:function(){return new X(Object(h.Xb)(p.d))},token:X,providedIn:"root"}),X),V=((B=function(t){s(i,t);var e=a(i);function i(t){var n;return u(this,i),(n=e.call(this,t))._keydownListener=function(t){for(var e=n._attachedOverlays,i=e.length-1;i>-1;i--)if(e[i]._keydownEvents.observers.length>0){e[i]._keydownEvents.next(t);break}},n}return d(i,[{key:"add",value:function(t){o(l(i.prototype),"add",this).call(this,t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}},{key:"detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}]),i}(H)).\u0275fac=function(t){return new(t||B)(h.Xb(p.d))},B.\u0275prov=Object(h.Kb)({factory:function(){return new B(Object(h.Xb)(p.d))},token:B,providedIn:"root"}),B),N=((A=function(t){s(i,t);var e=a(i);function i(t,n){var o;return u(this,i),(o=e.call(this,t))._platform=n,o._cursorStyleIsSet=!1,o._clickListener=function(t){for(var e=t.composedPath?t.composedPath()[0]:t.target,i=o._attachedOverlays.slice(),n=i.length-1;n>-1;n--){var s=i[n];if(!(s._outsidePointerEvents.observers.length<1)&&s.hasAttached()){if(s.overlayElement.contains(e))break;s._outsidePointerEvents.next(t)}}},o}return d(i,[{key:"add",value:function(t){o(l(i.prototype),"add",this).call(this,t),this._isAttached||(this._document.body.addEventListener("click",this._clickListener,!0),this._document.body.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=this._document.body.style.cursor,this._document.body.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0)}},{key:"detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("click",this._clickListener,!0),this._document.body.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}}]),i}(H)).\u0275fac=function(t){return new(t||A)(h.Xb(p.d),h.Xb(f.a))},A.\u0275prov=Object(h.Kb)({factory:function(){return new A(Object(h.Xb)(p.d),Object(h.Xb)(f.a))},token:A,providedIn:"root"}),A),z=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine),Y=((D=function(){function t(e,i){u(this,t),this._platform=i,this._document=e}return d(t,[{key:"ngOnDestroy",value:function(){var t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}},{key:"getContainerElement",value:function(){return this._containerElement||this._createContainer(),this._containerElement}},{key:"_createContainer",value:function(){if(this._platform.isBrowser||z)for(var t=this._document.querySelectorAll('.cdk-overlay-container[platform="server"], .cdk-overlay-container[platform="test"]'),e=0;e<t.length;e++)t[e].parentNode.removeChild(t[e]);var i=this._document.createElement("div");i.classList.add("cdk-overlay-container"),z?i.setAttribute("platform","test"):this._platform.isBrowser||i.setAttribute("platform","server"),this._document.body.appendChild(i),this._containerElement=i}}]),t}()).\u0275fac=function(t){return new(t||D)(h.Xb(p.d),h.Xb(f.a))},D.\u0275prov=Object(h.Kb)({factory:function(){return new D(Object(h.Xb)(p.d),Object(h.Xb)(f.a))},token:D,providedIn:"root"}),D),W=function(){function t(e,i,n,o,s,r,a,c,h){var l=this;u(this,t),this._portalOutlet=e,this._host=i,this._pane=n,this._config=o,this._ngZone=s,this._keyboardDispatcher=r,this._document=a,this._location=c,this._outsideClickDispatcher=h,this._backdropElement=null,this._backdropClick=new m.a,this._attachments=new m.a,this._detachments=new m.a,this._locationChanges=g.a.EMPTY,this._backdropClickHandler=function(t){return l._backdropClick.next(t)},this._keydownEvents=new m.a,this._outsidePointerEvents=new m.a,o.scrollStrategy&&(this._scrollStrategy=o.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=o.positionStrategy}return d(t,[{key:"attach",value:function(t){var e=this,i=this._portalOutlet.attach(t);return!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Object(k.a)(1)).subscribe(function(){e.hasAttached()&&e.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(function(){return e.dispose()})),this._outsideClickDispatcher.add(this),i}},{key:"detach",value:function(){if(this.hasAttached()){this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();var t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}}},{key:"dispose",value:function(){var t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this.detachBackdrop(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()}},{key:"hasAttached",value:function(){return this._portalOutlet.hasAttached()}},{key:"backdropClick",value:function(){return this._backdropClick}},{key:"attachments",value:function(){return this._attachments}},{key:"detachments",value:function(){return this._detachments}},{key:"keydownEvents",value:function(){return this._keydownEvents}},{key:"outsidePointerEvents",value:function(){return this._outsidePointerEvents}},{key:"getConfig",value:function(){return this._config}},{key:"updatePosition",value:function(){this._positionStrategy&&this._positionStrategy.apply()}},{key:"updatePositionStrategy",value:function(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}},{key:"updateSize",value:function(t){this._config=Object.assign(Object.assign({},this._config),t),this._updateElementSize()}},{key:"setDirection",value:function(t){this._config=Object.assign(Object.assign({},this._config),{direction:t}),this._updateElementDirection()}},{key:"addPanelClass",value:function(t){this._pane&&this._toggleClasses(this._pane,t,!0)}},{key:"removePanelClass",value:function(t){this._pane&&this._toggleClasses(this._pane,t,!1)}},{key:"getDirection",value:function(){var t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}},{key:"updateScrollStrategy",value:function(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}},{key:"_updateElementDirection",value:function(){this._host.setAttribute("dir",this.getDirection())}},{key:"_updateElementSize",value:function(){if(this._pane){var t=this._pane.style;t.width=Object(v.c)(this._config.width),t.height=Object(v.c)(this._config.height),t.minWidth=Object(v.c)(this._config.minWidth),t.minHeight=Object(v.c)(this._config.minHeight),t.maxWidth=Object(v.c)(this._config.maxWidth),t.maxHeight=Object(v.c)(this._config.maxHeight)}}},{key:"_togglePointerEvents",value:function(t){this._pane.style.pointerEvents=t?"":"none"}},{key:"_attachBackdrop",value:function(){var t=this;this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){t._backdropElement&&t._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")}},{key:"_updateStackingOrder",value:function(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}},{key:"detachBackdrop",value:function(){var t,e=this,i=this._backdropElement;if(i){var n=function n(){i&&(i.removeEventListener("click",e._backdropClickHandler),i.removeEventListener("transitionend",n),i.parentNode&&i.parentNode.removeChild(i)),e._backdropElement==i&&(e._backdropElement=null),e._config.backdropClass&&e._toggleClasses(i,e._config.backdropClass,!1),clearTimeout(t)};i.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(function(){i.addEventListener("transitionend",n)}),i.style.pointerEvents="none",t=this._ngZone.runOutsideAngular(function(){return setTimeout(n,500)})}}},{key:"_toggleClasses",value:function(t,e,i){var n=t.classList;Object(v.a)(e).forEach(function(t){t&&(i?n.add(t):n.remove(t))})}},{key:"_detachContentWhenStable",value:function(){var t=this;this._ngZone.runOutsideAngular(function(){var e=t._ngZone.onStable.pipe(Object(w.a)(Object(b.a)(t._attachments,t._detachments))).subscribe(function(){t._pane&&t._host&&0!==t._pane.children.length||(t._pane&&t._config.panelClass&&t._toggleClasses(t._pane,t._config.panelClass,!1),t._host&&t._host.parentElement&&(t._previousHostParent=t._host.parentElement,t._previousHostParent.removeChild(t._host)),e.unsubscribe())})})}},{key:"_disposeScrollStrategy",value:function(){var t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}},{key:"overlayElement",get:function(){return this._pane}},{key:"backdropElement",get:function(){return this._backdropElement}},{key:"hostElement",get:function(){return this._host}}]),t}(),K=/([A-Za-z%]+)$/,Z=function(){function t(e,i,n,o,s){u(this,t),this._viewportRuler=i,this._document=n,this._platform=o,this._overlayContainer=s,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new m.a,this._resizeSubscription=g.a.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(e)}return d(t,[{key:"attach",value:function(t){var e=this;this._validatePositions(),t.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(function(){e._isInitialRender=!0,e.apply()})}},{key:"apply",value:function(){if(!this._isDisposed&&this._platform.isBrowser)if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)this.reapplyLastPosition();else{this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect();var t,i,n=this._originRect,o=this._overlayRect,s=this._viewportRect,r=[],a=e(this._preferredPositions);try{for(a.s();!(i=a.n()).done;){var c=i.value,h=this._getOriginPoint(n,c),l=this._getOverlayPoint(h,o,c),u=this._getOverlayFit(l,o,s,c);if(u.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(c,h);this._canFitWithFlexibleDimensions(u,l,s)?r.push({position:c,origin:h,overlayRect:o,boundingBoxRect:this._calculateBoundingBoxRect(h,c)}):(!t||t.overlayFit.visibleArea<u.visibleArea)&&(t={overlayFit:u,overlayPoint:l,originPoint:h,position:c,overlayRect:o})}}catch(m){a.e(m)}finally{a.f()}if(r.length){var f,d=null,_=-1,p=e(r);try{for(p.s();!(f=p.n()).done;){var v=f.value,y=v.boundingBoxRect.width*v.boundingBoxRect.height*(v.position.weight||1);y>_&&(_=y,d=v)}}catch(m){p.e(m)}finally{p.f()}return this._isPushed=!1,void this._applyPosition(d.position,d.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(t.position,t.originPoint);this._applyPosition(t.position,t.originPoint)}}},{key:"detach",value:function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}},{key:"dispose",value:function(){this._isDisposed||(this._boundingBox&&q(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove("cdk-overlay-connected-position-bounding-box"),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}},{key:"reapplyLastPosition",value:function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}},{key:"withScrollableContainers",value:function(t){return this._scrollables=t,this}},{key:"withPositions",value:function(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}},{key:"withViewportMargin",value:function(t){return this._viewportMargin=t,this}},{key:"withFlexibleDimensions",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._hasFlexibleDimensions=t,this}},{key:"withGrowAfterOpen",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._growAfterOpen=t,this}},{key:"withPush",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._canPush=t,this}},{key:"withLockedPosition",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._positionLocked=t,this}},{key:"setOrigin",value:function(t){return this._origin=t,this}},{key:"withDefaultOffsetX",value:function(t){return this._offsetX=t,this}},{key:"withDefaultOffsetY",value:function(t){return this._offsetY=t,this}},{key:"withTransformOriginOn",value:function(t){return this._transformOriginSelector=t,this}},{key:"_getOriginPoint",value:function(t,e){var i;if("center"==e.originX)i=t.left+t.width/2;else{var n=this._isRtl()?t.right:t.left,o=this._isRtl()?t.left:t.right;i="start"==e.originX?n:o}return{x:i,y:"center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom}}},{key:"_getOverlayPoint",value:function(t,e,i){var n,o;return n="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,o="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:t.x+n,y:t.y+o}}},{key:"_getOverlayFit",value:function(t,e,i,n){var o=J(e),s=t.x,r=t.y,a=this._getOffset(n,"x"),c=this._getOffset(n,"y");a&&(s+=a),c&&(r+=c);var h=0-r,l=r+o.height-i.height,u=this._subtractOverflows(o.width,0-s,s+o.width-i.width),f=this._subtractOverflows(o.height,h,l),d=u*f;return{visibleArea:d,isCompletelyWithinViewport:o.width*o.height===d,fitsInViewportVertically:f===o.height,fitsInViewportHorizontally:u==o.width}}},{key:"_canFitWithFlexibleDimensions",value:function(t,e,i){if(this._hasFlexibleDimensions){var n=i.bottom-e.y,o=i.right-e.x,s=U(this._overlayRef.getConfig().minHeight),r=U(this._overlayRef.getConfig().minWidth),a=t.fitsInViewportHorizontally||null!=r&&r<=o;return(t.fitsInViewportVertically||null!=s&&s<=n)&&a}return!1}},{key:"_pushOverlayOnScreen",value:function(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};var n,o,s=J(e),r=this._viewportRect,a=Math.max(t.x+s.width-r.width,0),c=Math.max(t.y+s.height-r.height,0),h=Math.max(r.top-i.top-t.y,0),l=Math.max(r.left-i.left-t.x,0);return n=s.width<=r.width?l||-a:t.x<this._viewportMargin?r.left-i.left-t.x:0,o=s.height<=r.height?h||-c:t.y<this._viewportMargin?r.top-i.top-t.y:0,this._previousPushAmount={x:n,y:o},{x:t.x+n,y:t.y+o}}},{key:"_applyPosition",value:function(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._lastPosition=t,this._positionChanges.observers.length){var i=this._getScrollVisibility(),n=new F(t,i);this._positionChanges.next(n)}this._isInitialRender=!1}},{key:"_setTransformOrigin",value:function(t){if(this._transformOriginSelector){var e,i=this._boundingBox.querySelectorAll(this._transformOriginSelector),n=t.overlayY;e="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(var o=0;o<i.length;o++)i[o].style.transformOrigin="".concat(e," ").concat(n)}}},{key:"_calculateBoundingBoxRect",value:function(t,e){var i,n,o,s,r,a,c=this._viewportRect,h=this._isRtl();if("top"===e.overlayY)n=t.y,i=c.height-n+this._viewportMargin;else if("bottom"===e.overlayY)o=c.height-t.y+2*this._viewportMargin,i=c.height-o+this._viewportMargin;else{var l=Math.min(c.bottom-t.y+c.top,t.y),u=this._lastBoundingBoxSize.height;i=2*l,n=t.y-l,i>u&&!this._isInitialRender&&!this._growAfterOpen&&(n=t.y-u/2)}if("end"===e.overlayX&&!h||"start"===e.overlayX&&h)a=c.width-t.x+this._viewportMargin,s=t.x-this._viewportMargin;else if("start"===e.overlayX&&!h||"end"===e.overlayX&&h)r=t.x,s=c.right-t.x;else{var f=Math.min(c.right-t.x+c.left,t.x),d=this._lastBoundingBoxSize.width;s=2*f,r=t.x-f,s>d&&!this._isInitialRender&&!this._growAfterOpen&&(r=t.x-d/2)}return{top:n,left:r,bottom:o,right:a,width:s,height:i}}},{key:"_setBoundingBoxStyles",value:function(t,e){var i=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));var n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right=n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{var o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;n.height=Object(v.c)(i.height),n.top=Object(v.c)(i.top),n.bottom=Object(v.c)(i.bottom),n.width=Object(v.c)(i.width),n.left=Object(v.c)(i.left),n.right=Object(v.c)(i.right),n.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",n.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",o&&(n.maxHeight=Object(v.c)(o)),s&&(n.maxWidth=Object(v.c)(s))}this._lastBoundingBoxSize=i,q(this._boundingBox.style,n)}},{key:"_resetBoundingBoxStyles",value:function(){q(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}},{key:"_resetOverlayElementStyles",value:function(){q(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}},{key:"_setOverlayElementStyles",value:function(t,e){var i={},n=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(n){var r=this._viewportRuler.getViewportScrollPosition();q(i,this._getExactOverlayY(e,t,r)),q(i,this._getExactOverlayX(e,t,r))}else i.position="static";var a="",c=this._getOffset(e,"x"),h=this._getOffset(e,"y");c&&(a+="translateX(".concat(c,"px) ")),h&&(a+="translateY(".concat(h,"px)")),i.transform=a.trim(),s.maxHeight&&(n?i.maxHeight=Object(v.c)(s.maxHeight):o&&(i.maxHeight="")),s.maxWidth&&(n?i.maxWidth=Object(v.c)(s.maxWidth):o&&(i.maxWidth="")),q(this._pane.style,i)}},{key:"_getExactOverlayY",value:function(t,e,i){var n={top:"",bottom:""},o=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i));var s=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return o.y-=s,"bottom"===t.overlayY?n.bottom=this._document.documentElement.clientHeight-(o.y+this._overlayRect.height)+"px":n.top=Object(v.c)(o.y),n}},{key:"_getExactOverlayX",value:function(t,e,i){var n={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),"right"===(this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left")?n.right=this._document.documentElement.clientWidth-(o.x+this._overlayRect.width)+"px":n.left=Object(v.c)(o.x),n}},{key:"_getScrollVisibility",value:function(){var t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(function(t){return t.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:E(t,i),isOriginOutsideView:P(t,i),isOverlayClipped:E(e,i),isOverlayOutsideView:P(e,i)}}},{key:"_subtractOverflows",value:function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return i.reduce(function(t,e){return t-Math.max(e,0)},t)}},{key:"_getNarrowedViewportRect",value:function(){var t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}},{key:"_isRtl",value:function(){return"rtl"===this._overlayRef.getDirection()}},{key:"_hasExactPosition",value:function(){return!this._hasFlexibleDimensions||this._isPushed}},{key:"_getOffset",value:function(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}},{key:"_validatePositions",value:function(){}},{key:"_addPanelClasses",value:function(t){var e=this;this._pane&&Object(v.a)(t).forEach(function(t){""!==t&&-1===e._appliedPanelClasses.indexOf(t)&&(e._appliedPanelClasses.push(t),e._pane.classList.add(t))})}},{key:"_clearPanelClasses",value:function(){var t=this;this._pane&&(this._appliedPanelClasses.forEach(function(e){t._pane.classList.remove(e)}),this._appliedPanelClasses=[])}},{key:"_getOriginRect",value:function(){var t=this._origin;if(t instanceof h.l)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();var e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}},{key:"positions",get:function(){return this._preferredPositions}}]),t}();function q(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function U(e){if("number"!=typeof e&&null!=e){var i=t(e.split(K),2),n=i[0],o=i[1];return o&&"px"!==o?null:parseFloat(n)}return e||null}function J(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}var Q,G,$,tt,et,it=function(){function t(e,i,n,o,s,r,a){u(this,t),this._preferredPositions=[],this._positionStrategy=new Z(n,o,s,r,a).withFlexibleDimensions(!1).withPush(!1).withViewportMargin(0),this.withFallbackPosition(e,i),this.onPositionChange=this._positionStrategy.positionChanges}return d(t,[{key:"attach",value:function(t){this._overlayRef=t,this._positionStrategy.attach(t),this._direction&&(t.setDirection(this._direction),this._direction=null)}},{key:"dispose",value:function(){this._positionStrategy.dispose()}},{key:"detach",value:function(){this._positionStrategy.detach()}},{key:"apply",value:function(){this._positionStrategy.apply()}},{key:"recalculateLastPosition",value:function(){this._positionStrategy.reapplyLastPosition()}},{key:"withScrollableContainers",value:function(t){this._positionStrategy.withScrollableContainers(t)}},{key:"withFallbackPosition",value:function(t,e,i,n){var o=new T(t,e,i,n);return this._preferredPositions.push(o),this._positionStrategy.withPositions(this._preferredPositions),this}},{key:"withDirection",value:function(t){return this._overlayRef?this._overlayRef.setDirection(t):this._direction=t,this}},{key:"withOffsetX",value:function(t){return this._positionStrategy.withDefaultOffsetX(t),this}},{key:"withOffsetY",value:function(t){return this._positionStrategy.withDefaultOffsetY(t),this}},{key:"withLockedPosition",value:function(t){return this._positionStrategy.withLockedPosition(t),this}},{key:"withPositions",value:function(t){return this._preferredPositions=t.slice(),this._positionStrategy.withPositions(this._preferredPositions),this}},{key:"setOrigin",value:function(t){return this._positionStrategy.setOrigin(t),this}},{key:"positions",get:function(){return this._preferredPositions}}]),t}(),nt=function(){function t(){u(this,t),this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}return d(t,[{key:"attach",value:function(t){var e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add("cdk-global-overlay-wrapper"),this._isDisposed=!1}},{key:"top",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}},{key:"left",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}},{key:"bottom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}},{key:"right",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}},{key:"width",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}},{key:"height",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}},{key:"centerHorizontally",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.left(t),this._justifyContent="center",this}},{key:"centerVertically",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.top(t),this._alignItems="center",this}},{key:"apply",value:function(){if(this._overlayRef&&this._overlayRef.hasAttached()){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),n=i.width,o=i.height,s=i.maxWidth,r=i.maxHeight,a=!("100%"!==n&&"100vw"!==n||s&&"100%"!==s&&"100vw"!==s),c=!("100%"!==o&&"100vh"!==o||r&&"100%"!==r&&"100vh"!==r);t.position=this._cssPosition,t.marginLeft=a?"0":this._leftOffset,t.marginTop=c?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,a?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems=c?"flex-start":this._alignItems}}},{key:"dispose",value:function(){if(!this._isDisposed&&this._overlayRef){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove("cdk-global-overlay-wrapper"),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}}]),t}(),ot=((G=function(){function t(e,i,n,o){u(this,t),this._viewportRuler=e,this._document=i,this._platform=n,this._overlayContainer=o}return d(t,[{key:"global",value:function(){return new nt}},{key:"connectedTo",value:function(t,e,i){return new it(e,i,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}},{key:"flexibleConnectedTo",value:function(t){return new Z(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}]),t}()).\u0275fac=function(t){return new(t||G)(h.Xb(c.e),h.Xb(p.d),h.Xb(f.a),h.Xb(Y))},G.\u0275prov=Object(h.Kb)({factory:function(){return new G(Object(h.Xb)(c.e),Object(h.Xb)(p.d),Object(h.Xb)(f.a),Object(h.Xb)(Y))},token:G,providedIn:"root"}),G),st=0,rt=((Q=function(){function t(e,i,n,o,s,r,a,c,h,l,f){u(this,t),this.scrollStrategies=e,this._overlayContainer=i,this._componentFactoryResolver=n,this._positionBuilder=o,this._keyboardDispatcher=s,this._injector=r,this._ngZone=a,this._document=c,this._directionality=h,this._location=l,this._outsideClickDispatcher=f}return d(t,[{key:"create",value:function(t){var e=this._createHostElement(),i=this._createPaneElement(e),n=this._createPortalOutlet(i),o=new M(t);return o.direction=o.direction||this._directionality.value,new W(n,e,i,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}},{key:"position",value:function(){return this._positionBuilder}},{key:"_createPaneElement",value:function(t){var e=this._document.createElement("div");return e.id="cdk-overlay-"+st++,e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}},{key:"_createHostElement",value:function(){var t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}},{key:"_createPortalOutlet",value:function(t){return this._appRef||(this._appRef=this._injector.get(h.g)),new y.e(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}]),t}()).\u0275fac=function(t){return new(t||Q)(h.Xb(I),h.Xb(Y),h.Xb(h.j),h.Xb(ot),h.Xb(V),h.Xb(h.s),h.Xb(h.A),h.Xb(p.d),h.Xb(_.b),h.Xb(p.g),h.Xb(N))},Q.\u0275prov=h.Kb({token:Q,factory:Q.\u0275fac}),Q),at={provide:new h.r("cdk-connected-overlay-scroll-strategy"),deps:[rt],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},ct=(($=function t(){u(this,t)}).\u0275mod=h.Mb({type:$}),$.\u0275inj=h.Lb({factory:function(t){return new(t||$)},providers:[rt,at],imports:[[_.a,y.f,c.d],c.d]}),$),ht=r("FKr1"),lt=r("bTqV"),ut=r("R0Ic"),ft=r("u47x"),dt=r("itXk"),_t=r("GyhO"),pt=r("HDdC"),vt=function(){function t(e){u(this,t),this.total=e}return d(t,[{key:"call",value:function(t,e){return e.subscribe(new yt(t,this.total))}}]),t}(),yt=function(t){s(i,t);var e=a(i);function i(t,n){var o;return u(this,i),(o=e.call(this,t)).total=n,o.count=0,o}return d(i,[{key:"_next",value:function(t){++this.count>this.total&&this.destination.next(t)}}]),i}(O.a),mt=r("Kj3r"),gt=r("lJxs"),bt=r("JX91"),kt=new Set,wt=((et=function(){function t(e){u(this,t),this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):Ot}return d(t,[{key:"matchMedia",value:function(t){return this._platform.WEBKIT&&function(t){if(!kt.has(t))try{tt||((tt=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(tt)),tt.sheet&&(tt.sheet.insertRule("@media ".concat(t," {.fx-query-test{ }}"),0),kt.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}]),t}()).\u0275fac=function(t){return new(t||et)(h.Xb(f.a))},et.\u0275prov=Object(h.Kb)({factory:function(){return new et(Object(h.Xb)(f.a))},token:et,providedIn:"root"}),et);function Ot(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}var Ct,Rt=((Ct=function(){function t(e,i){u(this,t),this._mediaMatcher=e,this._zone=i,this._queries=new Map,this._destroySubject=new m.a}return d(t,[{key:"ngOnDestroy",value:function(){this._destroySubject.next(),this._destroySubject.complete()}},{key:"isMatched",value:function(t){var e=this;return xt(Object(v.a)(t)).some(function(t){return e._registerQuery(t).mql.matches})}},{key:"observe",value:function(t){var e=this,i=xt(Object(v.a)(t)).map(function(t){return e._registerQuery(t).observable}),n=Object(dt.a)(i);return(n=Object(_t.a)(n.pipe(Object(k.a)(1)),n.pipe(function(t){return t.lift(new vt(1))},Object(mt.a)(0)))).pipe(Object(gt.a)(function(t){var e={matches:!1,breakpoints:{}};return t.forEach(function(t){var i=t.matches,n=t.query;e.matches=e.matches||i,e.breakpoints[n]=i}),e}))}},{key:"_registerQuery",value:function(t){var e=this;if(this._queries.has(t))return this._queries.get(t);var i=this._mediaMatcher.matchMedia(t),n={observable:new pt.a(function(t){var n=function(i){return e._zone.run(function(){return t.next(i)})};return i.addListener(n),function(){i.removeListener(n)}}).pipe(Object(bt.a)(i),Object(gt.a)(function(e){var i=e.matches;return{query:t,matches:i}}),Object(w.a)(this._destroySubject)),mql:i};return this._queries.set(t,n),n}}]),t}()).\u0275fac=function(t){return new(t||Ct)(h.Xb(wt),h.Xb(h.A))},Ct.\u0275prov=Object(h.Kb)({factory:function(){return new Ct(Object(h.Xb)(wt),Object(h.Xb)(h.A))},token:Ct,providedIn:"root"}),Ct);function xt(t){return t.map(function(t){return t.split(",")}).reduce(function(t,e){return t.concat(e)}).map(function(t){return t.trim()})}function St(t,e){if(1&t){var i=h.Ub();h.Tb(0,"div",1),h.Tb(1,"button",2),h.ac("click",function(){return h.sc(i),h.ec().action()}),h.Ac(2),h.Sb(),h.Sb()}if(2&t){var n=h.ec();h.Cb(2),h.Bc(n.data.action)}}function Pt(t,e){}var Et,jt,At,Bt,Xt=new h.r("MatSnackBarData"),Dt=function t(){u(this,t),this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"},Lt=Math.pow(2,31)-1,It=function(){function t(e,i){var n=this;u(this,t),this._overlayRef=i,this._afterDismissed=new m.a,this._afterOpened=new m.a,this._onAction=new m.a,this._dismissedByAction=!1,this.containerInstance=e,this.onAction().subscribe(function(){return n.dismiss()}),e._onExit.subscribe(function(){return n._finishDismiss()})}return d(t,[{key:"dismiss",value:function(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}},{key:"dismissWithAction",value:function(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete())}},{key:"closeWithAction",value:function(){this.dismissWithAction()}},{key:"_dismissAfter",value:function(t){var e=this;this._durationTimeoutId=setTimeout(function(){return e.dismiss()},Math.min(t,Lt))}},{key:"_open",value:function(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}},{key:"_finishDismiss",value:function(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}},{key:"afterDismissed",value:function(){return this._afterDismissed}},{key:"afterOpened",value:function(){return this.containerInstance._onEnter}},{key:"onAction",value:function(){return this._onAction}}]),t}(),Mt=((Et=function(){function t(e,i){u(this,t),this.snackBarRef=e,this.data=i}return d(t,[{key:"action",value:function(){this.snackBarRef.dismissWithAction()}},{key:"hasAction",get:function(){return!!this.data.action}}]),t}()).\u0275fac=function(t){return new(t||Et)(h.Ob(It),h.Ob(Xt))},Et.\u0275cmp=h.Ib({type:Et,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,e){1&t&&(h.Tb(0,"span"),h.Ac(1),h.Sb(),h.zc(2,St,3,1,"div",0)),2&t&&(h.Cb(1),h.Bc(e.data.message),h.Cb(1),h.jc("ngIf",e.hasAction))},directives:[p.k,lt.a],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\n"],encapsulation:2,changeDetection:0}),Et),Tt={snackBarState:Object(ut.j)("state",[Object(ut.g)("void, hidden",Object(ut.h)({transform:"scale(0.8)",opacity:0})),Object(ut.g)("visible",Object(ut.h)({transform:"scale(1)",opacity:1})),Object(ut.i)("* => visible",Object(ut.e)("150ms cubic-bezier(0, 0, 0.2, 1)")),Object(ut.i)("* => void, * => hidden",Object(ut.e)("75ms cubic-bezier(0.4, 0.0, 1, 1)",Object(ut.h)({opacity:0})))])},Ft=((At=function(t){s(i,t);var e=a(i);function i(t,n,o,s,r){var a;return u(this,i),(a=e.call(this))._ngZone=t,a._elementRef=n,a._changeDetectorRef=o,a._platform=s,a.snackBarConfig=r,a._announceDelay=150,a._destroyed=!1,a._onAnnounce=new m.a,a._onExit=new m.a,a._onEnter=new m.a,a._animationState="void",a.attachDomPortal=function(t){return a._assertNotAttached(),a._applySnackBarClasses(),a._portalOutlet.attachDomPortal(t)},a._live="assertive"!==r.politeness||r.announcementMessage?"off"===r.politeness?"off":"polite":"assertive",a._platform.FIREFOX&&("polite"===a._live&&(a._role="status"),"assertive"===a._live&&(a._role="alert")),a}return d(i,[{key:"attachComponentPortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)}},{key:"onAnimationEnd",value:function(t){var e=t.fromState,i=t.toState;if(("void"===i&&"void"!==e||"hidden"===i)&&this._completeExit(),"visible"===i){var n=this._onEnter;this._ngZone.run(function(){n.next(),n.complete()})}}},{key:"enter",value:function(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}},{key:"exit",value:function(){return this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._onExit}},{key:"ngOnDestroy",value:function(){this._destroyed=!0,this._completeExit()}},{key:"_completeExit",value:function(){var t=this;this._ngZone.onMicrotaskEmpty.pipe(Object(k.a)(1)).subscribe(function(){t._onExit.next(),t._onExit.complete()})}},{key:"_applySnackBarClasses",value:function(){var t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach(function(e){return t.classList.add(e)}):t.classList.add(e)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")}},{key:"_assertNotAttached",value:function(){this._portalOutlet.hasAttached()}},{key:"_screenReaderAnnounce",value:function(){var t=this;this._announceTimeoutId||this._ngZone.runOutsideAngular(function(){t._announceTimeoutId=setTimeout(function(){var e=t._elementRef.nativeElement.querySelector("[aria-hidden]"),i=t._elementRef.nativeElement.querySelector("[aria-live]");if(e&&i){var n=null;t._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(n=document.activeElement),e.removeAttribute("aria-hidden"),i.appendChild(e),null==n||n.focus(),t._onAnnounce.next(),t._onAnnounce.complete()}},t._announceDelay)})}}]),i}(y.a)).\u0275fac=function(t){return new(t||At)(h.Ob(h.A),h.Ob(h.l),h.Ob(h.h),h.Ob(f.a),h.Ob(Dt))},At.\u0275cmp=h.Ib({type:At,selectors:[["snack-bar-container"]],viewQuery:function(t,e){var i;1&t&&h.Ec(y.c,3),2&t&&h.oc(i=h.bc())&&(e._portalOutlet=i.first)},hostAttrs:[1,"mat-snack-bar-container"],hostVars:1,hostBindings:function(t,e){1&t&&h.xc("@state.done",function(t){return e.onAnimationEnd(t)}),2&t&&h.yc("@state",e._animationState)},features:[h.zb],decls:3,vars:2,consts:[["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,e){1&t&&(h.Tb(0,"div",0),h.zc(1,Pt,0,0,"ng-template",1),h.Sb(),h.Pb(2,"div")),2&t&&(h.Cb(2),h.Db("aria-live",e._live)("role",e._role))},directives:[y.c],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\n"],encapsulation:2,data:{animation:[Tt.snackBarState]}}),At),Ht=((jt=function t(){u(this,t)}).\u0275mod=h.Mb({type:jt}),jt.\u0275inj=h.Lb({factory:function(t){return new(t||jt)},imports:[[ct,y.f,p.c,lt.b,ht.b],ht.b]}),jt),Vt=new h.r("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new Dt}}),Nt=((Bt=function(){function t(e,i,n,o,s,r){u(this,t),this._overlay=e,this._live=i,this._injector=n,this._breakpointObserver=o,this._parentSnackBar=s,this._defaultConfig=r,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=Mt,this.snackBarContainerComponent=Ft,this.handsetCssClass="mat-snack-bar-handset"}return d(t,[{key:"openFromComponent",value:function(t,e){return this._attach(t,e)}},{key:"openFromTemplate",value:function(t,e){return this._attach(t,e)}},{key:"open",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,n=Object.assign(Object.assign({},this._defaultConfig),i);return n.data={message:t,action:e},n.announcementMessage===t&&(n.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,n)}},{key:"dismiss",value:function(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}},{key:"ngOnDestroy",value:function(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}},{key:"_attachSnackBarContainer",value:function(t,e){var i=h.s.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:Dt,useValue:e}]}),n=new y.d(this.snackBarContainerComponent,e.viewContainerRef,i),o=t.attach(n);return o.instance.snackBarConfig=e,o.instance}},{key:"_attach",value:function(t,e){var i=this,n=Object.assign(Object.assign(Object.assign({},new Dt),this._defaultConfig),e),o=this._createOverlay(n),s=this._attachSnackBarContainer(o,n),r=new It(s,o);if(t instanceof h.N){var a=new y.g(t,null,{$implicit:n.data,snackBarRef:r});r.instance=s.attachTemplatePortal(a)}else{var c=this._createInjector(n,r),l=new y.d(t,void 0,c),u=s.attachComponentPortal(l);r.instance=u.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Object(w.a)(o.detachments())).subscribe(function(t){var e=o.overlayElement.classList;t.matches?e.add(i.handsetCssClass):e.remove(i.handsetCssClass)}),n.announcementMessage&&s._onAnnounce.subscribe(function(){i._live.announce(n.announcementMessage,n.politeness)}),this._animateSnackBar(r,n),this._openedSnackBarRef=r,this._openedSnackBarRef}},{key:"_animateSnackBar",value:function(t,e){var i=this;t.afterDismissed().subscribe(function(){i._openedSnackBarRef==t&&(i._openedSnackBarRef=null),e.announcementMessage&&i._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(function(){t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe(function(){return t._dismissAfter(e.duration)})}},{key:"_createOverlay",value:function(t){var e=new M;e.direction=t.direction;var i=this._overlay.position().global(),n="rtl"===t.direction,o="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!n||"end"===t.horizontalPosition&&n,s=!o&&"center"!==t.horizontalPosition;return o?i.left("0"):s?i.right("0"):i.centerHorizontally(),"top"===t.verticalPosition?i.top("0"):i.bottom("0"),e.positionStrategy=i,this._overlay.create(e)}},{key:"_createInjector",value:function(t,e){return h.s.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:It,useValue:e},{provide:Xt,useValue:t.data}]})}},{key:"_openedSnackBarRef",get:function(){var t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel},set:function(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}}]),t}()).\u0275fac=function(t){return new(t||Bt)(h.Xb(rt),h.Xb(ft.g),h.Xb(h.s),h.Xb(Rt),h.Xb(Bt,12),h.Xb(Vt))},Bt.\u0275prov=Object(h.Kb)({factory:function(){return new Bt(Object(h.Xb)(rt),Object(h.Xb)(ft.g),Object(h.Xb)(h.o),Object(h.Xb)(Rt),Object(h.Xb)(Bt,12),Object(h.Xb)(Vt))},token:Bt,providedIn:Ht}),Bt)},vVVL:function(t,e,i){"use strict";i.d(e,"a",function(){return h});var n=i("Cfvw"),o=i("w1tV"),s=i("lJxs"),r=i("SxV6"),a=i("fXoL"),c=i("vHPH"),h=function(){var t=function(){function t(e){u(this,t),this.logger=e,this.prettyPrintOne=Object(n.a)(this.getPrettyPrintOne()).pipe(Object(o.a)())}return d(t,[{key:"getPrettyPrintOne",value:function(){var t=this,e=window.prettyPrintOne;return e?Promise.resolve(e):i.e(4).then(i.t.bind(null,"Ue1H",7)).then(function(){return window.prettyPrintOne},function(e){var i="Cannot get prettify.js from server: "+e.message;return t.logger.error(new Error(i)),function(){throw new Error(i)}})}},{key:"formatCode",value:function(t,e,i){return this.prettyPrintOne.pipe(Object(s.a)(function(n){try{return n(t,e,i)}catch(s){var o="Could not format code that begins '".concat(t.substr(0,50),"...'.");throw console.error(o,s),new Error(o)}}),Object(r.a)())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Xb(c.a))},t.\u0275prov=a.Kb({token:t,factory:t.\u0275fac}),t}()}}])}();
//# sourceMappingURL=default~code-code-example-module~code-code-tabs-module-es5.48e4e1c9f1670b9cec23.js.map