c)M8(a,c,d);else{const e=a.g.length?a.g.shift():null;null!==e&&N8(a,e)}}),b.removeAttribute("show"))},P8=function(a,b,c=!1){a.appendChild(b);window.requestAnimationFrame(()=>{M8(a,b,c)})},Q8=function(a){O8(a,a.querySelector('*[type^="cookie-notification"]'))},R8=function(a){O8(a,a.querySelector('*[type^="support-attachment-error"]'))},S8=function(a){O8(a,a.querySelector('*[type^="signin-state-changed"]'))},N8=function(a, b){switch(b){case "loading":a.showLoading();break;case "refresh":Wua(a);break;case "error":a.showError();break;case "copied-to-clipboard":var c=_ds.M(Rua);P8(a,c,!0);break;case "cookie-notification":Xua(a);break;case "support-attachment-error":Yua(a);break;case "signin-state-changed":Zua(a)}if(null==b?0:b.startsWith("notification-")){c=a.getAttribute(`${b}-message`);const d=a.getAttribute(`${b}-link`),e=a.getAttribute(`${b}-link-txt`);T8(a,b,c,d,e,a.hasAttribute(`${b}-store-key`))}},Wua=function(a){const b= _ds.M(Pua);_ds.$g(b.querySelector(".devsite-snackbar-action"),"click",()=>{_ds.Gj().location.reload()});P8(a,b)},Xua=function(a){if(a.storage.isAvailable()&&!a.storage.get("devsite-eu-cookie")){var b=L8;if(a.hasAttribute("data-cookie-notice"))switch(Number(a.getAttribute("data-cookie-notice"))){case 2:b=Sua;break;default:b=L8}if(a.hasAttribute("data-cookie-policy")){const c=a.getAttribute("data-cookie-policy");b=_ds.M(b,{Nz:c})}else b=_ds.M(b);_ds.Zg(b.querySelector(".devsite-snackbar-action"),"click", ()=>{a.storage.isAvailable()&&a.storage.set("devsite-eu-cookie","1");Q8(a)});P8(a,b)}else b=a.g.length?a.g.shift():null,null!==b&&N8(a,b)},Yua=function(a){const b=_ds.M(Tua);P8(a,b);_ds.Zg(b.querySelector(".devsite-snackbar-action"),"click",()=>{R8(a)})},Zua=function(a){S8(a);const b=_ds.M(Oua);P8(a,b,!1);_ds.$g(b.querySelector(".devsite-snackbar-action--reload"),"click",async()=>{await (await _ds.t()).reload();S8(a)});_ds.$g(b.querySelector(".devsite-snackbar-action--dismiss"),"click",async()=>{await (await _ds.t()).reload(); S8(a)})},M8=function(a,b,c=!1){window.clearTimeout(a.v);a.j?O8(a,a.j,b,c):(a.j=b,window.requestAnimationFrame(()=>{b.setAttribute("show","")}),c&&(a.v=window.setTimeout(()=>{a.removeAttribute("type");O8(a,b)},5E3)))},T8=function(a,b,c,d,e,f){if(c&&d){const g="devsite-notification"+d;if(!f||a.storage.isAvailable()&&!a.storage.get(g)){b=_ds.M(Uua,{rM:b,message:c,link:d,qK:e});P8(a,b);const h=new _ds.E(b);h.listen(b,"click",k=>{k.stopPropagation();if(k.target.classList.contains("devsite-snackbar-link")|| k.target.classList.contains("devsite-snackbar-action"))f&&a.storage.isAvailable()&&a.storage.set(g,"1"),a.m(),_ds.G(h)})}}},U8=class extends _ds.Fi{static get observedAttributes(){return["type"]}constructor(){super();this.g=[];this.v=-1;this.j=null;this.eventHandler=new _ds.E(this);this.storage=new _ds.to}connectedCallback(){this.eventHandler.listen(document.body,"devsite-show-custom-snackbar-msg",this.ea);this.eventHandler.listen(document.body,"devsite-show-notification-snackbar-msg",this.oa);this.eventHandler.listen(document.body, "devsite-hide-notification-snackbar-msg",this.m)}disconnectedCallback(){_ds.G(this.eventHandler)}ea(a){this.setAttribute("type","custom");var b;if(a=null==(b=a.Ia)?void 0:b.detail){b=!!a.showClose;var c=!0;a.href&&(c=(new URL(a.href)).origin!==document.location.origin);var d=_ds.M(Vua,{message:a.msg,qB:a.linkText,link:a.href,Cf:c,rk:b});b&&_ds.Zg(d.querySelector(".devsite-snackbar-action"),"click",()=>{O8(this,d)});P8(this,d,!b)}}attributeChangedCallback(a,b,c){if("type"===a){switch(b){case "loading":this.hideLoading(); break;case "refresh":O8(this,this.querySelector('*[type^="refresh"]'));break;case "error":O8(this,this.querySelector('*[type^="error"]'));break;case "copied-to-clipboard":O8(this,this.querySelector('*[type^="copied-to-clipboard"]'));break;case "cookie-notification":Q8(this);break;case "support-attachment-error":R8(this);break;case "signin-state-changed":S8(this);break;case "custom":O8(this,this.querySelector('*[type^="custom"]'))}null!=b&&b.startsWith("notification-")&&this.m();if(c){let d;if(null== (d=c)?0:d.includes(",")){let e;this.g=null==(e=c)?void 0:e.split(",");c=`${this.g.shift()}`}N8(this,c)}}}showLoading(){if(!this.querySelector('*[type^="loading"]')){var a=_ds.M(Nua);P8(this,a)}}hideLoading(){O8(this,this.querySelector('*[type^="loading"]'))}showError(){const a=_ds.M(Qua);_ds.$g(a.querySelector(".devsite-snackbar-action"),"click",()=>{_ds.Gj().location.reload()});P8(this,a)}oa(a){let b;(a=null==(b=a.Ia)?void 0:b.detail)&&T8(this,"notification-custom",a.msg,a.href,a.qB,!0)}m(){O8(this, this.querySelector('*[type^="notification"]'))}};U8.prototype.attributeChangedCallback=U8.prototype.attributeChangedCallback;U8.prototype.disconnectedCallback=U8.prototype.disconnectedCallback;U8.prototype.connectedCallback=U8.prototype.connectedCallback;try{window.customElements.define("devsite-snackbar",U8)}catch(a){console.warn("Unrecognized DevSite custom element - DevsiteSnackBar",a)};})(_ds_www); ØA —Eoúô