1import { Controller } from "@hotwired/stimulus" 2 3export default class extends Controller { 4 static targets = ['progress'] 5 static values = { 6 progress: Number, 7 from: Number 8 } 9 10 connect() { 11 const from = this.hasFromValue ? this.fromValue : this.progressValue 12 this.progressTarget.style.transition = "none" 13 this.progressTarget.style.width = from + "%" 14 15 requestAnimationFrame(() => { 16 requestAnimationFrame(() => { 17 this.progressTarget.style.transition = "" 18 this.setValue(this.progressValue) 19 }) 20 }) 21 } 22 23 setValue(value) { 24 this.progressValue = value 25 this.progressTarget.style.width = value + '%' 26 } 27 28 disconnect() { 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.