1this.BX=this.BX||{};this.BX.UI=this.BX.UI||{};(function(t,e){"use strict";const s=["a[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"[tabindex]:not([disabled]):not([hidden])"];const i=s.join(",");const n=!e.Type.isUndefined(window.Element)&&"checkVisibility"in window.Element.prototype;const o=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);const r=new Set(["button","checkbox","file","hidden","image","radio","range","reset","submit"]);class a{static isDisabled(t){return e.Type.isElementNode(t)&&(t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true")}static isTextInput(t){if(!e.Type.isElementNode(t)){return false}if(t.tagName==="INPUT"){return!o.has(t.type)}return t.tagName==="TEXTAREA"||t.isContentEditable}static isEditable(t){if(!e.Type.isElementNode(t)){return false}if(t.tagName==="INPUT"){return!r.has(t.type)}return t.tagName==="TEXTAREA"||t.tagName==="SELECT"||t.isContentEditable}static isVisible(t){if(!e.Type.isElementNode(t)||!t.isConnected){return false}if(n){return t.checkVisibility({visibilityProperty:true,opacityProperty:true})}const s=t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0;return s&&getComputedStyle(t).visibility==="visible"}static isTabbable(t){if(!this.isFocusable(t)){return false}return!this.hasNegativeTabIndex(t)}static hasNegativeTabIndex(t){const e=t?.getAttribute("tabindex");if(e===null){return false}return Number.parseInt(e,10)<0}static isFocusable(t){if(!e.Type.isElementNode(t)||t.closest("[inert]")||!t.isConnected){return false}return t.matches(i)&&this.isVisible(t)}}const c="bx:a11y:debug";const l="*";const u={"focus-monitor":"FocusMonitor","focus-trap":"FocusTrap","focus-zone":"FocusZone","input-modality":"InputModality","live-announcer":"LiveAnnouncer"};class d{static#t=new Set;static#e=false;static#s=false;static#i(){if(this.#s){return}this.#s=true;try{const t=localStorage.getItem(c);if(t===l){this.#e=true}else if(t){const e=JSON.parse(t);if(Array.isArray(e)){for(const t of e){this.#t.add(t)}}}}catch{}}static enable(t){this.#i();if(t){this.#t.add(t)}else{this.#e=true}this.#n()}static disable(t){this.#i();if(t){this.#t.delete(t)}else{this.#e=false;this.#t.clear()}this.#n()}static isEnabled(t){this.#i();return this.#e||this.#t.has(t)}static log(t,e,...s){if(!this.isEnabled(t)){return}const i=u[t]||t;console.log(`%c[${i}]%c ${e}`,"color: #0075ff; font-weight: bold;","color: inherit; font-weight: normal;",...s)}static logNode(t,s,i){if(!this.isEnabled(t)||!e.Type.isElementNode(i)){return}const n=i.tagName.toLowerCase();const o=i.className?`.${[...i.classList].join(".")}`:"";const r=i.id?`#${i.id}`:"";const a=`${n}${o}${r}`;const c=i.getAttribute("role");const l=i.getAttribute("aria-labelledby");const d=l?l.split(/\s+/).map((t=>document.getElementById(t)?.textContent?.trim())).filter(Boolean).join(" "):"";const h=(i.getAttribute("aria-label")||d||i.textContent.trim().slice(0,30)||"\u2014").replaceAll(/\s+/g," ");const f=[c&&`role="${c}"`,i.getAttribute("aria-expanded")!==null&&`aria-expanded="${i.getAttribute("aria-expanded")}"`,i.getAttribute("href")&&`href="${i.getAttribute("href")}"`,i.getAttribute("tabindex")&&`tabindex="${i.getAttribute("tabindex")}"`].filter(Boolean).join(" ");const m=u[t]||t;const p=[`%c[${m}]%c ${s}`,`%c${a}%c`,`"%c${h}%c"`,f&&`%c${f}%c`].filter(Boolean).join(" ");console.log(p,"color: #0075ff; font-weight: bold;","color: inherit; font-weight: normal;","color: #0075ff; font-weight: bold;","color: inherit; font-weight: normal;","color: #e36209; font-style: italic;","color: inherit; font-style: normal;",...f?["color: #9b59b6;","color: inherit;"]:[])}static warn(t,e,...s){if(!this.isEnabled(t)){return}const i=u[t]||t;console.warn(`[${i}] ${e}`,...s)}static#n(){try{if(this.#e){localStorage.setItem(c,l)}else if(this.#t.size>0){localStorage.setItem(c,JSON.stringify([...this.#t]))}else{localStorage.removeItem(c)}}catch{}}}const h="a11y:restore-focus";class f{static get FOCUSABLE_SELECTOR(){return i}static isFocusLost(t){const e=this.getActiveElement(t);return e===null||e.tagName==="BODY"}static getFirst(t,e){return this.#o(t,"first",e)}static getLast(t,e){return this.#o(t,"last",e)}
1static getNext(t,e){return this.#o(t,"next",e)}static getPrevious(t,e){return this.#o(t,"previous",e)}static focusFirst(t,e){return this.focusTarget(this.#o(t,"first",e),e)}static focusLast(t,e){return this.focusTarget(this.#o(t,"last",e),e)}static focusNext(t,e){return this.focusTarget(this.#o(t,"next",e),e)}static focusPrevious(t,e){return this.focusTarget(this.#o(t,"previous",e),e)}static focusContainer(t,e){if(!t.hasAttribute("tabindex")){t.setAttribute("tabindex","-1")}this.focusTarget(t,e);return t}static getActiveElement(t){const{activeElement:s}=this.#r(t);if(s?.tagName==="IFRAME"&&s.contentDocument?.body){const t=s;return this.getActiveElement(t.contentDocument?.body)}if(e.Type.isElementNode(s)){return s}return null}static createWalker(t,e){const{tabbableOnly:s=false,accept:i}=e??{};const n=t.ownerDocument??document;return n.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(t){const e=t;if(!a.isFocusable(e)){return NodeFilter.FILTER_SKIP}if(s&&e.tabIndex<0){return NodeFilter.FILTER_SKIP}if(i&&!i(e)&&e.tagName!=="IFRAME"){return NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_ACCEPT}})}static*#a(t,e){const s=this.createWalker(t,e);for(let t=s.nextNode();t!==null;t=s.nextNode()){const s=t;if(s.tagName==="IFRAME"){try{const t=s;const i=t.contentDocument?.body;if(i){yield*this.#a(i,e);continue}}catch{}}yield s}}static#o(t,e,s){const i={tabbableOnly:s?.tabbableOnly??true,accept:s?.accept};switch(e){case"first":{return this.#a(t,i).next().value??null}case"last":{let e=null;for(const s of this.#a(t,i)){e=s}return e}case"next":{const e=this.#c(t,s);let n=e===null;for(const s of this.#a(t,i)){if(n){return s}if(s===e){n=true}}if(s?.wrap){return this.#a(t,i).next().value??null}return null}case"previous":{const e=this.#c(t,s);let n=null;for(const s of this.#a(t,i)){if(s===e){break}n=s}if(n){return n}if(s?.wrap){return this.#o(t,"last",s)}return null}}return null}static focusBySelector(t,e,s){const{accept:i,...n}=s??{};const o=t=>t.matches(e)&&(i?i(t):true);const r=this.#c(t,s);let a=r===null;for(const e of this.#a(t,{...n,accept:o})){if(a){return this.focusTarget(e,s)}if(e===r){a=true}}if(s?.wrap){const e=this.#a(t,{...n,accept:o}).next().value;if(e){return this.focusTarget(e,s)}}return null}static#c(t,e){const s=e?.from??this.getActiveElement(t);if(!s||t===s){return null}if(t.contains(s)){return s}let i=s.ownerDocument;while(i!==null){const e=i.defaultView?.frameElement;if(!e){return null}if(t.contains(e)){return s}i=e.ownerDocument}return null}static focusTarget(t,e){if(!t){return null}const{preventScroll:s,focusVisible:i}=e??{};t.focus({preventScroll:s,focusVisible:i});return t}static restoreFocus(t,s){if(!e.Type.isElementNode(t)){return null}try{const e=new CustomEvent(h,{bubbles:true,cancelable:true});const i=t.dispatchEvent(e);
1if(i){this.focusTarget(t,s);d.log("focus-monitor","restored focus to",t);return t}}catch{d.warn("focus-monitor","failed to restore focus to",t)}return null}static#r(t){if(!t){return document}if(t.window===t){return t.document}return t.ownerDocument??document}}class m{#l;#u=[];constructor(t=25){this.#l=t}record(t){if(!a.isFocusable(t)){return}if(this.#u[this.#u.length-1]?.deref()===t){return}for(let e=this.#u.length-1;e>=0;e--){const s=this.#u[e].deref();if(!s){this.#u.splice(e,1);continue}if(s===t){this.#u.splice(e,1);break}}d.logNode("focus-monitor","recorded",t);this.#u.push(new WeakRef(t));this.#d(t.ownerDocument)}getLastValid(){for(let t=this.#u.length-1;t>=0;t--){const e=this.#u[t].deref();if(!e){this.#u.splice(t,1);continue}if(a.isFocusable(e)){this.#u.length=t+1;return e}this.#u.splice(t,1)}return null}#d(t){const e=[];for(let s=this.#u.length-1;s>=0;s--){const i=this.#u[s].deref();if(!i){this.#u.splice(s,1);continue}if(i.ownerDocument===t){e.push(s)}}const s=e.length-this.#l;if(s<=0){return}for(let t=e.length-s;t<e.length;t++){this.#u.splice(e[t],1)}}}const p=new Set(["Tab","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]);const g=new Set(["Alt","AltGraph","CapsLock","Control","Meta","NumLock","ScrollLock","Shift"]);const b=new Set(["mouse","pen","touch"]);class y{#h="unknown";#f=null;#m=null;#p=false;#g=[];#b=new WeakMap;attach(t){if(this.#b.has(t)){return}const s=t=>{if(y.isBareModifier(t.key)){return}if(p.has(t.key)){this.#m=t.key;this.#p=t.shiftKey}else{this.#m=null;this.#p=false}this.#y("keyboard")};const i=t=>{this.#f=b.has(t.pointerType)?t.pointerType:"mouse";this.#m=null;this.#p=false;this.#y("pointer")};e.Event.bind(t,"keydown",s,true);e.Event.bind(t,"pointerdown",i,true);const n=()=>{e.Event.unbind(t,"keydown",s,true);e.Event.unbind(t,"pointerdown",i,true)};this.#g.push(new WeakRef(t));this.#b.set(t,n);t.documentElement.dataset.inputModality=this.#h}detach(t){const e=this.#b.get(t);if(e){e();this.#b.delete(t);this.#v()}}static isBareModifier(t){return g.has(t)}static enableDebug(){d.enable("input-modality")}static disableDebug(){d.disable("input-modality")}#y(t){if(this.#h!==t){d.log("input-modality",`${this.#h} -> ${t}`);this.#h=t;this.#F()}}#F(){const t=[];for(const e of this.#g){const s=e.deref();if(s){s.documentElement.dataset.inputModality=this.#h;t.push(e)}}this.#g=t}#v(){this.#g=this.#g.filter((t=>{const e=t.deref();return e&&this.#b.has(e)}))}getLastModality(){return this.#h}getLastPointerType(){return this.#h==="pointer"?this.#f:null}getLastNavigationKey(){return this.#h==="keyboard"?this.#m:null}isLastNavigationReversed(){return this.#h==="keyboard"&&this.#m==="Tab"&&this.#p}}class v{static useFocusTrapInDialogs(){const t=e.Extension.getSettings("ui.a11y");return t.get("useFocusTrapInDialogs")===true}static restoreLostFocus(){const t=e.Extension.getSettings("ui.a11y");return t.get("restoreLostFocus")===true}static suppressFocusOnRestore(){const t=e.Extension.getSettings("ui.a11y");return t.get("suppressFocusOnRestore")===true}}class F{static#E=null;#T;#h;#A=new WeakMap;constructor(){this.#T=new m(25);this.#h=new y;this.#I(document)}static get Instance(){return this.initialize()}static initialize(){const t=e.Page.getRootWindow();if(t!==window){const t=e.Reflection.getClass("top.BX.UI.Accessibility.FocusMonitor");if(t!==null){return t.Instance}}if(this.#E===null){this.#E=new F}return this.#E}static enableDebug(){d.enable("focus-monitor")}static disableDebug(){d.disable("focus-monitor")}static shouldRestoreLostFocus(){return v.restoreLostFocus()}#I(t){if(this.#A.has(t)){return}let s=null;const i=t=>{if(s!==null){clearTimeout(s);s=null}const i=t.target;if(e.Type.isElementNode(i)){this.#T.record(i);if(i.tagName==="IFRAME"){this.attachIframe(i)}}};const n=()=>
1{if(s!==null){return}s=window.setTimeout((()=>{s=null;this.#w(t)}),0)};t.addEventListener("focusin",i,true);t.addEventListener("focusout",n,true);const o=this.#S(t);this.#h.attach(t);this.#A.set(t,{detach:()=>{if(s!==null){clearTimeout(s)}t.removeEventListener("focusin",i,true);t.removeEventListener("focusout",n,true);this.#h.detach(t);o?.disconnect()}})}attachIframe(t){if(!e.Type.isElementNode(t)||t.tagName!=="IFRAME"){return}try{const e=t.contentDocument;if(!e){return}const s=this.#A.get(e);if(s){return}this.#I(e)}catch{}}detachIframe(t){try{const e=t.contentDocument;if(!e){return}const s=this.#A.get(e);if(s){s.detach();this.#A.delete(e)}}catch{}}#w(t){if(!F.shouldRestoreLostFocus()){return}const e=t.activeElement;if(e&&e!==t.body){return}if(this.#h.getLastModality()!=="keyboard"){return}const s=this.#T.getLastValid();if(s){this.#N(s);return}this.#D(t)}restoreFocus(){const t=this.#T.getLastValid();if(t){this.#N(t);return}this.#D(document)}#D(t){d.log("focus-monitor","restoring focus to root");f.restoreFocus(this.getRoot(t),{preventScroll:true})}getRoot(t=document){return t.querySelector("[data-focus-root]")||t.querySelector("main")||t.body}#N(t){if(!t.isConnected){return}const e=t.ownerDocument.defaultView;if(!e){return}const s=f.getActiveElement(t);if(s===t){return}if(e===window){f.restoreFocus(t,{preventScroll:true});return}e.requestAnimationFrame((()=>{f.restoreFocus(t,{preventScroll:true})}))}getLastInputModality(){return this.#h.getLastModality()}getModalityTracker(){return this.#h}#S(t){if(!F.shouldRestoreLostFocus()){return null}if(e.Browser.isFirefox()||e.Browser.isSafari()){const e=new MutationObserver((e=>{this.#w(t)}));const s=()=>e.observe(t.body,{childList:true,subtree:true,characterData:false});if(t.readyState==="loading"){t.addEventListener("DOMContentLoaded",s)}else{s()}return e}return null}}const E=Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINS;const T=Node.DOCUMENT_POSITION_FOLLOWING|Node.DOCUMENT_POSITION_CONTAINED_BY;const A=new WeakMap;class I{#x=`focus-trap-${e.Text.getRandom()}`;#L;#O;#k=false;#C=true;#s=false;#B=null;#R=true;#M=null;#P=null;#H=null;#_=null;#K=this.#z.bind(this);#$=this.#U.bind(this);constructor(t,s={}){this.#L=t;this.#O=e.Type.isPlainObject(s)?s:{};this.setRestoreFocus(this.#O.restoreFocus??null);if(this.#O.looped!==undefined){this.setLooped(this.#O.looped)}if(this.#O.preventScroll!==undefined){this.setPreventScroll(this.#O.preventScroll)}}static enableDebug(){d.enable("focus-trap")}static disableDebug(){d.disable("focus-trap")}activate(t={}){if(this.#k){return}if(!this.#s){this.#i()}if(this.#H===null){this.captureActiveElement()}this.#k=true;if(this.#C){this.#W(true)}const{initialFocus:e}={initialFocus:true,...t};if(e){this.applyInitialFocus()}this.#q(true)}deactivate(){if(!this.#k){return}this.#k=false;this.#W(false);this.#q(false);this.restoreFocus()}destroy(){this.deactivate();if(!this.#s){return}e.Event.unbind(this.#M,"focus",this.#K);e.Event.unbind(this.#P,"focus",this.#$);e.Dom.remove(this.#M);e.Dom.remove(this.#P);this.#s=false}setLooped(t){if(!e.Type.isBoolean(t)){return}this.#C=t;if(this.#k){this.#W(t)}}setPreventScroll(t){this.#R=e.Type.isBoolean(t)?t:true}isLooped(){return this.#C}isActive(){return this.#k}setLastFocusedElement(t){if(e.Type.isElementNode(t)&&t.tagName!=="BODY"&&!this.contains(t)){this.#H=t;d.logNode("focus-trap","set last focus",t)}}captureActiveElement(){const t=f.getActiveElement();if(t!==null){this.setLastFocusedElement(t)}return t}contains(t){return this.#L.contains(t)}focusFirst(t){return f.focusFirst(this.#L,this.#V(t))}focusLast(t){return f.focusLast(this.#L,this.#V(t))}focusNext(t){return f.focusNext(this.#L,this.#V(t))}focusPrevious(t){return f.focusPrevious(this.#L,this.#V(t))}focusContainer(t){return f.focusContainer(this.#L,this.#V(t))}focusBySelector(t,e){return f.focusBySelector(this.#L,t,this.#V(e))}#V(t){const s=e.Type.isPlainObject(t)?{...t}:{};if(e.Type.isNil(s.preventScroll)){s.preventScroll=this.#R}return s}getId(){return this.#x}#i(){this.#M=this.#j();this.#P=this.#j();e.Event.bind(this.#M,"focus",this.#K);e.Event.bind(this.#P,"focus",this.#$);this.#L.insertAdjacentElement("beforebegin",this.#M);this.#L.insertAdjacentElement("afterend",this.#P);this.#s=true}#j(){const t=document.createElement("div");t.setAttribute("aria-hidden","true");t.setAttribute("data-focus-trap",this.getId());e.Dom.style(t,{position:"fixed",width:0,height:0,opacity:"0",pointerEvents:"none",outline:"none"});return t}#z(t){if(!this.#k||!this.#M){return}const e=t.relatedTarget?this.#M.compareDocumentPosition(t.relatedTarget):0;const s=e&T;
1if(!s){if(!this.focusFirst()){this.focusContainer()}return}const i=this.#O.startBoundary?this.#X(this.#O.startBoundary):null;if(i){f.focusTarget(i,{preventScroll:this.#R});return}if(!this.focusLast()){this.focusContainer()}}#U(t){if(!this.#k||!this.#P){return}const e=t.relatedTarget?this.#P.compareDocumentPosition(t.relatedTarget):0;const s=e&E;if(!s){if(!this.focusLast()){this.focusContainer()}return}const i=this.#O.endBoundary?this.#X(this.#O.endBoundary):null;if(i){f.focusTarget(i,{preventScroll:this.#R});return}if(!this.focusFirst()){this.focusContainer()}}#X(t){if(e.Type.isStringFilled(t)){const s=document.querySelector(t);return s!==null&&e.Type.isElementNode(s)&&a.isFocusable(s)?s:null}if(e.Type.isElementNode(t)&&a.isFocusable(t)){return t}if(e.Type.isFunction(t)){const s=t();return e.Type.isElementNode(s)&&a.isFocusable(s)?s:null}return null}#W(t){const e=t?"0":"-1";this.#M?.setAttribute("tabindex",e);this.#P?.setAttribute("tabindex",e)}applyInitialFocus(){const t=this.#O.initialFocus??true;if(t===false){return}if(!this.#O.forceInitialFocus){const t=f.getActiveElement(this.#L);if(t&&this.#L.contains(t)&&t!==this.#L){return}}const e=Array.isArray(t)?t:[t];for(const t of e){if(this.#J(t)){return}}this.focusContainer()}#J(t){if(t===false){return false}if(t==="container"){this.focusContainer();return true}if(e.Type.isStringFilled(t)){return this.focusBySelector(t)!==null}if(e.Type.isFunction(t)){const e=t();if(a.isFocusable(e)){f.focusTarget(e,{preventScroll:this.#R});return true}return false}if(t===true||t==="first-tabbable"||e.Type.isNil(t)){return Boolean(this.focusFirst())}return false}setRestoreFocus(t){if(e.Type.isBoolean(t)||e.Type.isNull(t)||e.Type.isStringFilled(t)||e.Type.isFunction(t)||e.Type.isElementNode(t)){this.#B=t}}restoreFocus(){try{if(this.#B===null&&this.#Y()){this.#G(this.#H);return}const t=this.#B??true;if(t===false){return}if(e.Type.isStringFilled(t)){const e=this.#L.ownerDocument??document;let s=null;try{s=e.querySelector(t)}catch{console.error("FocusTrap: invalid restoreFocus selector provided")}if(s!==null&&a.isFocusable(s)){f.restoreFocus(s,{preventScroll:true});return}}if(e.Type.isElementNode(t)&&a.isFocusable(t)){f.restoreFocus(t,{preventScroll:true});return}if(e.Type.isFunction(t)){const e=t();if(a.isFocusable(e)){f.restoreFocus(e,{preventScroll:true});return}}if(this.#H!==null&&a.isFocusable(this.#H)){let t=[];const s=e.Type.isBoolean(this.#O.suppressFocusOnRestore)?this.#O.suppressFocusOnRestore:v.suppressFocusOnRestore();try{if(s){t=e.Event.getEventListeners(this.#H,"focus");if(t.length>0){e.Event.unbindAll(this.#H,"focus")}}d.logNode("focus-trap","back to last focus",this.#H);f.restoreFocus(this.#H,{preventScroll:true})}finally{if(s){for(const s of t){e.Event.bind(this.#H,"focus",s.listener)}}}return}F.Instance.restoreFocus()}finally{this.#H=null}}#Y(){if(f.isFocusLost(this.#L)){return false}const t=f.getActiveElement(this.#L);return t!==null&&!this.#Z(t)}#G(t){setTimeout((()=>{if(!f.isFocusLost(this.#L)){return}if(t!==null&&a.isFocusable(t)){d.logNode("focus-trap","back to last focus (lost)",t);f.restoreFocus(t,{preventScroll:true});return}F.Instance.restoreFocus()}),0)}#Z(t){if(this.contains(t)){return true}let s=t.ownerDocument;while(s?.defaultView?.frameElement){const t=s.defaultView.frameElement;if(e.Type.isElementNode(t)&&this.contains(t)){return true}s=t.ownerDocument}return false}#q(t){if(t&&this.#O.isolateOutside!==true){return}if(t){this.#Q()}else{for(const t of this.#_??[]){this.#tt(t)}this.#_=null}}#Q(){const t=[this.#L,...this.#et()];const e=t.filter((e=>!t.some((t=>t!==e&&t.contains(e)))));const s=this.#st(e);this.#_=new Set;for(const t of s){if(t===this.#L||this.#L.contains(t)||t.getAttribute("data-focus-trap")===this.getId()){continue}if(t.parentNode?.nodeName==="BODY"&&t.offsetWidth===0&&t.offsetHeight===0){continue}this.#_.add(t);this.#it(t)}}#it(t){const e=A.get(t);if(e){e.ownerCount++}else{A.set(t,{ownerCount:1,wasInert:t.inert||t.hasAttribute("inert")})}t.setAttribute("inert","true")}#tt(t){const e=A.get(t);if(!e){return}e.ownerCount--;if(e.ownerCount>0){return}A.delete(t);if(!e.wasInert){t.removeAttribute("inert")}}#st(t){const s=new Set;const i=new Set;for(const n of t){let t=n;while(t&&t.tagName!=="BODY"){i.add(t);const n=t.parentElement;const o=n?n.children:[];for(const t of o){if(t.tagName!=="SCRIPT"&&t.tagName!=="STYLE"&&!t.getAttribute("data-a11y-ignore-inert")&&e.Type.isElementNode(t)){s.add(t)}}t=n}}i.forEach((t=>{s.delete(t)}));return s}#et(){if(!e.Type.isArrayFilled(this.#O.outsideExceptionSelectors)){return[]}try{const t=this.#O.outsideExceptionSelectors.join(",");return[...document.querySelectorAll(t)]}
1catch{console.error("FocusTrap: invalid outsideExceptionSelectors provided");return[]}}}const w={mounted(t,e){const{active:s,options:i}=S(e.value);t.__focusTrap=new I(t,i);if(s){t.__focusTrap.activate()}},updated(t,e){const{active:s,options:i}=S(e.value);const{active:n,options:o}=S(e.oldValue);if(i!==o&&i){t.__focusTrap?.destroy();t.__focusTrap=new I(t,i)}const r=t.__focusTrap;if(!r){return}if(s){r.activate()}else{r.deactivate()}},unmounted(t){t.__focusTrap?.destroy();delete t.__focusTrap}};function S(t){if(e.Type.isBoolean(t)){return{active:t}}if(e.Type.isPlainObject(t)){return{active:t.active!==false,options:t.options}}return{active:false}}class N{static#E=null;#nt;#ot=[];#rt=false;#at=null;#ct=null;#lt=false;#ut=null;#dt=500;#ht=30;#ft=4e3;#mt=160;static enableDebug(){d.enable("live-announcer")}static disableDebug(){d.disable("live-announcer")}static announce(t,e="polite"){if(!N.#E){N.#E=new N}N.#E.announce(t,e)}static destroy(){N.#E?.destroy();N.#E=null}constructor(t){const{politeness:s="polite",container:i=document.body||document.documentElement,baseDelay:n,charDelay:o,maxDelay:r,maxMessageLength:a}=t??{};if(e.Type.isNumber(n)){this.#dt=n}if(e.Type.isNumber(o)){this.#ht=o}if(e.Type.isNumber(r)){this.#ft=r}if(e.Type.isNumber(a)){this.#mt=a}this.#nt=this.#pt(s);e.Dom.append(this.#nt,i);this.#ut=requestAnimationFrame((()=>{this.#ut=null;this.#lt=true;this.#gt()}))}announce(t,e="polite"){const s=this.#bt(t);if(!s){return}d.log("live-announcer",`[${e}] ${s}`);const i=this.#ot[this.#ot.length-1];if(i&&i.message===s&&i.politeness===e){return}if(e==="assertive"){this.#yt();this.#ot.unshift({message:s,politeness:e})}else{this.#ot.push({message:s,politeness:e})}this.#gt()}destroy(){if(this.#ut!==null){cancelAnimationFrame(this.#ut);this.#ut=null}this.#ot.length=0;this.#yt();this.#nt.remove()}#gt(){if(!this.#lt||this.#rt||this.#ot.length===0){return}const t=this.#ot.shift();if(!t){return}this.#rt=true;const{message:e,politeness:s}=t;const i=this.#vt(e);this.#nt.setAttribute("aria-live",s);this.#nt.textContent="";this.#at=requestAnimationFrame((()=>{this.#at=null;this.#nt.textContent=e;this.#ct=setTimeout((()=>{this.#ct=null;this.#rt=false;if(this.#ot.length===0){this.#nt.textContent=""}this.#gt()}),i)}))}#yt(){this.#rt=false;if(this.#at!==null){cancelAnimationFrame(this.#at);this.#at=null}if(this.#ct!==null){clearTimeout(this.#ct);this.#ct=null}this.#nt.textContent=""}#vt(t){const e=this.#dt+t.length*this.#ht;return Math.min(e,this.#ft)}#bt(t){if(!e.Type.isStringFilled(t)){return""}const s=t.trim();if(!s){return""}if(s.length<=this.#mt){return s}const i=s.slice(0,this.#mt-1);const n=i.replace(/\s+\S*$/,"");return`${n||i}\u2026`}#pt(t){const s=document.createElement("div");s.setAttribute("aria-live",t);s.setAttribute("aria-atomic","true");s.setAttribute("data-a11y-ignore-inert","true");e.Dom.style(s,{position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:"0"});return s}}const D=1;const x=2;const L=4;const O=8;const k=16;const C=32;const B=64;const R=128;const M=256;const P=512;const H={ArrowHorizontal:D,ArrowVertical:x,JK:L,HL:O,HomeAndEnd:k,WS:C,AD:B,Tab:R,PageUpDown:M,Backspace:P,ArrowAll:D|x,HJKL:O|L,WASD:C|B,All:D|x|L|O|k|C|B|R|M|P};const _={ELEMENT_ATTR:"data-active-descendant",CONTAINER_ATTR:"data-has-active-descendant",EXPLICIT:"activated-by-keyboard",IMPLICIT:"activated-by-other"};const K={ArrowLeft:H.ArrowHorizontal,ArrowDown:H.ArrowVertical,ArrowUp:H.ArrowVertical,ArrowRight:H.ArrowHorizontal,h:H.HL,j:H.JK,k:H.JK,l:H.HL,a:H.AD,s:H.WS,w:H.WS,d:H.AD,Tab:H.Tab,Home:H.HomeAndEnd,End:H.HomeAndEnd,PageUp:H.PageUpDown,PageDown:H.PageUpDown,Backspace:H.Backspace};const z={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end",Backspace:"previous"};class ${#L;#O;#k=false;#Ft;#Et;#Tt;#R;#At;#It;#wt=new Set;#St=new WeakMap;#Nt=null;#Dt=null;#xt=null;#Lt=null;#Ot=[];#kt=false;#Ct=new WeakSet;#Bt=this.#Rt.bind(this);#Mt=this.#Pt.bind(this);#Ht=this.#_t.bind(this);#Kt=this.#zt.bind(this);#$t=this.#Ut.bind(this);constructor(t,s={}){this.#L=t;this.#O=e.Type.isPlainObject(s)?s:{};this.#Dt=this.#O.activeDescendantControl??null;this.#Et=this.#O.focusOutBehavior??"stop";this.#Tt=this.#O.focusInStrategy??"previous";this.#R=this.#O.preventScroll??false;this.#At=this.#O.ignoreHoverEvents??false;this.#It=this.#O.tabbableOnly??false;this.#Ft=this.#O.bindKeys??(this.#O.getNextFocusable?H.ArrowAll:H.ArrowVertical)|H.HomeAndEnd}static enableDebug(){d.enable("focus-zone")}static disableDebug(){d.disable("focus-zone")}activate(){if(this.#k){return}this.#k=true;this.#wt=this.#Wt();for(const t of this.#wt){this.#qt(t)}if(this.#Dt){if(!this.#L.id){this.#L.setAttribute("id",`fz-${e.Text.getRandom()}`);this.#kt=true}this.#Dt.setAttribute("aria-controls",this.#L.id)}const t=this.#Tt==="initial"&&this.#Dt;if(!t){this.#Vt(this.#jt())}this.#Xt();this.#S();
1d.log("focus-zone",`activated with ${this.#wt.size} elements`)}deactivate(){if(!this.#k){return}this.#k=false;if(this.#xt){this.#xt.disconnect();this.#xt=null}if(this.#Lt!==null){cancelAnimationFrame(this.#Lt);this.#Lt=null}this.#Jt();for(const t of this.#wt){this.#Yt(t);if(this.#Ct.has(t)){t.removeAttribute("id");this.#Ct.delete(t)}}if(this.#Dt){this.#Gt();this.#Dt.removeAttribute("aria-controls")}if(this.#kt){this.#L.removeAttribute("id");this.#kt=false}this.#wt.clear();this.#Nt=null;d.log("focus-zone","deactivated")}isActive(){return this.#k}getCurrentFocusedElement(){return this.#Nt}refreshElements(){if(this.#k){this.#Zt()}}#Wt(){const t=new Set;const e=f.createWalker(this.#L,{tabbableOnly:this.#It,accept:this.#O.focusableElementFilter});for(let s=e.nextNode();s!==null;s=e.nextNode()){t.add(s)}return t}#Qt(t=null,e=false){return{from:t??undefined,tabbableOnly:false,accept:t=>this.#wt.has(t),wrap:e}}#te(t){let s=e.Type.isElementNode(t)?t:t.parentElement;while(s&&s!==this.#L){if(this.#wt.has(s)){return s}s=s.parentElement}return null}#qt(t){if(!this.#St.has(t)){this.#St.set(t,t.getAttribute("tabindex"))}t.setAttribute("tabindex","-1")}#Yt(t){const e=this.#St.get(t);if(e!==undefined){if(e===null){t.removeAttribute("tabindex")}else{t.setAttribute("tabindex",e)}this.#St.delete(t)}}#Vt(t=null,e=false){const s=this.#Nt;this.#Nt=t;if(this.#Dt){if(t&&f.getActiveElement()===this.#Dt){this.#ee(s,t,e)}else{this.#Gt()}return}if(s&&s!==t&&this.#St.has(s)){s.setAttribute("tabindex","-1")}if(t){t.setAttribute("tabindex","0")}}#ee(t,s,i=false){if(!s.id){s.setAttribute("id",`fz-${e.Text.getRandom()}`);this.#Ct.add(s)}if(t&&t!==s){t.removeAttribute(_.ELEMENT_ATTR)}if(!this.#Dt){return}const n=this.#Dt.getAttribute("aria-activedescendant");const o=i?_.EXPLICIT:_.IMPLICIT;const r=s.getAttribute(_.ELEMENT_ATTR);if(n===s.id&&r===o){return}this.#Dt.setAttribute("aria-activedescendant",s.id);this.#L.setAttribute(_.CONTAINER_ATTR,s.id);s.setAttribute(_.ELEMENT_ATTR,o);d.logNode("focus-zone","active descendant ->",s);this.#O.onActiveDescendantChanged?.(s,t,i)}#Gt(t=this.#Nt){if(this.#Tt==="first"){this.#Nt=null}this.#Dt?.removeAttribute("aria-activedescendant");this.#L.removeAttribute(_.CONTAINER_ATTR);if(t){t.removeAttribute(_.ELEMENT_ATTR)}const e=this.#L.querySelectorAll(`[${_.ELEMENT_ATTR}]`);for(const t of e){t.removeAttribute(_.ELEMENT_ATTR)}this.#O.onActiveDescendantChanged?.(null,t,false)}#Rt(t){const e=K[t.key];if(e===undefined||this.#wt.size===0){return}if(t.defaultPrevented||(e&this.#Ft)===0||$.#se(t,f.getActiveElement())){return}const s=$.#ie(t);let i=null;if(this.#O.getNextFocusable){i=this.#O.getNextFocusable(s,f.getActiveElement()??null,t)}if(!i){const e=this.#Et==="wrap"&&t.key!=="Tab";const n=this.#Qt(this.#Nt,e);switch(s){case"previous":{i=f.getPrevious(this.#L,n);break}case"next":{i=f.getNext(this.#L,n);break}case"start":{i=f.getFirst(this.#L,n);break}default:{i=f.getLast(this.#L,n)}}}if(this.#Dt){this.#Vt(i||this.#Nt,true)}else if(i){i.focus({preventScroll:this.#R})}if(t.key!=="Tab"||i){t.preventDefault()}}#Pt(t){if(!e.Type.isElementNode(t.target)){return}if(this.#Dt){this.#ne(t)}else{this.#oe(t)}}#ne(t){const e=t.target;if(this.#wt.has(e)){this.#Dt?.focus({preventScroll:this.#R});this.#Vt(e)}}#oe(t){const s=t.target;const i=F.Instance.getModalityTracker();const n=i.getLastModality()==="pointer";if(n){if(this.#wt.has(s)){this.#Vt(s)}return}if(!this.#wt.has(s)){return}if(this.#Tt==="previous"){this.#Vt(s)}else if(this.#Tt==="closest"||this.#Tt==="first"){if(this.#re(t.relatedTarget)){const t=this.#ae();if(t){t.focus({preventScroll:this.#R})}return}this.#Vt(s)}else if(e.Type.isFunction(this.#Tt)){if(this.#re(t.relatedTarget)){const e=this.#Tt(t.relatedTarget);if(e&&this.#wt.has(e)){e.focus({preventScroll:this.#R});return}d.warn("focus-zone","focusInStrategy returned an element outside the managed focus set.")}this.#Vt(s)}}#jt(){if(e.Type.isFunction(this.#Tt)){const t=this.#Tt(this.#Nt);return t&&this.#wt.has(t)?t:null}return f.getFirst(this.#L,this.#Qt())}#ae(){const t=this.#Qt();return F.Instance.getModalityTracker().isLastNavigationReversed()?f.getLast(this.#L,t):f.getFirst(this.#L,t)}#re(t){return e.Type.isElementNode(t)&&!this.#L.contains(t)}#_t(t){const{target:s}=t;if(!e.Type.isElementNode(s)){return}const i=this.#te(s);if(i){this.#Vt(i)}}#zt(){const t=this.#Tt==="initial"&&this.#Dt;if(this.#Nt){this.#ee(null,this.#Nt)}else if(!t){this.#Vt(f.getFirst(this.#L,this.#Qt()))}}#Ut(){this.#Gt()}#ce(t,s,i,n=false){e.Event.bind(t,s,i,n);this.#Ot.push([t,s,i,n])}#Xt(){const t=this.#Dt??this.#L;this.#ce(t,"keydown",this.#Bt);this.#ce(this.#L,"focusin",this.#Mt);if(this.#Dt){if(!this.#At){this.#ce(this.#L,"mousemove",this.#Ht,true)}this.#ce(this.#Dt,"focusin",this.#Kt);this.#ce(this.#Dt,"focusout",this.#$t)}}#Jt(){for(const[t,s,i,n]of this.#Ot){e.Event.unbind(t,s,i,n)}this.#Ot=[]}#S(){this.#xt=new MutationObserver((t=>{if(this.#le(t)){return}this.#ue()}));this.#xt.observe(this.#L,{attributes:true,subtree:true,childList:true,attributeFilter:["hidden","disabled","tabindex","inert","contenteditable","aria-disabled"]})}#le(t){if(this.#It){return false}return t.every((t=>t.type==="attributes"&&t.attributeName==="tabindex"&&this.#wt.has(t.target)))}#ue(){if(!this.#k||this.#Lt!==null){return}this.#Lt=requestAnimationFrame((()=>{this.#Lt=null;this.#Zt()}))}#Zt(){if(!this.#k){return}const t=this.#Wt();const e=this.#wt;for(const s of e){if(!t.has(s)){this.#Yt(s)}}for(const s of t){if(!e.has(s)){this.#qt(s)}}this.#wt=t;if(this.#Nt&&!t.has(this.#Nt)){this.#Vt(f.getFirst(this.#L,this.#Qt()))}else if(!this.#Nt&&t.size>0){const t=this.#Tt==="initial"&&this.#Dt;if(!t){this.#Vt(f.getFirst(this.#L,this.#Qt()))}}}static#ie(t){const s=z[t.key];if(t.key==="Tab"&&t.shiftKey){return"previous"}const i=e.Browser.isMac();if(i&&t.metaKey||!i&&t.ctrlKey){if(t.key==="ArrowLeft"||t.key==="ArrowUp"){return"start"}if(t.key==="ArrowRight"||t.key==="ArrowDown"){return"end"}}return s}static#se(t,s){const{key:i,metaKey:n,altKey:o}=t;const r=i.codePointAt(0)??0;const c=i.length===1||i.length===2&&r>=55296&&r<=56319;const l=a.isEditable(s);const u=s?.tagName==="SELECT";if(l&&(c||i==="Home"||i==="End")){return true}if(u){const t=e.Browser.isMac();if(i==="ArrowDown"&&t&&!n){return true}return i==="ArrowDown"&&!t&&o}if(l){const t=s?.tagName==="TEXTAREA"||s?.tagName==="INPUT";const n=s;const o=t&&n.selectionStart===0&&n.selectionEnd===0;const r=t&&n.selectionStart===n.value.length&&n.selectionEnd===n.value.length;if(i==="ArrowLeft"&&!o){return true}if(i==="ArrowRight"&&!r){return true}const a=e.Type.isElementNode(s)&&s.isContentEditable;if(s?.tagName==="TEXTAREA"||a){if(i==="PageUp"||i==="PageDown"){return true}if(i==="ArrowUp"&&!o){return true}if(i==="ArrowDown"&&!r){return true}}}return false}}class U extends HTMLElement{connectedCallback(){Object.assign(this.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"})}}if(!customElements.get("visually-hidden")){customElements.define("visually-hidden",U)}F.initialize();t.AccessibilityLogger=d;t.AccessibilitySettings=v;t.ActiveDescendant=_;t.FocusKeys=H;t.FocusMonitor=F;t.FocusNavigator=f;t.FocusTrap=I;t.FocusTrapDirective=w;t.FocusZone=$;t.InputModalityTracker=y;t.InteractivityChecker=a;t.LiveAnnouncer=N;t.RESTORE_FOCUS_EVENT=h;t.VisuallyHidden=U})(this.BX.UI.Accessibility=this.BX.UI.Accessibility||{},BX); 2//# sourceMappingURL=a11y.bundle.map.js
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.