1import{Controller}from"@hotwired/stimulus";export default class extends Controller{static targets=["dropdown","selectedFilters","form"];connect(){this.#e()}update(){this.#e()}removePill(e){const t=this.#t().find(t=>t.value===e.currentTarget.dataset.value);t&&(t.checked=!1,this.#e(),this.formTarget?.requestSubmit())}clearAll(){this.#t().forEach(e=>e.checked=!1),this.#e(),this.hasDropdownTarget&&this.#r(),this.formTarget?.requestSubmit()}#t(){return this.dropdownTargets.flatMap(e=>Array.from(e.querySelectorAll('input[type="checkbox"]')))}#e(){if(!this.hasSelectedFiltersTarget)return;const e=this.selectedFiltersTarget;e.innerHTML="",this.#t().forEach(t=>{if(!t.checked)return;const r=document.createElement("i");r.classList.add("fal","fa-times","sw-mt-2","pe-none");const s=document.createElement("button");s.type="button",s.classList.add("btn","btn-outline-confirm","btn-sm","d-flex","gap-2","align-items-center"),s.innerHTML=t.dataset.name,s.appendChild(r),s.dataset.value=t.value,s.dataset.action="filter-pills#removePill",e.appendChild(s)})}#r(){if(!this.hasDropdownTarget)return;const e=this.dropdownTarget.querySelector('[data-bs-toggle="dropdown"]');bootstrap.Dropdown.getInstance(e).hide()}}
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.