'use strict' function indexHtml (opts) { let routePrefix = opts.prefix if (opts.indexPrefix) { routePrefix = `${opts.indexPrefix.replace(/\/$/, '')}/${opts.prefix.replace(/^\//, '')}` } return (url) => { const hasTrailingSlash = /\/$/.test(url) const prefix = hasTrailingSlash ? `.${opts.staticPrefix}` : `${routePrefix}${opts.staticPrefix}` return ` ${opts.theme?.title || 'Swagger UI'} ${opts.theme && opts.theme.css ? opts.theme.css.map(css => `\n`).join('') : ''} ${opts.theme && opts.theme.favicon ? opts.theme.favicon.map(favicon => `\n`).join('') : ` `}
${opts.theme && opts.theme.js ? opts.theme.js.map(js => `\n`).join('') : ''} ` } } module.exports = indexHtml