--- import type { ComponentProps } from "astro/types"; import type CopyrightNotice from "@components/templates/CopyrightNotice.astro"; import { listYearsWithRanges } from "@utils/datetime"; interface Props extends ComponentProps {} let { license, title, holders, years } = Astro.props; if (typeof license !== "string") throw new Error(); const publicdomain = license === "CC0"; const sa = /SA/.test(license); const nd = /ND/.test(license); const nc = /NC/.test(license); const licenseURL = `https://creativecommons.org/licenses/${ license.slice(3).toLowerCase() }/4.0/`; const firstYear = Math.min(...years); const lastYears = years.sort((a, b) => a - b).slice(1); ---