package pages import ( "context" "crypto/sha256" "encoding/hex" "fmt" "io" "net/url" "regexp" "slices" "strconv" "strings" "sync" "unicode/utf8" "github.com/mudler/LocalAI/core/services/studio/workspace" ) // The code of a page is more than its index.html: the UI puts the scripts, // style sheets and ES modules that the page names from its own folder into the // page before it runs (pageAssets.js in the React UI). The consent to a shared // page must cover all of them, or the author could change app.js after the // viewer allowed the page and run new code without asking again. // // codeSet finds the same files as the UI's inliner: