97 lines
4.0 KiB
HTML
97 lines
4.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<script>
|
|
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
|
CSS.supports('top: constant(a)'))
|
|
document.write(
|
|
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
|
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
|
</script>
|
|
<title></title>
|
|
<!--preload-links-->
|
|
<!--app-context-->
|
|
<script>
|
|
// URL polyfill - must run before any other code
|
|
(function() {
|
|
'use strict'
|
|
if (typeof URL === 'undefined') {
|
|
const globalObj = typeof globalThis !== 'undefined' ? globalThis : (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : this)
|
|
const URLPolyfill = class URL {
|
|
constructor(url, base) {
|
|
let resolvedUrl = url
|
|
if (base) {
|
|
try {
|
|
const baseMatch = base.match(/^(https?:\/\/[^\/]+)(\/.*)?$/)
|
|
if (baseMatch) {
|
|
const baseOrigin = baseMatch[1]
|
|
const basePath = baseMatch[2] || '/'
|
|
if (url.startsWith('/')) {
|
|
resolvedUrl = baseOrigin + url
|
|
} else if (url.startsWith('http://') || url.startsWith('https://')) {
|
|
resolvedUrl = url
|
|
} else {
|
|
const baseDir = basePath.substring(0, basePath.lastIndexOf('/') + 1)
|
|
resolvedUrl = baseOrigin + baseDir + url
|
|
}
|
|
} else {
|
|
resolvedUrl = url
|
|
}
|
|
} catch (e) {
|
|
resolvedUrl = url
|
|
}
|
|
}
|
|
this.href = resolvedUrl
|
|
const match = resolvedUrl.match(/^(https?:\/\/)([^\/:]+)(?::(\d+))?(\/.*)?$/)
|
|
if (match) {
|
|
this.protocol = match[1]
|
|
this.hostname = match[2]
|
|
this.port = match[3] || ''
|
|
this.pathname = match[4] || '/'
|
|
this.host = this.hostname + (this.port ? ':' + this.port : '')
|
|
this.origin = this.protocol + this.host
|
|
} else {
|
|
this.protocol = ''
|
|
this.hostname = ''
|
|
this.port = ''
|
|
this.pathname = resolvedUrl
|
|
this.host = ''
|
|
this.origin = ''
|
|
}
|
|
const hashIndex = resolvedUrl.indexOf('#')
|
|
if (hashIndex !== -1) {
|
|
this.hash = resolvedUrl.substring(hashIndex)
|
|
resolvedUrl = resolvedUrl.substring(0, hashIndex)
|
|
} else {
|
|
this.hash = ''
|
|
}
|
|
const searchIndex = resolvedUrl.indexOf('?')
|
|
if (searchIndex !== -1) {
|
|
this.search = resolvedUrl.substring(searchIndex, hashIndex !== -1 ? hashIndex : undefined)
|
|
this.pathname = resolvedUrl.substring(0, searchIndex)
|
|
} else {
|
|
this.search = ''
|
|
}
|
|
}
|
|
toString() { return this.href }
|
|
static createObjectURL(blob) {
|
|
console.warn('URL.createObjectURL: Using data URL fallback in APP environment')
|
|
return 'data:image/png;base64,placeholder'
|
|
}
|
|
static revokeObjectURL(url) {}
|
|
}
|
|
globalObj.URL = URLPolyfill
|
|
if (typeof global !== 'undefined' && global !== globalObj) global.URL = URLPolyfill
|
|
if (typeof window !== 'undefined' && window !== globalObj) window.URL = URLPolyfill
|
|
if (typeof self !== 'undefined' && self !== globalObj) self.URL = URLPolyfill
|
|
}
|
|
})()
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="app"><!--app-html--></div>
|
|
<script type="module" src="/src/main.js"></script>
|
|
</body>
|
|
</html>
|