var __awaiter=this&&this.__awaiter||function(e,t,r,n){function o(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,u){function i(e){try{c(n.next(e))}catch(t){u(t)}}function a(e){try{c(n["throw"](e))}catch(t){u(t)}}function c(e){e.done?r(e.value):o(e.value).then(i,a)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},n,o,u,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(e){return function(t){return c([e,t])}}function c(i){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,o&&(u=i[0]&2?o["return"]:i[0]?o["throw"]||((u=o["return"])&&u.call(o),0):o.next)&&!(u=u.call(o,i[1])).done)return u;if(o=0,u)i=[i[0]&2,u.value];switch(i[0]){case 0:case 1:u=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;o=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(u=r.trys,u=u.length>0&&u[u.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!u||i[1]>u[0]&&i[1]<u[3])){r.label=i[1];break}if(i[0]===6&&r.label<u[1]){r.label=u[1];u=i;break}if(u&&r.label<u[2]){r.label=u[2];r.ops.push(i);break}if(u[2])r.ops.pop();r.trys.pop();continue}i=t.call(e,r)}catch(a){i=[6,a];o=0}finally{n=u=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var __spreadArrays=this&&this.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var u=arguments[t],i=0,a=u.length;i<a;i++,o++)n[o]=u[i];return n};System.register(["./p-f9e72899.system.js"],(function(e){"use strict";var t,r;return{setters:[function(e){t=e.r;r=e.g}],execute:function(){var n=function(){function e(){}return e}();var o=e("materials_snackbar_controller",function(){function e(e){t(this,e);this.snackQueue=[]}e.prototype.create=function(e){return __awaiter(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(o){this.controllerEl=document.querySelector("materials-snackbar-controller");if(!this.controllerEl){this.controllerEl=document.body.appendChild(document.createElement("materials-snackbar-controller"))}t=document.createElement("materials-snackbar");Object.assign(t,new n,e);t.addEventListener("close",(function(e){var t=e.target;t.remove();r.controllerEl.sliceQueue()}));this.controllerEl.pushToQueue(t);return[2]}))}))};e.prototype.pushToQueue=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.snackQueue=__spreadArrays(this.snackQueue,[e]);return[2]}))}))};e.prototype.sliceQueue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.snackQueue=this.snackQueue.length>1?__spreadArrays(this.snackQueue.slice(1,this.snackQueue.length)):[];return[2]}))}))};e.prototype.handleQueue=function(e,t){if(e.length>0&&(t.length>e.length||e.length===1)){document.body.appendChild(e[0])}};Object.defineProperty(e.prototype,"host",{get:function(){return r(this)},enumerable:true,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{snackQueue:["handleQueue"]}},enumerable:true,configurable:true});return e}())}}}));