1!function(Drupal,n,r){const i="[data-sitewide-alert]",d=e=>{window.localStorage.setItem("alert-dismissed-"+e.uuid,String(Math.round((new Date).getTime()/1e3))),document.querySelectorAll(`[data-uuid="${e.uuid}"]`).forEach(e=>{e.dispatchEvent(new CustomEvent("sitewide-alert-dismissed",{bubbles:!0,composed:!0})),o(e)})},o=e=>{e.dispatchEvent(new CustomEvent("sitewide-alert-removed",{bubbles:!0,composed:!0})),e.remove()},a=()=>{const r=document.querySelectorAll(i);fetch(window.location.origin+n.path.baseUrl+n.path.pathPrefix+"sitewide_alert/load").then(e=>e.json()).then(e=>e.sitewideAlerts,e=>{console.error(e)}).then(e=>{var t;t=e,document.querySelectorAll(i).forEach(e=>{e=e.querySelectorAll("[data-uuid]");Array.from(e).filter(e=>!t.includes(e.getAttribute("data-uuid"))).forEach(e=>o(e))});let l=!1;e.forEach(i=>{if(!l){const a="alert-dismissed-"+(e=i).uuid in window.localStorage&&!(Number(window.localStorage.getItem("alert-dismissed-"+e.uuid))<e.dismissalIgnoreBefore);var e;const s=((t=[],e=!0)=>{if(0===t.length)return!0;let r=!1;var i=window.location.pathname;for(let e=0;e<t.length;e++){var a=n.path.baseUrl.slice(0,-1)+t[e];if("*"===a.charAt(a.length-1)){if(i.startsWith(a.substring(0,a.length-1))){r=!0;break}}else if(a===i){r=!0;break}}return e?!r:r})(i.showOnPages,i.negateShowOnPages);r.forEach(e=>{var t,r=e.querySelector(`[data-uuid="${i.uuid}"]`);s&&!a?(t=(t=>{var e=document.createElement("div");if(e.innerHTML=t.renderedAlert,t.dismissible){var r=e.getElementsByClassName("js-dismiss-button");for(let e=0;e<r.length;e++)r[e].addEventListener("click",()=>d(t))}return e.firstElementChild})(i),r?e.replaceChild(t,r):e.appendChild(t),t.dispatchEvent(new CustomEvent("sitewide-alert-rendered",{bubbles:!0,composed:!0})),l=!0):!a&&s||!r||o(r)})}})})};Drupal.behaviors.sitewide_alert_init={attach:(e,t)=>{r("sitewide_alerts_init","html",e).forEach(e=>{var t;a(),!0===n.sitewideAlert.automaticRefresh&&(t=setInterval(()=>a(),n.sitewideAlert.refreshInterval<1e3?1e3:n.sitewideAlert.refreshInterval),n.sitewideAlert.automaticRefresh||clearInterval(t))})}}}(Drupal,drupalSettings,once); 2//# sourceMappingURL=sitewide-notifications.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.