openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
25 lines (24 loc) • 1.22 kB
JavaScript
import { t as normalizeControlUiBasePath } from "./control-ui-shared-_tUmz6W8.mjs";
//#region src/gateway/control-ui-root-assets.ts
const CONTROL_UI_BUILD_ID_ATTRIBUTE = "data-openclaw-control-ui-build-id";
/** Root files emitted by the Control UI build and served under any configured mount. */
const CONTROL_UI_ROOT_PUBLIC_ASSETS = [
"apple-touch-icon.png",
"favicon-32.png",
"favicon.ico",
"favicon.svg",
"manifest.webmanifest",
"sw.js"
];
function isControlUiRootPublicAsset(e) {
return CONTROL_UI_ROOT_PUBLIC_ASSETS.some((t) => t === e);
}
/** Public build inputs covered by the document's content-bound cache identity. */
function isControlUiVersionedPublicAsset(e) {
return isControlUiRootPublicAsset(e) && e !== "sw.js" || /^(?:fonts\/[^/]+\.(?:css|woff2)|themes\/[^/]+\.css|(?:provider-icons|cloud-provider-icons|file-icons(?:\/[^/]+)*)\/[^/]+\.svg|(?:app-art|community-art)\/[^/]+\.webp)$/u.test(e);
}
function buildControlUiRootAssetPath(e, t) {
return `${normalizeControlUiBasePath(e)}/${t}`;
}
//#endregion
export { isControlUiVersionedPublicAsset as a, isControlUiRootPublicAsset as i, CONTROL_UI_ROOT_PUBLIC_ASSETS as n, buildControlUiRootAssetPath as r, CONTROL_UI_BUILD_ID_ATTRIBUTE as t };