1"use strict";(globalThis.webpackChunkcpb=globalThis.webpackChunkcpb||[]).push([[8294,2520,5722],{2520:(e,t,n)=>{n.d(t,{default:()=>s});class s{constructor(e,t,n={}){this.id=e,this.el=t,this.props=n,this.state={}}init(){this.onMount()}changeState(e){return this.state={...this.state,...e},this.render(),this.state}getElement(e){return e?"string"==typeof e?this.el.querySelector(e):e:null}}},8294:(e,t,n)=>{n.d(t,{default:()=>r});const s=["ArrowUp","ArrowDown","Tab"];class i{constructor(e,t={}){var n;this.el=e,this.args={currentIndex:-1,elementsSelector:"",observeChildren:!0,...t},this.children=[],this.currentIndex=null!==(n=this.args.currentIndex)&&void 0!==n?n:-1,this.init()}init(){const{el:e}=this;this.children=this.getFocusableElements(),e.addEventListener("keydown",(e=>{if(s.includes(e.code))switch(this.currentIndex=this.children.findIndex((t=>t===e.target)),e.code){case"ArrowDown":e.preventDefault(),this.next();break;case"ArrowUp":e.preventDefault(),this.prev();break;default:this.currentIndex+=e.shiftKey?-1:1}})),this.args.observeChildren&&new MutationObserver((e=>{(e[0].addedNodes||e[0].removedNodes)&&(this.children=this.getFocusableElements())})).observe(this.el,{childList:!0})}reset(){var e;this.currentIndex=null!==(e=this.args.currentIndex)&&void 0!==e?e:-1}
1next(){return this.navigate(1)}prev(){return this.navigate(-1)}navigate(e=1){this.currentIndex+=e;let t=this.getElementByIndex(this.currentIndex);t||(t=this.getElementByIndex(1===e?0:-1),this.currentIndex=1===e?0:-1),t?.focus()}getElementByIndex(e){return this.children.at(e)}getFocusableElements(){const e=this.args.elementsSelector||'a[href], button, input, textarea, select, [tabindex]:not([tabindex="-1"])';return[...this.el.querySelectorAll(e)]}}var l=n(5722);class r extends l.default{constructor(e,t,n={}){super(e,t,{menuEl:".dropdown__menu",labelEl:".dropdown__label",contentEl:".dropdown__menu",toggleEl:".dropdown__toggle",closeEl:".dropdown__btn--close",...n}),this.menuEl=this.getElement(this.props.menuEl),this.labelEl=this.getElement(this.props.labelEl),this.navigator=new i(this.el,{observeChildren:!1})}onMount(){const{toggleEl:e,menuEl:t,labelEl:n}=this;e?(n&&(n.id=`dropdown-label-${this.id}`,e.setAttribute("aria-labelledby",n.id)),t&&(t.id=`dropdown-menu-${this.id}`,e.setAttribute("aria-controls",t.id),e.setAttribute("aria-owns",t.id)),super.onMount()):super.onMount()}}},5722:(e,t,n)=>{n.d(t,{default:()=>i});var s=n(2520);class i extends s.default{constructor(e,t,n){super(e,t,{expandClass:"expanded",closeOnClickOutside:!0,...n}),this.contentEl=this.getElement(this.props.contentEl),this.toggleEl=this.getElement(this.props.toggleEl)||this.el,this.closeEl=this.getElement(this.props.closeEl)}expand(){return this.changeState({expanded:!0})}collapse(){return this.changeState({expanded:!1})}toggle(e){return this.changeState({expanded:"boolean"==typeof e?e:!this.expanded()})}expanded(){return this.el.classList.contains(this.props.expandClass)}onMount(){const{el:e,toggleEl:t,closeEl:n,contentEl:s}=this;if(s?.setAttribute("inert",""),t?.setAttribute("aria-expanded","false"),t?.addEventListener("click",(()=>this.toggle())),n?.addEventListener("click",(()=>this.collapse())),e.addEventListener("keydown",(e=>"Escape"===e.code&&this.collapse())),!this.props.closeOnClickOutside)return;const i=e=>{!this.el.contains(e.target)&&this.expanded()&&this.collapse()};this.el.addEventListener("component:toggle",(e=>{if(!(e=>"detail"in e)(e))return;const{expanded:t}=e.detail;t?window.addEventListener("click",i,!0):window.removeEventListener("click",i,!0)}))}render(){const e=this.state;if(!("expanded"in e)||e.expanded===this.expanded())return;const{el:t,toggleEl:n,contentEl:s}=this;t.classList.toggle(this.props.expandClass,e.expanded),n?.setAttribute("aria-expanded",e.expanded),s?.toggleAttribute("inert",!e.expanded),!e.expanded&&t.contains(document.activeElement)&&n?.focus();const i=new CustomEvent("component:toggle",{detail:{expanded:e.expanded}});t.dispatchEvent(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.