├── hugo.dev.yaml ├── src ├── index.html ├── assets │ ├── sakura.png │ └── sakura-orig.png ├── global.d.ts ├── hooks │ ├── useTitle.ts │ ├── index.ts │ ├── useSource.ts │ ├── usePagination.ts │ ├── useTags.ts │ ├── useCount.ts │ ├── useNav.ts │ ├── useArchives.ts │ ├── usePosts.ts │ ├── useTheme.ts │ ├── usePost.ts │ ├── useLoading.ts │ └── useSakura.ts ├── main.tsx ├── components │ ├── Link.tsx │ ├── Paginator.tsx │ ├── Layout.tsx │ ├── Nav.tsx │ └── InvertLightness.tsx ├── providers │ └── AppProvider.tsx ├── pages │ ├── Archives.tsx │ ├── Tags.tsx │ ├── Home.tsx │ └── Post.tsx ├── App.tsx ├── utils.ts ├── prism.ts ├── main.css └── serviceWorker.ts ├── static ├── favicon.ico ├── favicon-16x16.png ├── favicon-32x32.png ├── apple-touch-180x180.png ├── android-chrome-192x192.png ├── assets │ ├── KaTeX_AMS-Regular-68534840.ttf │ ├── KaTeX_Main-Bold-0f60d1b8.woff2 │ ├── KaTeX_Main-Bold-138ac28d.ttf │ ├── KaTeX_Main-Bold-c76c5d69.woff │ ├── KaTeX_Main-Italic-0d85ae7c.ttf │ ├── KaTeX_Math-Italic-08ce98e5.ttf │ ├── KaTeX_AMS-Regular-0cdd387c.woff2 │ ├── KaTeX_AMS-Regular-30da91e8.woff │ ├── KaTeX_Fraktur-Bold-9163df9c.ttf │ ├── KaTeX_Fraktur-Bold-9be7ceb8.woff │ ├── KaTeX_Main-Italic-97479ca6.woff2 │ ├── KaTeX_Main-Italic-f1d6ef86.woff │ ├── KaTeX_Main-Regular-c6368d87.woff │ ├── KaTeX_Main-Regular-d0332f52.ttf │ ├── KaTeX_Math-Italic-7af58c5e.woff2 │ ├── KaTeX_Math-Italic-8a8d2445.woff │ ├── KaTeX_Size1-Regular-95b6d2f1.ttf │ ├── KaTeX_Size2-Regular-a6b2099f.ttf │ ├── KaTeX_Size3-Regular-500e04d5.ttf │ ├── KaTeX_Size4-Regular-c647367d.ttf │ ├── KaTeX_Caligraphic-Bold-07d8e303.ttf │ ├── KaTeX_Fraktur-Bold-74444efd.woff2 │ ├── KaTeX_Fraktur-Regular-1e6f9579.ttf │ ├── KaTeX_Fraktur-Regular-5e28753b.woff │ ├── KaTeX_Main-BoldItalic-70ee1f64.ttf │ ├── KaTeX_Main-BoldItalic-a6f7ec0d.woff │ ├── KaTeX_Main-Regular-c2342cd8.woff2 │ ├── KaTeX_Math-BoldItalic-850c0af5.woff │ ├── KaTeX_Math-BoldItalic-f9377ab0.ttf │ ├── KaTeX_SansSerif-Bold-1ece03f7.ttf │ ├── KaTeX_SansSerif-Bold-e99ae511.woff2 │ ├── KaTeX_SansSerif-Bold-ece03cfd.woff │ ├── KaTeX_SansSerif-Italic-3931dd81.ttf │ ├── KaTeX_Script-Regular-036d4e95.woff2 │ ├── KaTeX_Script-Regular-1c67f068.ttf │ ├── KaTeX_Script-Regular-d96cdf2b.woff │ ├── KaTeX_Size1-Regular-6b47c401.woff2 │ ├── KaTeX_Size1-Regular-c943cc98.woff │ ├── KaTeX_Size2-Regular-2014c523.woff │ ├── KaTeX_Size2-Regular-d04c5421.woff2 │ ├── KaTeX_Size3-Regular-6ab6b62e.woff │ ├── KaTeX_Size4-Regular-99f9c675.woff │ ├── KaTeX_Size4-Regular-a4af7d41.woff2 │ ├── KaTeX_Caligraphic-Bold-1ae6bd74.woff │ ├── KaTeX_Caligraphic-Bold-de7701e4.woff2 │ ├── KaTeX_Fraktur-Regular-51814d27.woff2 │ ├── KaTeX_Main-BoldItalic-99cd42a3.woff2 │ ├── KaTeX_Math-BoldItalic-dc47344d.woff2 │ ├── KaTeX_SansSerif-Italic-00b26ac8.woff2 │ ├── KaTeX_SansSerif-Italic-91ee6750.woff │ ├── KaTeX_SansSerif-Regular-11e4dc8a.woff │ ├── KaTeX_SansSerif-Regular-f36ea897.ttf │ ├── KaTeX_Typewriter-Regular-f01f3e87.ttf │ ├── KaTeX_Caligraphic-Regular-3398dd02.woff │ ├── KaTeX_Caligraphic-Regular-5d53e70a.woff2 │ ├── KaTeX_Caligraphic-Regular-ed0b7437.ttf │ ├── KaTeX_SansSerif-Regular-68e8c73e.woff2 │ ├── KaTeX_Typewriter-Regular-71d517d6.woff2 │ ├── KaTeX_Typewriter-Regular-e14fed02.woff │ ├── prism-ee349629.css │ ├── index-e06afd35.css │ ├── katex.min-088067ce.css │ └── index-1530c880.js ├── manifest.json └── sw.js ├── postcss.config.cjs ├── archetypes └── default.md ├── layouts ├── partials │ ├── header.html │ └── paginator.html ├── _default │ ├── terms.html │ ├── list.html │ ├── archives.html │ ├── single.html │ ├── rss.xml │ └── baseof.html ├── 404.html └── index.html ├── tsconfig.node.json ├── eslint.config.js ├── .gitignore ├── tailwind.config.cjs ├── theme.yaml ├── vite.config.ts ├── tsconfig.json ├── package.json ├── .github └── workflows │ └── main.yaml └── cmd.js /hugo.dev.yaml: -------------------------------------------------------------------------------- 1 | minify: 2 | disableHTML: true 3 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /src/assets/sakura.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/src/assets/sakura.png -------------------------------------------------------------------------------- /static/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/favicon-16x16.png -------------------------------------------------------------------------------- /static/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/favicon-32x32.png -------------------------------------------------------------------------------- /src/assets/sakura-orig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/src/assets/sakura-orig.png -------------------------------------------------------------------------------- /postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss : {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /src/global.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | -------------------------------------------------------------------------------- /static/apple-touch-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/apple-touch-180x180.png -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | draft: true 5 | --- 6 | -------------------------------------------------------------------------------- /static/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/android-chrome-192x192.png -------------------------------------------------------------------------------- /static/assets/KaTeX_AMS-Regular-68534840.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_AMS-Regular-68534840.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Main-Bold-0f60d1b8.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Main-Bold-0f60d1b8.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Main-Bold-138ac28d.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Main-Bold-138ac28d.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Main-Bold-c76c5d69.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Main-Bold-c76c5d69.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Main-Italic-0d85ae7c.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Main-Italic-0d85ae7c.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Math-Italic-08ce98e5.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Math-Italic-08ce98e5.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_AMS-Regular-0cdd387c.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_AMS-Regular-0cdd387c.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_AMS-Regular-30da91e8.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_AMS-Regular-30da91e8.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Fraktur-Bold-9163df9c.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Fraktur-Bold-9163df9c.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Fraktur-Bold-9be7ceb8.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Fraktur-Bold-9be7ceb8.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Main-Italic-97479ca6.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Main-Italic-97479ca6.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Main-Italic-f1d6ef86.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Main-Italic-f1d6ef86.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Main-Regular-c6368d87.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Main-Regular-c6368d87.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Main-Regular-d0332f52.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Main-Regular-d0332f52.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Math-Italic-7af58c5e.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Math-Italic-7af58c5e.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Math-Italic-8a8d2445.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Math-Italic-8a8d2445.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Size1-Regular-95b6d2f1.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Size1-Regular-95b6d2f1.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Size2-Regular-a6b2099f.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Size2-Regular-a6b2099f.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Size3-Regular-500e04d5.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Size3-Regular-500e04d5.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Size4-Regular-c647367d.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Size4-Regular-c647367d.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Caligraphic-Bold-07d8e303.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Caligraphic-Bold-07d8e303.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Fraktur-Bold-74444efd.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Fraktur-Bold-74444efd.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Fraktur-Regular-1e6f9579.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Fraktur-Regular-1e6f9579.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Fraktur-Regular-5e28753b.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Fraktur-Regular-5e28753b.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Main-BoldItalic-70ee1f64.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Main-BoldItalic-70ee1f64.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Main-BoldItalic-a6f7ec0d.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Main-BoldItalic-a6f7ec0d.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Main-Regular-c2342cd8.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Main-Regular-c2342cd8.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Math-BoldItalic-850c0af5.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Math-BoldItalic-850c0af5.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Math-BoldItalic-f9377ab0.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Math-BoldItalic-f9377ab0.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_SansSerif-Bold-1ece03f7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_SansSerif-Bold-1ece03f7.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_SansSerif-Bold-e99ae511.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_SansSerif-Bold-e99ae511.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_SansSerif-Bold-ece03cfd.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_SansSerif-Bold-ece03cfd.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_SansSerif-Italic-3931dd81.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_SansSerif-Italic-3931dd81.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Script-Regular-036d4e95.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Script-Regular-036d4e95.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Script-Regular-1c67f068.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Script-Regular-1c67f068.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Script-Regular-d96cdf2b.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Script-Regular-d96cdf2b.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Size1-Regular-6b47c401.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Size1-Regular-6b47c401.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Size1-Regular-c943cc98.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Size1-Regular-c943cc98.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Size2-Regular-2014c523.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Size2-Regular-2014c523.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Size2-Regular-d04c5421.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Size2-Regular-d04c5421.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Size3-Regular-6ab6b62e.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Size3-Regular-6ab6b62e.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Size4-Regular-99f9c675.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Size4-Regular-99f9c675.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Size4-Regular-a4af7d41.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Size4-Regular-a4af7d41.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Caligraphic-Bold-1ae6bd74.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Caligraphic-Bold-1ae6bd74.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Caligraphic-Bold-de7701e4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Caligraphic-Bold-de7701e4.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Fraktur-Regular-51814d27.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Fraktur-Regular-51814d27.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Main-BoldItalic-99cd42a3.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Main-BoldItalic-99cd42a3.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Math-BoldItalic-dc47344d.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Math-BoldItalic-dc47344d.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_SansSerif-Italic-00b26ac8.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_SansSerif-Italic-00b26ac8.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_SansSerif-Italic-91ee6750.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_SansSerif-Italic-91ee6750.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_SansSerif-Regular-11e4dc8a.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_SansSerif-Regular-11e4dc8a.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_SansSerif-Regular-f36ea897.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_SansSerif-Regular-f36ea897.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Typewriter-Regular-f01f3e87.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Typewriter-Regular-f01f3e87.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_Caligraphic-Regular-3398dd02.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Caligraphic-Regular-3398dd02.woff -------------------------------------------------------------------------------- /static/assets/KaTeX_Caligraphic-Regular-5d53e70a.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Caligraphic-Regular-5d53e70a.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Caligraphic-Regular-ed0b7437.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Caligraphic-Regular-ed0b7437.ttf -------------------------------------------------------------------------------- /static/assets/KaTeX_SansSerif-Regular-68e8c73e.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_SansSerif-Regular-68e8c73e.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Typewriter-Regular-71d517d6.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Typewriter-Regular-71d517d6.woff2 -------------------------------------------------------------------------------- /static/assets/KaTeX_Typewriter-Regular-e14fed02.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxyazi/hugo-theme-lavias/HEAD/static/assets/KaTeX_Typewriter-Regular-e14fed02.woff -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "allowSyntheticDefaultImports": true 7 | }, 8 | "include": [ 9 | "vite.config.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import { extended, formatting, javascript, preact, typescript } from "@sxyazi/eslint-config" 2 | 3 | export default [ 4 | ...javascript, 5 | ...typescript, 6 | 7 | ...preact, 8 | 9 | ...extended, 10 | ...formatting, 11 | ] 12 | 13 | -------------------------------------------------------------------------------- /layouts/partials/paginator.html: -------------------------------------------------------------------------------- 1 | {{ if .Paginator.HasNext }} 2 | Next Page 3 | {{ end }} 4 | 5 | {{ if .Paginator.HasPrev }} 6 | Prev Page 7 | {{ end }} 8 | -------------------------------------------------------------------------------- /src/hooks/useTitle.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from "preact/hooks" 2 | 3 | export const useTitle = (title?: string) => { 4 | useEffect(() => { 5 | if (!title) return 6 | const prevTitle = document.title 7 | 8 | document.title = title 9 | return () => document.title = prevTitle 10 | }, [title]) 11 | } 12 | -------------------------------------------------------------------------------- /layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | {{- range .Data.Terms.Alphabetical -}} 4 |

5 | {{ .Page.Title }} 6 | {{ .Count }} 7 |

8 | {{- end }} 9 |
10 | {{ end }} 11 | -------------------------------------------------------------------------------- /static/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sxyazi's blog", 3 | "short_name": "", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "theme_color": "#ffffff", 12 | "background_color": "#ffffff", 13 | "display": "standalone" 14 | } 15 | -------------------------------------------------------------------------------- /src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./useArchives" 2 | export * from "./useLoading" 3 | export * from "./useNav" 4 | export * from "./usePagination" 5 | export * from "./usePost" 6 | export * from "./usePosts" 7 | export * from "./useSakura" 8 | export * from "./useSource" 9 | export * from "./useTags" 10 | export * from "./useTheme" 11 | export * from "./useTitle" 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | const colors = require("tailwindcss/colors") 2 | 3 | /** @type {import('tailwindcss').Config} */ 4 | module.exports = { 5 | content: ["./src/**/*.tsx"], 6 | theme : { 7 | extend: {}, 8 | colors: { 9 | transparent: "transparent", 10 | white : colors.white, 11 | slate : colors.slate, 12 | accent : colors.pink, 13 | }, 14 | }, 15 | darkMode: "class", 16 | } 17 | -------------------------------------------------------------------------------- /theme.yaml: -------------------------------------------------------------------------------- 1 | name: 'Lavias' 2 | license: 'MIT' 3 | licenselink: 'https://github.com/sxyazi/hugo-theme-lavias/blob/master/LICENSE' 4 | description: 'A tale about Lavias.' 5 | homepage: 'https://github.com/sxyazi/hugo-theme-lavias' 6 | tags: 7 | - blog 8 | - lavias 9 | features: 10 | - blog 11 | - responsive 12 | author: 13 | name: 'sxyazi' 14 | homepage: 'https://github.com/sxyazi' 15 | min_version: '0.1' 16 | -------------------------------------------------------------------------------- /src/hooks/useSource.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from "preact/compat" 2 | import { AppContext } from "../providers/AppProvider" 3 | import { useLocation } from "react-router-dom" 4 | import { EMPTY_DIV } from "../utils" 5 | 6 | export const useSource = () => { 7 | const location = useLocation() 8 | const { source, path } = useContext(AppContext) 9 | 10 | if (location.pathname !== path.current) { 11 | return EMPTY_DIV 12 | } 13 | return source 14 | } 15 | -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | {{/*TODO*/}} 2 | {{ define "title" }}HTTP 404 - {{ .Site.Title }}{{ end }} 3 | 4 | {{ define "content" }} 5 |
6 |

404

7 |
8 |

Sorry, we couldn't find the page you're looking for.

9 |
10 |

Go back home

11 |
12 |
13 | {{ end }} 14 | -------------------------------------------------------------------------------- /layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | {{- range (.Paginator (.Site.Params.listPaginate | default 100)).Pages -}} 4 |
5 | {{ .Title }} 6 | 7 |
8 | {{- end }} 9 | {{ partial "paginator.html" . }} 10 |
11 | {{ end }} 12 | -------------------------------------------------------------------------------- /src/hooks/usePagination.ts: -------------------------------------------------------------------------------- 1 | import { useSource } from "./useSource" 2 | import { useEffect, useState } from "preact/hooks" 3 | 4 | export const usePagination = () => { 5 | const source = useSource() 6 | const [prev, setPrev] = useState() 7 | const [next, setNext] = useState() 8 | 9 | useEffect(() => { 10 | setPrev(source.querySelector("#prev-page")?.getAttribute("href")) 11 | setNext(source.querySelector("#next-page")?.getAttribute("href")) 12 | }, [source]) 13 | return { prev, next } 14 | } 15 | -------------------------------------------------------------------------------- /layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | {{- range (.Paginate (where site.RegularPages "Type" "!=" "section")).Pages -}} 4 |
5 | {{ .Title }} 6 | 7 |

{{ .Summary }}{{ if .Truncated }}…{{ end }}

8 |
9 | {{- end }} 10 | {{ partial "paginator.html" . }} 11 |
12 | {{ end }} 13 | -------------------------------------------------------------------------------- /layouts/_default/archives.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 | {{ $paginator := .Paginate (where site.RegularPages "Type" "!=" "section") (.Site.Params.listPaginate | default 100) }} 4 | {{- range $paginator.Pages -}} 5 | 9 | {{- end }} 10 | {{ partial "paginator.html" . }} 11 |
12 | {{ end }} 13 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 |
3 |

{{ .Title }}

4 | {{ if not .Date.IsZero }} 5 | 6 | {{ end }} 7 | {{ trim .RelPermalink "/" }} 8 |
{{ .Content }}
9 |
    10 | {{- range .Params.tags -}} 11 |
  • {{ . }}
  • 12 | {{- end }} 13 |
14 | {{ if .Params.TOC }} 15 | {{.TableOfContents}} 16 | {{ end }} 17 |
18 | {{ end }} 19 | -------------------------------------------------------------------------------- /src/main.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "preact" 2 | import { App } from "./App" 3 | import "./main.css" 4 | import "@chisato/markdown-css/dist/styles.css" 5 | import "nprogress/nprogress.css" 6 | import { BrowserRouter } from "react-router-dom" 7 | import { registerSW } from "virtual:sw-plugin" 8 | 9 | render( 10 | 11 | 12 | , 13 | document.querySelector("app")!, 14 | ) 15 | 16 | registerSW("sw.js").catch(console.error) 17 | 18 | setTimeout(() => { 19 | import("./prism").catch(console.info) 20 | import("katex/dist/katex.min.css").catch(console.info) 21 | import("katex/contrib/auto-render").catch(console.info) 22 | }) 23 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite" 2 | import preact from "@preact/preset-vite" 3 | import { resolve } from "node:path" 4 | import { nativeSW } from "vite-plugin-native-sw" 5 | 6 | export default defineConfig({ 7 | plugins: [ 8 | preact(), 9 | nativeSW({ 10 | entries: [{ 11 | src : resolve(__dirname, "src/serviceWorker.ts"), 12 | dist: "sw.js", 13 | }], 14 | }), 15 | ], 16 | esbuild: { 17 | legalComments: "none", 18 | }, 19 | resolve: { 20 | alias: { 21 | "/src": resolve(__dirname, "src"), 22 | }, 23 | }, 24 | build: { 25 | emptyOutDir: false, 26 | outDir : resolve(__dirname, "static"), 27 | }, 28 | }) 29 | -------------------------------------------------------------------------------- /src/components/Link.tsx: -------------------------------------------------------------------------------- 1 | import { Link as _Link, LinkProps, NavLink } from "react-router-dom" 2 | 3 | interface Props { 4 | nav?: boolean 5 | className?: string 6 | } 7 | 8 | const defaultClass = "p-1 text-accent-600 dark:text-accent-400 rounded hover:bg-accent-100 dark:hover:bg-slate-700" 9 | 10 | export const Link = ({ nav, ...props }: Props & LinkProps) => { 11 | props.className = `${defaultClass} ${props.className ?? ""}` 12 | 13 | // An absolute URL linked to the external site 14 | if (typeof props.to === "string" && /^https:\/\//.test(props.to)) { 15 | return 16 | } 17 | 18 | return nav ? : <_Link {...props}/> 19 | } 20 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "esModuleInterop": false, 7 | "jsx": "react-jsx", 8 | "jsxImportSource": "preact", 9 | "lib": [ 10 | "DOM", 11 | "DOM.Iterable", 12 | "ESNext" 13 | ], 14 | "strict": true, 15 | "noEmit": true, 16 | "allowJs": false, 17 | "skipLibCheck": true, 18 | "useDefineForClassFields": true, 19 | "allowSyntheticDefaultImports": true, 20 | "forceConsistentCasingInFileNames": true, 21 | "resolveJsonModule": true, 22 | "isolatedModules": true 23 | }, 24 | "include": [ 25 | "src" 26 | ], 27 | "references": [ 28 | { 29 | "path": "./tsconfig.node.json" 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /src/hooks/useTags.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "preact/hooks" 2 | import { useSource } from "./useSource" 3 | 4 | export type Tag = { 5 | name: string 6 | link: string 7 | count?: number 8 | } 9 | 10 | export const useTags = () => { 11 | const [links, setLinks] = useState([]) 12 | const source = useSource() 13 | 14 | useEffect(() => { 15 | setLinks([...source.querySelectorAll("#tags > p")].map(p => { 16 | const a = p.querySelector(":scope > a") 17 | 18 | return { 19 | name : a?.textContent ?? "", 20 | link : a?.getAttribute("href") ?? "", 21 | count: parseInt(p.querySelector(":scope > sup")?.textContent ?? "") || undefined, 22 | } 23 | })) 24 | }, [source]) 25 | return links 26 | } 27 | 28 | -------------------------------------------------------------------------------- /src/hooks/useCount.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "preact/hooks" 2 | 3 | type Count = { 4 | page: number 5 | total: number 6 | } 7 | 8 | export const useCount = (id?: string) => { 9 | const [count, setCount] = useState(null) 10 | 11 | useEffect(() => { 12 | if (!id) return 13 | 14 | const params = new URLSearchParams({ id, domain: location.hostname }) 15 | fetch(`https://core-services.vercel.app/count?${params.toString()}`) 16 | .then(resp => { 17 | if (resp.status !== 200) throw new Error(resp.statusText) 18 | return resp.json() as Promise 19 | }).then(resp => { 20 | setCount(resp) 21 | }).catch(e => { 22 | console.error(e) 23 | }) 24 | }, [id]) 25 | 26 | return count 27 | } 28 | 29 | -------------------------------------------------------------------------------- /src/hooks/useNav.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "preact/hooks" 2 | import { useSource } from "./useSource" 3 | 4 | export type Nav = { 5 | name: string 6 | link: string 7 | } 8 | 9 | let prevNavs: Nav[] = [] 10 | 11 | export const useNav = () => { 12 | const source = useSource() 13 | const [navs, setNavs] = useState(prevNavs) 14 | 15 | useEffect(() => { 16 | const navs = [...source.querySelectorAll("#nav > a")].map(a => { 17 | return { name: a.textContent!, link: a.getAttribute("href")! } 18 | }) 19 | if (!navs.length) return 20 | 21 | // We assume that the nav is always the same, 22 | // to avoid unnecessary re-renders and re-preloads. 23 | if (!prevNavs.length) { 24 | setNavs(prevNavs = navs) 25 | } 26 | }, [source]) 27 | return navs 28 | } 29 | -------------------------------------------------------------------------------- /src/components/Paginator.tsx: -------------------------------------------------------------------------------- 1 | import { usePagination } from "../hooks" 2 | import { MdNavigateBefore, MdNavigateNext } from "react-icons/md" 3 | import { Link } from "./Link" 4 | import { useEffect } from "preact/hooks" 5 | import { preload } from "../utils" 6 | 7 | export const Paginator = () => { 8 | const { prev, next } = usePagination() 9 | 10 | useEffect(() => { 11 | if (prev) preload(prev) 12 | if (next) preload(next) 13 | }, [prev, next]) 14 | 15 | return ( 16 |
17 | {next && 18 | Prev 19 | } 20 | 21 | {prev && 22 | Next 23 | } 24 |
25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /src/hooks/useArchives.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "preact/hooks" 2 | import { useSource } from "./useSource" 3 | 4 | export type Archive = { 5 | title: string 6 | link: string 7 | date: Date 8 | year: number 9 | } 10 | 11 | export const useArchives = () => { 12 | const [archives, setArchives] = useState([]) 13 | const source = useSource() 14 | 15 | useEffect(() => { 16 | setArchives([...source.querySelectorAll("#archives > article")].map(article => { 17 | const a = article.querySelector(":scope > a") 18 | const date = new Date(article.querySelector(":scope > time")?.getAttribute("datetime") ?? "") 19 | 20 | return { 21 | title: a?.textContent ?? "", 22 | link : a?.getAttribute("href") ?? "", 23 | date, 24 | year : date.getFullYear(), 25 | } 26 | })) 27 | }, [source]) 28 | return archives 29 | } 30 | -------------------------------------------------------------------------------- /src/hooks/usePosts.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "preact/hooks" 2 | import { useSource } from "./useSource" 3 | import { Post } from "./usePost" 4 | 5 | export const usePosts = () => { 6 | const [posts, setPosts] = useState([]) 7 | const source = useSource() 8 | 9 | useEffect(() => { 10 | setPosts( 11 | [...source.querySelectorAll("#posts > article")].map(article => { 12 | const a = article.querySelector(":scope > a") 13 | const time = article.querySelector(":scope > time") 14 | 15 | return { 16 | id : a?.getAttribute("href")?.replace(/^\//, "") ?? "", 17 | title : a?.textContent ?? "", 18 | link : a?.getAttribute("href") ?? "", 19 | date : new Date(time?.getAttribute("datetime") ?? ""), 20 | summary: article.querySelector(":scope > p")?.textContent ?? undefined, 21 | } 22 | }), 23 | ) 24 | }, [source]) 25 | return posts 26 | } 27 | -------------------------------------------------------------------------------- /src/hooks/useTheme.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "preact/hooks" 2 | 3 | export const useTheme = () => { 4 | const [dark, setDark] = useState(() => 5 | "theme" in localStorage 6 | ? localStorage.theme === "dark" 7 | : window.matchMedia("(prefers-color-scheme: dark)").matches, 8 | ) 9 | 10 | useEffect(() => { 11 | window 12 | .matchMedia("(prefers-color-scheme: dark)") 13 | .addEventListener("change", (event: MediaQueryListEvent) => { 14 | localStorage.removeItem("theme") 15 | setDark(event.matches) 16 | }) 17 | }, []) 18 | 19 | useEffect(() => { 20 | if (dark) { 21 | document.documentElement.classList.add("dark") 22 | } else { 23 | document.documentElement.classList.remove("dark") 24 | } 25 | }, [dark]) 26 | 27 | return { 28 | dark, 29 | toggle: () => setDark(dark => { 30 | localStorage.setItem("theme", dark ? "light" : "dark") 31 | return !dark 32 | }), 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hugo-theme-lavias", 3 | "private": false, 4 | "version": "0.1.0", 5 | "type": "module", 6 | "packageManager": "pnpm@8.3.1", 7 | "scripts": { 8 | "dev": "node cmd.js dev", 9 | "build": "node cmd.js build" 10 | }, 11 | "dependencies": { 12 | "@chisato/markdown-css": "^1.5.3", 13 | "@emotion/css": "^11.11.0", 14 | "katex": "^0.16.7", 15 | "nprogress": "^0.2.0", 16 | "preact": "^10.14.0", 17 | "prism-themes": "^1.9.0", 18 | "prismjs": "^1.29.0", 19 | "react-icons": "^4.8.0", 20 | "react-router-dom": "^6.11.1" 21 | }, 22 | "devDependencies": { 23 | "@preact/preset-vite": "^2.5.0", 24 | "@sxyazi/eslint-config": "^1.0.5", 25 | "@types/katex": "^0.16.0", 26 | "@types/node": "^20.1.5", 27 | "@types/nprogress": "^0.2.0", 28 | "@types/prismjs": "^1.26.0", 29 | "autoprefixer": "^10.4.14", 30 | "postcss": "^8.4.23", 31 | "tailwindcss": "^3.3.2", 32 | "typescript": "^5.0.4", 33 | "vite": "^4.3.6", 34 | "vite-plugin-native-sw": "^1.2.1" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/providers/AppProvider.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentChildren, createContext, createRef, RefObject } from "preact" 2 | import { EMPTY_DIV } from "../utils" 3 | import { useLoading } from "../hooks/useLoading" 4 | import { useTheme } from "../hooks" 5 | 6 | /* eslint-disable @typescript-eslint/indent, @typescript-eslint/no-extra-parens */ 7 | export const AppContext = createContext<{ 8 | path: RefObject 9 | source: HTMLElement 10 | 11 | dark: boolean 12 | toggle: () => void 13 | }>({ 14 | path : createRef(), 15 | source: EMPTY_DIV, 16 | 17 | dark : false, 18 | toggle: () => void 0, 19 | }) 20 | /* eslint-enable @typescript-eslint/indent, @typescript-eslint/no-extra-parens */ 21 | 22 | export const AppProvider = ({ children }: { children: ComponentChildren }) => { 23 | const { path, source } = useLoading() 24 | const { dark, toggle } = useTheme() 25 | 26 | return ( 27 | 33 | {children} 34 | 35 | ) 36 | } 37 | -------------------------------------------------------------------------------- /src/components/Layout.tsx: -------------------------------------------------------------------------------- 1 | import { Nav } from "./Nav" 2 | import { css } from "@emotion/css" 3 | import { ComponentChildren } from "preact" 4 | import { Paginator } from "./Paginator" 5 | 6 | interface Props { 7 | children: ComponentChildren 8 | className?: string 9 | } 10 | 11 | const styles = css` 12 | display: grid; 13 | grid-template-areas: 14 | 'nav' 15 | 'content' 16 | 'foot'; 17 | grid-template-rows: 60px 1fr 30px; 18 | grid-template-columns: 1fr; 19 | 20 | & > nav { 21 | grid-area: nav; 22 | justify-self: end; 23 | margin-top: 10px; 24 | margin-right: calc(25px - 100vw + 100%); 25 | 26 | @media (min-width: 1536px) { 27 | position: sticky; 28 | top: 10px; 29 | } 30 | } 31 | 32 | & > section { 33 | grid-area: content; 34 | justify-self: center; 35 | } 36 | ` 37 | 38 | export const Layout = ({ children, className }: Props) => { 39 | return ( 40 |
41 |
47 | ) 48 | } 49 | -------------------------------------------------------------------------------- /src/hooks/usePost.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "preact/hooks" 2 | import { Tag } from "./useTags" 3 | import { useSource } from "./useSource" 4 | 5 | export type Post = { 6 | id: string 7 | title: string 8 | link: string 9 | date?: Date 10 | content?: string 11 | summary?: string 12 | tags?: Tag[] 13 | } 14 | 15 | export const usePost = () => { 16 | const [post, setPost] = useState() 17 | const source = useSource() 18 | 19 | useEffect(() => { 20 | if (!source.querySelector("#post")) { 21 | return setPost(undefined) 22 | } 23 | 24 | const time = source.querySelector("#post > time") 25 | setPost({ 26 | id : source.querySelector("#post > span")?.textContent ?? "", 27 | title : source.querySelector("#post > h1")?.textContent ?? "", 28 | link : location.href, 29 | date : time ? new Date(time.getAttribute("datetime")!) : undefined, 30 | content: source.querySelector("#post > div")?.innerHTML ?? "", 31 | tags : [...source.querySelectorAll("#post > ul a")].map(a => { 32 | return { name: a.textContent!, link: a.getAttribute("href")! } 33 | }), 34 | }) 35 | }, [source]) 36 | return post 37 | } 38 | -------------------------------------------------------------------------------- /src/components/Nav.tsx: -------------------------------------------------------------------------------- 1 | import { useNav } from "../hooks" 2 | import { Link } from "./Link" 3 | import { useEffect } from "preact/hooks" 4 | import { canPreload, preload } from "../utils" 5 | import { MdDarkMode, MdLightMode } from "react-icons/md" 6 | import { css } from "@emotion/css" 7 | import { useContext } from "preact/compat" 8 | import { AppContext } from "../providers/AppProvider" 9 | import { useLocation } from "react-router-dom" 10 | 11 | const styles = css` 12 | svg { 13 | display: inline; 14 | vertical-align: sub; 15 | } 16 | ` 17 | 18 | export const Nav = () => { 19 | const nav = useNav() 20 | const { dark, toggle } = useContext(AppContext) 21 | const { pathname } = useLocation() 22 | 23 | useEffect(() => { 24 | nav.map(({ link }) => canPreload(pathname, link) && preload(link)) 25 | }, [nav]) 26 | 27 | return ( 28 | 38 | ) 39 | } 40 | -------------------------------------------------------------------------------- /src/pages/Archives.tsx: -------------------------------------------------------------------------------- 1 | import { Archive, useArchives, useTitle } from "../hooks" 2 | import { Layout } from "../components/Layout" 3 | import { formatDate } from "../utils" 4 | import { Link } from "../components/Link" 5 | 6 | const Line = ({ archive }: { archive: Archive }) => { 7 | return ( 8 |
9 | {archive.title} 10 | 11 |
12 | ) 13 | } 14 | 15 | export const Archives = () => { 16 | const archives = useArchives() 17 | useTitle("Archives") 18 | 19 | let lastYear: number 20 | return ( 21 | 22 | {archives.length > 0 &&

Archives:

} 23 | 24 | {archives.map(archive => { 25 | let newYear = false 26 | if (lastYear !== archive.year) { 27 | newYear = true 28 | lastYear = archive.year 29 | } 30 | 31 | return ( 32 | <> 33 | {newYear &&

{archive.year}

} 34 | 35 | 36 | ) 37 | })} 38 |
39 | ) 40 | } 41 | -------------------------------------------------------------------------------- /src/App.tsx: -------------------------------------------------------------------------------- 1 | import { Route, Routes } from "react-router-dom" 2 | import { Home } from "./pages/Home" 3 | import { Archives } from "./pages/Archives" 4 | import { Tags } from "./pages/Tags" 5 | import { Post } from "./pages/Post" 6 | import { useEffect } from "preact/hooks" 7 | import { AppProvider } from "./providers/AppProvider" 8 | 9 | export function App() { 10 | useEffect(() => { 11 | const onClick = (e: Event) => { 12 | if (!(e.target instanceof HTMLAnchorElement)) { 13 | return 14 | } 15 | 16 | const url = new URL(e.target.href) 17 | if (url.host !== location.host) { 18 | e.target.target = "_blank" 19 | e.target.rel = "noopener" 20 | } 21 | } 22 | 23 | document.addEventListener("click", onClick) 24 | return () => document.removeEventListener("click", onClick) 25 | }, []) 26 | 27 | return ( 28 | 29 | 30 | }/> 31 | }/> 32 | }/> 33 | }/> 34 | }/> 35 | }/> 36 | 37 | 38 | ) 39 | } 40 | -------------------------------------------------------------------------------- /static/sw.js: -------------------------------------------------------------------------------- 1 | const o="b3eecf5d",h=t=>{const e=t.split("/").pop()??"";return!!(["favicon.ico","manifest.json"].includes(e)||/.+\.[\da-z]{8}\.(js|json|css)$/.test(e)||/^\/?[^/]+-\d+x\d+\.png$/.test(t))},d=(t,e)=>{if(t.byteLength!==e.byteLength)return!1;const s=new Int8Array(t),r=new Int8Array(e);for(let n=0;n{t.waitUntil(self.skipWaiting())});self.addEventListener("activate",t=>{t.waitUntil(async function(){await caches.keys().then(e=>e.filter(s=>s!==o)).then(e=>Promise.all(e.map(s=>caches.delete(s))))}())});const y=new URL(self.registration.scope).hostname;self.addEventListener("fetch",t=>{const{request:e,clientId:s}=t,r=new URL(e.url);if(r.hostname===y)return t.respondWith(async function(){const n=await caches.match(e);if(n&&h(r.pathname))return n;const f=e.headers.get("x-swr")&&(n==null?void 0:n.clone()),l=fetch(e).then(a=>{if(a.status>=400)return a;const u=a.clone();return caches.open(o).then(c=>c.put(e,u)).catch(console.error),f&&a.clone().arrayBuffer().then(async c=>{if(d(c,await f.arrayBuffer()))return;const i=await self.clients.get(s);i==null||i.postMessage({type:"SWR",version:o,path:r.pathname,buf:c},[c])}).catch(console.error),a});return n??l}())}); 2 | -------------------------------------------------------------------------------- /.github/workflows/main.yaml: -------------------------------------------------------------------------------- 1 | name: 'CI' 2 | on: 3 | pull_request: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | Release: 10 | if: | 11 | github.ref == 'refs/heads/main' && 12 | github.event.repository.fork == false 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v3 17 | 18 | - name: Setup pnpm 19 | uses: pnpm/action-setup@v2 20 | 21 | - name: Get pnpm store directory 22 | id: pnpm-cache 23 | run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT 24 | 25 | - name: Setup pnpm cache 26 | uses: actions/cache@v3 27 | with: 28 | path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} 29 | key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} 30 | restore-keys: ${{ runner.os }}-pnpm-store- 31 | 32 | - name: Install dependencies 33 | run: pnpm install 34 | 35 | - name: Build 🗜️ 36 | run: | 37 | pnpm run build 38 | git config --global user.email "noreply@github.com" 39 | git config --global user.name "CI" 40 | git add -A && git commit -m "🗜️ build [skip ci]" 41 | git push 42 | 43 | -------------------------------------------------------------------------------- /src/utils.ts: -------------------------------------------------------------------------------- 1 | export const EMPTY_DIV = document.createElement("div") 2 | 3 | export const parse = (s: string) => { 4 | const parser = new DOMParser() 5 | return parser.parseFromString(s, "text/html") 6 | } 7 | 8 | export const preload = (url: string, priority: "auto" | "low" = "low") => { 9 | // @ts-ignore 10 | fetch(url, { priority }).catch(console.info) 11 | } 12 | 13 | export const formatDate = (date: Date, format: string) => { 14 | return format.replaceAll(/[Ydmw]/g, $0 => { 15 | switch ($0) { 16 | case "Y": 17 | return String(date.getFullYear()) 18 | case "m": 19 | return ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][date.getMonth()] 20 | case "d": 21 | return String(date.getDate()) 22 | case "w": 23 | return ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][date.getDay()] 24 | default: 25 | return $0 26 | } 27 | }) 28 | } 29 | 30 | export const canPreload = (a: string, b: string) => { 31 | try { 32 | if (new URL(b).origin !== location.origin) return false 33 | } catch {} 34 | 35 | while (a.includes("//")) a = a.replace("//", "/") 36 | while (b.includes("//")) b = b.replace("//", "/") 37 | return a.replaceAll(/^\/|\/$/g, "") !== b.replaceAll(/^\/|\/$/g, "") 38 | } 39 | -------------------------------------------------------------------------------- /src/pages/Tags.tsx: -------------------------------------------------------------------------------- 1 | import { Post, Tag, usePosts, useTags, useTitle } from "../hooks" 2 | import { useParams } from "react-router-dom" 3 | import { formatDate } from "../utils" 4 | import { Layout } from "../components/Layout" 5 | import { Link } from "../components/Link" 6 | 7 | const TagLine = ({ tag }: { tag: Tag }) => { 8 | return ( 9 |

10 | {tag.name} 11 | {tag.count} 12 |

13 | ) 14 | } 15 | 16 | const PostLine = ({ post }: { post: Post }) => { 17 | return ( 18 |
19 | {post.title} 20 | 21 |
22 | ) 23 | } 24 | 25 | export const Tags = () => { 26 | const tags = useTags() 27 | const posts = usePosts() 28 | const params = useParams() 29 | useTitle(params.tag ? `Tag “${params.tag}”` : "Tags") 30 | 31 | return ( 32 | 33 | {params.tag && posts.length > 0 && <> 34 |

Tag “{params.tag}”:

35 | {posts.map((post, i) => )} 36 | } 37 | 38 | {!params.tag && tags.length > 0 && <> 39 |

Tags:

40 | {tags.map((tag, i) => )} 41 | } 42 |
43 | ) 44 | } 45 | -------------------------------------------------------------------------------- /src/components/InvertLightness.tsx: -------------------------------------------------------------------------------- 1 | export const InvertLightness = () => { 2 | return ( 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 22 | 23 | 24 | 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /src/prism.ts: -------------------------------------------------------------------------------- 1 | import { highlightAllUnder } from "prismjs" 2 | 3 | // Styles 4 | import "prismjs/plugins/line-highlight/prism-line-highlight.css" 5 | import "prism-themes/themes/prism-dracula.css" 6 | 7 | // Plugins 8 | import "prismjs/plugins/line-highlight/prism-line-highlight.min" 9 | 10 | // Components 11 | import "prismjs/components/prism-c.min" 12 | import "prismjs/components/prism-cpp.min" 13 | import "prismjs/components/prism-php.min" 14 | import "prismjs/components/prism-markup-templating.min" 15 | import "prismjs/components/prism-go.min" 16 | import "prismjs/components/prism-java.min" 17 | import "prismjs/components/prism-swift.min" 18 | import "prismjs/components/prism-python.min" 19 | import "prismjs/components/prism-javascript.min" 20 | import "prismjs/components/prism-lua.min" 21 | import "prismjs/components/prism-typescript.min" 22 | import "prismjs/components/prism-css.min" 23 | import "prismjs/components/prism-http.min" 24 | import "prismjs/components/prism-bash.min" 25 | import "prismjs/components/prism-markdown.min" 26 | import "prismjs/components/prism-json.min" 27 | import "prismjs/components/prism-yaml.min" 28 | import "prismjs/components/prism-jsx.min" 29 | import "prismjs/components/prism-tsx.min" 30 | import "prismjs/components/prism-cmake.min" 31 | import "prismjs/components/prism-docker.min" 32 | import "prismjs/components/prism-sql.min" 33 | import "prismjs/components/prism-shell-session.min" 34 | import "prismjs/components/prism-ini.min" 35 | import "prismjs/components/prism-haskell.min" 36 | import "prismjs/components/prism-ruby.min" 37 | import "prismjs/components/prism-rust.min" 38 | 39 | // eslint-disable-next-line unicorn/prefer-export-from 40 | export { highlightAllUnder } 41 | -------------------------------------------------------------------------------- /src/hooks/useLoading.ts: -------------------------------------------------------------------------------- 1 | import { useLocation } from "react-router-dom" 2 | import { useEffect, useRef, useState } from "preact/hooks" 3 | import NProgress from "nprogress" 4 | import { EMPTY_DIV, parse } from "../utils" 5 | import { packedSW } from "virtual:sw-plugin" 6 | 7 | interface SWRMessage { 8 | type: "SWR" 9 | path: string 10 | version: string 11 | buf: ArrayBuffer 12 | } 13 | 14 | export const useLoading = () => { 15 | const location = useLocation() 16 | const path = useRef(location.pathname) 17 | const [source, setSource] = useState(document.querySelector("main")!) 18 | 19 | useEffect(() => { 20 | NProgress.start() 21 | if (location.pathname === path.current) { 22 | // @ts-ignore 23 | fetch(location.pathname, { headers: { "x-swr": "1" }, priority: "high" }).catch(console.error) 24 | NProgress.done() 25 | return 26 | } else { 27 | setSource(EMPTY_DIV) 28 | path.current = location.pathname 29 | } 30 | 31 | fetch(location.pathname, { 32 | headers : { "x-swr": "1" }, 33 | // @ts-ignore 34 | priority: "high", 35 | }) 36 | .then(resp => resp.text()) 37 | .then(resp => parse(resp).querySelector("main")!) 38 | .then(setSource) 39 | .finally(() => NProgress.done()) 40 | }, [location]) 41 | 42 | useEffect(() => { 43 | const onMessage = ({ data }: MessageEvent) => { 44 | if (data.type !== "SWR") return 45 | if (!packedSW().some(({ version }) => version === data.version)) return 46 | if (data.path === location.pathname) { 47 | const resp = new TextDecoder().decode(data.buf) 48 | setSource(parse(resp).querySelector("main")!) 49 | } 50 | } 51 | 52 | navigator.serviceWorker?.addEventListener("message", onMessage) 53 | return () => navigator.serviceWorker?.removeEventListener("message", onMessage) 54 | }, [location]) 55 | 56 | return { path, source } 57 | } 58 | -------------------------------------------------------------------------------- /layouts/_default/rss.xml: -------------------------------------------------------------------------------- 1 | {{- $pctx := . -}} 2 | {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} 3 | {{- $pages := slice -}} 4 | {{- if or $.IsHome $.IsSection -}} 5 | {{- $pages = $pctx.RegularPages -}} 6 | {{- else -}} 7 | {{- $pages = $pctx.Pages -}} 8 | {{- end -}} 9 | {{- $limit := .Site.Config.Services.RSS.Limit -}} 10 | {{- if ge $limit 1 -}} 11 | {{- $pages = $pages | first $limit -}} 12 | {{- end -}} 13 | {{- printf "" | safeHTML }} 14 | 15 | 16 | {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} 17 | {{ .Permalink }} 18 | Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} 19 | {{ with .Site.LanguageCode }}{{.}}{{ end }} 20 | {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{ end }}{{ end }} 21 | {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{ end }}{{ end }} 22 | {{ with .Site.Copyright }}{{.}}{{ end }} 23 | {{ if not .Date.IsZero }}{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} 24 | {{ with .OutputFormats.Get "RSS" }}{{ printf "" .Permalink .MediaType | safeHTML }}{{ end }} 25 | {{ range (where $pages "Type" "!=" "section") }} 26 | 27 | {{ .Title }} 28 | {{ .Permalink }} 29 | {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} 30 | {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{ end }}{{ end }} 31 | {{ .Permalink }} 32 | {{ .Summary | html }} 33 | 34 | {{ end }} 35 | 36 | 37 | -------------------------------------------------------------------------------- /cmd.js: -------------------------------------------------------------------------------- 1 | import child_process from "node:child_process" 2 | import { readFileSync, writeFileSync } from "node:fs" 3 | import { dirname, resolve } from "node:path" 4 | import process from "node:process" 5 | import { fileURLToPath } from "node:url" 6 | 7 | const base = dirname(fileURLToPath(import.meta.url)) 8 | 9 | const extract = () => { 10 | const html = readFileSync("static/index.html", "utf8") 11 | return { 12 | scripts: [...html.matchAll(/\n`) 26 | } else { 27 | const { scripts, links } = extract() 28 | htm = htm.replaceAll(reLink, `\n${links.join("\n")}\n`) 29 | htm = htm.replaceAll(reScript, `\n${scripts.join("\n")}\n`) 30 | } 31 | 32 | writeFileSync("layouts/_default/baseof.html", htm) 33 | return () => { 34 | writeFileSync("layouts/_default/baseof.html", origin) 35 | } 36 | } 37 | 38 | switch (process.argv[2]) { 39 | case "dev": 40 | const restore = replaceBase(true) 41 | child_process.execSync("rm -rf dist") 42 | try { 43 | child_process.execSync("hugo -d themes/hugo-theme-lavias/dist --config config.yaml,themes/hugo-theme-lavias/hugo.dev.yaml", { 44 | cwd: resolve(base, "../../"), 45 | }) 46 | } finally { 47 | restore() 48 | } 49 | child_process.spawnSync("pnpm", ["exec", "vite", "dev", "dist", "--config", resolve(base, "vite.config.js")], { 50 | stdio: "inherit", 51 | }) 52 | break 53 | 54 | case "build": 55 | child_process.execSync("rm -rf static/assets static/index.html") 56 | child_process.spawnSync("pnpm", ["exec", "vite", "build", "src", "--config", resolve(base, "vite.config.js")], { 57 | stdio: "inherit", 58 | }) 59 | 60 | replaceBase() 61 | child_process.execSync("rm -rf static/index.html") 62 | break 63 | } 64 | -------------------------------------------------------------------------------- /src/main.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | body { 6 | @apply dark:bg-slate-900; 7 | } 8 | 9 | body > main { 10 | @apply hidden; 11 | } 12 | 13 | #nprogress .bar { 14 | @apply bg-accent-400 !important; 15 | } 16 | 17 | #nprogress .peg { 18 | box-shadow: 0 0 10px theme(colors.accent.400), 0 0 5px theme(colors.accent.400) !important; 19 | } 20 | 21 | #nprogress .spinner { 22 | @apply hidden !important; 23 | } 24 | 25 | .markdown-content { 26 | @apply text-slate-700 dark:text-slate-300; 27 | 28 | --md-accent-400: theme(colors.accent.400); 29 | --md-accent-500: theme(colors.accent.500); 30 | --md-accent-600: theme(colors.accent.600); 31 | 32 | --md-slate-50: theme(colors.slate.50); 33 | --md-slate-100: theme(colors.slate.100); 34 | --md-slate-200: theme(colors.slate.200); 35 | --md-slate-300: theme(colors.slate.300); 36 | --md-slate-500: theme(colors.slate.500); 37 | --md-slate-600: theme(colors.slate.600); 38 | --md-slate-700: theme(colors.slate.700); 39 | --md-slate-800: theme(colors.slate.800); 40 | } 41 | 42 | /* Markdown headers */ 43 | .markdown-content :is(h1, h2, h3, h4, h5, h6) { 44 | @apply relative text-slate-800 dark:text-slate-200; 45 | } 46 | 47 | .markdown-content :is(h2, h3, h4, h5, h6)::before { 48 | content: ""; 49 | width: 1em; 50 | 51 | @apply absolute left-px bottom-0 border-t-2 border-dashed border-slate-600 dark:border-slate-400; 52 | } 53 | 54 | .markdown-content h1:hover + span { 55 | opacity: 1; 56 | } 57 | 58 | .markdown-content h2::before { 59 | @apply border-accent-600 dark:border-accent-400; 60 | } 61 | 62 | /* Markdown image */ 63 | :root.dark .markdown-content img.inv { 64 | filter: url("#invertLightness"); 65 | } 66 | 67 | :root.dark .markdown-content img.bri { 68 | filter: brightness(0.8); 69 | } 70 | 71 | /* Markdown table */ 72 | :root.dark .markdown-content table tr:nth-child(2n) { 73 | background: transparent; 74 | } 75 | 76 | /* KaTeX */ 77 | .katex-display .katex-html { 78 | overflow: auto hidden; 79 | } 80 | 81 | /* Custom scrollbar */ 82 | :root { 83 | scrollbar-color: theme(colors.accent.400) transparent; 84 | } 85 | 86 | ::-webkit-scrollbar { 87 | @apply w-1.5 h-1.5; 88 | } 89 | 90 | ::-webkit-scrollbar-thumb { 91 | @apply bg-accent-400 rounded; 92 | } 93 | 94 | @media (pointer: fine) { 95 | ::-webkit-scrollbar { 96 | @apply w-2 h-2; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /static/assets/prism-ee349629.css: -------------------------------------------------------------------------------- 1 | pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}@media print{.line-highlight{-webkit-print-color-adjust:exact;color-adjust:exact}}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:#997a6666;color:#f5f2f0;font:700 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px #fff}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[id].linkable-line-numbers span.line-numbers-rows{pointer-events:all}pre[id].linkable-line-numbers span.line-numbers-rows>span:before{cursor:pointer}pre[id].linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:#80808033}code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:none;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#282a36}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#6272a4}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.property,.token.tag,.token.constant,.token.symbol,.token.deleted{color:#ff79c6}.token.boolean,.token.number{color:#bd93f9}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#50fa7b}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.function,.token.class-name{color:#f1fa8c}.token.keyword{color:#8be9fd}.token.regex,.token.important{color:#ffb86c}.token.important,.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help} 2 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | {{ template "_internal/opengraph.html" . }} 14 | {{ template "_internal/twitter_cards.html" . }} 15 | 16 | 17 | {{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | {{ with .OutputFormats.Get "RSS" }} 33 | {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} 34 | {{ end }} 35 | 36 | 37 | 38 |
39 | {{ partial "header.html" . }} 40 | {{ block "content" . }}{{ end }} 41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | {{ if not .Site.IsServer }} 52 | {{ with .Site.GoogleAnalytics }} 53 | 54 | 60 | {{ end }} 61 | {{ end }} 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/pages/Home.tsx: -------------------------------------------------------------------------------- 1 | import { Layout } from "../components/Layout" 2 | import { formatDate, preload } from "../utils" 3 | import { Post, type Sakura, usePosts, useSakura, useTitle } from "../hooks" 4 | import { useEffect, useRef } from "preact/hooks" 5 | import { Link } from "react-router-dom" 6 | 7 | const preloadQueue = new Set() 8 | const preloadSucceeded = new Set() 9 | 10 | const Line = ({ post, sakura }: { post: Post, sakura: Sakura }) => { 11 | const refArticle = useRef(null) 12 | 13 | // Preload on background when mouse is entering 14 | useEffect(() => { 15 | const el = refArticle.current! 16 | const onMouseEnter = () => { 17 | sakura.start(refArticle) 18 | if (preloadQueue.has(post.link) || preloadSucceeded.has(post.link)) 19 | return 20 | 21 | preloadQueue.add(post.link) 22 | fetch(post.link) 23 | .then(() => preloadSucceeded.add(post.link)) 24 | .finally(() => preloadQueue.delete(post.link)) 25 | } 26 | const onMouseLeave = () => sakura.stop() 27 | 28 | el.addEventListener("mouseenter", onMouseEnter) 29 | el.addEventListener("mouseleave", onMouseLeave) 30 | return () => { 31 | el.removeEventListener("mouseenter", onMouseEnter) 32 | el.removeEventListener("mouseleave", onMouseLeave) 33 | } 34 | }, [post.link, sakura]) 35 | 36 | return ( 37 |
38 | 39 | {post.title} 40 | 43 | {post.summary} 44 |
45 | ) 46 | } 47 | 48 | export const Home = () => { 49 | const refCanvas = useRef(null) 50 | 51 | const posts = usePosts() 52 | const sakura = useSakura({ canvas: refCanvas }) 53 | useTitle(document.querySelector("title")?.dataset?.site) 54 | 55 | useEffect(() => { 56 | posts.length > 0 && preload(posts[0].link, "auto") 57 | posts.length > 1 && preload(posts[1].link, "auto") 58 | }, [posts]) 59 | 60 | return ( 61 | 62 | 63 | {posts.length > 0 && <> 64 |

My posts:

65 | {posts.map((post, i) => )} 66 | } 67 |
68 | ) 69 | } 70 | -------------------------------------------------------------------------------- /src/serviceWorker.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | export type {} 4 | declare const self: ServiceWorkerGlobalScope 5 | const SW_VERSION = "%SW_VERSION%" 6 | 7 | // @ts-ignore 8 | const isDev = () => SW_VERSION === "dev" 9 | const cachedOnlyOnce = (path: string) => { 10 | const file = path.split("/").pop() ?? "" 11 | 12 | // favicon.ico / manifest.json 13 | if (["favicon.ico", "manifest.json"].includes(file)) { 14 | return true 15 | } 16 | 17 | // [name].[hash].[js,json,css] 18 | if (/.+\.[\da-z]{8}\.(js|json|css)$/.test(file)) { 19 | return true 20 | } 21 | 22 | // *-[w]x[h].png at root path 23 | if (/^\/?[^/]+-\d+x\d+\.png$/.test(path)) { 24 | return true 25 | } 26 | 27 | return false 28 | } 29 | const buffEqual = (a: ArrayBuffer, b: ArrayBuffer) => { 30 | if (a.byteLength !== b.byteLength) return false 31 | 32 | const dv1 = new Int8Array(a) 33 | const dv2 = new Int8Array(b) 34 | for (let i = 0; i < a.byteLength; i++) { 35 | if (dv1[i] !== dv2[i]) return false 36 | } 37 | return true 38 | } 39 | 40 | self.addEventListener("install", (event: ExtendableEvent) => { 41 | event.waitUntil(self.skipWaiting()) 42 | }) 43 | 44 | self.addEventListener("activate", (event: ExtendableEvent) => { 45 | event.waitUntil(async function() { 46 | // await self.clients.claim() 47 | await caches.keys() 48 | .then(keys => keys.filter(key => key !== SW_VERSION)) 49 | .then(keys => Promise.all(keys.map(key => caches.delete(key)))) 50 | }()) 51 | }) 52 | 53 | const hostname = new URL(self.registration.scope).hostname 54 | 55 | self.addEventListener("fetch", (event: FetchEvent) => { 56 | if (isDev()) { 57 | return 58 | } 59 | 60 | const { request, clientId } = event 61 | const url = new URL(request.url) 62 | if (url.hostname !== hostname) { 63 | return 64 | } 65 | 66 | return event.respondWith(async function() { 67 | const cached = await caches.match(request) 68 | if (cached && cachedOnlyOnce(url.pathname)) { 69 | return cached 70 | } 71 | 72 | const swr = request.headers.get("x-swr") && cached?.clone() 73 | const fresh = fetch(request).then(resp => { 74 | if (resp.status >= 400) 75 | return resp 76 | 77 | // Put a copy of the response into the cache. 78 | const _resp = resp.clone() 79 | caches.open(SW_VERSION).then(cache => cache.put(request, _resp)).catch(console.error) 80 | 81 | // If the response is an SWR response, send it to the client. 82 | if (swr) 83 | resp.clone().arrayBuffer() 84 | .then(async (buf: ArrayBuffer) => { 85 | if (buffEqual(buf, await swr.arrayBuffer())) return 86 | const client = await self.clients.get(clientId) 87 | client?.postMessage({ type: "SWR", version: SW_VERSION, path: url.pathname, buf }, [buf]) 88 | }) 89 | .catch(console.error) 90 | 91 | return resp 92 | }) 93 | return cached ?? fresh 94 | }()) 95 | }) 96 | -------------------------------------------------------------------------------- /src/pages/Post.tsx: -------------------------------------------------------------------------------- 1 | import { usePost, useTitle } from "../hooks" 2 | import { Layout } from "../components/Layout" 3 | import { useEffect, useRef } from "preact/hooks" 4 | import { formatDate } from "../utils" 5 | import { useContext } from "preact/compat" 6 | import { AppContext } from "../providers/AppProvider" 7 | import { InvertLightness } from "../components/InvertLightness" 8 | import { useCount } from "../hooks/useCount" 9 | 10 | export const Post = () => { 11 | const post = usePost() 12 | const refContent = useRef(null) 13 | useTitle(post?.title) 14 | 15 | useEffect(() => { 16 | const highlight = (content: HTMLDivElement) => { 17 | const langAlias: { [key: string]: string } = { pgsql: "sql", shell: "bash", golang: "go" } 18 | 19 | for (const el of content.querySelectorAll("pre>code")) { 20 | if (!el.className.startsWith("language-")) { 21 | el.className = "language-plaintext" 22 | continue 23 | } 24 | 25 | // Line highlighting 26 | const regex = /(lang(?:uage)?-.+){([\d,-]+)}/ 27 | const lines = regex.exec(el.className) 28 | if (lines) { 29 | (el.parentNode as HTMLPreElement).dataset.line = lines[2] 30 | el.className = el.className.replace(regex, "$1") 31 | } 32 | 33 | const lang = el.className.slice(9) 34 | if (lang in langAlias) { 35 | el.className = `language-${langAlias[lang]}` 36 | } 37 | } 38 | 39 | void import("../prism").then(({ highlightAllUnder }) => { 40 | refContent.current && highlightAllUnder(refContent.current) 41 | }) 42 | } 43 | 44 | if (post && refContent.current) { 45 | highlight(refContent.current) 46 | } 47 | }, [post]) 48 | 49 | useEffect(() => { 50 | const renderMath = async (content: HTMLDivElement) => { 51 | import("katex/dist/katex.min.css") 52 | 53 | return (await import("katex/contrib/auto-render")).default(content, { 54 | output : "html", 55 | delimiters: [ 56 | { left: "$$", right: "$$", display: true }, 57 | { left: "$", right: "$", display: false }, 58 | ], 59 | throwOnError: false, 60 | }) 61 | } 62 | 63 | if (post && refContent.current) { 64 | renderMath(refContent.current).catch(console.error) 65 | } 66 | }, [post]) 67 | 68 | const count = useCount(post?.id) 69 | const { dark } = useContext(AppContext) 70 | return ( 71 | 72 | 73 | {post && <> 74 |

{post.title}

75 | 77 | {post.date ? : <>} 78 | {count ? {post.date ? " · " : ""}{count.page} view : <>} 79 | 80 |
81 | } 82 |
83 | ) 84 | } 85 | -------------------------------------------------------------------------------- /src/hooks/useSakura.ts: -------------------------------------------------------------------------------- 1 | import { Ref, useCallback, useEffect, useMemo, useRef } from "preact/hooks" 2 | import petal from "../assets/sakura.png" 3 | 4 | const limit = (n: number) => Math.min(0.1, Math.max(0.05, n)) 5 | 6 | export interface Sakura { 7 | start: (target: Ref) => void 8 | stop: () => void 9 | } 10 | 11 | interface Props { 12 | canvas: Ref 13 | } 14 | 15 | export const useSakura = ({ canvas }: Props): Sakura => { 16 | const percentX = useRef(0) 17 | const percentY = useRef(0) 18 | useEffect(() => { 19 | const onMouseMove = (e: MouseEvent) => { 20 | const { top, bottom, left, right, width, height } = canvas.current!.getBoundingClientRect() 21 | if (e.clientX < left || e.clientX > right || e.clientY < top || e.clientY > bottom) return 22 | 23 | percentX.current = (e.clientX - left) / width 24 | percentY.current = (e.clientY - top) / height 25 | } 26 | 27 | window.addEventListener("mousemove", onMouseMove) 28 | window.addEventListener("scroll", overlay) 29 | return () => { 30 | window.removeEventListener("mousemove", onMouseMove) 31 | window.removeEventListener("scroll", overlay) 32 | } 33 | }, [canvas]) 34 | 35 | const image = useMemo(() => 36 | Object.assign(new Image(), { src: petal }) 37 | , []) 38 | const blossom = useMemo(() => { 39 | const rotate = Math.random() 40 | return Array.from({ length: 10 }).map(() => ({ 41 | x : Math.random(), 42 | y : Math.random(), 43 | w : Math.random() * 10 + 5, 44 | h : Math.random() * 10 + 10, 45 | cos : Math.cos(rotate), 46 | sin : Math.sin(rotate), 47 | speedX : Math.random() * 0.01 + 0.02, 48 | speedY : Math.random() * 0.01 + 0.02, 49 | opacity: Math.random(), 50 | })) 51 | }, []) 52 | 53 | const target = useRef() 54 | const draw = useCallback(() => { 55 | if (!target.current || !canvas.current) return 56 | const { width, height } = canvas.current 57 | 58 | const ctx = canvas.current.getContext("2d")! 59 | ctx.clearRect(0, 0, width, height) 60 | 61 | for (const b of blossom) { 62 | if (b.x > 1) { 63 | b.x = 0 64 | } else if (b.x < 0) { 65 | b.x = 1 66 | } 67 | if (b.y > 1 || b.y < 0) { 68 | b.y = 0 69 | } 70 | 71 | if (percentX.current > 0.5) { 72 | b.x += b.speedX * limit(percentX.current - 0.5) 73 | } else { 74 | b.x -= b.speedX * limit(0.5 - percentX.current) 75 | } 76 | b.y += b.speedY * limit(percentY.current) 77 | 78 | ctx.globalAlpha = b.opacity 79 | ctx.setTransform(b.cos, b.sin, -b.sin, b.cos, b.x * width, b.y * height) 80 | ctx.drawImage(image, 0, 0, b.w, b.h) 81 | ctx.setTransform(1, 0, 0, 1, 0, 0) 82 | } 83 | requestAnimationFrame(draw) 84 | }, []) 85 | 86 | const start = (ref: Ref) => { 87 | void new Promise(reslove => { 88 | if (image.complete) reslove() 89 | // eslint-disable-next-line unicorn/prefer-add-event-listener 90 | else image.onload = () => reslove() 91 | }).then(() => { 92 | if (target.current) return 93 | target.current = ref.current 94 | 95 | overlay() 96 | draw() 97 | }) 98 | } 99 | 100 | const stop = () => { 101 | canvas.current!.style.display = "none" 102 | target.current = null 103 | } 104 | 105 | const overlay = () => { 106 | if (!target.current) return 107 | const rect = target.current.getBoundingClientRect() 108 | 109 | const el = canvas.current! 110 | el.width = rect.width 111 | el.height = rect.height 112 | el.style.top = `${rect.top}px` 113 | el.style.left = `${rect.left}px` 114 | el.style.display = "block" 115 | } 116 | 117 | return { 118 | start, 119 | stop, 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /static/assets/index-e06afd35.css: -------------------------------------------------------------------------------- 1 | *,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0px}.top-0{top:0px}.z-10{z-index:10}.my-12{margin-top:3rem;margin-bottom:3rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mt-10{margin-top:2.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.w-11\/12{width:91.666667%}.w-full{width:100%}.max-w-3xl{max-width:48rem}.list-none{list-style-type:none}.items-center{align-items:center}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.p-1{padding:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.text-accent-600{--tw-text-opacity: 1;color:rgb(219 39 119 / var(--tw-text-opacity))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:is(.dark body){--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}body>main{display:none}#nprogress .bar{--tw-bg-opacity: 1 !important;background-color:rgb(244 114 182 / var(--tw-bg-opacity))!important}#nprogress .peg{box-shadow:0 0 10px #f472b6,0 0 5px #f472b6!important}#nprogress .spinner{display:none!important}.markdown-content{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}:is(.dark .markdown-content){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}.markdown-content{--md-accent-400: #f472b6;--md-accent-500: #ec4899;--md-accent-600: #db2777;--md-slate-50: #f8fafc;--md-slate-100: #f1f5f9;--md-slate-200: #e2e8f0;--md-slate-300: #cbd5e1;--md-slate-500: #64748b;--md-slate-600: #475569;--md-slate-700: #334155;--md-slate-800: #1e293b}.markdown-content :is(h1,h2,h3,h4,h5,h6){position:relative;--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity))}:is(.dark .markdown-content :is(h1,h2,h3,h4,h5,h6)){--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}.markdown-content :is(h2,h3,h4,h5,h6):before{content:"";width:1em;position:absolute;left:1px;bottom:0px;border-top-width:2px;border-style:dashed;--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity))}:is(.dark .markdown-content :is(h2,h3,h4,h5,h6)):before{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity))}.markdown-content h1:hover+span{opacity:1}.markdown-content h2:before{--tw-border-opacity: 1;border-color:rgb(219 39 119 / var(--tw-border-opacity))}:is(.dark .markdown-content h2):before{--tw-border-opacity: 1;border-color:rgb(244 114 182 / var(--tw-border-opacity))}:root.dark .markdown-content img.inv{filter:url(#invertLightness)}:root.dark .markdown-content img.bri{filter:brightness(.8)}:root.dark .markdown-content table tr:nth-child(2n){background:transparent}.katex-display .katex-html{overflow:auto hidden}:root{scrollbar-color:#f472b6 transparent}::-webkit-scrollbar{height:.375rem;width:.375rem}::-webkit-scrollbar-thumb{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(244 114 182 / var(--tw-bg-opacity))}@media (pointer: fine){::-webkit-scrollbar{height:.5rem;width:.5rem}}.hover\:bg-accent-100:hover{--tw-bg-opacity: 1;background-color:rgb(252 231 243 / var(--tw-bg-opacity))}.hover\:underline:hover{text-decoration-line:underline}:is(.dark .dark\:text-accent-400){--tw-text-opacity: 1;color:rgb(244 114 182 / var(--tw-text-opacity))}:is(.dark .dark\:text-slate-200){--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}:is(.dark .dark\:text-slate-300){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}:is(.dark .dark\:text-slate-400){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:bg-slate-700:hover){--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity))}@media (min-width: 640px){.sm\:pb-8{padding-bottom:2rem}}.markdown-content{overflow:hidden}.markdown-content a{color:var(--md-accent-600);text-decoration:none;text-underline-offset:4px}.markdown-content a:hover{text-decoration:underline}.markdown-content p{line-height:1.8rem;margin:1rem 0}.markdown-content ol,.markdown-content ul{margin-bottom:1rem;margin-top:1rem;padding-left:1.25rem;line-height:1.8rem}.markdown-content ol{list-style-type:decimal}.markdown-content ul{list-style-type:disc}.markdown-content ul li{margin-top:.25rem}.markdown-content ul li p{margin-bottom:.5rem;margin-top:0}.markdown-content ul ul{margin:0;list-style:circle}.markdown-content img{display:block;max-width:100%}.markdown-content img[align=left]{float:left;margin-right:1rem}.markdown-content img[align=right]{float:right;margin-left:1rem}.markdown-content img[align=center]{margin-left:auto;margin-right:auto}.markdown-content img+pre{margin-top:1rem}.markdown-content h1,.markdown-content h2,.markdown-content h3,.markdown-content h4,.markdown-content h5,.markdown-content h6{font-weight:600;letter-spacing:.02rem;margin-bottom:1rem;position:relative}.markdown-content h1{font-size:2.2rem;margin-bottom:3rem;margin-top:1.25rem}.markdown-content h2{padding-bottom:.25rem;font-size:1.65rem;margin-top:2.5rem}.markdown-content h3{font-size:1.35rem;margin-top:2rem}.markdown-content h4{font-size:1rem;margin-top:2rem}.markdown-content h5{font-size:.875rem}.markdown-content h6{font-size:.85rem}.markdown-content table{border-collapse:collapse;margin:1rem 0;max-width:100%}.markdown-content table td,.markdown-content table th,.markdown-content table tr{border:1px solid var(--md-slate-200);padding:.375rem .875rem}.markdown-content table th{font-weight:500}.markdown-content table th:empty{display:none}.markdown-content table tr:nth-child(2n){background:var(--md-slate-50)}.markdown-content code{color:var(--md-slate-600);background:var(--md-slate-100);font-size:.85rem;border-radius:3px;padding:.2em .4em}.markdown-content pre{cursor:text;overflow-x:auto;font-size:.85rem}.markdown-content pre code{color:inherit;background:inherit;display:inline-block;font-size:inherit;-moz-tab-size:2;-o-tab-size:2;tab-size:2}.markdown-content pre+img{margin-top:1rem}.markdown-content .line-highlight{transform:translateY(2.5px)}.markdown-content .line-highlight:before,.markdown-content .line-highlight[data-end]:after{content:none}.markdown-content hr{background:var(--md-slate-200);border:0;height:.25em;margin:24px 0;overflow:hidden;padding:0}.markdown-content hr:after,.markdown-content hr:before{clear:both;content:"";display:table}.markdown-content strong{font-weight:500}.markdown-content blockquote{color:var(--md-slate-600);background:var(--md-slate-50);position:relative;margin:1rem 0;padding:1.2rem 55px;border-left:8px solid var(--md-accent-500)}.markdown-content blockquote:before{content:"“";font-family:Arial,serif;color:var(--md-accent-500);font-size:4rem;position:absolute;top:0;left:15px}.markdown-content blockquote p{margin:0}.markdown-content blockquote code{background:var(--md-slate-200)}.markdown-content figcaption{color:var(--md-slate-400);font-size:.75rem;line-height:1rem;text-align:center;margin-top:.5rem;margin-bottom:.5rem}.markdown-content-dark a{color:var(--md-accent-400)}.markdown-content-dark code{color:var(--md-slate-300);background:var(--md-slate-700)}.markdown-content-dark pre code{color:inherit;background:inherit}.markdown-content-dark blockquote{color:var(--md-slate-300);background:var(--md-slate-800);border-left-color:var(--md-accent-400)}.markdown-content-dark blockquote:before{color:var(--md-accent-400)}.markdown-content-dark blockquote code{background:var(--md-slate-600)}.markdown-content-dark figcaption{color:var(--md-slate-500)}#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0px;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}} 2 | -------------------------------------------------------------------------------- /static/assets/katex.min-088067ce.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-0cdd387c.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-30da91e8.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-68534840.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-de7701e4.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-1ae6bd74.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-07d8e303.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-5d53e70a.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-3398dd02.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-ed0b7437.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-74444efd.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-9be7ceb8.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-9163df9c.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-51814d27.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-5e28753b.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-1e6f9579.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-0f60d1b8.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-c76c5d69.woff) format("woff"),url(/assets/KaTeX_Main-Bold-138ac28d.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-99cd42a3.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-a6f7ec0d.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-70ee1f64.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-97479ca6.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-f1d6ef86.woff) format("woff"),url(/assets/KaTeX_Main-Italic-0d85ae7c.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-c2342cd8.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-c6368d87.woff) format("woff"),url(/assets/KaTeX_Main-Regular-d0332f52.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-dc47344d.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-850c0af5.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-f9377ab0.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-7af58c5e.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-8a8d2445.woff) format("woff"),url(/assets/KaTeX_Math-Italic-08ce98e5.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-e99ae511.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-ece03cfd.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-1ece03f7.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-00b26ac8.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-91ee6750.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-3931dd81.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-68e8c73e.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-11e4dc8a.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-f36ea897.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-036d4e95.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-d96cdf2b.woff) format("woff"),url(/assets/KaTeX_Script-Regular-1c67f068.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-6b47c401.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-c943cc98.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-95b6d2f1.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-d04c5421.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-2014c523.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-a6b2099f.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,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) format("woff2"),url(/assets/KaTeX_Size3-Regular-6ab6b62e.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-500e04d5.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-a4af7d41.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-99f9c675.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-c647367d.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-71d517d6.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-e14fed02.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-f01f3e87.ttf) format("truetype")}.katex{text-rendering:auto;font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.7"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo} 2 | -------------------------------------------------------------------------------- /static/assets/index-1530c880.js: -------------------------------------------------------------------------------- 1 | (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const vr="modulepreload",gr=function(e){return"/"+e},Tt={},ae=function(t,n,r){if(!n||n.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(n.map(i=>{if(i=gr(i),i in Tt)return;Tt[i]=!0;const s=i.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!r)for(let a=o.length-1;a>=0;a--){const p=o[a];if(p.href===i&&(!s||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${l}`))return;const f=document.createElement("link");if(f.rel=s?"stylesheet":vr,s||(f.as="script",f.crossOrigin=""),f.href=i,document.head.appendChild(f),s)return new Promise((a,p)=>{f.addEventListener("load",a),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())};var Ne,b,xn,ne,It,wn,ft,Sn,De={},kn=[],yr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,qe=Array.isArray;function q(e,t){for(var n in t)e[n]=t[n];return e}function Cn(e){var t=e.parentNode;t&&t.removeChild(e)}function P(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Ne.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return ye(e,s,r,o,null)}function ye(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++xn};return o==null&&b.vnode!=null&&b.vnode(i),i}function En(){return{current:null}}function U(e){return e.children}function j(e,t){this.props=e,this.context=t}function be(e,t){if(t==null)return e.__?be(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&ne.sort(ft));We.__r=0}function Pn(e,t,n,r,o,i,s,l,c,f){var a,p,m,h,u,d,_,g=r&&r.__k||kn,y=g.length;for(n.__k=[],a=0;a0?ye(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)!=null){if(h.__=n,h.__b=n.__b+1,(m=g[a])===null||m&&h.key==m.key&&h.type===m.type)g[a]=void 0;else for(p=0;p=0;t--)if((n=e.__k[t])&&(r=On(n)))return r}return null}function br(e,t,n,r,o){var i;for(i in n)i==="children"||i==="key"||i in t||je(e,i,null,n[i],r);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||n[i]===t[i]||je(e,i,t[i],n[i],r)}function Ut(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||yr.test(t)?n:n+"px"}function je(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Ut(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Ut(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?Bt:$t,i):e.removeEventListener(t,i?Bt:$t,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function $t(e){return this.l[e.type+!1](b.event?b.event(e):e)}function Bt(e){return this.l[e.type+!0](b.event?b.event(e):e)}function xt(e,t,n,r,o,i,s,l,c){var f,a,p,m,h,u,d,_,g,y,w,x,N,E,S,M=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,l=t.__e=n.__e,t.__h=null,i=[l]),(f=b.__b)&&f(t);try{e:if(typeof M=="function"){if(_=t.props,g=(f=M.contextType)&&r[f.__c],y=f?g?g.props.value:f.__:r,n.__c?d=(a=t.__c=n.__c).__=a.__E:("prototype"in M&&M.prototype.render?t.__c=a=new M(_,y):(t.__c=a=new j(_,y),a.constructor=M,a.render=wr),g&&g.sub(a),a.props=_,a.state||(a.state={}),a.context=y,a.__n=r,p=a.__d=!0,a.__h=[],a._sb=[]),a.__s==null&&(a.__s=a.state),M.getDerivedStateFromProps!=null&&(a.__s==a.state&&(a.__s=q({},a.__s)),q(a.__s,M.getDerivedStateFromProps(_,a.__s))),m=a.props,h=a.state,a.__v=t,p)M.getDerivedStateFromProps==null&&a.componentWillMount!=null&&a.componentWillMount(),a.componentDidMount!=null&&a.__h.push(a.componentDidMount);else{if(M.getDerivedStateFromProps==null&&_!==m&&a.componentWillReceiveProps!=null&&a.componentWillReceiveProps(_,y),!a.__e&&a.shouldComponentUpdate!=null&&a.shouldComponentUpdate(_,a.__s,y)===!1||t.__v===n.__v){for(t.__v!==n.__v&&(a.props=_,a.state=a.__s,a.__d=!1),a.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(Oe){Oe&&(Oe.__=t)}),w=0;w2&&(l.children=arguments.length>3?Ne.call(arguments,2):n),ye(e.type,l,r||e.key,o||e.ref,null)}function Z(e,t){var n={__c:t="__cC"+Sn++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(l){l.__e=!0,dt(l)})},this.sub=function(s){o.push(s);var l=s.componentWillUnmount;s.componentWillUnmount=function(){o.splice(o.indexOf(s),1),l&&l.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Ne=kn.slice,b={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(l){e=l}throw e}},xn=0,j.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=q({},this.state),typeof e=="function"&&(e=e(q({},n),this.props)),e&&q(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),dt(this))},j.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),dt(this))},j.prototype.render=U,ne=[],wn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ft=function(e,t){return e.__v.__b-t.__v.__b},We.__r=0,Sn=0;var oe,R,nt,Dt,ce=0,Un=[],Ae=[],Wt=b.__b,jt=b.__r,zt=b.diffed,Vt=b.__c,Ht=b.unmount;function de(e,t){b.__h&&b.__h(R,e,ce||t),ce=0;var n=R.__H||(R.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Ae}),n.__[e]}function W(e){return ce=1,$n(Bn,e)}function $n(e,t,n){var r=de(oe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Bn(void 0,t),function(l){var c=r.__N?r.__N[0]:r.__[0],f=r.t(c,l);c!==f&&(r.__N=[f,r.__[1]],r.__c.setState({}))}],r.__c=R,!R.u)){var o=function(l,c,f){if(!r.__c.__H)return!0;var a=r.__c.__H.__.filter(function(m){return m.__c});if(a.every(function(m){return!m.__N}))return!i||i.call(this,l,c,f);var p=!1;return a.forEach(function(m){if(m.__N){var h=m.__[0];m.__=m.__N,m.__N=void 0,h!==m.__[0]&&(p=!0)}}),!(!p&&r.__c.props===l)&&(!i||i.call(this,l,c,f))};R.u=!0;var i=R.shouldComponentUpdate,s=R.componentWillUpdate;R.componentWillUpdate=function(l,c,f){if(this.__e){var a=i;i=void 0,o(l,c,f),i=a}s&&s.call(this,l,c,f)},R.shouldComponentUpdate=o}return r.__N||r.__}function O(e,t){var n=de(oe++,3);!b.__s&&wt(n.__H,t)&&(n.__=e,n.i=t,R.__H.__h.push(n))}function he(e,t){var n=de(oe++,4);!b.__s&&wt(n.__H,t)&&(n.__=e,n.i=t,R.__h.push(n))}function z(e){return ce=5,X(function(){return{current:e}},[])}function kr(e,t,n){ce=6,he(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function X(e,t){var n=de(oe++,7);return wt(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Pe(e,t){return ce=8,X(function(){return e},t)}function L(e){var t=R.context[e.__c],n=de(oe++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(R)),t.props.value):e.__}function Cr(e,t){b.useDebugValue&&b.useDebugValue(t?t(e):e)}function Er(){var e=de(oe++,11);if(!e.__){for(var t=R.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Nr(){for(var e;e=Un.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Te),e.__H.__h.forEach(ht),e.__H.__h=[]}catch(t){e.__H.__h=[],b.__e(t,e.__v)}}b.__b=function(e){R=null,Wt&&Wt(e)},b.__r=function(e){jt&&jt(e),oe=0;var t=(R=e.__c).__H;t&&(nt===R?(t.__h=[],R.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Ae,n.__N=n.i=void 0})):(t.__h.forEach(Te),t.__h.forEach(ht),t.__h=[])),nt=R},b.diffed=function(e){zt&&zt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Un.push(t)!==1&&Dt===b.requestAnimationFrame||((Dt=b.requestAnimationFrame)||Pr)(Nr)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Ae&&(n.__=n.__V),n.i=void 0,n.__V=Ae})),nt=R=null},b.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Te),n.__h=n.__h.filter(function(r){return!r.__||ht(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],b.__e(r,n.__v)}}),Vt&&Vt(e,t)},b.unmount=function(e){Ht&&Ht(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Te(r)}catch(o){t=o}}),n.__H=void 0,t&&b.__e(t,n.__v))};var Ft=typeof requestAnimationFrame=="function";function Pr(e){var t,n=function(){clearTimeout(r),Ft&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Ft&&(t=requestAnimationFrame(n))}function Te(e){var t=R,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),R=t}function ht(e){var t=R;e.__c=e.__(),R=t}function wt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Bn(e,t){return typeof t=="function"?t(e):t}function Dn(e,t){for(var n in t)e[n]=t[n];return e}function pt(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function rt(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function _t(e){this.props=e}function Rr(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:pt(this.props,o)}function r(o){return this.shouldComponentUpdate=n,P(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(_t.prototype=new j).isPureReactComponent=!0,_t.prototype.shouldComponentUpdate=function(e,t){return pt(this.props,e)||pt(this.state,t)};var qt=b.__b;b.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),qt&&qt(e)};var Lr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function St(e){function t(n){var r=Dn({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Lr,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Jt=function(e,t){return e==null?null:J(J(e).map(t))},Wn={map:Jt,forEach:Jt,count:function(e){return e?J(e).length:0},only:function(e){var t=J(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:J},Or=b.__e;b.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}Or(e,t,n,r)};var Yt=b.unmount;function jn(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Dn({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return jn(r,t,n)})),e}function zn(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return zn(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Ie(){this.__u=0,this.t=null,this.__b=null}function Vn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Mr(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return P(n,i)}return o.displayName="Lazy",o.__f=!0,o}function ge(){this.u=null,this.o=null}b.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Yt&&Yt(e)},(Ie.prototype=new j).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=Vn(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(l):l())};n.__R=s;var l=function(){if(!--r.__u){if(r.state.__a){var f=r.state.__a;r.__v.__k[0]=zn(f,f.__c.__P,f.__c.__O)}var a;for(r.setState({__a:r.__b=null});a=r.t.pop();)a.forceUpdate()}},c=t.__h===!0;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Ie.prototype.componentWillUnmount=function(){this.t=[]},Ie.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=jn(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&P(U,null,e.fallback);return o&&(o.__h=null),[P(U,null,t.__a?null:e.children),o]};var Gt=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(r)}}),le(P(Ar,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ir(e,t){var n=P(Tr,{__v:e,i:t});return n.containerInfo=t,n}(ge.prototype=new j).__a=function(e){var t=this,n=Vn(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Gt(t,e,r)):o()};n?n(i):i()}},ge.prototype.render=function(e){this.u=null,this.o=new Map;var t=J(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},ge.prototype.componentDidUpdate=ge.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Gt(e,n,t)})};var Hn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ur=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,$r=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Br=/[A-Z0-9]/g,Dr=typeof document<"u",Wr=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function jr(e,t,n){return t.__k==null&&(t.textContent=""),le(e,t),typeof n=="function"&&n(),e?e.__c:null}function zr(e,t,n){return In(e,t),typeof n=="function"&&n(),e?e.__c:null}j.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(j.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Kt=b.event;function Vr(){}function Hr(){return this.cancelBubble}function Fr(){return this.defaultPrevented}b.event=function(e){Kt&&(e=Kt(e));var t=e.currentTarget,n=e.type;return n!=="input"&&n!=="change"||!t.h||Promise.resolve().then(function(){return function(r,o){o.value!=null&&(o.value=o.v),r==="change"&&o.checked!=null&&(o.checked=o.v)}(n,t)}),e.persist=Vr,e.isPropagationStopped=Hr,e.isDefaultPrevented=Fr,e.nativeEvent=e};var kt,qr={enumerable:!1,configurable:!0,get:function(){return this.class}},Xt=b.vnode;b.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||Dr&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var l=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":l==="ondoubleclick"?i="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||Wr(n.type)?l==="onfocus"?i="onfocusin":l==="onblur"?i="onfocusout":$r.test(i)?i=l:r.indexOf("-")===-1&&Ur.test(i)?i=i.replace(Br,"-$&").toLowerCase():s===null&&(s=void 0):l=i="oninput",l==="oninput"&&o[i=l]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=J(n.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=J(n.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",qr)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=Hn,Xt&&Xt(e)};var Zt=b.__r;b.__r=function(e){Zt&&Zt(e),kt=e.__c};var Qt=b.diffed;b.diffed=function(e){Qt&&Qt(e);var t=e.type,n=e.props,r=e.__e,o=r&&r.h;r==null||t!=="input"&&t!=="textarea"&&t!=="select"||o===!1||(o||n.oninput||n.onchange||n.onChange)&&(n.value!=null?(r.h=!0,r.v=n.value):n.checked!=null?(r.h=!0,r.v=n.checked):r.h=!1),r!=null&&e.type==="textarea"&&"value"in n&&n.value!==r.value&&(r.value=n.value==null?"":n.value),kt=null};var Jr={ReactCurrentDispatcher:{current:{readContext:function(e){return kt.__n[e.__c].props.value}}}};function Yr(e){return P.bind(null,e)}function Ct(e){return!!e&&e.$$typeof===Hn}function Gr(e){return Ct(e)?Sr.apply(null,arguments):e}function Kr(e){return!!e.__k&&(le(null,e),!0)}function Xr(e){return e&&(e.base||e.nodeType===1&&e)||null}var Zr=function(e,t){return e(t)},Qr=function(e,t){return e(t)},eo=U;function Fn(e){e()}function to(e){return e}function no(){return[!1,Fn]}var ro=he;function oo(e,t){var n=t(),r=W({p:{__:n,m:t}}),o=r[0].p,i=r[1];return he(function(){o.__=n,o.m=t,rt(o.__,t())||i({p:o})},[e,n,t]),O(function(){return rt(o.__,o.m())||i({p:o}),e(function(){rt(o.__,o.m())||i({p:o})})},[e]),n}var re={useState:W,useId:Er,useReducer:$n,useEffect:O,useLayoutEffect:he,useInsertionEffect:ro,useTransition:no,useDeferredValue:to,useSyncExternalStore:oo,startTransition:Fn,useRef:z,useImperativeHandle:kr,useMemo:X,useCallback:Pe,useContext:L,useDebugValue:Cr,version:"17.0.2",Children:Wn,render:jr,hydrate:zr,unmountComponentAtNode:Kr,createPortal:Ir,createElement:P,createContext:Z,createFactory:Yr,cloneElement:Gr,createRef:En,Fragment:U,isValidElement:Ct,findDOMNode:Xr,Component:j,PureComponent:_t,memo:Rr,forwardRef:St,flushSync:Qr,unstable_batchedUpdates:Zr,StrictMode:eo,Suspense:Ie,SuspenseList:ge,lazy:Mr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Jr};function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Et(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ao(){return Math.random().toString(36).substr(2,8)}function tn(e,t){return{usr:e.state,key:e.key,idx:t}}function mt(e,t,n,r){return n===void 0&&(n=null),xe({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?pe(t):t,{state:n,key:t&&t.key||r||ao()})}function ze(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function pe(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function so(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,l=Y.Pop,c=null,f=a();f==null&&(f=0,s.replaceState(xe({},s.state,{idx:f}),""));function a(){return(s.state||{idx:null}).idx}function p(){l=Y.Pop;let _=a(),g=_==null?null:_-f;f=_,c&&c({action:l,location:d.location,delta:g})}function m(_,g){l=Y.Push;let y=mt(d.location,_,g);n&&n(y,_),f=a()+1;let w=tn(y,f),x=d.createHref(y);try{s.pushState(w,"",x)}catch{o.location.assign(x)}i&&c&&c({action:l,location:d.location,delta:1})}function h(_,g){l=Y.Replace;let y=mt(d.location,_,g);n&&n(y,_),f=a();let w=tn(y,f),x=d.createHref(y);s.replaceState(w,"",x),i&&c&&c({action:l,location:d.location,delta:0})}function u(_){let g=o.location.origin!=="null"?o.location.origin:o.location.href,y=typeof _=="string"?_:ze(_);return T(g,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,g)}let d={get action(){return l},get location(){return e(o,s)},listen(_){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(en,p),c=_,()=>{o.removeEventListener(en,p),c=null}},createHref(_){return t(o,_)},createURL:u,encodeLocation(_){let g=u(_);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:m,replace:h,go(_){return s.go(_)}};return d}var nn;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(nn||(nn={}));function lo(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?pe(t):t,o=Nt(r.pathname||"/",n);if(o==null)return null;let i=qn(e);co(i);let s=null;for(let l=0;s==null&&l{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};c.relativePath.startsWith("/")&&(T(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let f=G([r,c.relativePath]),a=n.concat(c);i.children&&i.children.length>0&&(T(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),qn(i.children,t,a,f)),!(i.path==null&&!i.index)&&t.push({path:f,score:vo(f,i.index),routesMeta:a})};return e.forEach((i,s)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,s);else for(let c of Jn(i.path))o(i,s,c)}),t}function Jn(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=Jn(r.join("/")),l=[];return l.push(...s.map(c=>c===""?i:[i,c].join("/"))),o&&l.push(...s),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function co(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:go(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const uo=/^:\w+$/,fo=3,ho=2,po=1,_o=10,mo=-2,rn=e=>e==="*";function vo(e,t){let n=e.split("/"),r=n.length;return n.some(rn)&&(r+=mo),t&&(r+=ho),n.filter(o=>!rn(o)).reduce((o,i)=>o+(uo.test(i)?fo:i===""?po:_o),r)}function go(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function yo(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let s=0;s{if(a==="*"){let m=l[p]||"";s=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}return f[a]=So(l[p]||"",a),f},{}),pathname:i,pathnameBase:s,pattern:e}}function xo(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Et(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,l)=>(r.push(l),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function wo(e){try{return decodeURI(e)}catch(t){return Et(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function So(e,t){try{return decodeURIComponent(e)}catch(n){return Et(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Nt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function ko(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?pe(e):e;return{pathname:n?n.startsWith("/")?n:Co(n,t):t,search:No(r),hash:Po(o)}}function Co(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function ot(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Yn(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Gn(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=pe(e):(o=xe({},e),T(!o.pathname||!o.pathname.includes("?"),ot("?","pathname","search",o)),T(!o.pathname||!o.pathname.includes("#"),ot("#","pathname","hash",o)),T(!o.search||!o.search.includes("#"),ot("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,l;if(r||s==null)l=n;else{let p=t.length-1;if(s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),p-=1;o.pathname=m.join("/")}l=p>=0?t[p]:"/"}let c=ko(o,l),f=s&&s!=="/"&&s.endsWith("/"),a=(i||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(f||a)&&(c.pathname+="/"),c}const G=e=>e.join("/").replace(/\/\/+/g,"/"),Eo=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),No=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Po=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ro(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Kn=["post","put","patch","delete"];new Set(Kn);const Lo=["get",...Kn];new Set(Lo);function Ve(){return Ve=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),i=z(!1);return er(()=>{i.current=!0}),Pe(function(l,c){if(c===void 0&&(c={}),!i.current)return;if(typeof l=="number"){t.go(l);return}let f=Gn(l,JSON.parse(o),r,c.relative==="path");e!=="/"&&(f.pathname=f.pathname==="/"?e:G([e,f.pathname])),(c.replace?t.replace:t.push)(f,c.state,c)},[e,t,o,r])}function To(){let{matches:e}=L(Q),t=e[e.length-1];return t?t.params:{}}function Pt(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=L(Q),{pathname:o}=ee(),i=JSON.stringify(Yn(r).map(s=>s.pathnameBase));return X(()=>Gn(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function Io(e,t){return Uo(e,t)}function Uo(e,t,n){Re()||T(!1);let{navigator:r}=L(ie),{matches:o}=L(Q),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=ee(),f;if(t){var a;let d=typeof t=="string"?pe(t):t;l==="/"||(a=d.pathname)!=null&&a.startsWith(l)||T(!1),f=d}else f=c;let p=f.pathname||"/",m=l==="/"?p:p.slice(l.length)||"/",h=lo(e,{pathname:m}),u=jo(h&&h.map(d=>Object.assign({},d,{params:Object.assign({},s,d.params),pathname:G([l,r.encodeLocation?r.encodeLocation(d.pathname).pathname:d.pathname]),pathnameBase:d.pathnameBase==="/"?l:G([l,r.encodeLocation?r.encodeLocation(d.pathnameBase).pathname:d.pathnameBase])})),o,n);return t&&u?P(Je.Provider,{value:{location:Ve({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Y.Pop}},u):u}function $o(){let e=Fo(),t=Ro(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return P(U,null,P("h2",null,"Unexpected Application Error!"),P("h3",{style:{fontStyle:"italic"}},t),n?P("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},n):null,null)}const Bo=P($o,null);class Do extends j{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?P(Q.Provider,{value:this.props.routeContext},P(Qn.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Wo(e){let{routeContext:t,match:n,children:r}=e,o=L(Xn);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),P(Q.Provider,{value:t},r)}function jo(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let l=i.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id]));l>=0||T(!1),i=i.slice(0,Math.min(i.length,l+1))}return i.reduceRight((l,c,f)=>{let a=c.route.id?s==null?void 0:s[c.route.id]:null,p=null;n&&(p=c.route.errorElement||Bo);let m=t.concat(i.slice(0,f+1)),h=()=>{let u;return a?u=p:c.route.Component?u=P(c.route.Component,null):c.route.element?u=c.route.element:u=l,P(Wo,{match:c,routeContext:{outlet:l,matches:m,isDataRoute:n!=null},children:u})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?P(Do,{location:n.location,revalidation:n.revalidation,component:p,error:a,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):h()},null)}var vt;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(vt||(vt={}));var we;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(we||(we={}));function zo(e){let t=L(Xn);return t||T(!1),t}function Vo(e){let t=L(Zn);return t||T(!1),t}function Ho(e){let t=L(Q);return t||T(!1),t}function tr(e){let t=Ho(),n=t.matches[t.matches.length-1];return n.route.id||T(!1),n.route.id}function Fo(){var e;let t=L(Qn),n=Vo(we.UseRouteError),r=tr(we.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function qo(){let{router:e}=zo(vt.UseNavigateStable),t=tr(we.UseNavigateStable),n=z(!1);return er(()=>{n.current=!0}),Pe(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Ve({fromRouteId:t},i)))},[e,t])}function te(e){T(!1)}function Jo(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Y.Pop,navigator:i,static:s=!1}=e;Re()&&T(!1);let l=t.replace(/^\/*/,"/"),c=X(()=>({basename:l,navigator:i,static:s}),[l,i,s]);typeof r=="string"&&(r=pe(r));let{pathname:f="/",search:a="",hash:p="",state:m=null,key:h="default"}=r,u=X(()=>{let d=Nt(f,l);return d==null?null:{location:{pathname:d,search:a,hash:p,state:m,key:h},navigationType:o}},[l,f,a,p,m,h,o]);return u==null?null:P(ie.Provider,{value:c},P(Je.Provider,{children:n,value:u}))}function Yo(e){let{children:t,location:n}=e;return Io(gt(t),n)}var on;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(on||(on={}));new Promise(()=>{});function gt(e,t){t===void 0&&(t=[]);let n=[];return Wn.forEach(e,(r,o)=>{if(!Ct(r))return;let i=[...t,o];if(r.type===U){n.push.apply(n,gt(r.props.children,i));return}r.type!==te&&T(!1),!r.props.index||!r.props.children||T(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=gt(r.props.children,i)),n.push(s)}),n}function He(){return He=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function Go(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ko(e,t){return e.button===0&&(!t||t==="_self")&&!Go(e)}const Xo=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Zo=["aria-current","caseSensitive","className","end","style","to","children"];function Qo(e){let{basename:t,children:n,window:r}=e,o=z();o.current==null&&(o.current=io({window:r,v5Compat:!0}));let i=o.current,[s,l]=W({action:i.action,location:i.location});return he(()=>i.listen(l),[i]),P(Jo,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:i})}const ei=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ti=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rt=St(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:l,target:c,to:f,preventScrollReset:a}=t,p=nr(t,Xo),{basename:m}=L(ie),h,u=!1;if(typeof f=="string"&&ti.test(f)&&(h=f,ei))try{let y=new URL(window.location.href),w=f.startsWith("//")?new URL(y.protocol+f):new URL(f),x=Nt(w.pathname,m);w.origin===y.origin&&x!=null?f=x+w.search+w.hash:u=!0}catch{}let d=Oo(f,{relative:o}),_=ri(f,{replace:s,state:l,target:c,preventScrollReset:a,relative:o});function g(y){r&&r(y),y.defaultPrevented||_(y)}return P("a",He({},p,{href:h||d,onClick:u||i?r:g,ref:n,target:c}))}),ni=St(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:s=!1,style:l,to:c,children:f}=t,a=nr(t,Zo),p=Pt(c,{relative:a.relative}),m=ee(),h=L(Zn),{navigator:u}=L(ie),d=u.encodeLocation?u.encodeLocation(p).pathname:p.pathname,_=m.pathname,g=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;o||(_=_.toLowerCase(),g=g?g.toLowerCase():null,d=d.toLowerCase());let y=_===d||!s&&_.startsWith(d)&&_.charAt(d.length)==="/",w=g!=null&&(g===d||!s&&g.startsWith(d)&&g.charAt(d.length)==="/"),x=y?r:void 0,N;typeof i=="function"?N=i({isActive:y,isPending:w}):N=[i,y?"active":null,w?"pending":null].filter(Boolean).join(" ");let E=typeof l=="function"?l({isActive:y,isPending:w}):l;return P(Rt,He({},a,{"aria-current":x,className:N,ref:n,style:E,to:c}),typeof f=="function"?f({isActive:y,isPending:w}):f)});var an;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(an||(an={}));var sn;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(sn||(sn={}));function ri(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s}=t===void 0?{}:t,l=Mo(),c=ee(),f=Pt(e,{relative:s});return Pe(a=>{if(Ko(a,n)){a.preventDefault();let p=r!==void 0?r:ze(c)===ze(f);l(e,{replace:p,state:o,preventScrollReset:i,relative:s})}},[c,l,f,r,o,n,e,i,s])}const Lt=document.createElement("div"),ln=e=>new DOMParser().parseFromString(e,"text/html"),Se=(e,t="low")=>{fetch(e,{priority:t}).catch(console.info)},Ye=(e,t)=>t.replaceAll(/[Ydmw]/g,n=>{switch(n){case"Y":return String(e.getFullYear());case"m":return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()];case"d":return String(e.getDate());case"w":return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][e.getDay()];default:return n}}),oi=(e,t)=>{try{if(new URL(t).origin!==location.origin)return!1}catch{}for(;e.includes("//");)e=e.replace("//","/");for(;t.includes("//");)t=t.replace("//","/");return e.replaceAll(/^\/|\/$/g,"")!==t.replaceAll(/^\/|\/$/g,"")};var ii=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ai(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rr={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ii,function(){var n={};n.version="0.2.0";var r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};n.configure=function(u){var d,_;for(d in u)_=u[d],_!==void 0&&u.hasOwnProperty(d)&&(r[d]=_);return this},n.status=null,n.set=function(u){var d=n.isStarted();u=o(u,r.minimum,1),n.status=u===1?null:u;var _=n.render(!d),g=_.querySelector(r.barSelector),y=r.speed,w=r.easing;return _.offsetWidth,l(function(x){r.positionUsing===""&&(r.positionUsing=n.getPositioningCSS()),c(g,s(u,y,w)),u===1?(c(_,{transition:"none",opacity:1}),_.offsetWidth,setTimeout(function(){c(_,{transition:"all "+y+"ms linear",opacity:0}),setTimeout(function(){n.remove(),x()},y)},y)):setTimeout(x,y)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var u=function(){setTimeout(function(){n.status&&(n.trickle(),u())},r.trickleSpeed)};return r.trickle&&u(),this},n.done=function(u){return!u&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(u){var d=n.status;return d?(typeof u!="number"&&(u=(1-d)*o(Math.random()*d,.1,.95)),d=o(d+u,0,.994),n.set(d)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},function(){var u=0,d=0;n.promise=function(_){return!_||_.state()==="resolved"?this:(d===0&&n.start(),u++,d++,_.always(function(){d--,d===0?(u=0,n.done()):n.set((u-d)/u)}),this)}}(),n.render=function(u){if(n.isRendered())return document.getElementById("nprogress");a(document.documentElement,"nprogress-busy");var d=document.createElement("div");d.id="nprogress",d.innerHTML=r.template;var _=d.querySelector(r.barSelector),g=u?"-100":i(n.status||0),y=document.querySelector(r.parent),w;return c(_,{transition:"all 0 linear",transform:"translate3d("+g+"%,0,0)"}),r.showSpinner||(w=d.querySelector(r.spinnerSelector),w&&h(w)),y!=document.body&&a(y,"nprogress-custom-parent"),y.appendChild(d),d},n.remove=function(){p(document.documentElement,"nprogress-busy"),p(document.querySelector(r.parent),"nprogress-custom-parent");var u=document.getElementById("nprogress");u&&h(u)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var u=document.body.style,d="WebkitTransform"in u?"Webkit":"MozTransform"in u?"Moz":"msTransform"in u?"ms":"OTransform"in u?"O":"";return d+"Perspective"in u?"translate3d":d+"Transform"in u?"translate":"margin"};function o(u,d,_){return u_?_:u}function i(u){return(-1+u)*100}function s(u,d,_){var g;return r.positionUsing==="translate3d"?g={transform:"translate3d("+i(u)+"%,0,0)"}:r.positionUsing==="translate"?g={transform:"translate("+i(u)+"%,0)"}:g={"margin-left":i(u)+"%"},g.transition="all "+d+"ms "+_,g}var l=function(){var u=[];function d(){var _=u.shift();_&&_(d)}return function(_){u.push(_),u.length==1&&d()}}(),c=function(){var u=["Webkit","O","Moz","ms"],d={};function _(x){return x.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(N,E){return E.toUpperCase()})}function g(x){var N=document.body.style;if(x in N)return x;for(var E=u.length,S=x.charAt(0).toUpperCase()+x.slice(1),M;E--;)if(M=u[E]+S,M in N)return M;return x}function y(x){return x=_(x),d[x]||(d[x]=g(x))}function w(x,N,E){N=y(N),x.style[N]=E}return function(x,N){var E=arguments,S,M;if(E.length==2)for(S in N)M=N[S],M!==void 0&&N.hasOwnProperty(S)&&w(x,S,M);else w(x,E[1],E[2])}}();function f(u,d){var _=typeof u=="string"?u:m(u);return _.indexOf(" "+d+" ")>=0}function a(u,d){var _=m(u),g=_+d;f(_,d)||(u.className=g.substring(1))}function p(u,d){var _=m(u),g;f(u,d)&&(g=_.replace(" "+d+" "," "),u.className=g.substring(1,g.length-1))}function m(u){return(" "+(u.className||"")+" ").replace(/\s+/gi," ")}function h(u){u&&u.parentNode&&u.parentNode.removeChild(u)}return n})})(rr);var si=rr.exports;const it=ai(si),li=()=>[{dist:"sw.js",version:"b3eecf5d"}],ci=(e,t)=>"serviceWorker"in navigator&&navigator.serviceWorker.register("/"+e,{type:"classic",...t}),ui=()=>{const e=ee(),t=z(e.pathname),[n,r]=W(document.querySelector("main"));return O(()=>{if(it.start(),e.pathname===t.current){fetch(e.pathname,{headers:{"x-swr":"1"},priority:"high"}).catch(console.error),it.done();return}else r(Lt),t.current=e.pathname;fetch(e.pathname,{headers:{"x-swr":"1"},priority:"high"}).then(o=>o.text()).then(o=>ln(o).querySelector("main")).then(r).finally(()=>it.done())},[e]),O(()=>{var i;const o=({data:s})=>{if(s.type==="SWR"&&li().some(({version:l})=>l===s.version)&&s.path===e.pathname){const l=new TextDecoder().decode(s.buf);r(ln(l).querySelector("main"))}};return(i=navigator.serviceWorker)==null||i.addEventListener("message",o),()=>{var s;return(s=navigator.serviceWorker)==null?void 0:s.removeEventListener("message",o)}},[e]),{path:t,source:n}};var fi=0;function v(e,t,n,r,o,i){var s,l,c={};for(l in t)l=="ref"?s=t[l]:c[l]=t[l];var f={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--fi,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)c[l]===void 0&&(c[l]=s[l]);return b.vnode&&b.vnode(f),f}const Ge=Z({path:En(),source:Lt,dark:!1,toggle:()=>{}}),di=({children:e})=>{const{path:t,source:n}=ui(),{dark:r,toggle:o}=bi();return v(Ge.Provider,{value:{source:n,path:t,dark:r,toggle:o},children:e})},_e=()=>{const e=ee(),{source:t,path:n}=L(Ge);return e.pathname!==n.current?Lt:t},hi=()=>{const[e,t]=W([]),n=_e();return O(()=>{t([...n.querySelectorAll("#archives > article")].map(r=>{var s;const o=r.querySelector(":scope > a"),i=new Date(((s=r.querySelector(":scope > time"))==null?void 0:s.getAttribute("datetime"))??"");return{title:(o==null?void 0:o.textContent)??"",link:(o==null?void 0:o.getAttribute("href"))??"",date:i,year:i.getFullYear()}}))},[n]),e};let at=[];const pi=()=>{const e=_e(),[t,n]=W(at);return O(()=>{const r=[...e.querySelectorAll("#nav > a")].map(o=>({name:o.textContent,link:o.getAttribute("href")}));r.length&&(at.length||n(at=r))},[e]),t},_i=()=>{const e=_e(),[t,n]=W(),[r,o]=W();return O(()=>{var i,s;n((i=e.querySelector("#prev-page"))==null?void 0:i.getAttribute("href")),o((s=e.querySelector("#next-page"))==null?void 0:s.getAttribute("href"))},[e]),{prev:t,next:r}},mi=()=>{const[e,t]=W(),n=_e();return O(()=>{var o,i,s;if(!n.querySelector("#post"))return t(void 0);const r=n.querySelector("#post > time");t({id:((o=n.querySelector("#post > span"))==null?void 0:o.textContent)??"",title:((i=n.querySelector("#post > h1"))==null?void 0:i.textContent)??"",link:location.href,date:r?new Date(r.getAttribute("datetime")):void 0,content:((s=n.querySelector("#post > div"))==null?void 0:s.innerHTML)??"",tags:[...n.querySelectorAll("#post > ul a")].map(l=>({name:l.textContent,link:l.getAttribute("href")}))})},[n]),e},or=()=>{const[e,t]=W([]),n=_e();return O(()=>{t([...n.querySelectorAll("#posts > article")].map(r=>{var s,l;const o=r.querySelector(":scope > a"),i=r.querySelector(":scope > time");return{id:((s=o==null?void 0:o.getAttribute("href"))==null?void 0:s.replace(/^\//,""))??"",title:(o==null?void 0:o.textContent)??"",link:(o==null?void 0:o.getAttribute("href"))??"",date:new Date((i==null?void 0:i.getAttribute("datetime"))??""),summary:((l=r.querySelector(":scope > p"))==null?void 0:l.textContent)??void 0}}))},[n]),e},vi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKUAAAClCAMAAAAK9c3oAAABsFBMVEUAAAD73eX73eP85+r7xdP81OH81OL73eb71eD73eX73eX73eX84Ob73eX84Ob85+r73eX73uX71N791t/73eX7x9b7x9X81t/83eb83eT7yNb53eP73eb73eT73eX82OH8y9n7xdP71uD85+r7ydf8y9r70eD7x9X85+r85+r7yNb7x9X7xtT70OD6xNL62N744eT91t/6xNL85+r81OH91t785+r7ytj919/8ytn7y9v7y9v8y9n91eD85+r62uH85+r919/919/85unz29382OD85+r85+r6xNL93+X73eT70+L52tv72Nz4uMj7y9v5xtf6zdP91t773eb8y9j6xdT84+j7x8f85en73+X6yNj94eb94uf7ydr83eL6ytP74ef92+L62936x9L93uT719v70eD709j6zNP6w9H84+f74OL70db7z9X92eD82t/7z9/7yNb73N/5x9j5wc/4u8r72eX62dz81dv94+f73OT71uP7x9T6yNP5vMz73eD7zt362dv5v877zd3909z5vcz8ztH70uL02978z9r91d78zdn90tv84eb7ycr7yMjxrau1AAAAR3RSTlMAQPGAgDDwwaCAMCAQoFBAkOFPQNAwIBBwYED98cCwkPHw0LCgkIBxYNC9sItgYCDp4NDAwIAwEPn24tHAsKA8INislIBY8Hjw/sMAAA1xSURBVHjazJnpc9JAGMZbHe/7vjre932NjrczzpgUooFRGAzFOrHFAu2IhYqCQoVh+NT/2U02yZNks+xCpfX3qU798Jvn3fd9N9uxf8728fFthC025Ifx7WP/DTvGT+06uW/fxLsoDu7dPfYf8GLLhonvjUYjTiE/fafUXdGJXesb6aaLzzbH+Xz3Et0yPrZO7N8KQw6Nd+vruYkqiiBVh+eOsbXlxn2ICMMEe3eOrR3778SleRdg4tjYGrEJOUrXHBxcm+N5MT4gDXT6WrXRprPSdnn8GPYc8Zy/sVnaUdf1Tp7nue/oCPvoVFxe0qYczhPsGlXht0pLlnUXX90bdGfWG3rZVt63F4tzHSR7HR0s99iYl/Nuxx/dsR6SCBKUA549nYBpj0TXVnJZZ+jk/b/O5fQe0QQTJ4+O73QvgTtGPibRN6woTbRHJBOJXBm7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",st=e=>Math.min(.1,Math.max(.05,e)),gi=({canvas:e})=>{const t=z(0),n=z(0);O(()=>{const a=p=>{const{top:m,bottom:h,left:u,right:d,width:_,height:g}=e.current.getBoundingClientRect();p.clientXd||p.clientYh||(t.current=(p.clientX-u)/_,n.current=(p.clientY-m)/g)};return window.addEventListener("mousemove",a),window.addEventListener("scroll",f),()=>{window.removeEventListener("mousemove",a),window.removeEventListener("scroll",f)}},[e]);const r=X(()=>Object.assign(new Image,{src:vi}),[]),o=X(()=>{const a=Math.random();return Array.from({length:10}).map(()=>({x:Math.random(),y:Math.random(),w:Math.random()*10+5,h:Math.random()*10+10,cos:Math.cos(a),sin:Math.sin(a),speedX:Math.random()*.01+.02,speedY:Math.random()*.01+.02,opacity:Math.random()}))},[]),i=z(),s=Pe(()=>{if(!i.current||!e.current)return;const{width:a,height:p}=e.current,m=e.current.getContext("2d");m.clearRect(0,0,a,p);for(const h of o)h.x>1?h.x=0:h.x<0&&(h.x=1),(h.y>1||h.y<0)&&(h.y=0),t.current>.5?h.x+=h.speedX*st(t.current-.5):h.x-=h.speedX*st(.5-t.current),h.y+=h.speedY*st(n.current),m.globalAlpha=h.opacity,m.setTransform(h.cos,h.sin,-h.sin,h.cos,h.x*a,h.y*p),m.drawImage(r,0,0,h.w,h.h),m.setTransform(1,0,0,1,0,0);requestAnimationFrame(s)},[]),l=a=>{new Promise(p=>{r.complete?p():r.onload=()=>p()}).then(()=>{i.current||(i.current=a.current,f(),s())})},c=()=>{e.current.style.display="none",i.current=null},f=()=>{if(!i.current)return;const a=i.current.getBoundingClientRect(),p=e.current;p.width=a.width,p.height=a.height,p.style.top=`${a.top}px`,p.style.left=`${a.left}px`,p.style.display="block"};return{start:l,stop:c}},yi=()=>{const[e,t]=W([]),n=_e();return O(()=>{t([...n.querySelectorAll("#tags > p")].map(r=>{var i;const o=r.querySelector(":scope > a");return{name:(o==null?void 0:o.textContent)??"",link:(o==null?void 0:o.getAttribute("href"))??"",count:parseInt(((i=r.querySelector(":scope > sup"))==null?void 0:i.textContent)??"")||void 0}}))},[n]),e},bi=()=>{const[e,t]=W(()=>"theme"in localStorage?localStorage.theme==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches);return O(()=>{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{localStorage.removeItem("theme"),t(n.matches)})},[]),O(()=>{e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},[e]),{dark:e,toggle:()=>t(n=>(localStorage.setItem("theme",n?"light":"dark"),!n))}},Ke=e=>{O(()=>{if(!e)return;const t=document.title;return document.title=e,()=>document.title=t},[e])},xi="p-1 text-accent-600 dark:text-accent-400 rounded hover:bg-accent-100 dark:hover:bg-slate-700",ue=({nav:e,...t})=>(t.className=`${xi} ${t.className??""}`,typeof t.to=="string"&&/^https:\/\//.test(t.to)?v("a",{href:t.to,...t}):e?v(ni,{...t}):v(Rt,{...t}));var ir={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},cn=re.createContext&&re.createContext(ir),K=globalThis&&globalThis.__assign||function(){return K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?I(me,--B):0,fe--,A===10&&(fe=1,Qe--),A}function D(){return A=B2||Ce(A)>3?"":" "}function ji(e,t){for(;--t&&D()&&!(A<48||A>102||A>57&&A<65||A>70&&A<97););return Le(e,Ue()+(t<6&&F()==32&&D()==32))}function bt(e){for(;D();)switch(A){case e:return B;case 34:case 39:e!==34&&e!==39&&bt(A);break;case 40:e===41&&bt(e);break;case 92:D();break}return B}function zi(e,t){for(;D()&&e+A!==47+10;)if(e+A===42+42&&F()===47)break;return"/*"+Le(t,B-1)+"*"+Ze(e===47?e:D())}function Vi(e){for(;!Ce(F());)D();return Le(e,B)}function Hi(e){return dr(Be("",null,null,null,[""],e=fr(e),0,[0],e))}function Be(e,t,n,r,o,i,s,l,c){for(var f=0,a=0,p=s,m=0,h=0,u=0,d=1,_=1,g=1,y=0,w="",x=o,N=i,E=r,S=w;_;)switch(u=y,y=D()){case 40:if(u!=108&&I(S,p-1)==58){yt(S+=C($e(y),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:S+=$e(y);break;case 9:case 10:case 13:case 32:S+=Wi(u);break;case 92:S+=ji(Ue()-1,7);continue;case 47:switch(F()){case 42:case 47:Me(Fi(zi(D(),Ue()),t,n),c);break;default:S+="/"}break;case 123*d:l[f++]=V(S)*g;case 125*d:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+a:g==-1&&(S=C(S,/\f/g,"")),h>0&&V(S)-p&&Me(h>32?fn(S+";",r,n,p-1):fn(C(S," ","")+";",r,n,p-2),c);break;case 59:S+=";";default:if(Me(E=un(S,t,n,f,a,o,l,w,x=[],N=[],p),i),y===123)if(a===0)Be(S,t,E,E,x,i,p,l,N);else switch(m===99&&I(S,3)===110?100:m){case 100:case 108:case 109:case 115:Be(e,E,E,r&&Me(un(e,E,E,0,0,o,l,w,o,x=[],p),N),o,N,p,l,r?x:N);break;default:Be(S,E,E,E,[""],N,0,l,N)}}f=a=h=0,d=g=1,w=S="",p=s;break;case 58:p=1+V(S),h=u;default:if(d<1){if(y==123)--d;else if(y==125&&d++==0&&Di()==125)continue}switch(S+=Ze(y),y*d){case 38:g=a>0?1:(S+="\f",-1);break;case 44:l[f++]=(V(S)-1)*g,g=1;break;case 64:F()===45&&(S+=$e(D())),m=F(),a=p=V(w=S+=Vi(Ue())),y++;break;case 45:u===45&&V(S)==2&&(d=0)}}return i}function un(e,t,n,r,o,i,s,l,c,f,a){for(var p=o-1,m=o===0?i:[""],h=At(m),u=0,d=0,_=0;u0?m[g]+" "+y:C(y,/&\f/g,m[g])))&&(c[_++]=w);return et(e,t,n,o===0?Ot:l,c,f,a)}function Fi(e,t,n){return et(e,t,n,sr,Ze(Bi()),ke(e,2,-2),0)}function fn(e,t,n,r){return et(e,t,n,Mt,ke(e,0,r),ke(e,r+1,-1),r)}function se(e,t){for(var n="",r=At(e),o=0;o6)switch(I(e,t+1)){case 109:if(I(e,t+4)!==45)break;case 102:return C(e,/(.+:)(.+)-([^]+)/,"$1"+k+"$2-$3$1"+Fe+(I(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~yt(e,"stretch")?hr(C(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(I(e,t+1)!==115)break;case 6444:switch(I(e,V(e)-3-(~yt(e,"!important")&&10))){case 107:return C(e,":",":"+k)+e;case 101:return C(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+k+(I(e,14)===45?"inline-":"")+"box$3$1"+k+"$2$3$1"+$+"$2box$3")+e}break;case 5936:switch(I(e,t+11)){case 114:return k+e+$+C(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return k+e+$+C(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return k+e+$+C(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return k+e+$+e+e}return e}var ta=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Mt:t.return=hr(t.value,t.length);break;case lr:return se([ve(t,{value:C(t.value,"@","@"+k)})],o);case Ot:if(t.length)return $i(t.props,function(i){switch(Ui(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return se([ve(t,{props:[C(i,/:(read-\w+)/,":"+Fe+"$1")]})],o);case"::placeholder":return se([ve(t,{props:[C(i,/:(plac\w+)/,":"+k+"input-$1")]}),ve(t,{props:[C(i,/:(plac\w+)/,":"+Fe+"$1")]}),ve(t,{props:[C(i,/:(plac\w+)/,$+"input-$1")]})],o)}return""})}},na=[ta],ra=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(d){var _=d.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(d),d.setAttribute("data-s",""))})}var o=t.stylisPlugins||na,i={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(d){for(var _=d.getAttribute("data-emotion").split(" "),g=1;g<_.length;g++)i[_[g]]=!0;l.push(d)});var c,f=[Qi,ea];{var a,p=[qi,Yi(function(d){a.insert(d)})],m=Ji(f.concat(o,p)),h=function(_){return se(Hi(_),m)};c=function(_,g,y,w){a=y,h(_?_+"{"+g.styles+"}":g.styles),w&&(u.inserted[g.name]=!0)}}var u={key:n,sheet:new Li({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return u.sheet.hydrate(l),u};function oa(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var ia={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},aa=/[A-Z]|^ms/g,sa=/_EMO_([^_]+?)_([^]*?)_EMO_/g,pr=function(t){return t.charCodeAt(1)===45},hn=function(t){return t!=null&&typeof t!="boolean"},lt=Gi(function(e){return pr(e)?e:e.replace(aa,"-$&").toLowerCase()}),pn=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(sa,function(r,o,i){return H={name:o,styles:i,next:H},o})}return ia[t]!==1&&!pr(t)&&typeof n=="number"&&n!==0?n+"px":n};function Ee(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return H={name:n.name,styles:n.styles,next:H},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)H={name:r.name,styles:r.styles,next:H},r=r.next;var o=n.styles+";";return o}return la(e,t,n)}case"function":{if(e!==void 0){var i=H,s=n(e);return H=i,Ee(e,t,s)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function la(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o{const e=pi(),{dark:t,toggle:n}=L(Ge),{pathname:r}=ee();return O(()=>{e.map(({link:o})=>oi(r,o)&&Se(o))},[e]),v("nav",{className:_a,children:[e.map((o,i)=>v(ue,{nav:!0,to:o.link,className:"px-2",children:o.name},i)),v("button",{className:"px-2 text-accent-600 dark:text-accent-400",onClick:n,children:t?v(Ci,{size:"19"}):v(ki,{size:"19"})})]})},va=()=>{const{prev:e,next:t}=_i();return O(()=>{e&&Se(e),t&&Se(t)},[e,t]),v("footer",{className:"flex mt-4 sm:pb-8",children:[t&&v(ue,{to:t,className:"flex items-center pr-2.5",children:[v(Ei,{size:"20"})," Prev"]}),e&&v(ue,{to:e,className:"flex items-center pl-2.5",children:["Next ",v(Ni,{size:"20"})]})]})},ga=mr` 7 | display: grid; 8 | grid-template-areas: 9 | 'nav' 10 | 'content' 11 | 'foot'; 12 | grid-template-rows: 60px 1fr 30px; 13 | grid-template-columns: 1fr; 14 | 15 | & > nav { 16 | grid-area: nav; 17 | justify-self: end; 18 | margin-top: 10px; 19 | margin-right: calc(25px - 100vw + 100%); 20 | 21 | @media (min-width: 1536px) { 22 | position: sticky; 23 | top: 10px; 24 | } 25 | } 26 | 27 | & > section { 28 | grid-area: content; 29 | justify-self: center; 30 | } 31 | `,tt=({children:e,className:t})=>v("div",{className:ga,children:[v(ma,{}),v("section",{className:`w-11/12 max-w-3xl ${t??""}`,children:[e,v(va,{})]})]}),ut=new Set,gn=new Set,ya=({post:e,sakura:t})=>{const n=z(null);return O(()=>{const r=n.current,o=()=>{t.start(n),!(ut.has(e.link)||gn.has(e.link))&&(ut.add(e.link),fetch(e.link).then(()=>gn.add(e.link)).finally(()=>ut.delete(e.link)))},i=()=>t.stop();return r.addEventListener("mouseenter",o),r.addEventListener("mouseleave",i),()=>{r.removeEventListener("mouseenter",o),r.removeEventListener("mouseleave",i)}},[e.link,t]),v("article",{ref:n,className:"my-12 relative",children:[v(Rt,{to:e.link,className:"block w-full h-full absolute inset-0"}),v("span",{className:"font-medium text-lg text-accent-600 dark:text-accent-400 mr-2",children:e.title}),v("time",{className:"text-sm whitespace-nowrap text-slate-400 dark:text-slate-400",children:Ye(e.date,"w, m d, Y")}),v("summary",{className:"list-none mt-3 text-slate-700 dark:text-slate-300 line-clamp-3",children:e.summary})]})},yn=()=>{var r,o;const e=z(null),t=or(),n=gi({canvas:e});return Ke((o=(r=document.querySelector("title"))==null?void 0:r.dataset)==null?void 0:o.site),O(()=>{t.length>0&&Se(t[0].link,"auto"),t.length>1&&Se(t[1].link,"auto")},[t]),v(tt,{children:[v("canvas",{ref:e,className:"fixed z-10 pointer-events-none"}),t.length>0&&v(U,{children:[v("h2",{className:"font-medium text-xl mb-6 dark:text-slate-200",children:"My posts:"}),t.map((i,s)=>v(ya,{post:i,sakura:n},s))]})]})},ba=({archive:e})=>v("article",{className:"mb-4",children:[v(ue,{to:e.link,children:e.title}),v("time",{className:"ml-2 text-xs text-slate-500 dark:text-slate-400",children:Ye(e.date,"w, m d, Y")})]}),xa=()=>{const e=hi();Ke("Archives");let t;return v(tt,{children:[e.length>0&&v("h2",{className:"font-medium text-xl mb-4 dark:text-slate-200",children:"Archives:"}),e.map(n=>{let r=!1;return t!==n.year&&(r=!0,t=n.year),v(U,{children:[r&&v("h2",{className:"mt-10 mb-5 text-lg dark:text-slate-200",children:n.year}),v(ba,{archive:n})]})})]})},wa=({tag:e})=>v("p",{className:"my-2",children:[v(ue,{to:e.link,children:e.name}),v("sup",{className:"ml-1 text-slate-500 dark:text-slate-400",children:e.count})]}),Sa=({post:e})=>v("article",{className:"mb-4",children:[v(ue,{to:e.link,className:"text-accent-600 hover:underline underline-offset-4",children:e.title}),v("time",{className:"ml-2 text-xs text-slate-500 dark:text-slate-400",children:Ye(e.date,"w, m d, Y")})]}),bn=()=>{const e=yi(),t=or(),n=To();return Ke(n.tag?`Tag “${n.tag}”`:"Tags"),v(tt,{children:[n.tag&&t.length>0&&v(U,{children:[v("h2",{className:"font-medium text-xl mb-4 dark:text-slate-200",children:["Tag “",n.tag,"”:"]}),t.map((r,o)=>v(Sa,{post:r},o))]}),!n.tag&&e.length>0&&v(U,{children:[v("h2",{className:"font-medium text-xl mb-4 dark:text-slate-200",children:"Tags:"}),e.map((r,o)=>v(wa,{tag:r},o))]})]})},ka=()=>v("svg",{xmlns:"http://www.w3.org/2000/svg",className:"hidden",children:v("filter",{id:"invertLightness",x:"0",y:"0",style:"color-interpolation-filters: sRGB",children:[v("feColorMatrix",{type:"matrix",in:"SourceGraphic",result:"red",values:"1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1"}),v("feColorMatrix",{type:"matrix",in:"SourceGraphic",result:"green",values:"0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1"}),v("feColorMatrix",{type:"matrix",in:"SourceGraphic",result:"blue",values:"0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1"}),v("feBlend",{in:"red",in2:"green",mode:"lighten",result:"maxyellow"}),v("feBlend",{in:"maxyellow",in2:"blue",mode:"lighten",result:"max"}),v("feBlend",{in:"red",in2:"green",mode:"darken",result:"minyellow"}),v("feBlend",{in:"minyellow",in2:"blue",mode:"darken",result:"min"}),v("feComponentTransfer",{result:"adjustment",in:"min",children:[v("feFuncR",{type:"linear",intercept:"1",slope:"-1"}),v("feFuncG",{type:"linear",intercept:"1",slope:"-1"}),v("feFuncB",{type:"linear",intercept:"1",slope:"-1"})]}),v("feComposite",{operator:"arithmetic",in:"SourceGraphic",in2:"adjustment",k1:"0",k2:"1",k3:"1",k4:"-1",result:"channelAdjustment"}),v("feComposite",{operator:"arithmetic",in:"channelAdjustment",in2:"max",k1:"0",k2:"1",k3:"-1",k4:"1",result:"finalColors"}),v("feComposite",{operator:"in",in:"finalColors",in2:"SourceAlpha"})]})}),Ca=e=>{const[t,n]=W(null);return O(()=>{if(!e)return;const r=new URLSearchParams({id:e,domain:location.hostname});fetch(`https://core-services.vercel.app/count?${r.toString()}`).then(o=>{if(o.status!==200)throw new Error(o.statusText);return o.json()}).then(o=>{n(o)}).catch(o=>{console.error(o)})},[e]),t},Ea=()=>{const e=mi(),t=z(null);Ke(e==null?void 0:e.title),O(()=>{const o=i=>{const s={pgsql:"sql",shell:"bash",golang:"go"};for(const l of i.querySelectorAll("pre>code")){if(!l.className.startsWith("language-")){l.className="language-plaintext";continue}const c=/(lang(?:uage)?-.+){([\d,-]+)}/,f=c.exec(l.className);f&&(l.parentNode.dataset.line=f[2],l.className=l.className.replace(c,"$1"));const a=l.className.slice(9);a in s&&(l.className=`language-${s[a]}`)}ae(()=>import("./prism-d6868189.js"),["assets/prism-d6868189.js","assets/prism-ee349629.css"]).then(({highlightAllUnder:l})=>{t.current&&l(t.current)})};e&&t.current&&o(t.current)},[e]),O(()=>{const o=async i=>(ae(()=>Promise.resolve({}),["assets/katex.min-088067ce.css"]),(await ae(()=>import("./auto-render-eb88af63.js"),[])).default(i,{output:"html",delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1}],throwOnError:!1}));e&&t.current&&o(t.current).catch(console.error)},[e]);const n=Ca(e==null?void 0:e.id),{dark:r}=L(Ge);return v(tt,{className:`relative markdown-content ${r?"markdown-content-dark":""}`,children:[v(ka,{}),e&&v(U,{children:[v("h1",{children:e.title}),v("span",{className:"absolute top-0 text-xs text-slate-500 dark:text-slate-400 transition-opacity opacity-0 pointer-events-none",children:[e.date?v("time",{children:Ye(e.date,"w, m d, Y")}):v(U,{}),n?v("span",{children:[e.date?" · ":"",n.page," view"]}):v(U,{})]}),v("div",{ref:t,dangerouslySetInnerHTML:{__html:e.content}})]})]})};function Na(){return O(()=>{const e=t=>{if(!(t.target instanceof HTMLAnchorElement))return;new URL(t.target.href).host!==location.host&&(t.target.target="_blank",t.target.rel="noopener")};return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[]),v(di,{children:v(Yo,{children:[v(te,{path:"/",element:v(yn,{})}),v(te,{path:"/page/:page",element:v(yn,{})}),v(te,{path:"/tags",element:v(bn,{})}),v(te,{path:"/tags/:tag",element:v(bn,{})}),v(te,{path:"/archives",element:v(xa,{})}),v(te,{path:"*",element:v(Ea,{})})]})})}le(v(Qo,{children:v(Na,{})}),document.querySelector("app"));ci("sw.js").catch(console.error);setTimeout(()=>{ae(()=>import("./prism-d6868189.js"),["assets/prism-d6868189.js","assets/prism-ee349629.css"]).catch(console.info),ae(()=>Promise.resolve({}),["assets/katex.min-088067ce.css"]).catch(console.info),ae(()=>import("./auto-render-eb88af63.js"),[]).catch(console.info)});export{ii as c}; 32 | --------------------------------------------------------------------------------