/** Permanently decommissioned storage. Historical records remain for reference. */ export const RETIRED_STORAGE_URL_PATTERN = '^https?://s3[.]1080p[.]hk([/:?#]|$)'; export const RETIRED_STORAGE_MESSAGE = '旧存储已停用,源文件已无法恢复,请重新上传。'; export function isRetiredStorageUrl(value: string | null | undefined): boolean { if (!value) return false; try { const url = new URL(value, 'https://local.invalid'); if (url.hostname === 's3.1080p.hk') return true; if (url.pathname === '/api/image-proxy' || url.pathname === '/api/canvas/3d/model-proxy') { const source = url.searchParams.get('url'); return Boolean(source && new URL(source).hostname === 's3.1080p.hk'); } } catch { /* Relative local assets and non-URL values are not retired storage. */ } return false; }