(function(){var T=document&&document.currentScript&&document.currentScript.src;(window.webpackJsonpruntime=window.webpackJsonpruntime||[]).push([[18],{aQKb:function(C,k,A){"use strict";A.r(k),A.d(k,"init",function(){return x});function x(){I(),N(),window.rtCommonProps["keyboard.navigation.enabled"]&&q()}function I(){const e=document.querySelectorAll('.dmMobileBody [dmle_extension="onelinksmenu"] li.dmUDNavigationItem_dmMore > a');e.forEach(i=>i.removeEventListener("click",w)),e.forEach(i=>i.addEventListener("click",w))}function w(e){const i=e.target.closest("li.dmUDNavigationItem_dmMore");i.classList.add("hover"),document.body.addEventListener("click",()=>{i.classList.remove("hover")},{once:!0})}function N(){[...document.querySelectorAll(`.unifiednav:not([data-nav-structure='VERTICAL']) .unifiednav__container_sub-nav[data-depth="0"]`)].forEach(e=>{const i=e.querySelector(".unifiednav__container"),f=e.getBoundingClientRect();f.top+f.height<=window.innerHeight||(i?(e.style.transitionDuration="0.2s",e.addEventListener("wheel",l=>{l.preventDefault();const m=l.currentTarget,s=Number(m.dataset.scrollY||0),p=window._navScrollSpeed||35,u=l.deltaY>0?p:-p,r=f.height-window.innerHeight+f.top,g=Math.max(0,Math.min(s+u,r));m.dataset.scrollY=g,m.style.transform=`translate(0, -${g}px)`})):(e.style.maxHeight="65vh",e.style.overflow="auto"))})}function q(){const e={tab:"Tab",enter:"Enter",esc:"Escape",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown"},i=document.querySelectorAll(".unifiednav");Array.from(i).forEach(f=>{const l=f.querySelectorAll(".unifiednav > ul > li"),m=f.querySelectorAll(".unifiednav > ul > li li");let s=0,p=[],u,r;const g=t=>{u=t,u.style.opacity=1,u.style.maxHeight="initial",p.push(t)},E=t=>{t.style.removeProperty("opacity"),t.style.removeProperty("max-height")},v=()=>{u&&(E(u),u=null)},h=()=>{p.forEach(t=>E(t)),p=[]},S=t=>{const a=t.getElementsByTagName("a")[0];a&&a.focus()},b=t=>{s=t,t===l.length?s=0:t<0&&(s=l.length-1),S(l[s])},d=(t,a)=>{r=a;const n=t.children;a===n.length?r=0:a<0&&(r=n.length-1),S(n[r]),g(t)},L=t=>{t.getElementsByTagName("a")[0].click()},D=({element:t,index:a})=>{Array.from(t.querySelectorAll("a")).forEach((n,o)=>{a===0&&o===0?(n.setAttribute("tabindex","0"),t.addEventListener("focus",()=>{s=0})):n.setAttribute("tabindex","-1")})};Array.prototype.forEach.call(l,(t,a)=>{D({element:t,index:a}),t.addEventListener("focus",()=>{r=0,Array.prototype.forEach.call(l,n=>{n.setAttribute("aria-expanded","false")})}),t.addEventListener("click",function(){this.getAttribute("aria-expanded")==="false"||this.getAttribute("aria-expanded")===null?this.setAttribute("aria-expanded","true"):this.setAttribute("aria-expanded","false")}),t.addEventListener("keydown",function(n){let o=!1;const c=this.querySelector("ul");switch(n.code){case e.right:b(s+1),h(),o=!0;break;case e.left:b(s-1),h(),o=!0;break;case e.tab:h();break;case e.space:case e.enter:c?(r=0,v(),d(c,0)):L(this),o=!0;break;case e.down:c&&(r=0,d(c,0),o=!0);break;case e.up:c&&(r=c.querySelectorAll("li").length-1,d(c,r),o=!0);break;case e.esc:v(),b(s),o=!0;break;default:o=!1}o&&n.preventDefault()})}),Array.prototype.forEach.call(m,t=>{t.addEventListener("keydown",function(a){let n=!1;const o=this.querySelector("ul"),c=this.parentNode.parentNode,y=c.closest(".unifiednav__container_sub-nav"),M=()=>{v(),r=Array.prototype.indexOf.call(y.children,c),u=y,d(y,r)};switch(a.code){case e.tab:h();break;case e.right:o?d(o,0):(b(s+1),h()),n=!0;break;case e.left:y?M():(b(s-1),h()),n=!0;break;case e.esc:y?M():(b(s),v()),n=!0;break;case e.down:d(this.parentNode,r+1),n=!0;break;case e.up:d(this.parentNode,r-1),n=!0;break;case e.enter:case e.space:o?d(o,0):L(this),n=!0;break;default:n=!1}return n&&(a.preventDefault(),a.stopPropagation()),!1})})})}}}])})();
