1"use strict";(self.webpackChunk_text_chatbot=self.webpackChunk_text_chatbot||[]).push([[671],{6671(e,t,s){s.r(t);var n=s(7578);const i=class extends n.xI{static targets=["root","top"];connect(){this._handleClick=this.handleClick.bind(this),this._handleKeyDown=this.handleKeyDown.bind(this),this._handleMouseEnter=this.handleMouseEnter.bind(this),this._handleMouseLeave=this.handleMouseLeave.bind(this),this.adjustPositions();const e=this.getSubmenu(this.topTarget);this.initialMenuLeftPosition=e?window.getComputedStyle(e).left:null,this.setListeners()}disconnect(){this.removeListeners()}setListeners(){for(let e of this.topTargets)e.addEventListener("click",this._handleClick),e.addEventListener("keydown",this._handleKeyDown);for(let e of this.rootTargets)e.addEventListener("mouseenter",this._handleMouseEnter),e.addEventListener("mouseleave",this._handleMouseLeave)}removeListeners(){for(let e of this.topTargets)e.removeEventListener("click",this._handleClick),e.removeEventListener("keydown",this._handleKeyDown);for(let e of this.rootTargets)e.removeEventListener("mouseenter",this._handleMouseEnter),e.removeEventListener("mouseleave",this._handleMouseLeave)}getSubmenu(e){const t=e.nextElementSibling;return t&&t.classList.contains("c-menu__sub")?t:null}handleClick(e){"A"===e.target.nodeName&&this.isDesktop()||(e.preventDefault(),this.toggle(e.target))}handleKeyDown(e){this.getSubmenu(e.target)&&("ArrowDown"===e.key||" "===e.key?(e.preventDefault(),this.open(e.target)):"Escape"===e.key&&this.close(e.target))}isDesktop(){return window.matchMedia("(min-width: 64rem)").matches}handleMouseEnter(e){setTimeout(()=>{e.preventDefault(),this.open(e.target)},1)}handleMouseLeave(e){e.preventDefault(),this.close(e.target)}adjustPositions(){for(const e of this.topTargets){const t=this.getSubmenu(e);if(t){const s=t.getBoundingClientRect(),n=window.innerWidth-s.x-s.width,i=s.width+64,o=e.getBoundingClientRect().left,a=parseFloat(t.style.left||this.initialMenuLeftPosition);t.style.left=n<=54&&a<=-32?window.innerWidth-i-o+"px":this.initialMenuLeftPosition}}}getRoot(e){return e.closest("li")}isOpened(e){return this.getRoot(e).classList.contains("v--opened")}toggle(e){this.isOpened(e)?this.close(e):this.open(e)}open(e){this.adjustPositions();for(const e of this.rootTargets)this.close(e);const t=this.getRoot(e);t.classList.add("v--opened");const s=t.querySelector("[aria-expanded]");s&&s.setAttribute("aria-expanded","true"),this.element.classList.add("v--has-opened")}close(e){const t=this.getRoot(e);t.classList.remove("v--opened");const s=t.querySelector("[aria-expanded]");s&&s.setAttribute("aria-expanded","false"),this.element.classList.remove("v--has-opened"),this.adjustPositions()}};s.d(t,["default",0,i])}}]);
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.