1import { Controller } from '@hotwired/stimulus' 2 3export default class extends Controller { 4 static targets = ['element'] 5 6 toggle () { 7 this.elementTarget.classList.toggle('hidden') 8 } 9 10 toggleExclusive (event) { 11 event.preventDefault() 12 13 const current = this.elementTarget 14 15 document 16 .querySelectorAll('[data-hide-show-target="element"]') 17 .forEach(section => { 18 if (section === current) { 19 section.classList.toggle('hidden') 20 } else { 21 section.classList.add('hidden') 22 } 23 }) 24 } 25 26 closeOnClickOutside (event) { 27 if (this.element.contains(event.target)) return 28 this.elementTarget.classList.add('hidden') 29 } 30};
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.