1var c=Object.defineProperty;var g=(i,e,t)=>e in i?c(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var o=(i,e,t)=>g(i,typeof e!="symbol"?e+"":e,t);import{h as a}from"./entry-client-D4F_DRpu.js";/* empty css */var h=Object.defineProperty,d=(i,e,t)=>e in i?h(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,u=(i,e,t)=>(d(i,e+"",t),t);class f{constructor(e="cache"){u(this,"prefix"),this.prefix=e}getStorageMedium(e=!0){return typeof window>"u"||typeof window.localStorage>"u"?null:e?window.localStorage:window.sessionStorage}Has(e){return typeof this.Get(`${this.prefix}-${e}`)<"u"}Get(e){const t=this.getStorageMedium(!1),s=this.getStorageMedium(!0);let r=!1,n=null;if(t&&s){try{n=t.getItem(`${this.prefix}-${e}`),n=this.toJSONIfJSON(n),r=n!==null}catch{}if(!r)try{n=s.getItem(`${this.prefix}-${e}`),n=this.toJSONIfJSON(n),r=n!==null}catch{}}return n}toJSONIfJSON(e){return typeof e=="string"&&(e.indexOf("{")===0||e.indexOf("[")===0)&&(e=JSON.parse(e)),e}Save(e,t,s=!0){console.warn("StoreManager.Save is deprecated"),this.Set(e,t,s)}Set(e,t,s=!0){const r=this.getStorageMedium(s);let n=!1;if(r){typeof t=="object"&&(t=JSON.stringify(t));try{r.setItem(`${this.prefix}-${e}`,t),n=!0}catch(l){console.error("Unable to save object",l)}}return n}Remove(e){const t=this.getStorageMedium(!0),s=this.getStorageMedium(!1);t&&t.removeItem(`${this.prefix}-${e}`),s&&s.removeItem(`${this.prefix}-${e}`)}}class m{constructor(e){o(this,"ariaManager");o(this,"elements",[]);o(this,"controlledElements",[]);o(this,"behaviorName","hideforsession");o(this,"attributeName","data-behavior");o(this,"elementSelector",`[${this.attributeName}]`);o(this,"storeName","HideForSessionManager");o(this,"settingsKey","Settings");o(this,"storeManager",new f(this.storeName));if(typeof window.sessionStorage!="object"){console.info("Does not support Session storage, cannot hide element");return}this.ariaManager=new a({parent:e}),this.InitiateElements(),this.hideChoosenElements()}getHideSettings(){const e=this.storeManager.Get(this.settingsKey);return e===null||typeof e!="object"?{}:e}addToSettings(e=""){const t=this.getHideSettings();t[e]=!0,this.storeManager.Save(this.settingsKey,t,!1)}InitiateElements(){const e=[].slice.call(document.querySelectorAll(this.elementSelector)).map(t=>t);this.elements=e.filter(t=>{const s=t.getAttribute(this.attributeName);return s!=null&&s.indexOf(this.behaviorName)!==-1}).filter(t=>t.dataset.HideForSessionManager!=="activated"),this.elements.forEach(t=>{var r;t.dataset.HideForSessionManager="activated",t.addEventListener("click",this.onButtonClick.bind(this,t));const s=(r=this.ariaManager)==null?void 0:r.GetARIAControlTargets(t);s&&this.controlledElements.push(...s)})}hideChoosenElements(){const e=this.getHideSettings();if(Object.keys(e).length){this.controlledElements.filter(s=>e[s.id]).forEach(s=>{var r;(r=this.ariaManager)==null||r.AriaHidden(s,!0)});return}this.controlledElements.forEach(t=>{var s;(s=this.ariaManager)==null||s.AriaHidden(t,!1)})}onButtonClick(e){var s;(((s=this.ariaManager)==null?void 0:s.GetARIAControlTargets(e))??[]).forEach(r=>{this.addToSettings(r.id)})}}const M=()=>{const i=document.querySelectorAll('[data-global-information-message="true"]');if(i.length===0)return;const e=i[0];if(typeof window.sessionStorage!="object"){console.info("Does not support Session storage, cannot hide element");const t=new a({parent:e});t.AriaHidden(e,!1);const s=document.querySelectorAll("[data-globalmessage-close-button]");s.length&&t.AriaHidden(s[0],!0);return}new m(e)};export{M as default};
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.