cici 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +10 -10
  3. package/.next/app-path-routes-manifest.json +1 -1
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/next-minimal-server.js.nft.json +1 -1
  6. package/.next/next-server.js.nft.json +1 -1
  7. package/.next/prerender-manifest.json +1 -1
  8. package/.next/required-server-files.json +1 -1
  9. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/mile/prompts.body +1 -1
  11. package/.next/server/app/atom.xml.body +1 -1
  12. package/.next/server/app/blog/[id]/page_client-reference-manifest.js +1 -1
  13. package/.next/server/app/blog/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/editor/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  16. package/.next/server/app/memos/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/page_client-reference-manifest.js +1 -1
  18. package/.next/server/app/rss.xml.body +1 -1
  19. package/.next/server/app/sitemap.xml/route.js +4 -4
  20. package/.next/server/app/sitemap.xml.body +5 -5
  21. package/.next/server/app/unavailable/page_client-reference-manifest.js +1 -1
  22. package/.next/server/app-paths-manifest.json +6 -6
  23. package/.next/server/chunks/3607.js +1 -1
  24. package/.next/server/chunks/719.js +1 -1
  25. package/.next/server/functions-config-manifest.json +1 -1
  26. package/.next/server/pages/500.html +1 -1
  27. package/.next/server/server-reference-manifest.json +1 -1
  28. package/.next/standalone/.next/BUILD_ID +1 -1
  29. package/.next/standalone/.next/app-build-manifest.json +10 -10
  30. package/.next/standalone/.next/app-path-routes-manifest.json +1 -1
  31. package/.next/standalone/.next/build-manifest.json +2 -2
  32. package/.next/standalone/.next/prerender-manifest.json +1 -1
  33. package/.next/standalone/.next/required-server-files.json +1 -1
  34. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  35. package/.next/standalone/.next/server/app/api/mile/prompts.body +1 -1
  36. package/.next/standalone/.next/server/app/atom.xml.body +1 -1
  37. package/.next/standalone/.next/server/app/blog/[id]/page_client-reference-manifest.js +1 -1
  38. package/.next/standalone/.next/server/app/blog/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/editor/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  41. package/.next/standalone/.next/server/app/memos/page_client-reference-manifest.js +1 -1
  42. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/.next/server/app/rss.xml.body +1 -1
  44. package/.next/standalone/.next/server/app/sitemap.xml/route.js +4 -4
  45. package/.next/standalone/.next/server/app/sitemap.xml.body +5 -5
  46. package/.next/standalone/.next/server/app/unavailable/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/.next/server/app-paths-manifest.json +6 -6
  48. package/.next/standalone/.next/server/chunks/3607.js +1 -1
  49. package/.next/standalone/.next/server/chunks/719.js +1 -1
  50. package/.next/standalone/.next/server/pages/500.html +1 -1
  51. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  52. package/.next/standalone/cache-handler.cjs +66 -0
  53. package/.next/standalone/package.json +1 -1
  54. package/.next/standalone/server.js +1 -1
  55. package/.next/trace +120 -120
  56. package/bin/cici.js +103 -33
  57. package/package.json +1 -1
  58. /package/.next/standalone/.next/static/{PDn4f_-4CIbfG8EmueowG → EVdo6WxGjsfWSi0PYx0v3}/_buildManifest.js +0 -0
  59. /package/.next/standalone/.next/static/{PDn4f_-4CIbfG8EmueowG → EVdo6WxGjsfWSi0PYx0v3}/_ssgManifest.js +0 -0
  60. /package/.next/static/{PDn4f_-4CIbfG8EmueowG → EVdo6WxGjsfWSi0PYx0v3}/_buildManifest.js +0 -0
  61. /package/.next/static/{PDn4f_-4CIbfG8EmueowG → EVdo6WxGjsfWSi0PYx0v3}/_ssgManifest.js +0 -0
@@ -2,31 +2,31 @@
2
2
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
3
  <url>
4
4
  <loc>https://blog.minghe.me</loc>
5
- <lastmod>2026-07-21T19:08:20.507Z</lastmod>
5
+ <lastmod>2026-07-21T19:58:37.295Z</lastmod>
6
6
  <changefreq>daily</changefreq>
7
7
  <priority>1</priority>
8
8
  </url>
9
9
  <url>
10
10
  <loc>https://blog.minghe.me/blog</loc>
11
- <lastmod>2026-07-21T19:08:20.507Z</lastmod>
11
+ <lastmod>2026-07-21T19:58:37.295Z</lastmod>
12
12
  <changefreq>daily</changefreq>
13
13
  <priority>0.9</priority>
14
14
  </url>
15
15
  <url>
16
16
  <loc>https://blog.minghe.me/memos</loc>
17
- <lastmod>2026-07-21T19:08:20.507Z</lastmod>
17
+ <lastmod>2026-07-21T19:58:37.295Z</lastmod>
18
18
  <changefreq>daily</changefreq>
19
19
  <priority>0.8</priority>
20
20
  </url>
21
21
  <url>
22
22
  <loc>https://blog.minghe.me/editor</loc>
23
- <lastmod>2026-07-21T19:08:20.507Z</lastmod>
23
+ <lastmod>2026-07-21T19:58:37.295Z</lastmod>
24
24
  <changefreq>weekly</changefreq>
25
25
  <priority>0.5</priority>
26
26
  </url>
27
27
  <url>
28
28
  <loc>https://blog.minghe.me/login</loc>
29
- <lastmod>2026-07-21T19:08:20.507Z</lastmod>
29
+ <lastmod>2026-07-21T19:58:37.295Z</lastmod>
30
30
  <changefreq>monthly</changefreq>
31
31
  <priority>0.3</priority>
