I only took a cursory glance but a lot of that belongs to the UI framework (svelte)
Similar to react/vue, it's used to render the content on the page, and automatically update what's shown on the page when variables change value. This basically replaced jquery and the callback-hell that was mid-2000s web development

It's not a valid control unless you adjust for ivermectin consumption