32
32
  </url>
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/unavailable/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"80":{"*":{"id":"41868","name":"*","chunks":[],"async":false}},"3980":{"*":{"id":"94789","name":"*","chunks":[],"async":false}},"4707":{"*":{"id":"79671","name":"*","chunks":[],"async":false}},"12846":{"*":{"id":"12994","name":"*","chunks":[],"async":false}},"14447":{"*":{"id":"34239","name":"*","chunks":[],"async":false}},"16456":{"*":{"id":"13170","name":"*","chunks":[],"async":false}},"19107":{"*":{"id":"96114","name":"*","chunks":[],"async":false}},"28490":{"*":{"id":"93169","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"37344":{"*":{"id":"92073","name":"*","chunks":[],"async":false}},"51113":{"*":{"id":"27551","name":"*","chunks":[],"async":false}},"59556":{"*":{"id":"77083","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","name":"*","chunks":[],"async":false}},"63141":{"*":{"id":"78584","name":"*","chunks":[],"async":false}},"63156":{"*":{"id":"41713","name":"*","chunks":[],"async":false}},"65878":{"*":{"id":"92481","name":"*","chunks":[],"async":false}},"72972":{"*":{"id":"79404","name":"*","chunks":[],"async":false}},"75247":{"*":{"id":"80943","name":"*","chunks":[],"async":false}},"75873":{"*":{"id":"52719","name":"*","chunks":[],"async":false}},"81908":{"*":{"id":"18413","name":"*","chunks":[],"async":false}},"87232":{"*":{"id":"72892","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/cici/cici/node_modules/next/dist/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/app/globals.css":{"id":47960,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/Analytics.tsx":{"id":75873,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/CreateButton.tsx":{"id":28490,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/EditContext.tsx":{"id":75247,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/SessionProvider.tsx":{"id":63156,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/ui/toaster.tsx":{"id":59556,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":16456,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/font/google/target.css?{\"path\":\"components/ui/font.ts\",\"import\":\"Gowun_Dodum\",\"arguments\":[{\"weight\":\"400\",\"subsets\":[\"latin\"],\"display\":\"swap\"}],\"variableName\":\"gowun_wodum\"}":{"id":91444,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/app/login/page.tsx":{"id":3980,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/app/blog/[id]/component.tsx":{"id":63141,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/discussing/dist/components/Discussion.js":{"id":37344,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/components/Editor.tsx":{"id":14447,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/components/GitHubSignInButton.tsx":{"id":51113,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/components/BlogList.tsx":{"id":81908,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/components/MemosList.tsx":{"id":87232,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/image-component.js":{"id":65878,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/image-component.js":{"id":65878,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/link.js":{"id":72972,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/link.js":{"id":72972,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false}},"entryCSSFiles":{"/home/runner/work/cici/cici/":[],"/home/runner/work/cici/cici/app/layout":["static/css/bf9d0ede562bd061.css","static/css/67e4cfd62ab3f75c.css"],"/home/runner/work/cici/cici/app/page":[],"/home/runner/work/cici/cici/app/unavailable/page":[]}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/unavailable/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"80":{"*":{"id":"41868","name":"*","chunks":[],"async":false}},"3980":{"*":{"id":"94789","name":"*","chunks":[],"async":false}},"4707":{"*":{"id":"79671","name":"*","chunks":[],"async":false}},"12846":{"*":{"id":"12994","name":"*","chunks":[],"async":false}},"14447":{"*":{"id":"34239","name":"*","chunks":[],"async":false}},"16456":{"*":{"id":"13170","name":"*","chunks":[],"async":false}},"19107":{"*":{"id":"96114","name":"*","chunks":[],"async":false}},"28490":{"*":{"id":"93169","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"37344":{"*":{"id":"92073","name":"*","chunks":[],"async":false}},"51113":{"*":{"id":"27551","name":"*","chunks":[],"async":false}},"59556":{"*":{"id":"77083","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","name":"*","chunks":[],"async":false}},"63141":{"*":{"id":"78584","name":"*","chunks":[],"async":false}},"63156":{"*":{"id":"41713","name":"*","chunks":[],"async":false}},"65878":{"*":{"id":"92481","name":"*","chunks":[],"async":false}},"72972":{"*":{"id":"79404","name":"*","chunks":[],"async":false}},"75247":{"*":{"id":"80943","name":"*","chunks":[],"async":false}},"75873":{"*":{"id":"52719","name":"*","chunks":[],"async":false}},"81908":{"*":{"id":"18413","name":"*","chunks":[],"async":false}},"87232":{"*":{"id":"72892","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/cici/cici/node_modules/next/dist/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/app/globals.css":{"id":47960,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/Analytics.tsx":{"id":75873,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/CreateButton.tsx":{"id":28490,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/EditContext.tsx":{"id":75247,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/SessionProvider.tsx":{"id":63156,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/ui/toaster.tsx":{"id":59556,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":16456,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/font/google/target.css?{\"path\":\"components/ui/font.ts\",\"import\":\"Gowun_Dodum\",\"arguments\":[{\"weight\":\"400\",\"subsets\":[\"latin\"],\"display\":\"swap\"}],\"variableName\":\"gowun_wodum\"}":{"id":91444,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/app/login/page.tsx":{"id":3980,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/app/blog/[id]/component.tsx":{"id":63141,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/discussing/dist/components/Discussion.js":{"id":37344,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/components/BlogList.tsx":{"id":81908,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/components/Editor.tsx":{"id":14447,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/components/GitHubSignInButton.tsx":{"id":51113,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/components/MemosList.tsx":{"id":87232,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/image-component.js":{"id":65878,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/image-component.js":{"id":65878,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/link.js":{"id":72972,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/link.js":{"id":72972,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false}},"entryCSSFiles":{"/home/runner/work/cici/cici/":[],"/home/runner/work/cici/cici/app/layout":["static/css/bf9d0ede562bd061.css","static/css/67e4cfd62ab3f75c.css"],"/home/runner/work/cici/cici/app/page":[],"/home/runner/work/cici/cici/app/unavailable/page":[]}}
@@ -3,25 +3,25 @@
3
3
  "/api/auth/[...nextauth]/route": "app/api/auth/[...nextauth]/route.js",
4
4
  "/api/blog/[id]/highlights/[hid]/comments/[cid]/reactions/route": "app/api/blog/[id]/highlights/[hid]/comments/[cid]/reactions/route.js",
5
5
  "/api/blog/[id]/highlights/[hid]/comments/[cid]/route": "app/api/blog/[id]/highlights/[hid]/comments/[cid]/route.js",
6
- "/api/blog/[id]/highlights/[hid]/resolve/route": "app/api/blog/[id]/highlights/[hid]/resolve/route.js",
7
6
  "/api/blog/[id]/highlights/[hid]/replies/route": "app/api/blog/[id]/highlights/[hid]/replies/route.js",
8
7
  "/api/blog/[id]/highlights/[hid]/route": "app/api/blog/[id]/highlights/[hid]/route.js",
8
+ "/api/blog/[id]/highlights/[hid]/resolve/route": "app/api/blog/[id]/highlights/[hid]/resolve/route.js",
9
9
  "/api/blog/[id]/highlights/route": "app/api/blog/[id]/highlights/route.js",
10
10
  "/api/webhooks/notification/route": "app/api/webhooks/notification/route.js",
11
- "/login/page": "app/login/page.js",
12
11
  "/favicon.ico/route": "app/favicon.ico/route.js",
12
+ "/login/page": "app/login/page.js",
13
13
  "/robots.txt/route": "app/robots.txt/route.js",
14
14
  "/unavailable/page": "app/unavailable/page.js",
15
15
  "/api/asset/[...path]/route": "app/api/asset/[...path]/route.js",
16
16
  "/api/upload/route": "app/api/upload/route.js",
17
+ "/atom.xml/route": "app/atom.xml/route.js",
17
18
  "/api/mile/prompts/route": "app/api/mile/prompts/route.js",
18
19
  "/blog/[id]/page": "app/blog/[id]/page.js",
19
- "/atom.xml/route": "app/atom.xml/route.js",
20
- "/editor/page": "app/editor/page.js",
21
20
  "/blog/page": "app/blog/page.js",
21
+ "/editor/page": "app/editor/page.js",
22
+ "/api/graphql/route": "app/api/graphql/route.js",
22
23
  "/memos/page": "app/memos/page.js",
23
24
  "/page": "app/page.js",
24
25
  "/rss.xml/route": "app/rss.xml/route.js",
25
- "/sitemap.xml/route": "app/sitemap.xml/route.js",
26
- "/api/graphql/route": "app/api/graphql/route.js"
26
+ "/sitemap.xml/route": "app/sitemap.xml/route.js"
27
27
  }
@@ -11,4 +11,4 @@ title: ${t}
11
11
  date: ${e}
12
12
  ${l}${a}${o}---
13
13
 
14
- ${r}`}function n(t){let e=t.match(/date:\s*(.+)/);return e?e[1]:void 0}function o(t){let e=t.match(/status:\s*(.+)/);return e?e[1].trim():void 0}r.d(e,{Mv:()=>o,X4:()=>s,gk:()=>i,xr:()=>n})},31470:(t,e,r)=>{r.d(e,{Bf:()=>s,CT:()=>o});let i="data",s={rootKeep:()=>".gitkeep",blogDir:()=>"blog",blogDirKeep:()=>"blog/.gitkeep",blogPost:t=>`blog/${t}.md`,blogFile:t=>`blog/${t}`,blogManifest:()=>"blog-manifest.json",memos:()=>"memos.json",likes:()=>"likes.json",siteConfig:()=>"site-config.json",highlightsDir:()=>"highlights",highlightsFile:t=>`highlights/${t}.json`},n=t=>`${i}/${t}`,o={root:()=>i,rootKeep:()=>n(s.rootKeep()),blogDir:()=>n(s.blogDir()),blogDirKeep:()=>n(s.blogDirKeep()),blogPost:t=>n(s.blogPost(t)),blogFile:t=>n(s.blogFile(t)),blogManifest:()=>n(s.blogManifest()),memos:()=>n(s.memos()),likes:()=>n(s.likes()),siteConfig:()=>n(s.siteConfig()),highlightsDir:()=>n(s.highlightsDir()),highlightsFile:t=>n(s.highlightsFile(t))}},82575:(t,e,r)=>{r.d(e,{I7:()=>f,XD:()=>p,CR:()=>y,Kx:()=>m,Ix:()=>w});var i=r(94545),s=r(31470);async function n(t,e,r){try{let n;let o=new i.v({auth:t}),{data:a}=await o.repos.getContent({owner:e,repo:r,path:s.CT.blogDir()});if(!Array.isArray(a)){console.error("Expected array of files but got:",typeof a);return}let l=a.filter(t=>"file"===t.type&&t.name.endsWith(".md")&&".gitkeep"!==t.name).map(t=>t.name).sort();try{let{data:t}=await o.repos.getContent({owner:e,repo:r,path:s.CT.blogManifest()});!Array.isArray(t)&&"sha"in t&&(n=t.sha)}catch(t){console.log("Blog manifest does not exist yet, will create it")}await o.repos.createOrUpdateFileContents({owner:e,repo:r,path:s.CT.blogManifest(),message:"Update blog manifest",content:Buffer.from(JSON.stringify({files:l},null,2)).toString("base64"),sha:n}),console.log("Blog manifest updated successfully with",l.length,"files")}catch(t){console.error("Failed to update blog manifest:",t)}}var o=r(42491),a=r(55315),l=r.n(a),c=r(45854);let u="cici";async function g(t,e,r){try{let{data:i}=await t.repos.get({owner:e,repo:r});if(!i.description){let{data:i}=await t.users.getAuthenticated(),s=i.login;await t.repos.update({owner:e,repo:r,description:`https://tinymind.me/${s}`}),console.log(`Updated repository description to https://tinymind.me/${s}`)}}catch(e){if((0,c.XD)(e))await t.repos.createForAuthenticatedUser({name:r,auto_init:!0}),console.log(`Created new repository: ${r}`);else throw e}try{let{data:i}=await t.repos.getContent({owner:e,repo:r,path:"README.md"});if(console.log("README content:",i),"content"in i){let s=Buffer.from(i.content,"base64").toString("utf-8");console.log("README Decoded content:",s.trim()),(""===s.trim()||"# tinymind-blog"===s.trim())&&(await t.repos.createOrUpdateFileContents({owner:e,repo:r,path:"README.md",message:"Update README.md with default content",content:Buffer.from("# cici Blog\n\nWrite blog posts and memos at https://tinymind.me with data stored on GitHub.").toString("base64"),sha:i.sha}),console.log("README.md updated with default content"))}}catch(i){if(i instanceof Error&&"status"in i&&404===i.status){let i=Buffer.from("Write blog posts and memos at https://tinymind.me with data stored on GitHub.").toString("base64");await t.repos.createOrUpdateFileContents({owner:e,repo:r,path:"README.md",message:"Initial commit: Add README.md",content:i})}else throw i}}async function d(t,e,r){try{await (0,c.QF)(t,e,r,s.CT.rootKeep(),"Initialize content directory",""),await (0,c.QF)(t,e,r,s.CT.blogDirKeep(),"Initialize blog directory",""),await (0,c.QF)(t,e,r,s.CT.memos(),"Initialize memos.json","[]")}catch(t){throw console.error("Error ensuring content structure:",t),t}}async function h(t,e,r){await g(t,e,r),await d(t,e,r)}async function f(t,e,r,i=[],a,l="published",u){let g=(0,c.Pe)(r),{owner:d,repo:f}=u??await (0,c.rP)(r);await h(g,d,f);let p=`${(0,o.gk)(t)}.md`,m=s.CT.blogFile(p),w=(0,o.X4)({title:t,date:new Date().toISOString(),content:e,status:l,location:a,discussions:i});await g.repos.createOrUpdateFileContents({owner:d,repo:f,path:m,message:`Add blog post: ${t}`,content:Buffer.from(w).toString("base64")}),await n(r,d,f)}async function p(t,e,r){if(console.log("Deleting blog post..."),!e)throw Error("Access token is required");let i=(0,c.Pe)(e);try{let{owner:o,repo:a}=r??await (0,c.rP)(e),l=decodeURIComponent(t),u=`${l}.md`,g=s.CT.blogFile(u);console.log(`Attempting to delete file: ${g}`);let d=await i.repos.getContent({owner:o,repo:a,path:g});if(Array.isArray(d.data)||!("sha"in d.data))throw Error("Unexpected response when fetching current blog post");await i.repos.deleteFile({owner:o,repo:a,path:g,message:"Delete blog post",sha:d.data.sha}),console.log("Blog post deleted successfully"),await n(e,o,a)}catch(t){throw console.error("Error deleting blog post:",t),t}}async function m(t,e,r,i,a=[],l,u,g){if(console.log("Updating blog post..."),!i)throw Error("Access token is required");let d=(0,c.Pe)(i);try{let{owner:h,repo:f}=g??await (0,c.rP)(i),{content:p,sha:m}=await (0,c.LK)(d,h,f,s.CT.blogPost(t)),w=(0,o.xr)(p)??new Date().toISOString(),y=void 0!==u?u:(0,o.Mv)(p)??"published",b=(0,o.X4)({title:e,date:w,content:r,status:y,location:l,discussions:a});await (0,c.gO)(d,h,f,s.CT.blogPost(t),"Update blog post",b,m),console.log("Blog post updated successfully"),await n(i,h,f)}catch(t){throw console.error("Error updating blog post:",t),t}}async function w(t,e,r){if(console.log("Uploading image..."),!e)throw Error("Access token is required");let i=(0,c.Pe)(e);console.log("Octokit instance created");try{let{owner:s,repo:n}=r??await (0,c.rP)(e);console.log("Repo info:",{owner:s,repo:n});let{data:o}=await i.repos.get({owner:s,repo:n}),a=o.default_branch;console.log("Default branch:",a),await h(i,s,n),console.log("GitHub structure initialized");let u=new Date().toISOString().split("T")[0],g=Date.now().toString(),d=l().extname(t.name),f=`${g}${d}`,p=`assets/images/${u}/${f}`;await (0,c.kP)(i,s,n,`assets/images/${u}`);let m=await (0,c.sT)(t),w=await i.repos.createOrUpdateFileContents({owner:s,repo:n,path:p,message:`Upload image: ${f}`,content:m});console.log(w),console.log("Image uploaded successfully");let y=w.data.content?.download_url;if(y){let t=y.split("/"),e=t[3],r=t[4],i=t.slice(6).join("/");return`https://github.com/${e}/${r}/blob/${a}/${i}?raw=true`}throw Error("Failed to get image URL")}catch(t){throw console.error("Error uploading image:",t),t}}async function y(t){let e,r;let i=null;if(t.length>40)try{i=(0,c.Pe)(t);let s=await (0,c.rP)(t);e=s.owner,r=s.repo}catch(i){console.error("Error getting authenticated user:",i),e=t,r=u}else e=t,r=u;let s=`https://github.com/${e}.png`,n=`https://github.com/${e}.png`,o=s,a=n;return i&&(o=await b(i,e,r,"assets/icon.jpg",s),a=await b(i,e,r,"assets/icon-144.jpg",n)),{iconPath:o,appleTouchIconPath:a}}async function b(t,e,r,i,s){try{return await t.repos.getContent({owner:e,repo:r,path:i}),`https://github.com/${e}/${r}/blob/main/${i}?raw=true`}catch(t){return console.warn(`No icon found in ${i}, using default:`,s),s}}},45854:(t,e,r)=>{r.d(e,{LK:()=>o,Pe:()=>s,QF:()=>g,XD:()=>u,gO:()=>a,kP:()=>l,rP:()=>n,sT:()=>c});var i=r(94545);function s(t){if(!t)throw Error("Access token is required");return new i.v({auth:t})}async function n(t){if(!t)throw Error("Access token is required");let e=s(t);try{let{data:t}=await e.users.getAuthenticated();return{owner:t.login,repo:"cici"}}catch(t){throw console.error("Error getting authenticated user:",t),Error("Failed to get authenticated user")}}async function o(t,e,r,i){let s=await t.repos.getContent({owner:e,repo:r,path:i});if(Array.isArray(s.data)||!("content"in s.data))throw Error("Unexpected response from GitHub API");return{content:Buffer.from(s.data.content,"base64").toString("utf-8"),sha:s.data.sha}}async function a(t,e,r,i,s,n,o){let a={owner:e,repo:r,path:i,message:s,content:Buffer.from(n).toString("base64")};o&&(a.sha=o),await t.repos.createOrUpdateFileContents(a)}async function l(t,e,r,i){try{await t.repos.getContent({owner:e,repo:r,path:i})}catch(s){if(s instanceof Error&&"status"in s&&404===s.status)await t.repos.createOrUpdateFileContents({owner:e,repo:r,path:`${i}/.gitkeep`,message:`Create directory: ${i}`,content:""});else throw s}}async function c(t){return new Promise((e,r)=>{let i=new FileReader;i.readAsDataURL(t),i.onload=()=>{"string"==typeof i.result?e(i.result.split(",")[1]):r(Error("Failed to convert file to base64"))},i.onerror=t=>r(t)})}function u(t){return t instanceof Error&&"status"in t&&404===t.status}async function g(t,e,r,i,s,n){try{await t.repos.getContent({owner:e,repo:r,path:i}),console.log(`File ${i} already exists.`)}catch(o){if(u(o)){console.log(`Creating file ${i}...`);try{await a(t,e,r,i,s,n),console.log(`File ${i} created successfully.`)}catch(t){throw console.error(`Error creating file ${i}:`,t),t}}else throw console.error(`Error checking file ${i}:`,o),o}}},54428:(t,e,r)=>{r.d(e,{Bi:()=>m,K4:()=>p,VD:()=>w});var i=r(92048),s=r(55315),n=r.n(s),o=r(94545),a=r(8502),l=r(31470),c=r(73194);let u="cici",g=new Map;function d(t){return l.CT.highlightsFile(t)}function h(t){if(!t||0===t.length||t.length>200||t.includes("/")||t.includes("\\")||t.includes("\0")||t.includes("..")||t.startsWith("."))throw Error(`Invalid postId: ${t}`)}function f(t){if("object"==typeof t&&null!==t&&"status"in t){let e=t.status;return"number"==typeof e?e:void 0}}class p{constructor(t){this.rootDir=t}absPath(t){return n().join(this.rootDir,l.Bf.highlightsFile(t))}async load(t){h(t);try{let e=await i.promises.readFile(this.absPath(t),"utf-8");return{data:a.x.parse(JSON.parse(e)),sha:null}}catch(e){if("ENOENT"===e?.code)return{data:(0,a.Bk)(t),sha:null};throw e}}async save(t,e,r,s){h(t);let o=a.x.parse(e),l=this.absPath(t);return await i.promises.mkdir(n().dirname(l),{recursive:!0}),await i.promises.writeFile(l,JSON.stringify(o,null,2),"utf-8"),{sha:""}}}class m{constructor(t,e){this.octokit=t,this.owner=e}async load(t){h(t);let e=g.get(t);if(e&&e.expiresAt>Date.now())return{data:e.data,sha:e.sha};let r=await this.readFile(t);if(!r){let e=(0,a.Bk)(t);return g.set(t,{data:e,sha:null,expiresAt:Date.now()+3e4}),{data:e,sha:null}}let i=a.x.parse(JSON.parse(r.content));return g.set(t,{data:i,sha:r.sha,expiresAt:Date.now()+3e4}),{data:i,sha:r.sha}}async save(t,e,r,i){h(t);let s=a.x.parse(e),n=Buffer.from(JSON.stringify(s,null,2)).toString("base64"),o=0,l=r;for(;o<3;)try{let e=await this.octokit.repos.createOrUpdateFileContents({owner:this.owner,repo:u,path:d(t),message:i,content:n,...l?{sha:l}:{}}),r=e.data.content?.sha??"";return g.set(t,{data:s,sha:r,expiresAt:Date.now()+3e4}),{sha:r}}catch(r){let e=f(r);if(409===e||422===e){g.delete(t),o++;let e=await this.readFile(t);l=e?.sha??null;continue}throw r}throw Error("Save failed after 3 retries due to write contention")}async readFile(t){try{let e=(await this.octokit.repos.getContent({owner:this.owner,repo:u,path:d(t)})).data;if(Array.isArray(e)||"file"!==e.type)return null;return{content:Buffer.from(e.content,"base64").toString("utf-8"),sha:e.sha}}catch(t){if(404===f(t))return null;throw t}}}function w(t={}){if((0,c.g)())return new p((0,c.$)());let e=t.ownerToken??process.env.HIGHLIGHTS_GH_TOKEN;if(!e)throw Error("HIGHLIGHTS_GH_TOKEN not configured. Inline comments require a service token in production.");let r=process.env.GITHUB_USERNAME;if(!r)throw Error("GITHUB_USERNAME not configured.");return new m(new o.v({auth:e}),r)}},8502:(t,e,r)=>{r.d(e,{Bk:()=>u,Om:()=>s,x:()=>c});var i=r(4037);let s=i.Ry({startOffset:i.Rx().int().nonnegative(),endOffset:i.Rx().int().nonnegative(),exact:i.Z_().min(1).max(1e3),prefix:i.Z_().max(64),suffix:i.Z_().max(64)}).refine(t=>t.endOffset>=t.startOffset,{message:"endOffset must be >= startOffset"}),n=i.IM(i.Z_(),i.IX(i.Z_())),o=i.Km(["ios","android","web"]),a=i.Ry({id:i.Z_().min(1).max(64),parentId:i.Z_().min(1).max(64).nullable(),body:i.Z_().min(1).max(2e3),authorName:i.Z_().max(40).nullable(),fingerprint:i.Z_().min(1).max(128),country:i.Z_().max(8),platform:o,reactions:n,resolved:i.O7(),createdAt:i.Z_().datetime(),hidden:i.O7(),hiddenReason:i.Z_().max(200).optional()}),l=i.Ry({id:i.Z_().min(1).max(64),anchor:s,thread:i.IX(a).min(1),resolved:i.O7(),createdAt:i.Z_().datetime()}),c=i.Ry({postId:i.Z_().min(1),highlights:i.IX(l),schemaVersion:i.i0(1)});function u(t){return{postId:t,highlights:[],schemaVersion:1}}},81336:(t,e,r)=>{r.d(e,{T:()=>g,X:()=>u});var i=r(92048),s=r.n(i),n=r(55315),o=r.n(n),a=r(73194);let l={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".avif":"image/avif"};function c(){return o().join((0,a.$)(),"assets")}async function u(t,e){let r=function(t,e){let r=o().extname(t||"").toLowerCase();if(r&&l[r])return r;if(e){let t=`.${e.split("/")[1]||""}`.toLowerCase();if(l[t])return t}return r||".png"}(t.name,t.type),i=o().posix.join("images",e.date),n=`${e.id}${r}`,a=o().join(c(),i);s().mkdirSync(a,{recursive:!0});let u=Buffer.from(await t.arrayBuffer());return s().writeFileSync(o().join(a,n),u),`/api/asset/${i}/${n}`}function g(t){if(t.some(t=>!t||".."===t||t.includes("\0")||t.includes("/")||t.includes("\\")))return null;let e=c(),r=o().resolve(e,...t);if(r!==e&&!r.startsWith(e+o().sep)||!s().existsSync(r)||!s().statSync(r).isFile())return null;let i=o().extname(r).toLowerCase();return{body:s().readFileSync(r),contentType:l[i]??"application/octet-stream"}}},88069:(t,e,r)=>{r.d(e,{D:()=>o});var i=r(55315),s=r.n(i);let n="cici";function o(t){let e=process.env.CICI_DIR;if(e)return{kind:"local",dir:s().resolve(e)};let r=process.env.CICI_REPO;if(r){let[e,i]=r.split("/");if(!e)throw Error(`Invalid CICI_REPO "${r}" — expected "owner/name".`);return{kind:"github",owner:e,repo:i||n,token:process.env.CICI_TOKEN||t||void 0}}return{kind:"github",owner:process.env.GITHUB_USERNAME||"metrue",repo:n,token:t||void 0}}},73194:(t,e,r)=>{r.d(e,{$:()=>a,g:()=>o});var i=r(55315),s=r.n(i),n=r(88069);function o(){return"local"===(0,n.D)().kind}function a(){let t=process.env.CICI_DIR;return t?s().resolve(t):s().join(process.cwd(),"sample-content")}},63607:(t,e,r)=>{r.d(e,{VH:()=>A});var i=r(88069),s=r(81336),n=r(54428),o=r(92048),a=r.n(o),l=r(55315),c=r.n(l);function u(t){let{frontmatter:e}=function(t){let e=t.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);return e?{frontmatter:e[1],body:e[2].replace(/^\n/,"")}:{frontmatter:"",body:t}}(t),r=e.match(/title:[ \t]*(.+)/),i=e.match(/date:[ \t]*(.+)/),s=e.match(/latitude:[ \t]*(.+)/),n=e.match(/longitude:[ \t]*(.+)/),o=e.match(/city:[ \t]*(.+)/),a=e.match(/street:[ \t]*(.+)/),l=e.match(/status:[ \t]*(.+)/),c=e.match(/publishedAt:[ \t]*(.+)/),u=e.match(/lastModified:[ \t]*(.+)/),g=s?.[1]?.trim(),d=n?.[1]?.trim(),h=g?parseFloat(g):NaN,f=d?parseFloat(d):NaN;return{title:r?r[1].trim():"",date:i?i[1].trim():new Date().toISOString(),discussions:function(t){let e=[],r=t.match(/external_discussions:\s*\n([\s\S]*?)(?=\n\w|$)/);if(!r)return e;let i=r[1].split("\n").filter(t=>t.trim()),s={};for(let t of i)t.includes("platform:")?(s.platform&&s.url&&e.push(s),s={platform:t.split(":")[1].trim()}):t.includes("url:")&&s.platform&&(s.url=t.split("url:")[1].trim());return s.platform&&s.url&&e.push(s),e}(e),...g&&!isNaN(h)&&{latitude:h},...d&&!isNaN(f)&&{longitude:f},...o&&o[1].trim()&&{city:o[1].trim()},...a&&a[1].trim()&&{street:a[1].trim()},...l&&{status:l[1].trim()},...c&&{publishedAt:c[1].trim()},...u&&{lastModified:u[1].trim()}}}var g=r(31470),d=r(73194),h=r(42491);class f{abs(t){return c().join((0,d.$)(),t)}get dataDir(){return(0,d.$)()}get blogDir(){return this.abs(g.Bf.blogDir())}async getBlogPosts(t=!1){try{if(!a().existsSync(this.blogDir))return console.log("Blog directory does not exist, returning empty array"),[];let e=a().readdirSync(this.blogDir).filter(t=>t.endsWith(".md")&&".gitkeep"!==t),r=[];for(let t of e){let e=await this.getBlogPost(t);e&&r.push(e)}let i=r.sort((t,e)=>new Date(e.date).getTime()-new Date(t.date).getTime());if(t)return i;return i.filter(t=>"published"===t.status)}catch(t){return console.error("Error reading local blog posts:",t),[]}}async getBlogPost(t){try{let e=c().join(this.blogDir,t);if(!a().existsSync(e))return null;let r=a().readFileSync(e,"utf-8"),i=u(r),s=this.getFirstImageURLFrom(r);return{id:t.replace(".md",""),title:i.title||t.replace(".md",""),content:r,imageUrl:s,date:i.date?new Date(i.date).toISOString():new Date().toISOString(),discussions:i.discussions.length>0?i.discussions:void 0,latitude:i.latitude,longitude:i.longitude,city:i.city,street:i.street,status:i.status||"published",publishedAt:i.publishedAt||i.date,lastModified:i.lastModified||i.date||new Date().toISOString()}}catch(e){return console.error(`Error reading blog post ${t}:`,e),null}}async getMemos(){try{let t=this.abs(g.Bf.memos());if(!a().existsSync(t))return console.log("memos.json not found, returning empty array"),[];let e=a().readFileSync(t,"utf-8"),r=JSON.parse(e);return Array.isArray(r)?r:[]}catch(t){return console.error("Error reading local memos:",t),[]}}async getSiteConfig(){try{let t=a().readFileSync(this.abs(g.Bf.siteConfig()),"utf-8");return JSON.parse(t)}catch{return null}}async getLinks(){try{let t=this.abs(g.Bf.siteConfig());if(!a().existsSync(t))return{};let e=a().readFileSync(t,"utf-8");return JSON.parse(e).links||{}}catch(t){return console.warn("Error reading local site config:",t),{}}}async getLikes(){try{let t=this.abs(g.Bf.likes());if(!a().existsSync(t))return console.log("likes.json not found, returning empty object"),{};let e=a().readFileSync(t,"utf-8"),r=JSON.parse(e);return"object"==typeof r&&null!==r?r:{}}catch(t){return console.error("Error reading local likes:",t),{}}}async updateLikes(t){try{let e=this.abs(g.Bf.likes()),r=JSON.stringify(t,null,2);a().writeFileSync(e,r,"utf-8"),console.log("Updated local likes data")}catch(t){throw console.error("Error updating local likes:",t),Error("Failed to update local likes data")}}async createMemo(t){try{let e=await this.getMemos(),r=[t,...e],i=this.abs(g.Bf.memos()),s=JSON.stringify(r,null,2);return a().writeFileSync(i,s,"utf-8"),console.log("Created new memo locally"),t}catch(t){throw console.error("Error creating local memo:",t),Error("Failed to create memo locally")}}async createBlogPost(t){let e=(0,h.gk)(t.title),r=this.abs(g.Bf.blogFile(`${e}.md`)),i=(0,h.X4)({title:t.title,date:new Date().toISOString(),content:t.content,status:t.status,location:t.location,discussions:t.discussions});return a().mkdirSync(c().dirname(r),{recursive:!0}),a().writeFileSync(r,i,"utf-8"),e}async updateBlogPost(t,e){let r=this.abs(g.Bf.blogPost(t)),i="";try{i=a().readFileSync(r,"utf-8")}catch{}let s=(0,h.xr)(i)??new Date().toISOString(),n=void 0!==e.status?e.status:(0,h.Mv)(i)??"published",o=(0,h.X4)({title:e.title,date:s,content:e.content,status:n,location:e.location,discussions:e.discussions});return a().mkdirSync(c().dirname(r),{recursive:!0}),a().writeFileSync(r,o,"utf-8"),t}async deleteBlogPost(t){let e=this.abs(g.Bf.blogPost(t));try{a().unlinkSync(e)}catch(t){if(t?.code!=="ENOENT")throw t}}async updateMemo(t,e){let r=await this.getMemos(),i=r.findIndex(e=>e.id===t);if(-1===i)throw Error("Memo not found");let s={...r[i],content:e},n=r.map((t,e)=>e===i?s:t);return a().writeFileSync(this.abs(g.Bf.memos()),JSON.stringify(n,null,2),"utf-8"),s}async deleteMemo(t){let e=(await this.getMemos()).filter(e=>e.id!==t);a().writeFileSync(this.abs(g.Bf.memos()),JSON.stringify(e,null,2),"utf-8")}async getDrafts(){return(await this.getBlogPosts(!0)).filter(t=>"draft"===t.status)}async getAllBlogPosts(){return this.getBlogPosts(!0)}async checkRepositoryHealth(){return a().existsSync(this.dataDir)}getFirstImageURLFrom(t){let e=/(https?:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|webp))/i.exec(t);if(e){let t=e[1];return t.startsWith("https://github")?`${t}?raw=true`:t}return null}}class p{constructor(t){this.dir=t,this.client=new f}get label(){return`local: ${this.dir}`}canWrite(){return!0}getBlogPosts(t){return this.client.getBlogPosts(t?.includeDrafts??!1)}async getBlogPost(t){return await this.client.getBlogPost(`${t}.md`)??void 0}getMemos(){return this.client.getMemos()}getLinks(){return this.client.getLinks()}getLikes(){return this.client.getLikes()}getSiteConfig(){return this.client.getSiteConfig()}createBlogPost(t){return this.client.createBlogPost(t)}updateBlogPost(t,e){return this.client.updateBlogPost(t,e)}deleteBlogPost(t){return this.client.deleteBlogPost(t)}createMemo(t){return this.client.createMemo(t)}updateMemo(t,e){return this.client.updateMemo(t,e)}deleteMemo(t){return this.client.deleteMemo(t)}updateLikes(t){return this.client.updateLikes(t)}uploadAsset(t){return(0,s.X)(t,{date:new Date().toISOString().split("T")[0],id:Date.now().toString()})}highlights(){return new n.K4(this.dir)}}var m=r(45854),w=r(82575),y=r(94545);let b=t=>{let e=/(https?:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|webp))/i.exec(t);if(e){let t=e[1];return t.startsWith("https://github")?`${t}?raw=true`:t}return null};class k{constructor(t,e="cici"){this.accessToken=t,this.repo=e}async getSafeOwner(t){if(t&&"true"!==t)return t;if(this.accessToken)try{let t=new y.v({auth:this.accessToken}),{data:e}=await t.users.getAuthenticated();if(e.login&&"true"!==e.login)return e.login}catch(t){console.warn("Failed to get authenticated user:",t)}return process.env.GITHUB_USERNAME||"metrue"}async getBlogPosts(t,e=!1){let r=this.accessToken?new y.v({auth:this.accessToken}):new y.v,i=await this.getSafeOwner(t);try{let t=await r.repos.getContent({owner:i,repo:this.repo,path:g.CT.blogDir()});if(!Array.isArray(t.data))return console.warn("Unexpected response from GitHub API: data is not an array"),[];let s=(await Promise.all(t.data.filter(t=>"file"===t.type&&".gitkeep"!==t.name&&t.name.endsWith(".md")).map(async t=>this.getBlogPost(t.name,i)))).filter(t=>void 0!==t);if(e&&this.accessToken)return s;return s.filter(t=>"published"===t.status)}catch(t){if(console.error("Error fetching blog posts:",t),t instanceof Error&&"status"in t&&404===t.status)return console.log("Blog directory does not exist, returning empty array"),[];throw t}}async getBlogPost(t,e){let r=this.accessToken?new y.v({auth:this.accessToken}):new y.v,i=await this.getSafeOwner(e),s=await r.repos.getContent({owner:i,repo:this.repo,path:g.CT.blogFile(t)});if("content"in s.data){let e=Buffer.from(s.data.content,"base64").toString("utf-8"),r=u(e);return{id:t.replace(".md",""),title:r.title?decodeURIComponent(r.title):decodeURIComponent(t.replace(".md","")),content:e,imageUrl:b(e),date:r.date?new Date(r.date).toISOString():new Date().toISOString(),discussions:r.discussions.length>0?r.discussions:void 0,latitude:r.latitude,longitude:r.longitude,city:r.city,street:r.street,status:r.status||"published",publishedAt:r.publishedAt||r.date,lastModified:r.lastModified||r.date||new Date().toISOString()}}}async getMemos(t){let e=this.accessToken?new y.v({auth:this.accessToken}):new y.v,r=await this.getSafeOwner(t);try{let t=await e.repos.getContent({owner:r,repo:this.repo,path:g.CT.memos()});if(Array.isArray(t.data)||!("content"in t.data))return[];let i=Buffer.from(t.data.content,"base64").toString("utf-8");return JSON.parse(i)}catch(t){return console.error("Error fetching public memos:",t),[]}}async getLinks(t){let e=this.accessToken?new y.v({auth:this.accessToken}):new y.v,r=await this.getSafeOwner(t);try{let t=await e.repos.getContent({owner:r,repo:this.repo,path:g.CT.siteConfig()});if(Array.isArray(t.data)||!("content"in t.data))return{};let i=Buffer.from(t.data.content,"base64").toString("utf-8");return JSON.parse(i).links||{}}catch(t){return console.warn("Error fetching links:",t),{}}}async getLikes(t){let e=this.accessToken?new y.v({auth:this.accessToken}):new y.v,r=await this.getSafeOwner(t);try{let t=await e.repos.getContent({owner:r,repo:this.repo,path:g.CT.likes()});if(Array.isArray(t.data)||!("content"in t.data))return{};let i=Buffer.from(t.data.content,"base64").toString("utf-8");return JSON.parse(i)}catch(t){if(console.error("Error fetching likes:",t),t instanceof Error&&"status"in t&&404===t.status)return{};throw t}}async updateLikes(t,e){let r=new y.v({auth:this.accessToken}),i=await this.getSafeOwner(e);try{let e;try{let t=await r.repos.getContent({owner:i,repo:this.repo,path:g.CT.likes()});!Array.isArray(t.data)&&"sha"in t.data&&(e=t.data.sha)}catch(t){}await r.repos.createOrUpdateFileContents({owner:i,repo:this.repo,path:g.CT.likes(),message:`Update likes data - ${new Date().toISOString()}`,content:Buffer.from(JSON.stringify(t,null,2)).toString("base64"),...e&&{sha:e}})}catch(t){throw console.error("Error updating likes:",t),Error("Failed to update likes data")}}async getDrafts(t){return(await this.getBlogPosts(t,!0)).filter(t=>"draft"===t.status)}async getAllBlogPosts(t){return this.getBlogPosts(t,!0)}}let S=(t,e)=>new k(t,e),$=t=>{let e=/(https?:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|webp))/i.exec(t);if(e){let t=e[1];return t.startsWith("https://github")?`${t}?raw=true`:t}return null};class C{constructor(t,e="cici"){this.owner=t,this.baseUrl=`https://raw.githubusercontent.com/${t}/${e}/main`}async getBlogPosts(t=!1){try{try{let e=await fetch(`${this.baseUrl}/${g.CT.blogManifest()}`);if(e.ok){let r=await e.json(),i=r.files||[...r.published||[],...r.drafts||[]],s=(await Promise.all(i.map(t=>this.getBlogPost(t)))).filter(t=>null!==t);if(t)return s;return s.filter(t=>"published"===t.status)}}catch{}return console.warn("Blog manifest not found, returning empty array"),[]}catch(t){throw console.error("Error fetching blog posts via raw URLs:",t),t}}async getBlogPost(t){try{let e=await fetch(`${this.baseUrl}/${g.CT.blogFile(t)}`);if(!e.ok){if(404===e.status)return null;throw Error(`HTTP ${e.status}: ${e.statusText}`)}let r=await e.text(),i=u(r);return{id:t.replace(".md",""),title:i.title?decodeURIComponent(i.title.trim()):decodeURIComponent(t.replace(".md","")),content:r,imageUrl:$(r),date:i.date?new Date(i.date.trim()).toISOString():new Date().toISOString(),discussions:i.discussions.length>0?i.discussions:void 0,latitude:i.latitude,longitude:i.longitude,city:i.city,street:i.street,status:i.status||"published",publishedAt:i.publishedAt||i.date,lastModified:i.lastModified||i.date||new Date().toISOString()}}catch(e){return console.error(`Error fetching blog post ${t}:`,e),null}}async getMemos(){try{let t=await fetch(`${this.baseUrl}/${g.CT.memos()}`);if(!t.ok){if(404===t.status)return console.log("memos.json not found, returning empty array"),[];throw Error(`HTTP ${t.status}: ${t.statusText}`)}let e=await t.json();return Array.isArray(e)?e:[]}catch(t){return console.error("Error fetching memos via raw URLs:",t),[]}}async getLinks(){try{let t=await fetch(`${this.baseUrl}/${g.CT.siteConfig()}`);if(!t.ok){if(404===t.status)return{};throw Error(`HTTP ${t.status}: ${t.statusText}`)}return(await t.json()).links||{}}catch(t){return console.warn("Error fetching links via raw URLs:",t),{}}}async getLikes(){try{let t=await fetch(`${this.baseUrl}/${g.CT.likes()}`);if(!t.ok){if(404===t.status)return console.log("likes.json not found, returning empty object"),{};throw Error(`HTTP ${t.status}: ${t.statusText}`)}let e=await t.json();return"object"==typeof e&&null!==e?e:{}}catch(t){return console.error("Error fetching likes via raw URLs:",t),{}}}async getDrafts(){return(await this.getBlogPosts(!0)).filter(t=>"draft"===t.status)}async getAllBlogPosts(){return this.getBlogPosts(!0)}async checkRepositoryHealth(){try{return(await fetch(`${this.baseUrl}/README.md`)).ok}catch{return!1}}}class E extends Error{constructor(t="This cici instance is read-only. Provide a token to enable editing."){super(t),this.name="ReadOnlyError"}}class B{constructor(t){this.owner=t.owner,this.repo=t.repo,this.token=t.token,this.reader=new C(t.owner,t.repo),this.apiReader=t.token?S(t.token,t.repo):void 0,this.target={owner:t.owner,repo:t.repo}}async fresh(t,e){if(this.apiReader)try{return await t(this.apiReader)}catch(t){console.warn("GitHub API read failed, falling back to raw URL:",t)}return e()}get label(){return`github: ${this.owner}/${this.repo}${this.token?"":" (read-only)"}`}canWrite(){return!!this.token}requireToken(){if(!this.token)throw new E;return this.token}writeOctokit(){return(0,m.Pe)(this.requireToken())}getBlogPosts(t){let e=t?.includeDrafts??!1;return this.fresh(t=>t.getBlogPosts(this.owner,e),()=>this.reader.getBlogPosts(e))}async getBlogPost(t){return await this.fresh(e=>e.getBlogPost(`${t}.md`,this.owner),()=>this.reader.getBlogPost(`${t}.md`))??void 0}getMemos(){return this.fresh(t=>t.getMemos(this.owner),()=>this.reader.getMemos())}getLinks(){return this.fresh(t=>t.getLinks(this.owner),()=>this.reader.getLinks())}getLikes(){return this.fresh(t=>t.getLikes(this.owner),()=>this.reader.getLikes())}async getSiteConfig(){if(this.token)try{let t=(0,m.Pe)(this.token),e=await t.repos.getContent({owner:this.owner,repo:this.repo,path:g.CT.siteConfig()});if(!Array.isArray(e.data)&&"content"in e.data){let t=Buffer.from(e.data.content,"base64").toString("utf-8");return JSON.parse(t)}}catch(t){console.warn("GitHub API site-config read failed, falling back to raw URL:",t)}try{let t=`https://raw.githubusercontent.com/${this.owner}/${this.repo}/main/${g.CT.siteConfig()}`,e=await fetch(t);if(!e.ok)return null;return await e.json()}catch{return null}}async createBlogPost(t){let e=this.requireToken();return await (0,w.I7)(t.title,t.content,e,t.discussions,t.location,t.status,this.target),(0,h.gk)(t.title)}async updateBlogPost(t,e){let r=this.requireToken();return await (0,w.Kx)(t,e.title,e.content,r,e.discussions,e.location,e.status,this.target),t}async deleteBlogPost(t){await (0,w.XD)(t,this.requireToken(),this.target)}async uploadAsset(t){return(0,w.Ix)(t,this.requireToken(),this.target)}async createMemo(t){let e=g.CT.memos(),{data:r,sha:i}=await this.getJsonFile(e),s=Array.isArray(r)?r:[];return await this.putFile(e,JSON.stringify([t,...s],null,2),`Add memo ${t.id}`,i),t}async updateMemo(t,e){let r=g.CT.memos(),{data:i,sha:s}=await this.getJsonFile(r),n=Array.isArray(i)?i:[],o=n.findIndex(e=>e.id===t);if(-1===o)throw Error("Memo not found");let a={...n[o],content:e},l=n.map((t,e)=>e===o?a:t);return await this.putFile(r,JSON.stringify(l,null,2),`Update memo ${t}`,s),a}async deleteMemo(t){let e=g.CT.memos(),{data:r,sha:i}=await this.getJsonFile(e),s=Array.isArray(r)?r:[];await this.putFile(e,JSON.stringify(s.filter(e=>e.id!==t),null,2),`Delete memo ${t}`,i)}async updateLikes(t){let e=g.CT.likes(),{sha:r}=await this.getJsonFile(e);await this.putFile(e,JSON.stringify(t,null,2),"Update likes",r)}highlights(){return new n.Bi((0,m.Pe)(this.token),this.owner)}async getJsonFile(t){let e=this.writeOctokit();try{let r=await e.repos.getContent({owner:this.owner,repo:this.repo,path:t});if(Array.isArray(r.data)||!("content"in r.data))return{data:null};let i=Buffer.from(r.data.content,"base64").toString("utf-8");return{data:JSON.parse(i),sha:r.data.sha}}catch(t){if(t?.status===404)return{data:null};throw t}}putFile(t,e,r,i){return(0,m.gO)(this.writeOctokit(),this.owner,this.repo,t,r,e,i)}}function A(t){var e;return"local"===(e=(0,i.D)(t)).kind?new p(e.dir):new B({owner:e.owner,repo:e.repo,token:e.token})}}};
14
+ ${r}`}function n(t){let e=t.match(/date:\s*(.+)/);return e?e[1]:void 0}function o(t){let e=t.match(/status:\s*(.+)/);return e?e[1].trim():void 0}r.d(e,{Mv:()=>o,X4:()=>s,gk:()=>i,xr:()=>n})},31470:(t,e,r)=>{r.d(e,{Bf:()=>s,CT:()=>o});let i="data",s={rootKeep:()=>".gitkeep",blogDir:()=>"blog",blogDirKeep:()=>"blog/.gitkeep",blogPost:t=>`blog/${t}.md`,blogFile:t=>`blog/${t}`,blogManifest:()=>"blog-manifest.json",memos:()=>"memos.json",likes:()=>"likes.json",siteConfig:()=>"site-config.json",highlightsDir:()=>"highlights",highlightsFile:t=>`highlights/${t}.json`},n=t=>`${i}/${t}`,o={root:()=>i,rootKeep:()=>n(s.rootKeep()),blogDir:()=>n(s.blogDir()),blogDirKeep:()=>n(s.blogDirKeep()),blogPost:t=>n(s.blogPost(t)),blogFile:t=>n(s.blogFile(t)),blogManifest:()=>n(s.blogManifest()),memos:()=>n(s.memos()),likes:()=>n(s.likes()),siteConfig:()=>n(s.siteConfig()),highlightsDir:()=>n(s.highlightsDir()),highlightsFile:t=>n(s.highlightsFile(t))}},82575:(t,e,r)=>{r.d(e,{I7:()=>f,XD:()=>p,CR:()=>y,Kx:()=>m,Ix:()=>w});var i=r(94545),s=r(31470);async function n(t,e,r){try{let n;let o=new i.v({auth:t}),{data:a}=await o.repos.getContent({owner:e,repo:r,path:s.CT.blogDir()});if(!Array.isArray(a)){console.error("Expected array of files but got:",typeof a);return}let l=a.filter(t=>"file"===t.type&&t.name.endsWith(".md")&&".gitkeep"!==t.name).map(t=>t.name).sort();try{let{data:t}=await o.repos.getContent({owner:e,repo:r,path:s.CT.blogManifest()});!Array.isArray(t)&&"sha"in t&&(n=t.sha)}catch(t){console.log("Blog manifest does not exist yet, will create it")}await o.repos.createOrUpdateFileContents({owner:e,repo:r,path:s.CT.blogManifest(),message:"Update blog manifest",content:Buffer.from(JSON.stringify({files:l},null,2)).toString("base64"),sha:n}),console.log("Blog manifest updated successfully with",l.length,"files")}catch(t){console.error("Failed to update blog manifest:",t)}}var o=r(42491),a=r(55315),l=r.n(a),c=r(45854);let u="cici";async function g(t,e,r){try{let{data:i}=await t.repos.get({owner:e,repo:r});if(!i.description){let{data:i}=await t.users.getAuthenticated(),s=i.login;await t.repos.update({owner:e,repo:r,description:`https://tinymind.me/${s}`}),console.log(`Updated repository description to https://tinymind.me/${s}`)}}catch(e){if((0,c.XD)(e))await t.repos.createForAuthenticatedUser({name:r,auto_init:!0}),console.log(`Created new repository: ${r}`);else throw e}try{let{data:i}=await t.repos.getContent({owner:e,repo:r,path:"README.md"});if(console.log("README content:",i),"content"in i){let s=Buffer.from(i.content,"base64").toString("utf-8");console.log("README Decoded content:",s.trim()),(""===s.trim()||"# tinymind-blog"===s.trim())&&(await t.repos.createOrUpdateFileContents({owner:e,repo:r,path:"README.md",message:"Update README.md with default content",content:Buffer.from("# cici Blog\n\nWrite blog posts and memos at https://tinymind.me with data stored on GitHub.").toString("base64"),sha:i.sha}),console.log("README.md updated with default content"))}}catch(i){if(i instanceof Error&&"status"in i&&404===i.status){let i=Buffer.from("Write blog posts and memos at https://tinymind.me with data stored on GitHub.").toString("base64");await t.repos.createOrUpdateFileContents({owner:e,repo:r,path:"README.md",message:"Initial commit: Add README.md",content:i})}else throw i}}async function d(t,e,r){try{await (0,c.QF)(t,e,r,s.CT.rootKeep(),"Initialize content directory",""),await (0,c.QF)(t,e,r,s.CT.blogDirKeep(),"Initialize blog directory",""),await (0,c.QF)(t,e,r,s.CT.memos(),"Initialize memos.json","[]")}catch(t){throw console.error("Error ensuring content structure:",t),t}}async function h(t,e,r){await g(t,e,r),await d(t,e,r)}async function f(t,e,r,i=[],a,l="published",u){let g=(0,c.Pe)(r),{owner:d,repo:f}=u??await (0,c.rP)(r);await h(g,d,f);let p=`${(0,o.gk)(t)}.md`,m=s.CT.blogFile(p),w=(0,o.X4)({title:t,date:new Date().toISOString(),content:e,status:l,location:a,discussions:i});await g.repos.createOrUpdateFileContents({owner:d,repo:f,path:m,message:`Add blog post: ${t}`,content:Buffer.from(w).toString("base64")}),await n(r,d,f)}async function p(t,e,r){if(console.log("Deleting blog post..."),!e)throw Error("Access token is required");let i=(0,c.Pe)(e);try{let{owner:o,repo:a}=r??await (0,c.rP)(e),l=decodeURIComponent(t),u=`${l}.md`,g=s.CT.blogFile(u);console.log(`Attempting to delete file: ${g}`);let d=await i.repos.getContent({owner:o,repo:a,path:g});if(Array.isArray(d.data)||!("sha"in d.data))throw Error("Unexpected response when fetching current blog post");await i.repos.deleteFile({owner:o,repo:a,path:g,message:"Delete blog post",sha:d.data.sha}),console.log("Blog post deleted successfully"),await n(e,o,a)}catch(t){throw console.error("Error deleting blog post:",t),t}}async function m(t,e,r,i,a=[],l,u,g){if(console.log("Updating blog post..."),!i)throw Error("Access token is required");let d=(0,c.Pe)(i);try{let{owner:h,repo:f}=g??await (0,c.rP)(i),{content:p,sha:m}=await (0,c.LK)(d,h,f,s.CT.blogPost(t)),w=(0,o.xr)(p)??new Date().toISOString(),y=void 0!==u?u:(0,o.Mv)(p)??"published",b=(0,o.X4)({title:e,date:w,content:r,status:y,location:l,discussions:a});await (0,c.gO)(d,h,f,s.CT.blogPost(t),"Update blog post",b,m),console.log("Blog post updated successfully"),await n(i,h,f)}catch(t){throw console.error("Error updating blog post:",t),t}}async function w(t,e,r){if(console.log("Uploading image..."),!e)throw Error("Access token is required");let i=(0,c.Pe)(e);console.log("Octokit instance created");try{let{owner:s,repo:n}=r??await (0,c.rP)(e);console.log("Repo info:",{owner:s,repo:n});let{data:o}=await i.repos.get({owner:s,repo:n}),a=o.default_branch;console.log("Default branch:",a),await h(i,s,n),console.log("GitHub structure initialized");let u=new Date().toISOString().split("T")[0],g=Date.now().toString(),d=l().extname(t.name),f=`${g}${d}`,p=`assets/images/${u}/${f}`;await (0,c.kP)(i,s,n,`assets/images/${u}`);let m=await (0,c.sT)(t),w=await i.repos.createOrUpdateFileContents({owner:s,repo:n,path:p,message:`Upload image: ${f}`,content:m});console.log(w),console.log("Image uploaded successfully");let y=w.data.content?.download_url;if(y){let t=y.split("/"),e=t[3],r=t[4],i=t.slice(6).join("/");return`https://github.com/${e}/${r}/blob/${a}/${i}?raw=true`}throw Error("Failed to get image URL")}catch(t){throw console.error("Error uploading image:",t),t}}async function y(t){let e,r;let i=null;if(t.length>40)try{i=(0,c.Pe)(t);let s=await (0,c.rP)(t);e=s.owner,r=s.repo}catch(i){console.error("Error getting authenticated user:",i),e=t,r=u}else e=t,r=u;let s=`https://github.com/${e}.png`,n=`https://github.com/${e}.png`,o=s,a=n;return i&&(o=await b(i,e,r,"assets/icon.jpg",s),a=await b(i,e,r,"assets/icon-144.jpg",n)),{iconPath:o,appleTouchIconPath:a}}async function b(t,e,r,i,s){try{return await t.repos.getContent({owner:e,repo:r,path:i}),`https://github.com/${e}/${r}/blob/main/${i}?raw=true`}catch(t){return console.warn(`No icon found in ${i}, using default:`,s),s}}},45854:(t,e,r)=>{r.d(e,{LK:()=>o,Pe:()=>s,QF:()=>g,XD:()=>u,gO:()=>a,kP:()=>l,rP:()=>n,sT:()=>c});var i=r(94545);function s(t){if(!t)throw Error("Access token is required");return new i.v({auth:t})}async function n(t){if(!t)throw Error("Access token is required");let e=s(t);try{let{data:t}=await e.users.getAuthenticated();return{owner:t.login,repo:"cici"}}catch(t){throw console.error("Error getting authenticated user:",t),Error("Failed to get authenticated user")}}async function o(t,e,r,i){let s=await t.repos.getContent({owner:e,repo:r,path:i});if(Array.isArray(s.data)||!("content"in s.data))throw Error("Unexpected response from GitHub API");return{content:Buffer.from(s.data.content,"base64").toString("utf-8"),sha:s.data.sha}}async function a(t,e,r,i,s,n,o){let a={owner:e,repo:r,path:i,message:s,content:Buffer.from(n).toString("base64")};o&&(a.sha=o),await t.repos.createOrUpdateFileContents(a)}async function l(t,e,r,i){try{await t.repos.getContent({owner:e,repo:r,path:i})}catch(s){if(s instanceof Error&&"status"in s&&404===s.status)await t.repos.createOrUpdateFileContents({owner:e,repo:r,path:`${i}/.gitkeep`,message:`Create directory: ${i}`,content:""});else throw s}}async function c(t){return new Promise((e,r)=>{let i=new FileReader;i.readAsDataURL(t),i.onload=()=>{"string"==typeof i.result?e(i.result.split(",")[1]):r(Error("Failed to convert file to base64"))},i.onerror=t=>r(t)})}function u(t){return t instanceof Error&&"status"in t&&404===t.status}async function g(t,e,r,i,s,n){try{await t.repos.getContent({owner:e,repo:r,path:i}),console.log(`File ${i} already exists.`)}catch(o){if(u(o)){console.log(`Creating file ${i}...`);try{await a(t,e,r,i,s,n),console.log(`File ${i} created successfully.`)}catch(t){throw console.error(`Error creating file ${i}:`,t),t}}else throw console.error(`Error checking file ${i}:`,o),o}}},54428:(t,e,r)=>{r.d(e,{Bi:()=>p,K4:()=>f,VD:()=>m});var i=r(92048),s=r(55315),n=r.n(s),o=r(94545),a=r(8502),l=r(31470),c=r(88069);let u=new Map;function g(t){return l.CT.highlightsFile(t)}function d(t){if(!t||0===t.length||t.length>200||t.includes("/")||t.includes("\\")||t.includes("\0")||t.includes("..")||t.startsWith("."))throw Error(`Invalid postId: ${t}`)}function h(t){if("object"==typeof t&&null!==t&&"status"in t){let e=t.status;return"number"==typeof e?e:void 0}}class f{constructor(t){this.rootDir=t}absPath(t){return n().join(this.rootDir,l.Bf.highlightsFile(t))}async load(t){d(t);try{let e=await i.promises.readFile(this.absPath(t),"utf-8");return{data:a.x.parse(JSON.parse(e)),sha:null}}catch(e){if("ENOENT"===e?.code)return{data:(0,a.Bk)(t),sha:null};throw e}}async save(t,e,r,s){d(t);let o=a.x.parse(e),l=this.absPath(t);return await i.promises.mkdir(n().dirname(l),{recursive:!0}),await i.promises.writeFile(l,JSON.stringify(o,null,2),"utf-8"),{sha:""}}}class p{constructor(t,e,r="cici"){this.octokit=t,this.owner=e,this.repo=r}async load(t){d(t);let e=u.get(t);if(e&&e.expiresAt>Date.now())return{data:e.data,sha:e.sha};let r=await this.readFile(t);if(!r){let e=(0,a.Bk)(t);return u.set(t,{data:e,sha:null,expiresAt:Date.now()+3e4}),{data:e,sha:null}}let i=a.x.parse(JSON.parse(r.content));return u.set(t,{data:i,sha:r.sha,expiresAt:Date.now()+3e4}),{data:i,sha:r.sha}}async save(t,e,r,i){d(t);let s=a.x.parse(e),n=Buffer.from(JSON.stringify(s,null,2)).toString("base64"),o=0,l=r;for(;o<3;)try{let e=await this.octokit.repos.createOrUpdateFileContents({owner:this.owner,repo:this.repo,path:g(t),message:i,content:n,...l?{sha:l}:{}}),r=e.data.content?.sha??"";return u.set(t,{data:s,sha:r,expiresAt:Date.now()+3e4}),{sha:r}}catch(r){let e=h(r);if(409===e||422===e){u.delete(t),o++;let e=await this.readFile(t);l=e?.sha??null;continue}throw r}throw Error("Save failed after 3 retries due to write contention")}async readFile(t){try{let e=(await this.octokit.repos.getContent({owner:this.owner,repo:this.repo,path:g(t)})).data;if(Array.isArray(e)||"file"!==e.type)return null;return{content:Buffer.from(e.content,"base64").toString("utf-8"),sha:e.sha}}catch(t){if(404===h(t))return null;throw t}}}function m(t={}){let e=(0,c.D)(t.ownerToken);if("local"===e.kind)return new f(e.dir);{let r=t.ownerToken??e.token??process.env.HIGHLIGHTS_GH_TOKEN;if(!r)throw Error("HIGHLIGHTS_GH_TOKEN not configured. Inline comments require a service token in production.");return new p(new o.v({auth:r}),e.owner,e.repo)}}},8502:(t,e,r)=>{r.d(e,{Bk:()=>u,Om:()=>s,x:()=>c});var i=r(4037);let s=i.Ry({startOffset:i.Rx().int().nonnegative(),endOffset:i.Rx().int().nonnegative(),exact:i.Z_().min(1).max(1e3),prefix:i.Z_().max(64),suffix:i.Z_().max(64)}).refine(t=>t.endOffset>=t.startOffset,{message:"endOffset must be >= startOffset"}),n=i.IM(i.Z_(),i.IX(i.Z_())),o=i.Km(["ios","android","web"]),a=i.Ry({id:i.Z_().min(1).max(64),parentId:i.Z_().min(1).max(64).nullable(),body:i.Z_().min(1).max(2e3),authorName:i.Z_().max(40).nullable(),fingerprint:i.Z_().min(1).max(128),country:i.Z_().max(8),platform:o,reactions:n,resolved:i.O7(),createdAt:i.Z_().datetime(),hidden:i.O7(),hiddenReason:i.Z_().max(200).optional()}),l=i.Ry({id:i.Z_().min(1).max(64),anchor:s,thread:i.IX(a).min(1),resolved:i.O7(),createdAt:i.Z_().datetime()}),c=i.Ry({postId:i.Z_().min(1),highlights:i.IX(l),schemaVersion:i.i0(1)});function u(t){return{postId:t,highlights:[],schemaVersion:1}}},81336:(t,e,r)=>{r.d(e,{T:()=>g,X:()=>u});var i=r(92048),s=r.n(i),n=r(55315),o=r.n(n),a=r(73194);let l={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".avif":"image/avif"};function c(){return o().join((0,a.$)(),"assets")}async function u(t,e){let r=function(t,e){let r=o().extname(t||"").toLowerCase();if(r&&l[r])return r;if(e){let t=`.${e.split("/")[1]||""}`.toLowerCase();if(l[t])return t}return r||".png"}(t.name,t.type),i=o().posix.join("images",e.date),n=`${e.id}${r}`,a=o().join(c(),i);s().mkdirSync(a,{recursive:!0});let u=Buffer.from(await t.arrayBuffer());return s().writeFileSync(o().join(a,n),u),`/api/asset/${i}/${n}`}function g(t){if(t.some(t=>!t||".."===t||t.includes("\0")||t.includes("/")||t.includes("\\")))return null;let e=c(),r=o().resolve(e,...t);if(r!==e&&!r.startsWith(e+o().sep)||!s().existsSync(r)||!s().statSync(r).isFile())return null;let i=o().extname(r).toLowerCase();return{body:s().readFileSync(r),contentType:l[i]??"application/octet-stream"}}},88069:(t,e,r)=>{r.d(e,{D:()=>o});var i=r(55315),s=r.n(i);let n="cici";function o(t){let e=process.env.CICI_DIR;if(e)return{kind:"local",dir:s().resolve(e)};let r=process.env.CICI_REPO;if(r){let[e,i]=r.split("/");if(!e)throw Error(`Invalid CICI_REPO "${r}" — expected "owner/name".`);return{kind:"github",owner:e,repo:i||n,token:process.env.CICI_TOKEN||t||void 0}}return{kind:"github",owner:process.env.GITHUB_USERNAME||"metrue",repo:n,token:t||void 0}}},73194:(t,e,r)=>{r.d(e,{$:()=>a,g:()=>o});var i=r(55315),s=r.n(i),n=r(88069);function o(){return"local"===(0,n.D)().kind}function a(){let t=process.env.CICI_DIR;return t?s().resolve(t):s().join(process.cwd(),"sample-content")}},63607:(t,e,r)=>{r.d(e,{VH:()=>T});var i=r(88069),s=r(81336),n=r(54428),o=r(92048),a=r.n(o),l=r(55315),c=r.n(l);function u(t){let{frontmatter:e}=function(t){let e=t.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);return e?{frontmatter:e[1],body:e[2].replace(/^\n/,"")}:{frontmatter:"",body:t}}(t),r=e.match(/title:[ \t]*(.+)/),i=e.match(/date:[ \t]*(.+)/),s=e.match(/latitude:[ \t]*(.+)/),n=e.match(/longitude:[ \t]*(.+)/),o=e.match(/city:[ \t]*(.+)/),a=e.match(/street:[ \t]*(.+)/),l=e.match(/status:[ \t]*(.+)/),c=e.match(/publishedAt:[ \t]*(.+)/),u=e.match(/lastModified:[ \t]*(.+)/),g=s?.[1]?.trim(),d=n?.[1]?.trim(),h=g?parseFloat(g):NaN,f=d?parseFloat(d):NaN;return{title:r?r[1].trim():"",date:i?i[1].trim():new Date().toISOString(),discussions:function(t){let e=[],r=t.match(/external_discussions:\s*\n([\s\S]*?)(?=\n\w|$)/);if(!r)return e;let i=r[1].split("\n").filter(t=>t.trim()),s={};for(let t of i)t.includes("platform:")?(s.platform&&s.url&&e.push(s),s={platform:t.split(":")[1].trim()}):t.includes("url:")&&s.platform&&(s.url=t.split("url:")[1].trim());return s.platform&&s.url&&e.push(s),e}(e),...g&&!isNaN(h)&&{latitude:h},...d&&!isNaN(f)&&{longitude:f},...o&&o[1].trim()&&{city:o[1].trim()},...a&&a[1].trim()&&{street:a[1].trim()},...l&&{status:l[1].trim()},...c&&{publishedAt:c[1].trim()},...u&&{lastModified:u[1].trim()}}}var g=r(31470),d=r(73194),h=r(42491);class f{abs(t){return c().join((0,d.$)(),t)}get dataDir(){return(0,d.$)()}get blogDir(){return this.abs(g.Bf.blogDir())}async getBlogPosts(t=!1){try{if(!a().existsSync(this.blogDir))return console.log("Blog directory does not exist, returning empty array"),[];let e=a().readdirSync(this.blogDir).filter(t=>t.endsWith(".md")&&".gitkeep"!==t),r=[];for(let t of e){let e=await this.getBlogPost(t);e&&r.push(e)}let i=r.sort((t,e)=>new Date(e.date).getTime()-new Date(t.date).getTime());if(t)return i;return i.filter(t=>"published"===t.status)}catch(t){return console.error("Error reading local blog posts:",t),[]}}async getBlogPost(t){try{let e=c().join(this.blogDir,t);if(!a().existsSync(e))return null;let r=a().readFileSync(e,"utf-8"),i=u(r),s=this.getFirstImageURLFrom(r);return{id:t.replace(".md",""),title:i.title||t.replace(".md",""),content:r,imageUrl:s,date:i.date?new Date(i.date).toISOString():new Date().toISOString(),discussions:i.discussions.length>0?i.discussions:void 0,latitude:i.latitude,longitude:i.longitude,city:i.city,street:i.street,status:i.status||"published",publishedAt:i.publishedAt||i.date,lastModified:i.lastModified||i.date||new Date().toISOString()}}catch(e){return console.error(`Error reading blog post ${t}:`,e),null}}async getMemos(){try{let t=this.abs(g.Bf.memos());if(!a().existsSync(t))return console.log("memos.json not found, returning empty array"),[];let e=a().readFileSync(t,"utf-8"),r=JSON.parse(e);return Array.isArray(r)?r:[]}catch(t){return console.error("Error reading local memos:",t),[]}}async getSiteConfig(){try{let t=a().readFileSync(this.abs(g.Bf.siteConfig()),"utf-8");return JSON.parse(t)}catch{return null}}async getLinks(){try{let t=this.abs(g.Bf.siteConfig());if(!a().existsSync(t))return{};let e=a().readFileSync(t,"utf-8");return JSON.parse(e).links||{}}catch(t){return console.warn("Error reading local site config:",t),{}}}async getLikes(){try{let t=this.abs(g.Bf.likes());if(!a().existsSync(t))return console.log("likes.json not found, returning empty object"),{};let e=a().readFileSync(t,"utf-8"),r=JSON.parse(e);return"object"==typeof r&&null!==r?r:{}}catch(t){return console.error("Error reading local likes:",t),{}}}async updateLikes(t){try{let e=this.abs(g.Bf.likes()),r=JSON.stringify(t,null,2);a().writeFileSync(e,r,"utf-8"),console.log("Updated local likes data")}catch(t){throw console.error("Error updating local likes:",t),Error("Failed to update local likes data")}}async createMemo(t){try{let e=await this.getMemos(),r=[t,...e],i=this.abs(g.Bf.memos()),s=JSON.stringify(r,null,2);return a().writeFileSync(i,s,"utf-8"),console.log("Created new memo locally"),t}catch(t){throw console.error("Error creating local memo:",t),Error("Failed to create memo locally")}}async createBlogPost(t){let e=(0,h.gk)(t.title),r=this.abs(g.Bf.blogFile(`${e}.md`)),i=(0,h.X4)({title:t.title,date:new Date().toISOString(),content:t.content,status:t.status,location:t.location,discussions:t.discussions});return a().mkdirSync(c().dirname(r),{recursive:!0}),a().writeFileSync(r,i,"utf-8"),e}async updateBlogPost(t,e){let r=this.abs(g.Bf.blogPost(t)),i="";try{i=a().readFileSync(r,"utf-8")}catch{}let s=(0,h.xr)(i)??new Date().toISOString(),n=void 0!==e.status?e.status:(0,h.Mv)(i)??"published",o=(0,h.X4)({title:e.title,date:s,content:e.content,status:n,location:e.location,discussions:e.discussions});return a().mkdirSync(c().dirname(r),{recursive:!0}),a().writeFileSync(r,o,"utf-8"),t}async deleteBlogPost(t){let e=this.abs(g.Bf.blogPost(t));try{a().unlinkSync(e)}catch(t){if(t?.code!=="ENOENT")throw t}}async updateMemo(t,e){let r=await this.getMemos(),i=r.findIndex(e=>e.id===t);if(-1===i)throw Error("Memo not found");let s={...r[i],content:e},n=r.map((t,e)=>e===i?s:t);return a().writeFileSync(this.abs(g.Bf.memos()),JSON.stringify(n,null,2),"utf-8"),s}async deleteMemo(t){let e=(await this.getMemos()).filter(e=>e.id!==t);a().writeFileSync(this.abs(g.Bf.memos()),JSON.stringify(e,null,2),"utf-8")}async getDrafts(){return(await this.getBlogPosts(!0)).filter(t=>"draft"===t.status)}async getAllBlogPosts(){return this.getBlogPosts(!0)}async checkRepositoryHealth(){return a().existsSync(this.dataDir)}getFirstImageURLFrom(t){let e=/(https?:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|webp))/i.exec(t);if(e){let t=e[1];return t.startsWith("https://github")?`${t}?raw=true`:t}return null}}class p{constructor(t){this.dir=t,this.client=new f}get label(){return`local: ${this.dir}`}canWrite(){return!0}getBlogPosts(t){return this.client.getBlogPosts(t?.includeDrafts??!1)}async getBlogPost(t){return await this.client.getBlogPost(`${t}.md`)??void 0}getMemos(){return this.client.getMemos()}getLinks(){return this.client.getLinks()}getLikes(){return this.client.getLikes()}getSiteConfig(){return this.client.getSiteConfig()}createBlogPost(t){return this.client.createBlogPost(t)}updateBlogPost(t,e){return this.client.updateBlogPost(t,e)}deleteBlogPost(t){return this.client.deleteBlogPost(t)}createMemo(t){return this.client.createMemo(t)}updateMemo(t,e){return this.client.updateMemo(t,e)}deleteMemo(t){return this.client.deleteMemo(t)}updateLikes(t){return this.client.updateLikes(t)}uploadAsset(t){return(0,s.X)(t,{date:new Date().toISOString().split("T")[0],id:Date.now().toString()})}highlights(){return new n.K4(this.dir)}}var m=r(45854),w=r(82575),y=r(94545);let b=t=>{let e=/(https?:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|webp))/i.exec(t);if(e){let t=e[1];return t.startsWith("https://github")?`${t}?raw=true`:t}return null};class k{constructor(t,e="cici"){this.accessToken=t,this.repo=e}async getSafeOwner(t){if(t&&"true"!==t)return t;if(this.accessToken)try{let t=new y.v({auth:this.accessToken}),{data:e}=await t.users.getAuthenticated();if(e.login&&"true"!==e.login)return e.login}catch(t){console.warn("Failed to get authenticated user:",t)}return process.env.GITHUB_USERNAME||"metrue"}async getBlogPosts(t,e=!1){let r=this.accessToken?new y.v({auth:this.accessToken}):new y.v,i=await this.getSafeOwner(t);try{let t=await r.repos.getContent({owner:i,repo:this.repo,path:g.CT.blogDir()});if(!Array.isArray(t.data))return console.warn("Unexpected response from GitHub API: data is not an array"),[];let s=(await Promise.all(t.data.filter(t=>"file"===t.type&&".gitkeep"!==t.name&&t.name.endsWith(".md")).map(async t=>this.getBlogPost(t.name,i)))).filter(t=>void 0!==t);if(e&&this.accessToken)return s;return s.filter(t=>"published"===t.status)}catch(t){if(console.error("Error fetching blog posts:",t),t instanceof Error&&"status"in t&&404===t.status)return console.log("Blog directory does not exist, returning empty array"),[];throw t}}async getBlogPost(t,e){let r=this.accessToken?new y.v({auth:this.accessToken}):new y.v,i=await this.getSafeOwner(e),s=await r.repos.getContent({owner:i,repo:this.repo,path:g.CT.blogFile(t)});if("content"in s.data){let e=Buffer.from(s.data.content,"base64").toString("utf-8"),r=u(e);return{id:t.replace(".md",""),title:r.title?decodeURIComponent(r.title):decodeURIComponent(t.replace(".md","")),content:e,imageUrl:b(e),date:r.date?new Date(r.date).toISOString():new Date().toISOString(),discussions:r.discussions.length>0?r.discussions:void 0,latitude:r.latitude,longitude:r.longitude,city:r.city,street:r.street,status:r.status||"published",publishedAt:r.publishedAt||r.date,lastModified:r.lastModified||r.date||new Date().toISOString()}}}async getMemos(t){let e=this.accessToken?new y.v({auth:this.accessToken}):new y.v,r=await this.getSafeOwner(t);try{let t=await e.repos.getContent({owner:r,repo:this.repo,path:g.CT.memos()});if(Array.isArray(t.data)||!("content"in t.data))return[];let i=Buffer.from(t.data.content,"base64").toString("utf-8");return JSON.parse(i)}catch(t){return console.error("Error fetching public memos:",t),[]}}async getLinks(t){let e=this.accessToken?new y.v({auth:this.accessToken}):new y.v,r=await this.getSafeOwner(t);try{let t=await e.repos.getContent({owner:r,repo:this.repo,path:g.CT.siteConfig()});if(Array.isArray(t.data)||!("content"in t.data))return{};let i=Buffer.from(t.data.content,"base64").toString("utf-8");return JSON.parse(i).links||{}}catch(t){return console.warn("Error fetching links:",t),{}}}async getLikes(t){let e=this.accessToken?new y.v({auth:this.accessToken}):new y.v,r=await this.getSafeOwner(t);try{let t=await e.repos.getContent({owner:r,repo:this.repo,path:g.CT.likes()});if(Array.isArray(t.data)||!("content"in t.data))return{};let i=Buffer.from(t.data.content,"base64").toString("utf-8");return JSON.parse(i)}catch(t){if(console.error("Error fetching likes:",t),t instanceof Error&&"status"in t&&404===t.status)return{};throw t}}async updateLikes(t,e){let r=new y.v({auth:this.accessToken}),i=await this.getSafeOwner(e);try{let e;try{let t=await r.repos.getContent({owner:i,repo:this.repo,path:g.CT.likes()});!Array.isArray(t.data)&&"sha"in t.data&&(e=t.data.sha)}catch(t){}await r.repos.createOrUpdateFileContents({owner:i,repo:this.repo,path:g.CT.likes(),message:`Update likes data - ${new Date().toISOString()}`,content:Buffer.from(JSON.stringify(t,null,2)).toString("base64"),...e&&{sha:e}})}catch(t){throw console.error("Error updating likes:",t),Error("Failed to update likes data")}}async getDrafts(t){return(await this.getBlogPosts(t,!0)).filter(t=>"draft"===t.status)}async getAllBlogPosts(t){return this.getBlogPosts(t,!0)}}let S=(t,e)=>new k(t,e),$=t=>{let e=/(https?:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|webp))/i.exec(t);if(e){let t=e[1];return t.startsWith("https://github")?`${t}?raw=true`:t}return null};class C{constructor(t,e="cici"){this.owner=t,this.baseUrl=`https://raw.githubusercontent.com/${t}/${e}/main`}async getBlogPosts(t=!1){try{try{let e=await fetch(`${this.baseUrl}/${g.CT.blogManifest()}`);if(e.ok){let r=await e.json(),i=r.files||[...r.published||[],...r.drafts||[]],s=(await Promise.all(i.map(t=>this.getBlogPost(t)))).filter(t=>null!==t);if(t)return s;return s.filter(t=>"published"===t.status)}}catch{}return console.warn("Blog manifest not found, returning empty array"),[]}catch(t){throw console.error("Error fetching blog posts via raw URLs:",t),t}}async getBlogPost(t){try{let e=await fetch(`${this.baseUrl}/${g.CT.blogFile(t)}`);if(!e.ok){if(404===e.status)return null;throw Error(`HTTP ${e.status}: ${e.statusText}`)}let r=await e.text(),i=u(r);return{id:t.replace(".md",""),title:i.title?decodeURIComponent(i.title.trim()):decodeURIComponent(t.replace(".md","")),content:r,imageUrl:$(r),date:i.date?new Date(i.date.trim()).toISOString():new Date().toISOString(),discussions:i.discussions.length>0?i.discussions:void 0,latitude:i.latitude,longitude:i.longitude,city:i.city,street:i.street,status:i.status||"published",publishedAt:i.publishedAt||i.date,lastModified:i.lastModified||i.date||new Date().toISOString()}}catch(e){return console.error(`Error fetching blog post ${t}:`,e),null}}async getMemos(){try{let t=await fetch(`${this.baseUrl}/${g.CT.memos()}`);if(!t.ok){if(404===t.status)return console.log("memos.json not found, returning empty array"),[];throw Error(`HTTP ${t.status}: ${t.statusText}`)}let e=await t.json();return Array.isArray(e)?e:[]}catch(t){return console.error("Error fetching memos via raw URLs:",t),[]}}async getLinks(){try{let t=await fetch(`${this.baseUrl}/${g.CT.siteConfig()}`);if(!t.ok){if(404===t.status)return{};throw Error(`HTTP ${t.status}: ${t.statusText}`)}return(await t.json()).links||{}}catch(t){return console.warn("Error fetching links via raw URLs:",t),{}}}async getLikes(){try{let t=await fetch(`${this.baseUrl}/${g.CT.likes()}`);if(!t.ok){if(404===t.status)return console.log("likes.json not found, returning empty object"),{};throw Error(`HTTP ${t.status}: ${t.statusText}`)}let e=await t.json();return"object"==typeof e&&null!==e?e:{}}catch(t){return console.error("Error fetching likes via raw URLs:",t),{}}}async getDrafts(){return(await this.getBlogPosts(!0)).filter(t=>"draft"===t.status)}async getAllBlogPosts(){return this.getBlogPosts(!0)}async checkRepositoryHealth(){try{return(await fetch(`${this.baseUrl}/README.md`)).ok}catch{return!1}}}class B extends Error{constructor(t="This cici instance is read-only. Provide a token to enable editing."){super(t),this.name="ReadOnlyError"}}class E{constructor(t){this.owner=t.owner,this.repo=t.repo,this.token=t.token,this.reader=new C(t.owner,t.repo),this.apiReader=t.token?S(t.token,t.repo):void 0,this.target={owner:t.owner,repo:t.repo}}async fresh(t,e){if(this.apiReader)try{return await t(this.apiReader)}catch(t){console.warn("GitHub API read failed, falling back to raw URL:",t)}return e()}get label(){return`github: ${this.owner}/${this.repo}${this.token?"":" (read-only)"}`}canWrite(){return!!this.token}requireToken(){if(!this.token)throw new B;return this.token}writeOctokit(){return(0,m.Pe)(this.requireToken())}getBlogPosts(t){let e=t?.includeDrafts??!1;return this.fresh(t=>t.getBlogPosts(this.owner,e),()=>this.reader.getBlogPosts(e))}async getBlogPost(t){return await this.fresh(e=>e.getBlogPost(`${t}.md`,this.owner),()=>this.reader.getBlogPost(`${t}.md`))??void 0}getMemos(){return this.fresh(t=>t.getMemos(this.owner),()=>this.reader.getMemos())}getLinks(){return this.fresh(t=>t.getLinks(this.owner),()=>this.reader.getLinks())}getLikes(){return this.fresh(t=>t.getLikes(this.owner),()=>this.reader.getLikes())}async getSiteConfig(){if(this.token)try{let t=(0,m.Pe)(this.token),e=await t.repos.getContent({owner:this.owner,repo:this.repo,path:g.CT.siteConfig()});if(!Array.isArray(e.data)&&"content"in e.data){let t=Buffer.from(e.data.content,"base64").toString("utf-8");return JSON.parse(t)}}catch(t){console.warn("GitHub API site-config read failed, falling back to raw URL:",t)}try{let t=`https://raw.githubusercontent.com/${this.owner}/${this.repo}/main/${g.CT.siteConfig()}`,e=await fetch(t);if(!e.ok)return null;return await e.json()}catch{return null}}async createBlogPost(t){let e=this.requireToken();return await (0,w.I7)(t.title,t.content,e,t.discussions,t.location,t.status,this.target),(0,h.gk)(t.title)}async updateBlogPost(t,e){let r=this.requireToken();return await (0,w.Kx)(t,e.title,e.content,r,e.discussions,e.location,e.status,this.target),t}async deleteBlogPost(t){await (0,w.XD)(t,this.requireToken(),this.target)}async uploadAsset(t){return(0,w.Ix)(t,this.requireToken(),this.target)}async createMemo(t){let e=g.CT.memos(),{data:r,sha:i}=await this.getJsonFile(e),s=Array.isArray(r)?r:[];return await this.putFile(e,JSON.stringify([t,...s],null,2),`Add memo ${t.id}`,i),t}async updateMemo(t,e){let r=g.CT.memos(),{data:i,sha:s}=await this.getJsonFile(r),n=Array.isArray(i)?i:[],o=n.findIndex(e=>e.id===t);if(-1===o)throw Error("Memo not found");let a={...n[o],content:e},l=n.map((t,e)=>e===o?a:t);return await this.putFile(r,JSON.stringify(l,null,2),`Update memo ${t}`,s),a}async deleteMemo(t){let e=g.CT.memos(),{data:r,sha:i}=await this.getJsonFile(e),s=Array.isArray(r)?r:[];await this.putFile(e,JSON.stringify(s.filter(e=>e.id!==t),null,2),`Delete memo ${t}`,i)}async updateLikes(t){let e=g.CT.likes(),{sha:r}=await this.getJsonFile(e);await this.putFile(e,JSON.stringify(t,null,2),"Update likes",r)}highlights(){return new n.Bi((0,m.Pe)(this.token),this.owner,this.repo)}async getJsonFile(t){let e=this.writeOctokit();try{let r=await e.repos.getContent({owner:this.owner,repo:this.repo,path:t});if(Array.isArray(r.data)||!("content"in r.data))return{data:null};let i=Buffer.from(r.data.content,"base64").toString("utf-8");return{data:JSON.parse(i),sha:r.data.sha}}catch(t){if(t?.status===404)return{data:null};throw t}}putFile(t,e,r,i){return(0,m.gO)(this.writeOctokit(),this.owner,this.repo,t,r,e,i)}}function T(t){var e;return"local"===(e=(0,i.D)(t)).kind?new p(e.dir):new E({owner:e.owner,repo:e.repo,token:e.token})}}};
@@ -1 +1 @@
1
- "use strict";exports.id=719,exports.ids=[719],exports.modules={90455:(e,t,n)=>{n.d(t,{G:()=>s,L:()=>i});var r=n(45609);async function s(){let e=await (0,r.getServerSession)(i);return e?(e.accessToken?console.log("Session found with access token"):console.log("Session found, but no access token"),e):(console.log("No session found"),null)}let i={providers:[(0,n(77210).Z)({clientId:process.env.GITHUB_ID,clientSecret:process.env.GITHUB_SECRET,authorization:{params:{scope:"public_repo workflow"}}})],callbacks:{async jwt({token:e,account:t,profile:n}){t&&t.access_token&&(e.accessToken=t.access_token);let r=n&&"object"==typeof n&&"login"in n?n.login:void 0,s=t&&"object"==typeof t&&"username"in t?t.username:void 0;return(r||s)&&(e.username=r??s),e},session:async({session:e,token:t})=>(e.accessToken=t.accessToken,e.user&&(e.user.username=t.username),e)},secret:process.env.NEXTAUTH_SECRET,debug:!1}},31470:(e,t,n)=>{n.d(t,{Bf:()=>s,CT:()=>o});let r="data",s={rootKeep:()=>".gitkeep",blogDir:()=>"blog",blogDirKeep:()=>"blog/.gitkeep",blogPost:e=>`blog/${e}.md`,blogFile:e=>`blog/${e}`,blogManifest:()=>"blog-manifest.json",memos:()=>"memos.json",likes:()=>"likes.json",siteConfig:()=>"site-config.json",highlightsDir:()=>"highlights",highlightsFile:e=>`highlights/${e}.json`},i=e=>`${r}/${e}`,o={root:()=>r,rootKeep:()=>i(s.rootKeep()),blogDir:()=>i(s.blogDir()),blogDirKeep:()=>i(s.blogDirKeep()),blogPost:e=>i(s.blogPost(e)),blogFile:e=>i(s.blogFile(e)),blogManifest:()=>i(s.blogManifest()),memos:()=>i(s.memos()),likes:()=>i(s.likes()),siteConfig:()=>i(s.siteConfig()),highlightsDir:()=>i(s.highlightsDir()),highlightsFile:e=>i(s.highlightsFile(e))}},54428:(e,t,n)=>{n.d(t,{Bi:()=>m,K4:()=>p,VD:()=>w});var r=n(92048),s=n(55315),i=n.n(s),o=n(94545),a=n(8502),l=n(31470),c=n(73194);let u="cici",h=new Map;function f(e){return l.CT.highlightsFile(e)}function d(e){if(!e||0===e.length||e.length>200||e.includes("/")||e.includes("\\")||e.includes("\0")||e.includes("..")||e.startsWith("."))throw Error(`Invalid postId: ${e}`)}function g(e){if("object"==typeof e&&null!==e&&"status"in e){let t=e.status;return"number"==typeof t?t:void 0}}class p{constructor(e){this.rootDir=e}absPath(e){return i().join(this.rootDir,l.Bf.highlightsFile(e))}async load(e){d(e);try{let t=await r.promises.readFile(this.absPath(e),"utf-8");return{data:a.x.parse(JSON.parse(t)),sha:null}}catch(t){if("ENOENT"===t?.code)return{data:(0,a.Bk)(e),sha:null};throw t}}async save(e,t,n,s){d(e);let o=a.x.parse(t),l=this.absPath(e);return await r.promises.mkdir(i().dirname(l),{recursive:!0}),await r.promises.writeFile(l,JSON.stringify(o,null,2),"utf-8"),{sha:""}}}class m{constructor(e,t){this.octokit=e,this.owner=t}async load(e){d(e);let t=h.get(e);if(t&&t.expiresAt>Date.now())return{data:t.data,sha:t.sha};let n=await this.readFile(e);if(!n){let t=(0,a.Bk)(e);return h.set(e,{data:t,sha:null,expiresAt:Date.now()+3e4}),{data:t,sha:null}}let r=a.x.parse(JSON.parse(n.content));return h.set(e,{data:r,sha:n.sha,expiresAt:Date.now()+3e4}),{data:r,sha:n.sha}}async save(e,t,n,r){d(e);let s=a.x.parse(t),i=Buffer.from(JSON.stringify(s,null,2)).toString("base64"),o=0,l=n;for(;o<3;)try{let t=await this.octokit.repos.createOrUpdateFileContents({owner:this.owner,repo:u,path:f(e),message:r,content:i,...l?{sha:l}:{}}),n=t.data.content?.sha??"";return h.set(e,{data:s,sha:n,expiresAt:Date.now()+3e4}),{sha:n}}catch(n){let t=g(n);if(409===t||422===t){h.delete(e),o++;let t=await this.readFile(e);l=t?.sha??null;continue}throw n}throw Error("Save failed after 3 retries due to write contention")}async readFile(e){try{let t=(await this.octokit.repos.getContent({owner:this.owner,repo:u,path:f(e)})).data;if(Array.isArray(t)||"file"!==t.type)return null;return{content:Buffer.from(t.content,"base64").toString("utf-8"),sha:t.sha}}catch(e){if(404===g(e))return null;throw e}}}function w(e={}){if((0,c.g)())return new p((0,c.$)());let t=e.ownerToken??process.env.HIGHLIGHTS_GH_TOKEN;if(!t)throw Error("HIGHLIGHTS_GH_TOKEN not configured. Inline comments require a service token in production.");let n=process.env.GITHUB_USERNAME;if(!n)throw Error("GITHUB_USERNAME not configured.");return new m(new o.v({auth:t}),n)}},8502:(e,t,n)=>{n.d(t,{Bk:()=>u,Om:()=>s,x:()=>c});var r=n(4037);let s=r.Ry({startOffset:r.Rx().int().nonnegative(),endOffset:r.Rx().int().nonnegative(),exact:r.Z_().min(1).max(1e3),prefix:r.Z_().max(64),suffix:r.Z_().max(64)}).refine(e=>e.endOffset>=e.startOffset,{message:"endOffset must be >= startOffset"}),i=r.IM(r.Z_(),r.IX(r.Z_())),o=r.Km(["ios","android","web"]),a=r.Ry({id:r.Z_().min(1).max(64),parentId:r.Z_().min(1).max(64).nullable(),body:r.Z_().min(1).max(2e3),authorName:r.Z_().max(40).nullable(),fingerprint:r.Z_().min(1).max(128),country:r.Z_().max(8),platform:o,reactions:i,resolved:r.O7(),createdAt:r.Z_().datetime(),hidden:r.O7(),hiddenReason:r.Z_().max(200).optional()}),l=r.Ry({id:r.Z_().min(1).max(64),anchor:s,thread:r.IX(a).min(1),resolved:r.O7(),createdAt:r.Z_().datetime()}),c=r.Ry({postId:r.Z_().min(1),highlights:r.IX(l),schemaVersion:r.i0(1)});function u(e){return{postId:e,highlights:[],schemaVersion:1}}},54904:(e,t,n)=>{n.d(t,{AH:()=>f,Cg:()=>u,Kz:()=>w,N9:()=>a,W4:()=>c,bH:()=>m,fT:()=>d,mF:()=>h,qF:()=>l});var r=n(87070),s=n(69271),i=n(90455),o=n(73194);function a(e,t){return r.NextResponse.json({success:!0,data:e},t)}function l(e,t=400){return r.NextResponse.json({success:!1,error:e},{status:t})}function c(e,t="Internal server error",n=500){return console.error("[highlights]",e),l(e instanceof Error&&e.message?e.message:t,n)}function u(e){let t=(0,s.H9)(e),n=(0,s.zC)(e),r=(0,s.D4)(t);return{fingerprint:(0,s.F6)(r,n),country:n.country,platform:(0,s.tz)(n.userAgent)}}async function h(){if((0,o.g)())return!0;let e=await (0,i.G)(),t=process.env.GITHUB_USERNAME;if(!t)return!1;if(e?.user?.username)return e.user.username===t;if(e?.accessToken){let n=await p(e.accessToken);if(n)return n===t}return!1}async function f(){let e=await (0,i.G)();return e?.accessToken}async function d(){let e=await (0,i.G)();if(e?.user?.username)return e.user.username;if(e?.accessToken){let t=await p(e.accessToken);if(t)return t}return e?.user?.name??null}let g=new Map;async function p(e){let t=g.get(e);if(t&&t.expiresAt>Date.now())return t.login;try{let t=await fetch("https://api.github.com/user",{headers:{Authorization:`Bearer ${e}`,Accept:"application/vnd.github+json"}});if(!t.ok)return null;let n=await t.json();if(!n.login)return null;return g.set(e,{login:n.login,expiresAt:Date.now()+6e5}),n.login}catch{return null}}class m extends Error{}async function w(e,t){let n;try{n=await e.json()}catch{throw new m("Invalid JSON body")}let r=t.safeParse(n);if(!r.success)throw new m(r.error.issues.map(e=>`${e.path.join(".")}: ${e.message}`).join("; "));return r.data}},69271:(e,t,n)=>{n.d(t,{D4:()=>a,Ed:()=>u,F6:()=>c,H9:()=>i,JS:()=>h,SS:()=>d,Wz:()=>f,tz:()=>l,zC:()=>o});var r=n(84770),s=n.n(r);function i(e){let t=e.headers.get("x-forwarded-for"),n=e.headers.get("x-real-ip");return e.headers.get("cf-connecting-ip")||t?.split(",")[0]?.trim()||n||e.ip||"127.0.0.1"}function o(e){let t=e.headers.get("accept-language")||"",n=e.headers.get("user-agent")||"",r=t.split(",")[0]?.trim()||"unknown";return{country:r.includes("-")?r.split("-")[1]?.toUpperCase():"UNKNOWN",language:r,userAgent:n}}function a(e){let t=process.env.LIKE_HASH_SALT||"cofe-likes-salt-2025";return s().createHash("sha256").update(e+t).digest("hex").substring(0,12)}function l(e){return/iPhone|iPad|iPod/.test(e)?"ios":/Android/.test(e)?"android":"web"}function c(e,t){let n=l(t.userAgent),r=function(e){let t=process.env.LIKE_HASH_SALT||"cofe-likes-salt-2025";return s().createHash("sha256").update(e+t).digest("hex").substring(0,8)}(t.userAgent);return`${e}_${t.country}_${n}_${r}`}function u(e,t){return`${e}_${t}`}function h(e,t,n){let r=Object.keys(e[t]||{}).find(e=>e.startsWith(`${n}_`));return{hasLiked:!!r,existingLikeId:r}}function f(e,t,n){let r=Object.values(e[t]||{}),s=Array.from(new Set(r.map(e=>e.country).filter(e=>"UNKNOWN"!==e))),{hasLiked:i}=h(e,t,n);return{count:r.length,countries:s,userLiked:i}}function d(e,t){return`${e}_${t}`}},88069:(e,t,n)=>{n.d(t,{D:()=>o});var r=n(55315),s=n.n(r);let i="cici";function o(e){let t=process.env.CICI_DIR;if(t)return{kind:"local",dir:s().resolve(t)};let n=process.env.CICI_REPO;if(n){let[t,r]=n.split("/");if(!t)throw Error(`Invalid CICI_REPO "${n}" — expected "owner/name".`);return{kind:"github",owner:t,repo:r||i,token:process.env.CICI_TOKEN||e||void 0}}return{kind:"github",owner:process.env.GITHUB_USERNAME||"metrue",repo:i,token:e||void 0}}},73194:(e,t,n)=>{n.d(t,{$:()=>a,g:()=>o});var r=n(55315),s=n.n(r),i=n(88069);function o(){return"local"===(0,i.D)().kind}function a(){let e=process.env.CICI_DIR;return e?s().resolve(e):s().join(process.cwd(),"sample-content")}},49303:(e,t,n)=>{e.exports=n(30517)}};
1
+ "use strict";exports.id=719,exports.ids=[719],exports.modules={90455:(e,t,n)=>{n.d(t,{G:()=>s,L:()=>i});var r=n(45609);async function s(){let e=await (0,r.getServerSession)(i);return e?(e.accessToken?console.log("Session found with access token"):console.log("Session found, but no access token"),e):(console.log("No session found"),null)}let i={providers:[(0,n(77210).Z)({clientId:process.env.GITHUB_ID,clientSecret:process.env.GITHUB_SECRET,authorization:{params:{scope:"public_repo workflow"}}})],callbacks:{async jwt({token:e,account:t,profile:n}){t&&t.access_token&&(e.accessToken=t.access_token);let r=n&&"object"==typeof n&&"login"in n?n.login:void 0,s=t&&"object"==typeof t&&"username"in t?t.username:void 0;return(r||s)&&(e.username=r??s),e},session:async({session:e,token:t})=>(e.accessToken=t.accessToken,e.user&&(e.user.username=t.username),e)},secret:process.env.NEXTAUTH_SECRET,debug:!1}},31470:(e,t,n)=>{n.d(t,{Bf:()=>s,CT:()=>o});let r="data",s={rootKeep:()=>".gitkeep",blogDir:()=>"blog",blogDirKeep:()=>"blog/.gitkeep",blogPost:e=>`blog/${e}.md`,blogFile:e=>`blog/${e}`,blogManifest:()=>"blog-manifest.json",memos:()=>"memos.json",likes:()=>"likes.json",siteConfig:()=>"site-config.json",highlightsDir:()=>"highlights",highlightsFile:e=>`highlights/${e}.json`},i=e=>`${r}/${e}`,o={root:()=>r,rootKeep:()=>i(s.rootKeep()),blogDir:()=>i(s.blogDir()),blogDirKeep:()=>i(s.blogDirKeep()),blogPost:e=>i(s.blogPost(e)),blogFile:e=>i(s.blogFile(e)),blogManifest:()=>i(s.blogManifest()),memos:()=>i(s.memos()),likes:()=>i(s.likes()),siteConfig:()=>i(s.siteConfig()),highlightsDir:()=>i(s.highlightsDir()),highlightsFile:e=>i(s.highlightsFile(e))}},54428:(e,t,n)=>{n.d(t,{Bi:()=>p,K4:()=>g,VD:()=>m});var r=n(92048),s=n(55315),i=n.n(s),o=n(94545),a=n(8502),l=n(31470),c=n(88069);let u=new Map;function h(e){return l.CT.highlightsFile(e)}function f(e){if(!e||0===e.length||e.length>200||e.includes("/")||e.includes("\\")||e.includes("\0")||e.includes("..")||e.startsWith("."))throw Error(`Invalid postId: ${e}`)}function d(e){if("object"==typeof e&&null!==e&&"status"in e){let t=e.status;return"number"==typeof t?t:void 0}}class g{constructor(e){this.rootDir=e}absPath(e){return i().join(this.rootDir,l.Bf.highlightsFile(e))}async load(e){f(e);try{let t=await r.promises.readFile(this.absPath(e),"utf-8");return{data:a.x.parse(JSON.parse(t)),sha:null}}catch(t){if("ENOENT"===t?.code)return{data:(0,a.Bk)(e),sha:null};throw t}}async save(e,t,n,s){f(e);let o=a.x.parse(t),l=this.absPath(e);return await r.promises.mkdir(i().dirname(l),{recursive:!0}),await r.promises.writeFile(l,JSON.stringify(o,null,2),"utf-8"),{sha:""}}}class p{constructor(e,t,n="cici"){this.octokit=e,this.owner=t,this.repo=n}async load(e){f(e);let t=u.get(e);if(t&&t.expiresAt>Date.now())return{data:t.data,sha:t.sha};let n=await this.readFile(e);if(!n){let t=(0,a.Bk)(e);return u.set(e,{data:t,sha:null,expiresAt:Date.now()+3e4}),{data:t,sha:null}}let r=a.x.parse(JSON.parse(n.content));return u.set(e,{data:r,sha:n.sha,expiresAt:Date.now()+3e4}),{data:r,sha:n.sha}}async save(e,t,n,r){f(e);let s=a.x.parse(t),i=Buffer.from(JSON.stringify(s,null,2)).toString("base64"),o=0,l=n;for(;o<3;)try{let t=await this.octokit.repos.createOrUpdateFileContents({owner:this.owner,repo:this.repo,path:h(e),message:r,content:i,...l?{sha:l}:{}}),n=t.data.content?.sha??"";return u.set(e,{data:s,sha:n,expiresAt:Date.now()+3e4}),{sha:n}}catch(n){let t=d(n);if(409===t||422===t){u.delete(e),o++;let t=await this.readFile(e);l=t?.sha??null;continue}throw n}throw Error("Save failed after 3 retries due to write contention")}async readFile(e){try{let t=(await this.octokit.repos.getContent({owner:this.owner,repo:this.repo,path:h(e)})).data;if(Array.isArray(t)||"file"!==t.type)return null;return{content:Buffer.from(t.content,"base64").toString("utf-8"),sha:t.sha}}catch(e){if(404===d(e))return null;throw e}}}function m(e={}){let t=(0,c.D)(e.ownerToken);if("local"===t.kind)return new g(t.dir);{let n=e.ownerToken??t.token??process.env.HIGHLIGHTS_GH_TOKEN;if(!n)throw Error("HIGHLIGHTS_GH_TOKEN not configured. Inline comments require a service token in production.");return new p(new o.v({auth:n}),t.owner,t.repo)}}},8502:(e,t,n)=>{n.d(t,{Bk:()=>u,Om:()=>s,x:()=>c});var r=n(4037);let s=r.Ry({startOffset:r.Rx().int().nonnegative(),endOffset:r.Rx().int().nonnegative(),exact:r.Z_().min(1).max(1e3),prefix:r.Z_().max(64),suffix:r.Z_().max(64)}).refine(e=>e.endOffset>=e.startOffset,{message:"endOffset must be >= startOffset"}),i=r.IM(r.Z_(),r.IX(r.Z_())),o=r.Km(["ios","android","web"]),a=r.Ry({id:r.Z_().min(1).max(64),parentId:r.Z_().min(1).max(64).nullable(),body:r.Z_().min(1).max(2e3),authorName:r.Z_().max(40).nullable(),fingerprint:r.Z_().min(1).max(128),country:r.Z_().max(8),platform:o,reactions:i,resolved:r.O7(),createdAt:r.Z_().datetime(),hidden:r.O7(),hiddenReason:r.Z_().max(200).optional()}),l=r.Ry({id:r.Z_().min(1).max(64),anchor:s,thread:r.IX(a).min(1),resolved:r.O7(),createdAt:r.Z_().datetime()}),c=r.Ry({postId:r.Z_().min(1),highlights:r.IX(l),schemaVersion:r.i0(1)});function u(e){return{postId:e,highlights:[],schemaVersion:1}}},54904:(e,t,n)=>{n.d(t,{AH:()=>f,Cg:()=>u,Kz:()=>w,N9:()=>a,W4:()=>c,bH:()=>m,fT:()=>d,mF:()=>h,qF:()=>l});var r=n(87070),s=n(69271),i=n(90455),o=n(73194);function a(e,t){return r.NextResponse.json({success:!0,data:e},t)}function l(e,t=400){return r.NextResponse.json({success:!1,error:e},{status:t})}function c(e,t="Internal server error",n=500){return console.error("[highlights]",e),l(e instanceof Error&&e.message?e.message:t,n)}function u(e){let t=(0,s.H9)(e),n=(0,s.zC)(e),r=(0,s.D4)(t);return{fingerprint:(0,s.F6)(r,n),country:n.country,platform:(0,s.tz)(n.userAgent)}}async function h(){if((0,o.g)())return!0;let e=await (0,i.G)(),t=process.env.GITHUB_USERNAME;if(!t)return!1;if(e?.user?.username)return e.user.username===t;if(e?.accessToken){let n=await p(e.accessToken);if(n)return n===t}return!1}async function f(){let e=await (0,i.G)();return e?.accessToken}async function d(){let e=await (0,i.G)();if(e?.user?.username)return e.user.username;if(e?.accessToken){let t=await p(e.accessToken);if(t)return t}return e?.user?.name??null}let g=new Map;async function p(e){let t=g.get(e);if(t&&t.expiresAt>Date.now())return t.login;try{let t=await fetch("https://api.github.com/user",{headers:{Authorization:`Bearer ${e}`,Accept:"application/vnd.github+json"}});if(!t.ok)return null;let n=await t.json();if(!n.login)return null;return g.set(e,{login:n.login,expiresAt:Date.now()+6e5}),n.login}catch{return null}}class m extends Error{}async function w(e,t){let n;try{n=await e.json()}catch{throw new m("Invalid JSON body")}let r=t.safeParse(n);if(!r.success)throw new m(r.error.issues.map(e=>`${e.path.join(".")}: ${e.message}`).join("; "));return r.data}},69271:(e,t,n)=>{n.d(t,{D4:()=>a,Ed:()=>u,F6:()=>c,H9:()=>i,JS:()=>h,SS:()=>d,Wz:()=>f,tz:()=>l,zC:()=>o});var r=n(84770),s=n.n(r);function i(e){let t=e.headers.get("x-forwarded-for"),n=e.headers.get("x-real-ip");return e.headers.get("cf-connecting-ip")||t?.split(",")[0]?.trim()||n||e.ip||"127.0.0.1"}function o(e){let t=e.headers.get("accept-language")||"",n=e.headers.get("user-agent")||"",r=t.split(",")[0]?.trim()||"unknown";return{country:r.includes("-")?r.split("-")[1]?.toUpperCase():"UNKNOWN",language:r,userAgent:n}}function a(e){let t=process.env.LIKE_HASH_SALT||"cofe-likes-salt-2025";return s().createHash("sha256").update(e+t).digest("hex").substring(0,12)}function l(e){return/iPhone|iPad|iPod/.test(e)?"ios":/Android/.test(e)?"android":"web"}function c(e,t){let n=l(t.userAgent),r=function(e){let t=process.env.LIKE_HASH_SALT||"cofe-likes-salt-2025";return s().createHash("sha256").update(e+t).digest("hex").substring(0,8)}(t.userAgent);return`${e}_${t.country}_${n}_${r}`}function u(e,t){return`${e}_${t}`}function h(e,t,n){let r=Object.keys(e[t]||{}).find(e=>e.startsWith(`${n}_`));return{hasLiked:!!r,existingLikeId:r}}function f(e,t,n){let r=Object.values(e[t]||{}),s=Array.from(new Set(r.map(e=>e.country).filter(e=>"UNKNOWN"!==e))),{hasLiked:i}=h(e,t,n);return{count:r.length,countries:s,userLiked:i}}function d(e,t){return`${e}_${t}`}},88069:(e,t,n)=>{n.d(t,{D:()=>o});var r=n(55315),s=n.n(r);let i="cici";function o(e){let t=process.env.CICI_DIR;if(t)return{kind:"local",dir:s().resolve(t)};let n=process.env.CICI_REPO;if(n){let[t,r]=n.split("/");if(!t)throw Error(`Invalid CICI_REPO "${n}" — expected "owner/name".`);return{kind:"github",owner:t,repo:r||i,token:process.env.CICI_TOKEN||e||void 0}}return{kind:"github",owner:process.env.GITHUB_USERNAME||"metrue",repo:i,token:e||void 0}}},73194:(e,t,n)=>{n.d(t,{$:()=>a,g:()=>o});var r=n(55315),s=n.n(r),i=n(88069);function o(){return"local"===(0,i.D)().kind}function a(){let e=process.env.CICI_DIR;return e?s().resolve(e):s().join(process.cwd(),"sample-content")}},49303:(e,t,n)=>{e.exports=n(30517)}};
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-a3d722a538b58757.js" defer=""></script><script src="/_next/static/chunks/framework-00a8ba1a63cfdc9e.js" defer=""></script><script src="/_next/static/chunks/main-530e55a5659ae7e4.js" defer=""></script><script src="/_next/static/chunks/pages/_app-15e2daefa259f0b5.js" defer=""></script><script src="/_next/static/chunks/pages/_error-28b803cb2479b966.js" defer=""></script><script src="/_next/static/PDn4f_-4CIbfG8EmueowG/_buildManifest.js" defer=""></script><script src="/_next/static/PDn4f_-4CIbfG8EmueowG/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"PDn4f_-4CIbfG8EmueowG","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-a3d722a538b58757.js" defer=""></script><script src="/_next/static/chunks/framework-00a8ba1a63cfdc9e.js" defer=""></script><script src="/_next/static/chunks/main-530e55a5659ae7e4.js" defer=""></script><script src="/_next/static/chunks/pages/_app-15e2daefa259f0b5.js" defer=""></script><script src="/_next/static/chunks/pages/_error-28b803cb2479b966.js" defer=""></script><script src="/_next/static/EVdo6WxGjsfWSi0PYx0v3/_buildManifest.js" defer=""></script><script src="/_next/static/EVdo6WxGjsfWSi0PYx0v3/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"EVdo6WxGjsfWSi0PYx0v3","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- {"node":{},"edge":{},"encryptionKey":"qGPMoS4a2+Q+LrY5pm4Nik/YS7nqlbtU4z5SB2T1kd0="}
1
+ {"node":{},"edge":{},"encryptionKey":"1a568u2uEY4GGoBa5q/0DfLF2VMBB/JD6J1kU3hginw="}
@@ -0,0 +1,66 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * Custom Next.js 14 CacheHandler that stores ISR/fetch cache entries under the
5
+ * OS temp dir instead of `.next/cache`.
6
+ *
7
+ * On Vercel the standalone server runs from a read-only filesystem
8
+ * (`/var/task`), so Next's default FileSystemCache throws
9
+ * `ENOENT: mkdir '/var/task/.next/cache'`. That error is non-fatal but noisy —
10
+ * routing cache writes to `os.tmpdir()` (writable on the platform) removes it.
11
+ *
12
+ * All filesystem access is wrapped in try/catch: a cache miss or write failure
13
+ * must never throw, or it would take down the request it's caching.
14
+ */
15
+
16
+ const fs = require('fs')
17
+ const os = require('os')
18
+ const path = require('path')
19
+ const crypto = require('crypto')
20
+
21
+ const CACHE_DIR = path.join(os.tmpdir(), 'cici-next-cache')
22
+
23
+ /** Turn an arbitrary cache key (may contain `/`, `:`, etc.) into a safe filename. */
24
+ function keyToFile(key) {
25
+ const hash = crypto.createHash('sha256').update(String(key)).digest('hex')
26
+ return path.join(CACHE_DIR, `${hash}.json`)
27
+ }
28
+
29
+ module.exports = class CacheHandler {
30
+ constructor(options) {
31
+ this.options = options
32
+ }
33
+
34
+ async get(key) {
35
+ try {
36
+ const raw = fs.readFileSync(keyToFile(key), 'utf-8')
37
+ const parsed = JSON.parse(raw)
38
+ return {
39
+ value: parsed.value,
40
+ lastModified: parsed.lastModified,
41
+ }
42
+ } catch (_err) {
43
+ // Miss or unreadable entry — treat as no cache.
44
+ return null
45
+ }
46
+ }
47
+
48
+ async set(key, data, ctx) {
49
+ try {
50
+ fs.mkdirSync(CACHE_DIR, { recursive: true })
51
+ const payload = JSON.stringify({
52
+ value: data,
53
+ lastModified: Date.now(),
54
+ tags: ctx && ctx.tags ? ctx.tags : [],
55
+ })
56
+ fs.writeFileSync(keyToFile(key), payload, 'utf-8')
57
+ } catch (_err) {
58
+ // Never throw on cache write failure — the cache is best-effort.
59
+ }
60
+ }
61
+
62
+ async revalidateTag(_tag) {
63
+ // No-op: entries expire via Next's own revalidation metadata; we don't
64
+ // maintain a tag index. Kept as a stub so the handler satisfies the API.
65
+ }
66
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cici",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "private": false,
5
5
  "description": "cici — a git-backed blog CMS (pure tooling; your posts live in a separate content repo). Run `npx cici --dir <dir>` or `--repo <owner/name>` to serve/edit, or `cici build` / `cici start` to deploy.",
6
6
  "repository": {
@@ -9,7 +9,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
9
9
  const hostname = process.env.HOSTNAME || '0.0.0.0'
10
10
 
11
11
  let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
12
- const nextConfig = {"env":{},"eslint":{"ignoreDuringBuilds":false},"typescript":{"ignoreBuildErrors":false,"tsconfigPath":"tsconfig.json"},"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.mjs","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"analyticsId":"","images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[16,32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":60,"formats":["image/webp"],"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"inline","remotePatterns":[{"protocol":"https","hostname":"*"},{"protocol":"http","hostname":"*"}],"unoptimized":false},"devIndicators":{"buildActivity":true,"buildActivityPosition":"bottom-right"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"amp":{"canonicalBase":""},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"optimizeFonts":true,"excludeDefaultMomentLocales":true,"serverRuntimeConfig":{},"publicRuntimeConfig":{},"reactProductionProfiling":false,"reactStrictMode":true,"httpAgentOptions":{"keepAlive":true},"outputFileTracing":true,"staticPageGenerationTimeout":60,"swcMinify":true,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"experimental":{"multiZoneDraftMode":false,"prerenderEarlyExit":false,"serverMinification":true,"serverSourceMaps":false,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","middlewarePrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"outputFileTracingRoot":"/home/runner/work/cici/cici","swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"adjustFontFallbacks":false,"adjustFontFallbacksWithSizeAdjust":false,"typedRoutes":false,"instrumentationHook":false,"bundlePagesExternals":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"missingSuspenseWithCSRBailout":true,"optimizeServerReact":true,"useEarlyImport":false,"staleTimes":{"dynamic":30,"static":300},"optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"configFileName":"next.config.mjs","_originalRewrites":{"beforeFiles":[],"afterFiles":[{"source":"/manifest.json","destination":"/manifest.json"}],"fallback":[]}}
12
+ const nextConfig = {"env":{},"eslint":{"ignoreDuringBuilds":false},"typescript":{"ignoreBuildErrors":false,"tsconfigPath":"tsconfig.json"},"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheHandler":"../cache-handler.cjs","cacheMaxMemorySize":0,"configOrigin":"next.config.mjs","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"analyticsId":"","images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[16,32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":60,"formats":["image/webp"],"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"inline","remotePatterns":[{"protocol":"https","hostname":"*"},{"protocol":"http","hostname":"*"}],"unoptimized":false},"devIndicators":{"buildActivity":true,"buildActivityPosition":"bottom-right"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"amp":{"canonicalBase":""},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"optimizeFonts":true,"excludeDefaultMomentLocales":true,"serverRuntimeConfig":{},"publicRuntimeConfig":{},"reactProductionProfiling":false,"reactStrictMode":true,"httpAgentOptions":{"keepAlive":true},"outputFileTracing":true,"staticPageGenerationTimeout":60,"swcMinify":true,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"experimental":{"multiZoneDraftMode":false,"prerenderEarlyExit":false,"serverMinification":true,"serverSourceMaps":false,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","middlewarePrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"outputFileTracingRoot":"/home/runner/work/cici/cici","swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"adjustFontFallbacks":false,"adjustFontFallbacksWithSizeAdjust":false,"typedRoutes":false,"instrumentationHook":false,"bundlePagesExternals":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"missingSuspenseWithCSRBailout":true,"optimizeServerReact":true,"useEarlyImport":false,"staleTimes":{"dynamic":30,"static":300},"optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"configFileName":"next.config.mjs","_originalRewrites":{"beforeFiles":[],"afterFiles":[{"source":"/manifest.json","destination":"/manifest.json"}],"fallback":[]}}
13
13
 
14
14
  process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
15
15