dev3000 0.0.126 → 0.0.127
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.
- package/dist/cdp-monitor.d.ts.map +1 -1
- package/dist/cdp-monitor.js +18 -0
- package/dist/cdp-monitor.js.map +1 -1
- package/dist/dev-environment.d.ts +0 -4
- package/dist/dev-environment.d.ts.map +1 -1
- package/dist/dev-environment.js +1 -236
- package/dist/dev-environment.js.map +1 -1
- package/dist/screencast-manager.d.ts +2 -1
- package/dist/screencast-manager.d.ts.map +1 -1
- package/dist/screencast-manager.js +85 -36
- package/dist/screencast-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts +3 -0
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +13 -1
- package/dist/utils/version-check.js.map +1 -1
- package/mcp-server/.next/BUILD_ID +1 -1
- package/mcp-server/.next/app-path-routes-manifest.json +2 -0
- package/mcp-server/.next/build-manifest.json +7 -7
- package/mcp-server/.next/fallback-build-manifest.json +2 -2
- package/mcp-server/.next/next-minimal-server.js.nft.json +1 -1
- package/mcp-server/.next/next-server.js.nft.json +1 -1
- package/mcp-server/.next/prerender-manifest.json +3 -3
- package/mcp-server/.next/routes-manifest.json +12 -0
- package/mcp-server/.next/server/app/_global-error/page/build-manifest.json +5 -5
- package/mcp-server/.next/server/app/_global-error/page.js +8 -8
- package/mcp-server/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/mcp-server/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/mcp-server/.next/server/app/_global-error.html +2 -2
- package/mcp-server/.next/server/app/_global-error.rsc +7 -7
- package/mcp-server/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/mcp-server/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/mcp-server/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/mcp-server/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/mcp-server/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/mcp-server/.next/server/app/_not-found/page/build-manifest.json +5 -5
- package/mcp-server/.next/server/app/_not-found/page.js +10 -10
- package/mcp-server/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/mcp-server/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/mcp-server/.next/server/app/_not-found.html +1 -1
- package/mcp-server/.next/server/app/_not-found.rsc +8 -8
- package/mcp-server/.next/server/app/_not-found.segments/_full.segment.rsc +8 -8
- package/mcp-server/.next/server/app/_not-found.segments/_head.segment.rsc +3 -3
- package/mcp-server/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/mcp-server/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/mcp-server/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/mcp-server/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/mcp-server/.next/server/app/api/jank/[session]/route.js +8 -8
- package/mcp-server/.next/server/app/api/jank/[session]/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/logs/append/route.js +4 -4
- package/mcp-server/.next/server/app/api/logs/append/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/logs/head/route.js +4 -4
- package/mcp-server/.next/server/app/api/logs/head/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/logs/list/route.js +4 -4
- package/mcp-server/.next/server/app/api/logs/list/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/logs/rotate/route.js +6 -6
- package/mcp-server/.next/server/app/api/logs/rotate/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/logs/stream/route.js +4 -4
- package/mcp-server/.next/server/app/api/logs/stream/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/logs/tail/route.js +4 -4
- package/mcp-server/.next/server/app/api/logs/tail/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/orchestrator/route.js +6 -6
- package/mcp-server/.next/server/app/api/orchestrator/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/screenshots/[filename]/route.js +6 -6
- package/mcp-server/.next/server/app/api/screenshots/[filename]/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/screenshots/capture/route/app-paths-manifest.json +3 -0
- package/mcp-server/.next/server/app/api/screenshots/capture/route/build-manifest.json +11 -0
- package/mcp-server/.next/server/app/api/screenshots/capture/route/server-reference-manifest.json +4 -0
- package/mcp-server/.next/server/app/api/screenshots/capture/route.js +9 -0
- package/mcp-server/.next/server/app/api/screenshots/capture/route.js.map +5 -0
- package/mcp-server/.next/server/app/api/screenshots/capture/route.js.nft.json +1 -0
- package/mcp-server/.next/server/app/api/screenshots/capture/route_client-reference-manifest.js +2 -0
- package/mcp-server/.next/server/app/api/screenshots/clear/route/app-paths-manifest.json +3 -0
- package/mcp-server/.next/server/app/api/screenshots/clear/route/build-manifest.json +11 -0
- package/mcp-server/.next/server/app/api/screenshots/clear/route/server-reference-manifest.json +4 -0
- package/mcp-server/.next/server/app/api/screenshots/clear/route.js +8 -0
- package/mcp-server/.next/server/app/api/screenshots/clear/route.js.map +5 -0
- package/mcp-server/.next/server/app/api/screenshots/clear/route.js.nft.json +1 -0
- package/mcp-server/.next/server/app/api/screenshots/clear/route_client-reference-manifest.js +2 -0
- package/mcp-server/.next/server/app/api/screenshots/list/route.js +6 -6
- package/mcp-server/.next/server/app/api/screenshots/list/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/teams/route.js +5 -5
- package/mcp-server/.next/server/app/api/teams/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/tools/route.js +6 -6
- package/mcp-server/.next/server/app/api/tools/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/index.html +1 -1
- package/mcp-server/.next/server/app/index.rsc +10 -10
- package/mcp-server/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/mcp-server/.next/server/app/index.segments/_full.segment.rsc +10 -10
- package/mcp-server/.next/server/app/index.segments/_head.segment.rsc +3 -3
- package/mcp-server/.next/server/app/index.segments/_index.segment.rsc +4 -4
- package/mcp-server/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/mcp-server/.next/server/app/logs/page/build-manifest.json +5 -5
- package/mcp-server/.next/server/app/logs/page.js +13 -13
- package/mcp-server/.next/server/app/logs/page.js.nft.json +1 -1
- package/mcp-server/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/mcp-server/.next/server/app/mcp/route.js +8 -7
- package/mcp-server/.next/server/app/mcp/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/page/build-manifest.json +5 -5
- package/mcp-server/.next/server/app/page.js +12 -12
- package/mcp-server/.next/server/app/page.js.nft.json +1 -1
- package/mcp-server/.next/server/app/page_client-reference-manifest.js +1 -1
- package/mcp-server/.next/server/app/video/[session]/page/build-manifest.json +5 -5
- package/mcp-server/.next/server/app/video/[session]/page.js +12 -12
- package/mcp-server/.next/server/app/video/[session]/page.js.nft.json +1 -1
- package/mcp-server/.next/server/app/video/[session]/page_client-reference-manifest.js +1 -1
- package/mcp-server/.next/server/app-paths-manifest.json +2 -0
- package/mcp-server/.next/server/chunks/250ae__next-internal_server_app_api_screenshots_capture_route_actions_4034f26c.js +3 -0
- package/mcp-server/.next/server/chunks/250ae__next-internal_server_app_api_screenshots_clear_route_actions_e26206f4.js +3 -0
- package/mcp-server/.next/server/chunks/{8b111_next_70882466._.js → 433f5_next_5860112e._.js} +3 -3
- package/mcp-server/.next/server/chunks/{8b111_next_70882466._.js.map → 433f5_next_5860112e._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/{8b111_next_dist_b45da2c0._.js → 433f5_next_dist_36978895._.js} +3 -3
- package/mcp-server/.next/server/chunks/{8b111_next_dist_b45da2c0._.js.map → 433f5_next_dist_36978895._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/{8b111_next_dist_esm_build_templates_app-route_61845054.js → 433f5_next_dist_esm_build_templates_app-route_ac28ad10.js} +2 -2
- package/mcp-server/.next/server/chunks/{8b111_next_dist_esm_build_templates_app-route_61845054.js.map → 433f5_next_dist_esm_build_templates_app-route_ac28ad10.js.map} +1 -1
- package/mcp-server/.next/server/chunks/433f5_next_eab95237._.js +3 -0
- package/mcp-server/.next/server/chunks/{8b111_next_1353f498._.js.map → 433f5_next_eab95237._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__0c791ce7._.js +3 -0
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__f2de2bac._.js.map → [root-of-the-server]__0c791ce7._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__262fc29c._.js +3 -0
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__97925d45._.js.map → [root-of-the-server]__262fc29c._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__340a77dc._.js +3 -0
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__9a45c8f9._.js.map → [root-of-the-server]__340a77dc._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__880af90b._.js → [root-of-the-server]__3edbdbcd._.js} +3 -3
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__880af90b._.js.map → [root-of-the-server]__3edbdbcd._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__714e8bcf._.js +3 -0
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__e1a64519._.js.map → [root-of-the-server]__714e8bcf._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__7dc404bd._.js +3 -0
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__92444e87._.js.map → [root-of-the-server]__7dc404bd._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__90514e85._.js +4 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__90514e85._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__9a5b611f._.js +3 -0
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__8173a02b._.js.map → [root-of-the-server]__9a5b611f._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__72f849fd._.js → [root-of-the-server]__b4e8283a._.js} +2 -2
- package/mcp-server/.next/server/chunks/[root-of-the-server]__b5a27148._.js +3 -0
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__7a6a57a4._.js.map → [root-of-the-server]__b5a27148._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__b73733ab._.js +3 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__b73733ab._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__d3743c8b._.js +7 -0
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__45cf400e._.js.map → [root-of-the-server]__d3743c8b._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__9be3321c._.js → [root-of-the-server]__e3fa14dc._.js} +3 -3
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__9be3321c._.js.map → [root-of-the-server]__e3fa14dc._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__97925d45._.js → [root-of-the-server]__e7678c16._.js} +2 -2
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__5e1331cc._.js.map → [root-of-the-server]__e7678c16._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__e767dfde._.js +3 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__e767dfde._.js.map +1 -0
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__86eb7852._.js → [root-of-the-server]__eb460e97._.js} +2 -2
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__f449fffa._.js → [root-of-the-server]__ec4b3348._.js} +3 -3
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__f449fffa._.js.map → [root-of-the-server]__ec4b3348._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__f9975293._.js → [root-of-the-server]__f71263ca._.js} +2 -2
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__f9975293._.js.map → [root-of-the-server]__f71263ca._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__fa4b0e38._.js +4 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__fa4b0e38._.js.map +1 -0
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__11cde0db._.js → [root-of-the-server]__ff23085a._.js} +2 -2
- package/mcp-server/.next/server/chunks/{[root-of-the-server]__11cde0db._.js.map → [root-of-the-server]__ff23085a._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/mcp-server_app_mcp_tools_ts_faf6d7df._.js +216 -0
- package/mcp-server/.next/server/chunks/mcp-server_app_mcp_tools_ts_faf6d7df._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/{8b111_next_dist_a0631e8f._.js → 433f5_next_dist_319eb8f9._.js} +2 -2
- package/mcp-server/.next/server/chunks/ssr/433f5_next_dist_319eb8f9._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/433f5_next_dist_3356a03a._.js +6 -0
- package/mcp-server/.next/server/chunks/ssr/433f5_next_dist_3356a03a._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/433f5_next_dist_6d2930c9._.js +6 -0
- package/mcp-server/.next/server/chunks/ssr/{8b111_next_dist_2d5fda8a._.js.map → 433f5_next_dist_6d2930c9._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/{8b111_next_dist_bc5bff92._.js → 433f5_next_dist_8f74ef27._.js} +3 -3
- package/mcp-server/.next/server/chunks/ssr/{8b111_next_dist_bc5bff92._.js.map → 433f5_next_dist_8f74ef27._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/433f5_next_dist_client_components_1532728b._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{8b111_next_dist_client_components_69dfdf5e._.js.map → 433f5_next_dist_client_components_1532728b._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/433f5_next_dist_client_components_builtin_forbidden_443a1c24.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{8b111_next_dist_client_components_builtin_forbidden_5a705cc6.js.map → 433f5_next_dist_client_components_builtin_forbidden_443a1c24.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/433f5_next_dist_client_components_builtin_global-error_e298b8f7.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{8b111_next_dist_client_components_builtin_global-error_d996306b.js.map → 433f5_next_dist_client_components_builtin_global-error_e298b8f7.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/433f5_next_dist_client_components_builtin_unauthorized_9c23d540.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{8b111_next_dist_client_components_builtin_unauthorized_0df11997.js.map → 433f5_next_dist_client_components_builtin_unauthorized_9c23d540.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/{_3b1c49b6._.js → 433f5_next_dist_esm_build_templates_app-page_bb761d9a.js} +3 -3
- package/mcp-server/.next/server/chunks/ssr/{8b111_next_dist_esm_build_templates_app-page_4117d230.js.map → 433f5_next_dist_esm_build_templates_app-page_bb761d9a.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__0e37b86c._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__016aaaae._.js.map → [root-of-the-server]__0e37b86c._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__1bed47e4._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__c73c0147._.js.map → [root-of-the-server]__1bed47e4._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__1e4a60c6._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__1e4a60c6._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__2f9d6c3b._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__baf72617._.js.map → [root-of-the-server]__2f9d6c3b._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__77ed8c60._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__0aa14b12._.js.map → [root-of-the-server]__77ed8c60._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__8c027bae._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__d9257d07._.js.map → [root-of-the-server]__8c027bae._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__8fcdd573._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__0e5de3ed._.js.map → [root-of-the-server]__8fcdd573._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__a0ce1891._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__ad363fb6._.js.map → [root-of-the-server]__a0ce1891._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__bfde36b8._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__23b471c0._.js.map → [root-of-the-server]__bfde36b8._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__dcabe801._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__f9ee1284._.js.map → [root-of-the-server]__dcabe801._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__5ba89445._.js → [root-of-the-server]__eafb9ac9._.js} +2 -2
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__5ba89445._.js.map → [root-of-the-server]__eafb9ac9._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/{_ba028667._.js → _6cd0eda9._.js} +3 -3
- package/mcp-server/.next/server/chunks/ssr/{_2eb35278._.js.map → _6cd0eda9._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/{_af685f91._.js → _76837614._.js} +3 -3
- package/mcp-server/.next/server/chunks/ssr/{_af685f91._.js.map → _76837614._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/{_5ba67898._.js → _dfef4eeb._.js} +3 -3
- package/mcp-server/.next/server/chunks/ssr/{_5ba67898._.js.map → _dfef4eeb._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/_ee998c93._.js +4 -0
- package/mcp-server/.next/server/chunks/ssr/{_ba028667._.js.map → _ee998c93._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/{_2eb35278._.js → _f701568c._.js} +3 -3
- package/mcp-server/.next/server/chunks/ssr/{_3b1c49b6._.js.map → _f701568c._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/mcp-server_app_layout_tsx_afa41767._.js +1 -1
- package/mcp-server/.next/server/chunks/ssr/mcp-server_app_layout_tsx_afa41767._.js.map +1 -1
- package/mcp-server/.next/server/chunks/ssr/mcp-server_app_page_tsx_9fc46577._.js +1 -1
- package/mcp-server/.next/server/chunks/ssr/mcp-server_components_dark-mode-toggle_tsx_f31dd15d._.js +1 -1
- package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_0d033cf1._.js +5 -0
- package/mcp-server/.next/server/chunks/ssr/{node_modules__pnpm_3bd414fc._.js.map → node_modules__pnpm_0d033cf1._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_bc9dc95d._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{node_modules__pnpm_9d64b6f5._.js.map → node_modules__pnpm_bc9dc95d._.js.map} +1 -1
- package/mcp-server/.next/server/functions-config-manifest.json +1 -11
- package/mcp-server/.next/server/middleware-build-manifest.js +5 -5
- package/mcp-server/.next/server/pages/404.html +1 -1
- package/mcp-server/.next/server/pages/500.html +2 -2
- package/mcp-server/.next/server/server-reference-manifest.js +1 -1
- package/mcp-server/.next/server/server-reference-manifest.json +1 -1
- package/mcp-server/.next/static/X1Fi8LPe31lA0sFmINgXU/_clientMiddlewareManifest.json +1 -0
- package/mcp-server/.next/static/chunks/{45ba9786ab8c2e44.js → 08a78d62338c3d96.js} +1 -1
- package/mcp-server/.next/static/chunks/17797b93973bb065.js +1 -0
- package/mcp-server/.next/static/chunks/17d2f6f99b8f9354.js +2 -0
- package/mcp-server/.next/static/chunks/30950243aed68f90.js +3 -0
- package/mcp-server/.next/static/chunks/{95b89db5d1d54841.js → 352b1f4a58e2b0f6.js} +1 -1
- package/mcp-server/.next/static/chunks/{5171d9a831cc2de4.js → 4642be305803c7ba.js} +1 -1
- package/mcp-server/.next/static/chunks/59cdeaf92a780e96.css +1 -0
- package/mcp-server/.next/static/chunks/6bcb17537678c0c2.js +3 -0
- package/mcp-server/.next/static/chunks/8f35629757e9709d.js +1 -0
- package/mcp-server/.next/static/chunks/{3d612a0a5e49885d.js → 9e5b31ad403669a0.js} +1 -1
- package/mcp-server/.next/static/chunks/ab9bdd79609e2b89.js +1 -0
- package/mcp-server/.next/static/chunks/cbaf461889257de6.js +4 -0
- package/mcp-server/.next/static/chunks/{turbopack-39686e05867003be.js → turbopack-f72c45e89cd8b51e.js} +1 -1
- package/mcp-server/app/api/screenshots/capture/route.ts +137 -0
- package/mcp-server/app/api/screenshots/clear/route.ts +44 -0
- package/mcp-server/app/mcp/route.ts +3 -1
- package/mcp-server/app/mcp/tools.ts +6 -2
- package/mcp-server/package.json +1 -1
- package/package.json +2 -2
- package/mcp-server/.next/server/chunks/8b111_next_1353f498._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__3ac957e6._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__45cf400e._.js +0 -7
- package/mcp-server/.next/server/chunks/[root-of-the-server]__5e1331cc._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__7a6a57a4._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__8173a02b._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__92444e87._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__9a45c8f9._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__ae49815f._.js +0 -217
- package/mcp-server/.next/server/chunks/[root-of-the-server]__ae49815f._.js.map +0 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__d4d47e5f._.js +0 -28
- package/mcp-server/.next/server/chunks/[root-of-the-server]__d4d47e5f._.js.map +0 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__e1a64519._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__f2de2bac._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/8b111_next_dist_2d5fda8a._.js +0 -6
- package/mcp-server/.next/server/chunks/ssr/8b111_next_dist_416feb3b._.js +0 -6
- package/mcp-server/.next/server/chunks/ssr/8b111_next_dist_416feb3b._.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/8b111_next_dist_a0631e8f._.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/8b111_next_dist_client_components_69dfdf5e._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/8b111_next_dist_client_components_builtin_forbidden_5a705cc6.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/8b111_next_dist_client_components_builtin_global-error_d996306b.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/8b111_next_dist_client_components_builtin_unauthorized_0df11997.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/8b111_next_dist_esm_build_templates_app-page_4117d230.js +0 -4
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__016aaaae._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__0aa14b12._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__0e5de3ed._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__23b471c0._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__ad363fb6._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__baf72617._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__bf7cd8c6._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__c73c0147._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__d9257d07._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__f9ee1284._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_3bd414fc._.js +0 -5
- package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_9d64b6f5._.js +0 -3
- package/mcp-server/.next/server/middleware.js +0 -5
- package/mcp-server/.next/server/middleware.js.nft.json +0 -1
- package/mcp-server/.next/static/chunks/37739dbbbff41860.js +0 -2
- package/mcp-server/.next/static/chunks/9af9038936981171.js +0 -3
- package/mcp-server/.next/static/chunks/9d9ea52745b7cee8.css +0 -1
- package/mcp-server/.next/static/chunks/a3771e169e1ff356.js +0 -1
- package/mcp-server/.next/static/chunks/a92901311ade94f3.js +0 -4
- package/mcp-server/.next/static/chunks/b3811fb9af254076.js +0 -1
- package/mcp-server/.next/static/chunks/eb96b27d3b73ef3b.js +0 -3
- package/mcp-server/.next/static/chunks/f9a2399752a0a1fa.js +0 -1
- package/mcp-server/.next/static/lSzvvkjD4ab_1CtchfQYo/_clientMiddlewareManifest.json +0 -6
- /package/mcp-server/.next/server/chunks/{[root-of-the-server]__3ac957e6._.js.map → 250ae__next-internal_server_app_api_screenshots_capture_route_actions_4034f26c.js.map} +0 -0
- /package/mcp-server/.next/server/chunks/{[root-of-the-server]__72f849fd._.js.map → 250ae__next-internal_server_app_api_screenshots_clear_route_actions_e26206f4.js.map} +0 -0
- /package/mcp-server/.next/server/chunks/{[root-of-the-server]__86eb7852._.js.map → [root-of-the-server]__b4e8283a._.js.map} +0 -0
- /package/mcp-server/.next/server/chunks/{ssr/[root-of-the-server]__bf7cd8c6._.js.map → [root-of-the-server]__eb460e97._.js.map} +0 -0
- /package/mcp-server/.next/static/{lSzvvkjD4ab_1CtchfQYo → X1Fi8LPe31lA0sFmINgXU}/_buildManifest.js +0 -0
- /package/mcp-server/.next/static/{lSzvvkjD4ab_1CtchfQYo → X1Fi8LPe31lA0sFmINgXU}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/.pnpm/next%4016.0.7_%40opentelemetry%2Bapi%401.9.0_babel-plugin-react-compiler%401.0.0_react-dom%4019.3.0_a20848594014cb183ab624f2be88a203/node_modules/next/dist/esm/build/templates/app-route.js","../../../../mcp-server/app/api/screenshots/list/route.ts"],"sourcesContent":["import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setReferenceManifestsSingleton } from \"next/dist/esm/server/app-render/encryption-utils\";\nimport { createServerModuleMap } from \"next/dist/esm/server/app-render/action-utils\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/screenshots/list/route\",\n pathname: \"/api/screenshots/list\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/mcp-server/app/api/screenshots/list/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/screenshots/list/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setReferenceManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap({\n serverActionsManifest\n })\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import { readdirSync } from \"fs\"\nimport { type NextRequest, NextResponse } from \"next/server\"\nimport { tmpdir } from \"os\"\nimport { join } from \"path\"\n\nexport async function GET(request: NextRequest) {\n try {\n const searchParams = request.nextUrl.searchParams\n const pattern = searchParams.get(\"pattern\") || \"\"\n\n const screenshotDir = process.env.SCREENSHOT_DIR || join(tmpdir(), \"dev3000-mcp-deps\", \"public\", \"screenshots\")\n\n const files = readdirSync(screenshotDir)\n .filter((f) => f.endsWith(\".png\"))\n .filter((f) => (pattern ? f.includes(pattern) : true))\n\n return NextResponse.json({ files })\n } catch (error) {\n console.error(\"Error listing screenshots:\", error)\n return NextResponse.json({ files: [] }, { status: 500 })\n }\n}\n"],"names":[],"mappings":"+hCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,E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AC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAcV,GAbI,AAAE,CAAD,YAAgB,EAAA,eAAe,EAChC,CADmC,KAC7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[0]}
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/.pnpm/next%4016.0.9_%40opentelemetry%2Bapi%401.9.0_babel-plugin-react-compiler%401.0.0_react-dom%4019.3.0_fa664f6e74076e0531728f3cffad7b1f/node_modules/next/dist/esm/build/templates/app-route.js","../../../../mcp-server/app/api/screenshots/list/route.ts"],"sourcesContent":["import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setReferenceManifestsSingleton } from \"next/dist/esm/server/app-render/encryption-utils\";\nimport { createServerModuleMap } from \"next/dist/esm/server/app-render/action-utils\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/screenshots/list/route\",\n pathname: \"/api/screenshots/list\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/mcp-server/app/api/screenshots/list/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/screenshots/list/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setReferenceManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap({\n serverActionsManifest\n })\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import { readdirSync } from \"fs\"\nimport { type NextRequest, NextResponse } from \"next/server\"\nimport { tmpdir } from \"os\"\nimport { join } from \"path\"\n\nexport async function GET(request: NextRequest) {\n try {\n const searchParams = request.nextUrl.searchParams\n const pattern = searchParams.get(\"pattern\") || \"\"\n\n const screenshotDir = process.env.SCREENSHOT_DIR || join(tmpdir(), \"dev3000-mcp-deps\", \"public\", \"screenshots\")\n\n const files = readdirSync(screenshotDir)\n .filter((f) => f.endsWith(\".png\"))\n .filter((f) => (pattern ? f.includes(pattern) : true))\n\n return NextResponse.json({ files })\n } catch (error) {\n console.error(\"Error listing screenshots:\", error)\n return NextResponse.json({ files: [] }, { status: 500 })\n }\n}\n"],"names":[],"mappings":"+hCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,MACA,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A,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAcV,GAbI,AAAE,CAAD,YAAgB,EAAA,eAAe,EAChC,CADmC,KAC7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[0]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},51281,e=>{"use strict";var t=e.i(11483),r=e.i(56204),n=e.i(3295),a=e.i(5406),o=e.i(37084),s=e.i(17489),i=e.i(16219),l=e.i(15437),d=e.i(17628),u=e.i(46572),p=e.i(45928),c=e.i(47920),h=e.i(21471),R=e.i(91397),x=e.i(96522),v=e.i(23084),g=e.i(93695);e.i(6877);var f=e.i(62865),E=e.i(22734);async function w(e){try{let{searchParams:t}=new URL(e.url),r=parseInt(t.get("lines")||"50",10),n=t.get("logPath")||process.env.LOG_FILE_PATH||"./ai-dev-tools/consolidated.log";if(!(0,E.existsSync)(n))return Response.json({error:"Log file not found"},{status:404});let a=(0,E.readFileSync)(n,"utf-8").split("\n").filter(e=>e.trim()),o={logs:a.slice(0,r).join("\n"),total:a.length};return Response.json(o)}catch(t){let e={error:t instanceof Error?t.message:"Unknown error"};return Response.json(e,{status:500})}}e.s(["GET",()=>w],9421);var m=e.i(9421);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/logs/head/route",pathname:"/api/logs/head",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/mcp-server/app/api/logs/head/route.ts",nextConfigOutput:"",userland:m}),{workAsyncStorage:y,workUnitAsyncStorage:A,serverHooks:b}=C;function T(){return(0,n.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:A})}async function P(e,t,n){C.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let E="/api/logs/head/route";E=E.replace(/\/index$/,"")||"/";let w=await C.prepare(e,t,{srcPage:E,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:m,params:y,nextConfig:A,parsedUrl:b,isDraftMode:T,prerenderManifest:P,routerServerContext:N,isOnDemandRevalidate:O,revalidateOnlyGenerated:S,resolvedPathname:_,clientReferenceManifest:k,serverActionsManifest:j}=w,q=(0,l.normalizeAppPath)(E),H=!!(P.dynamicRoutes[q]||P.routes[_]),U=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,b,!1):t.end("This page could not be found"),null);if(H&&!T){let e=!!P.routes[_],t=P.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(A.experimental.adapterPath)return await U();throw new g.NoFallbackError}}let I=null;!H||C.isDev||T||(I="/index"===(I=_)?"/":I);let M=!0===C.isDev||!H,D=H&&!M;j&&k&&(0,s.setReferenceManifestsSingleton)({page:E,clientReferenceManifest:k,serverActionsManifest:j,serverModuleMap:(0,i.createServerModuleMap)({serverActionsManifest:j})});let F=e.method||"GET",L=(0,o.getTracer)(),$=L.getActiveScopeSpan(),K={params:y,prerenderManifest:P,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts},cacheComponents:!!A.cacheComponents,supportsDynamicResponse:M,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:A.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n)=>C.onRequestError(e,t,n,N)},sharedContext:{buildId:m}},B=new d.NodeNextRequest(e),G=new d.NodeNextResponse(t),V=u.NextRequestAdapter.fromNodeNextRequest(B,(0,u.signalFromNodeResponse)(t));try{let s=async e=>C.handle(V,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=L.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${F} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${F} ${E}`)}),i=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var o,l;let d=async({previousCacheEntry:r})=>{try{if(!i&&O&&S&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await s(a);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!H)return await (0,h.sendResponse)(B,G,o,K.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,R.toNodeOutgoingHttpHeaders)(o.headers);d&&(t[v.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=v.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:O})},N),t}},u=await C.handleResponse({req:e,nextConfig:A,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:S,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:i});if(!H)return null;if((null==u||null==(o=u.value)?void 0:o.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",O?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,R.fromNodeOutgoingHttpHeaders)(u.value.headers);return i&&H||p.delete(v.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,h.sendResponse)(B,G,new Response(u.value.body,{headers:p,status:u.value.status||200})),null};$?await l($):await L.withPropagatedContext(e.headers,()=>L.trace(p.BaseServerSpan.handleRequest,{spanName:`${F} ${E}`,kind:o.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},l))}catch(t){if(t instanceof g.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:O})}),H)throw t;return await (0,h.sendResponse)(B,G,new Response(null,{status:500})),null}}e.s(["handler",()=>P,"patchFetch",()=>T,"routeModule",()=>C,"serverHooks",()=>b,"workAsyncStorage",()=>y,"workUnitAsyncStorage",()=>A],51281)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__262fc29c._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/.pnpm/next%4016.0.7_%40opentelemetry%2Bapi%401.9.0_babel-plugin-react-compiler%401.0.0_react-dom%4019.3.0_a20848594014cb183ab624f2be88a203/node_modules/next/dist/esm/build/templates/app-route.js","../../../../mcp-server/app/api/logs/head/route.ts"],"sourcesContent":["import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setReferenceManifestsSingleton } from \"next/dist/esm/server/app-render/encryption-utils\";\nimport { createServerModuleMap } from \"next/dist/esm/server/app-render/action-utils\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/logs/head/route\",\n pathname: \"/api/logs/head\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/mcp-server/app/api/logs/head/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/logs/head/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setReferenceManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap({\n serverActionsManifest\n })\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import { existsSync, readFileSync } from \"fs\"\nimport type { NextRequest } from \"next/server\"\nimport type { LogsApiError, LogsApiResponse } from \"@/types\"\n\nexport async function GET(request: NextRequest): Promise<Response> {\n try {\n const { searchParams } = new URL(request.url)\n const lines = parseInt(searchParams.get(\"lines\") || \"50\", 10)\n const logPath = searchParams.get(\"logPath\") || process.env.LOG_FILE_PATH || \"./ai-dev-tools/consolidated.log\"\n\n if (!existsSync(logPath)) {\n const errorResponse: LogsApiError = { error: \"Log file not found\" }\n return Response.json(errorResponse, { status: 404 })\n }\n\n const logContent = readFileSync(logPath, \"utf-8\")\n const allLines = logContent.split(\"\\n\").filter((line) => line.trim())\n const headLines = allLines.slice(0, lines)\n\n const response: LogsApiResponse = {\n logs: headLines.join(\"\\n\"),\n total: allLines.length\n }\n\n return Response.json(response)\n } catch (error) {\n const errorResponse: LogsApiError = {\n error: error instanceof Error ? error.message : \"Unknown error\"\n }\n return Response.json(errorResponse, { status: 500 })\n }\n}\n"],"names":[],"mappings":"0vBAAA,IAAA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OCjBA,EAAA,EAAA,CAAA,CAAA,OAIO,eAAe,EAAI,CAAoB,EAC5C,GAAI,CACF,GAAM,cAAE,CAAY,CAAE,CAAG,IAAI,IAAI,EAAQ,GAAG,EACtC,EAAQ,SAAS,EAAa,GAAG,CAAC,UAAY,KAAM,IACpD,EAAU,EAAa,GAAG,CAAC,YAAc,QAAQ,GAAG,CAAC,aAAa,EAAI,kCAE5E,GAAI,CAAC,CAAA,EAAA,EAAA,UAAA,AAAU,EAAC,GAEd,OAFwB,AAEjB,SAAS,IAAI,CADgB,AACf,CADiB,MA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AAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[0]}
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/.pnpm/next%4016.0.9_%40opentelemetry%2Bapi%401.9.0_babel-plugin-react-compiler%401.0.0_react-dom%4019.3.0_fa664f6e74076e0531728f3cffad7b1f/node_modules/next/dist/esm/build/templates/app-route.js","../../../../mcp-server/app/api/logs/head/route.ts"],"sourcesContent":["import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setReferenceManifestsSingleton } from \"next/dist/esm/server/app-render/encryption-utils\";\nimport { createServerModuleMap } from \"next/dist/esm/server/app-render/action-utils\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/logs/head/route\",\n pathname: \"/api/logs/head\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/mcp-server/app/api/logs/head/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/logs/head/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setReferenceManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap({\n serverActionsManifest\n })\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import { existsSync, readFileSync } from \"fs\"\nimport type { NextRequest } from \"next/server\"\nimport type { LogsApiError, LogsApiResponse } from \"@/types\"\n\nexport async function GET(request: NextRequest): Promise<Response> {\n try {\n const { searchParams } = new URL(request.url)\n const lines = parseInt(searchParams.get(\"lines\") || \"50\", 10)\n const logPath = searchParams.get(\"logPath\") || process.env.LOG_FILE_PATH || \"./ai-dev-tools/consolidated.log\"\n\n if (!existsSync(logPath)) {\n const errorResponse: LogsApiError = { error: \"Log file not found\" }\n return Response.json(errorResponse, { status: 404 })\n }\n\n const logContent = readFileSync(logPath, \"utf-8\")\n const allLines = logContent.split(\"\\n\").filter((line) => line.trim())\n const headLines = allLines.slice(0, lines)\n\n const response: LogsApiResponse = {\n logs: headLines.join(\"\\n\"),\n total: allLines.length\n }\n\n return Response.json(response)\n } catch (error) {\n const errorResponse: LogsApiError = {\n error: error instanceof Error ? error.message : \"Unknown error\"\n }\n return Response.json(errorResponse, { status: 500 })\n }\n}\n"],"names":[],"mappings":"0vBAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAA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AAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAcV,GAbI,AAAE,CAAD,YAAgB,EAAA,eAAe,EAChC,CADmC,KAC7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[0]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[49719,(t,e,i)=>{e.exports=t.x("assert",()=>require("assert"))},73169,t=>{"use strict";function e(t,n,a,l,f,p={}){let{threshold:u=.1,alpha:c=.1,aaColor:d=[255,255,0],diffColor:_=[255,0,0],includeAA:g,diffColorAlt:b,diffMask:y}=p;if(!i(t)||!i(n)||a&&!i(a))throw Error("Image data: Uint8Array, Uint8ClampedArray or Buffer expected.");if(t.length!==n.length||a&&a.length!==t.length)throw Error("Image sizes do not match.");if(t.length!==l*f*4)throw Error("Image data size does not match width/height.");let m=l*f,E=new Uint32Array(t.buffer,t.byteOffset,m),T=new Uint32Array(n.buffer,n.byteOffset,m),w=!0;for(let t=0;t<m;t++)if(E[t]!==T[t]){w=!1;break}if(w){if(a&&!y)for(let e=0;e<m;e++)o(t,4*e,c,a);return 0}let C=35215*u*u,[O,I,L]=d,[A,P,k]=_,[R,x,D]=b||_,M=0;for(let e=0;e<f;e++)for(let i=0;i<l;i++){let p=e*l+i,u=4*p,d=E[p]===T[p]?0:s(t,n,u,u,!1);if(Math.abs(d)>C){let s=r(t,i,e,l,f,E,T)||r(n,i,e,l,f,T,E);!g&&s?a&&!y&&h(a,u,O,I,L):(a&&(d<0?h(a,u,R,x,D):h(a,u,A,P,k)),M++)}else a&&!y&&o(t,u,c,a)}return M}function i(t){return ArrayBuffer.isView(t)&&1===t.BYTES_PER_ELEMENT}function r(t,e,i,r,h,o,a){let l=Math.max(e-1,0),f=Math.max(i-1,0),p=Math.min(e+1,r-1),u=Math.min(i+1,h-1),c=i*r+e,d=+(e===l||e===p||i===f||i===u),_=0,g=0,b=0,y=0,m=0,E=0;for(let n=l;n<=p;n++)for(let h=f;h<=u;h++){if(n===e&&h===i)continue;let o=s(t,t,4*c,(h*r+n)*4,!0);if(0===o){if(++d>2)return!1}else o<_?(_=o,b=n,y=h):o>g&&(g=o,m=n,E=h)}return 0!==_&&0!==g&&(n(o,b,y,r,h)&&n(a,b,y,r,h)||n(o,m,E,r,h)&&n(a,m,E,r,h))}function n(t,e,i,r,n){let s=Math.max(e-1,0),h=Math.max(i-1,0),o=Math.min(e+1,r-1),a=Math.min(i+1,n-1),l=t[i*r+e],f=+(e===s||e===o||i===h||i===a);for(let n=s;n<=o;n++)for(let s=h;s<=a;s++)if((n!==e||s!==i)&&(f+=+(l===t[s*r+n]))>2)return!0;return!1}function s(t,e,i,r,n){let s=t[i],h=t[i+1],o=t[i+2],a=t[i+3],l=e[r],f=e[r+1],p=e[r+2],u=e[r+3],c=s-l,d=h-f,_=o-p,g=a-u;if(!c&&!d&&!_&&!g)return 0;(a<255||u<255)&&(c=(s*a-l*u-(48+i%2*159)*g)/255,d=(h*a-f*u-(48+(i/1.618033988749895|0)%2*159)*g)/255,_=(o*a-p*u-(48+(i/2.618033988749895|0)%2*159)*g)/255);let b=.29889531*c+.58662247*d+.11448223*_;if(n)return b;let y=.59597799*c-.2741761*d-.32180189*_,m=.21147017*c-.52261711*d+.31114694*_,E=.5053*b*b+.299*y*y+.1957*m*m;return b>0?-E:E}function h(t,e,i,r,n){t[e+0]=i,t[e+1]=r,t[e+2]=n,t[e+3]=255}function o(t,e,i,r){let n=255+(.29889531*t[e]+.58662247*t[e+1]+.11448223*t[e+2]-255)*i*t[e+3]/255;h(r,e,n,n,n)}t.s(["default",()=>e])},37106,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(88947),s=e.exports=function(){n.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};r.inherits(s,n),s.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e}),process.nextTick((function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}).bind(this))},s.prototype.write=function(t,e){let i;return this.writable?(i=Buffer.isBuffer(t)?t:Buffer.from(t,e||this._encoding),this._buffers.push(i),this._buffered+=i.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused):(this.emit("error",Error("Stream not writable")),!1)},s.prototype.end=function(t,e){t&&this.write(t,e),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},s.prototype.destroySoon=s.prototype.end,s.prototype._end=function(){this._reads.length>0&&this.emit("error",Error("Unexpected end of input")),this.destroy()},s.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},s.prototype._processReadAllowingLess=function(t){this._reads.shift();let e=this._buffers[0];e.length>t.length?(this._buffered-=t.length,this._buffers[0]=e.slice(t.length),t.func.call(this,e.slice(0,t.length))):(this._buffered-=e.length,this._buffers.shift(),t.func.call(this,e))},s.prototype._processRead=function(t){this._reads.shift();let e=0,i=0,r=Buffer.alloc(t.length);for(;e<t.length;){let n=this._buffers[i++],s=Math.min(n.length,t.length-e);n.copy(r,e,0,s),e+=s,s!==n.length&&(this._buffers[--i]=n.slice(s))}i>0&&this._buffers.splice(0,i),this._buffered-=t.length,t.func.call(this,r)},s.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let t=this._reads[0];if(t.allowLess)this._processReadAllowingLess(t);else if(this._buffered>=t.length)this._processRead(t);else break}this._buffers&&!this.writable&&this._end()}catch(t){this.emit("error",t)}}},33106,(t,e,i)=>{"use strict";let r=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];i.getImagePasses=function(t,e){let i=[],n=t%8,s=e%8,h=(t-n)/8,o=(e-s)/8;for(let t=0;t<r.length;t++){let e=r[t],a=h*e.x.length,l=o*e.y.length;for(let t=0;t<e.x.length;t++)if(e.x[t]<n)a++;else break;for(let t=0;t<e.y.length;t++)if(e.y[t]<s)l++;else break;a>0&&l>0&&i.push({width:a,height:l,index:t})}return i},i.getInterlaceIterator=function(t){return function(e,i,n){let s=e%r[n].x.length,h=(e-s)/r[n].x.length*8+r[n].x[s],o=i%r[n].y.length;return 4*h+((i-o)/r[n].y.length*8+r[n].y[o])*t*4}}},35352,(t,e,i)=>{"use strict";e.exports=function(t,e,i){let r=t+e-i,n=Math.abs(r-t),s=Math.abs(r-e),h=Math.abs(r-i);return n<=s&&n<=h?t:s<=h?e:i}},28378,(t,e,i)=>{"use strict";let r=t.r(33106),n=t.r(35352);function s(t,e,i){let r=t*e;return 8!==i&&(r=Math.ceil(r/(8/i))),r}let h=e.exports=function(t,e){let i=t.width,n=t.height,h=t.interlace,o=t.bpp,a=t.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],h){let t=r.getImagePasses(i,n);for(let e=0;e<t.length;e++)this._images.push({byteWidth:s(t[e].width,o,a),height:t[e].height,lineIndex:0})}else this._images.push({byteWidth:s(i,o,a),height:n,lineIndex:0});8===a?this._xComparison=o:16===a?this._xComparison=2*o:this._xComparison=1};h.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},h.prototype._unFilterType1=function(t,e,i){let r=this._xComparison,n=r-1;for(let s=0;s<i;s++){let i=t[1+s],h=s>n?e[s-r]:0;e[s]=i+h}},h.prototype._unFilterType2=function(t,e,i){let r=this._lastLine;for(let n=0;n<i;n++){let i=t[1+n],s=r?r[n]:0;e[n]=i+s}},h.prototype._unFilterType3=function(t,e,i){let r=this._xComparison,n=r-1,s=this._lastLine;for(let h=0;h<i;h++){let i=t[1+h],o=s?s[h]:0,a=Math.floor(((h>n?e[h-r]:0)+o)/2);e[h]=i+a}},h.prototype._unFilterType4=function(t,e,i){let r=this._xComparison,s=r-1,h=this._lastLine;for(let o=0;o<i;o++){let i=t[1+o],a=h?h[o]:0,l=n(o>s?e[o-r]:0,a,o>s&&h?h[o-r]:0);e[o]=i+l}},h.prototype._reverseFilterLine=function(t){let e,i=t[0],r=this._images[this._imageIndex],n=r.byteWidth;if(0===i)e=t.slice(1,n+1);else switch(e=Buffer.alloc(n),i){case 1:this._unFilterType1(t,e,n);break;case 2:this._unFilterType2(t,e,n);break;case 3:this._unFilterType3(t,e,n);break;case 4:this._unFilterType4(t,e,n);break;default:throw Error("Unrecognised filter type - "+i)}this.write(e),r.lineIndex++,r.lineIndex>=r.height?(this._lastLine=null,this._imageIndex++,r=this._images[this._imageIndex]):this._lastLine=e,r?this.read(r.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}},41998,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(37106),s=t.r(28378),h=e.exports=function(t){n.call(this);let e=[],i=this;this._filter=new s(t,{read:this.read.bind(this),write:function(t){e.push(t)},complete:function(){i.emit("complete",Buffer.concat(e))}}),this._filter.start()};r.inherits(h,n)},86982,(t,e,i)=>{"use strict";e.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:0x49484452,TYPE_IEND:0x49454e44,TYPE_IDAT:0x49444154,TYPE_PLTE:0x504c5445,TYPE_tRNS:0x74524e53,TYPE_gAMA:0x67414d41,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},22352,(t,e,i)=>{"use strict";let r=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=0xedb88320^e>>>1:e>>>=1;r[t]=e}let n=e.exports=function(){this._crc=-1};n.prototype.write=function(t){for(let e=0;e<t.length;e++)this._crc=r[(this._crc^t[e])&255]^this._crc>>>8;return!0},n.prototype.crc32=function(){return -1^this._crc},n.crc32=function(t){let e=-1;for(let i=0;i<t.length;i++)e=r[(e^t[i])&255]^e>>>8;return -1^e}},23213,(t,e,i)=>{"use strict";let r=t.r(86982),n=t.r(22352),s=e.exports=function(t,e){this._options=t,t.checkCRC=!1!==t.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[r.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[r.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[r.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[r.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[r.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[r.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};s.prototype.start=function(){this.read(r.PNG_SIGNATURE.length,this._parseSignature.bind(this))},s.prototype._parseSignature=function(t){let e=r.PNG_SIGNATURE;for(let i=0;i<e.length;i++)if(t[i]!==e[i])return void this.error(Error("Invalid file signature"));this.read(8,this._parseChunkBegin.bind(this))},s.prototype._parseChunkBegin=function(t){let e=t.readUInt32BE(0),i=t.readUInt32BE(4),s="";for(let e=4;e<8;e++)s+=String.fromCharCode(t[e]);let h=!!(32&t[4]);return this._hasIHDR||i===r.TYPE_IHDR?(this._crc=new n,this._crc.write(Buffer.from(s)),this._chunks[i])?this._chunks[i](e):h?void this.read(e+4,this._skipChunk.bind(this)):void this.error(Error("Unsupported critical chunk type "+s)):void this.error(Error("Expected IHDR on beggining"))},s.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},s.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},s.prototype._parseChunkEnd=function(t){let e=t.readInt32BE(0),i=this._crc.crc32();this._options.checkCRC&&i!==e?this.error(Error("Crc error - "+e+" - "+i)):this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},s.prototype._handleIHDR=function(t){this.read(t,this._parseIHDR.bind(this))},s.prototype._parseIHDR=function(t){this._crc.write(t);let e=t.readUInt32BE(0),i=t.readUInt32BE(4),n=t[8],s=t[9],h=t[10],o=t[11],a=t[12];if(8!==n&&4!==n&&2!==n&&1!==n&&16!==n)return void this.error(Error("Unsupported bit depth "+n));if(!(s in r.COLORTYPE_TO_BPP_MAP))return void this.error(Error("Unsupported color type"));if(0!==h)return void this.error(Error("Unsupported compression method"));if(0!==o)return void this.error(Error("Unsupported filter method"));if(0!==a&&1!==a)return void this.error(Error("Unsupported interlace method"));this._colorType=s;let l=r.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:i,depth:n,interlace:!!a,palette:!!(s&r.COLORTYPE_PALETTE),color:!!(s&r.COLORTYPE_COLOR),alpha:!!(s&r.COLORTYPE_ALPHA),bpp:l,colorType:s}),this._handleChunkEnd()},s.prototype._handlePLTE=function(t){this.read(t,this._parsePLTE.bind(this))},s.prototype._parsePLTE=function(t){this._crc.write(t);let e=Math.floor(t.length/3);for(let i=0;i<e;i++)this._palette.push([t[3*i],t[3*i+1],t[3*i+2],255]);this.palette(this._palette),this._handleChunkEnd()},s.prototype._handleTRNS=function(t){this.simpleTransparency(),this.read(t,this._parseTRNS.bind(this))},s.prototype._parseTRNS=function(t){if(this._crc.write(t),this._colorType===r.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(Error("Transparency chunk must be after palette"));if(t.length>this._palette.length)return void this.error(Error("More transparent colors than palette size"));for(let e=0;e<t.length;e++)this._palette[e][3]=t[e];this.palette(this._palette)}this._colorType===r.COLORTYPE_GRAYSCALE&&this.transColor([t.readUInt16BE(0)]),this._colorType===r.COLORTYPE_COLOR&&this.transColor([t.readUInt16BE(0),t.readUInt16BE(2),t.readUInt16BE(4)]),this._handleChunkEnd()},s.prototype._handleGAMA=function(t){this.read(t,this._parseGAMA.bind(this))},s.prototype._parseGAMA=function(t){this._crc.write(t),this.gamma(t.readUInt32BE(0)/r.GAMMA_DIVISION),this._handleChunkEnd()},s.prototype._handleIDAT=function(t){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-t,this._parseIDAT.bind(this,t))},s.prototype._parseIDAT=function(t,e){if(this._crc.write(e),this._colorType===r.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw Error("Expected palette not found");this.inflateData(e);let i=t-e.length;i>0?this._handleIDAT(i):this._handleChunkEnd()},s.prototype._handleIEND=function(t){this.read(t,this._parseIEND.bind(this))},s.prototype._parseIEND=function(t){this._crc.write(t),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}},74047,(t,e,i)=>{"use strict";let r=t.r(33106),n=[function(){},function(t,e,i,r){if(r===e.length)throw Error("Ran out of data");let n=e[r];t[i]=n,t[i+1]=n,t[i+2]=n,t[i+3]=255},function(t,e,i,r){if(r+1>=e.length)throw Error("Ran out of data");let n=e[r];t[i]=n,t[i+1]=n,t[i+2]=n,t[i+3]=e[r+1]},function(t,e,i,r){if(r+2>=e.length)throw Error("Ran out of data");t[i]=e[r],t[i+1]=e[r+1],t[i+2]=e[r+2],t[i+3]=255},function(t,e,i,r){if(r+3>=e.length)throw Error("Ran out of data");t[i]=e[r],t[i+1]=e[r+1],t[i+2]=e[r+2],t[i+3]=e[r+3]}],s=[function(){},function(t,e,i,r){let n=e[0];t[i]=n,t[i+1]=n,t[i+2]=n,t[i+3]=r},function(t,e,i){let r=e[0];t[i]=r,t[i+1]=r,t[i+2]=r,t[i+3]=e[1]},function(t,e,i,r){t[i]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=r},function(t,e,i){t[i]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3]}];i.dataToBitMap=function(t,e){let i,h,o,a,l,f,p=e.width,u=e.height,c=e.depth,d=e.bpp,_=e.interlace;8!==c&&(i=[],h=0,o={get:function(e){for(;i.length<e;)!function(){let e,r,n,s;if(h===t.length)throw Error("Ran out of data");let o=t[h];switch(h++,c){default:throw Error("unrecognised depth");case 16:n=t[h],h++,i.push((o<<8)+n);break;case 4:n=15&o,s=o>>4,i.push(s,n);break;case 2:e=3&o,r=o>>2&3,n=o>>4&3,s=o>>6&3,i.push(s,n,r,e);break;case 1:e=o>>4&1,r=o>>5&1,n=o>>6&1,s=o>>7&1,i.push(s,n,r,e,o>>3&1,o>>2&1,o>>1&1,1&o)}}();let r=i.slice(0,e);return i=i.slice(e),r},resetAfterLine:function(){i.length=0},end:function(){if(h!==t.length)throw Error("extra data found")}}),a=c<=8?Buffer.alloc(p*u*4):new Uint16Array(p*u*4);let g=Math.pow(2,c)-1,b=0;if(_)l=r.getImagePasses(p,u),f=r.getInterlaceIterator(p,u);else{let t=0;f=function(){let e=t;return t+=4,e},l=[{width:p,height:u}]}for(let e=0;e<l.length;e++)8===c?b=function(t,e,i,r,s,h){let o=t.width,a=t.height,l=t.index;for(let t=0;t<a;t++)for(let a=0;a<o;a++){let o=i(a,t,l);n[r](e,s,o,h),h+=r}return h}(l[e],a,f,d,t,b):function(t,e,i,r,n,h){let o=t.width,a=t.height,l=t.index;for(let t=0;t<a;t++){for(let a=0;a<o;a++){let o=n.get(r),f=i(a,t,l);s[r](e,o,f,h)}n.resetAfterLine()}}(l[e],a,f,d,o,g);if(8===c){if(b!==t.length)throw Error("extra data found")}else o.end();return a}},37829,(t,e,i)=>{"use strict";e.exports=function(t,e,i=!1){let r=e.depth,n=e.width,s=e.height,h=e.colorType,o=e.transColor,a=e.palette,l=t;return 3===h?!function(t,e,i,r,n){let s=0;for(let h=0;h<r;h++)for(let r=0;r<i;r++){let i=n[t[s]];if(!i)throw Error("index "+t[s]+" not in palette");for(let t=0;t<4;t++)e[s+t]=i[t];s+=4}}(t,l,n,s,a):(o&&function(t,e,i,r,n){let s=0;for(let h=0;h<r;h++)for(let r=0;r<i;r++){let i=!1;if(1===n.length?n[0]===t[s]&&(i=!0):n[0]===t[s]&&n[1]===t[s+1]&&n[2]===t[s+2]&&(i=!0),i)for(let t=0;t<4;t++)e[s+t]=0;s+=4}}(t,l,n,s,o),8===r||i||(16===r&&(l=Buffer.alloc(n*s*4)),!function(t,e,i,r,n){let s=Math.pow(2,n)-1,h=0;for(let n=0;n<r;n++)for(let r=0;r<i;r++){for(let i=0;i<4;i++)e[h+i]=Math.floor(255*t[h+i]/s+.5);h+=4}}(t,l,n,s,r))),l}},6183,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(6461),s=t.r(37106),h=t.r(41998),o=t.r(23213),a=t.r(74047),l=t.r(37829),f=e.exports=function(t){s.call(this),this._parser=new o(t,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=t,this.writable=!0,this._parser.start()};r.inherits(f,s),f.prototype._handleError=function(t){this.emit("error",t),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0},f.prototype._inflateData=function(t){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=n.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let t=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,e=Math.max(t,n.Z_MIN_CHUNK);this._inflate=n.createInflate({chunkSize:e});let i=t,r=this.emit.bind(this,"error");this._inflate.on("error",function(t){i&&r(t)}),this._filter.on("complete",this._complete.bind(this));let s=this._filter.write.bind(this._filter);this._inflate.on("data",function(t){i&&(t.length>i&&(t=t.slice(0,i)),i-=t.length,s(t))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(t)},f.prototype._handleMetaData=function(t){this._metaData=t,this._bitmapInfo=Object.create(t),this._filter=new h(this._bitmapInfo)},f.prototype._handleTransColor=function(t){this._bitmapInfo.transColor=t},f.prototype._handlePalette=function(t){this._bitmapInfo.palette=t},f.prototype._simpleTransparency=function(){this._metaData.alpha=!0},f.prototype._headersFinished=function(){this.emit("metadata",this._metaData)},f.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))},f.prototype._complete=function(t){let e;if(!this.errord){try{let i=a.dataToBitMap(t,this._bitmapInfo);e=l(i,this._bitmapInfo,this._options.skipRescale),i=null}catch(t){this._handleError(t);return}this.emit("parsed",e)}}},55920,(t,e,i)=>{"use strict";let r=t.r(86982);e.exports=function(t,e,i,n){let s=-1!==[r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(n.colorType);if(n.colorType===n.inputColorType){let e,i=(new DataView(e=new ArrayBuffer(2)).setInt16(0,256,!0),256!==new Int16Array(e)[0]);if(8===n.bitDepth||16===n.bitDepth&&i)return t}let h=16!==n.bitDepth?t:new Uint16Array(t.buffer),o=255,a=r.COLORTYPE_TO_BPP_MAP[n.inputColorType];4!==a||n.inputHasAlpha||(a=3);let l=r.COLORTYPE_TO_BPP_MAP[n.colorType];16===n.bitDepth&&(o=65535,l*=2);let f=Buffer.alloc(e*i*l),p=0,u=0,c=n.bgColor||{};void 0===c.red&&(c.red=o),void 0===c.green&&(c.green=o),void 0===c.blue&&(c.blue=o);for(let t=0;t<i;t++)for(let t=0;t<e;t++){let t=function(){let t,e,i,a=o;switch(n.inputColorType){case r.COLORTYPE_COLOR_ALPHA:a=h[p+3],t=h[p],e=h[p+1],i=h[p+2];break;case r.COLORTYPE_COLOR:t=h[p],e=h[p+1],i=h[p+2];break;case r.COLORTYPE_ALPHA:a=h[p+1],e=t=h[p],i=t;break;case r.COLORTYPE_GRAYSCALE:e=t=h[p],i=t;break;default:throw Error("input color type:"+n.inputColorType+" is not supported at present")}return n.inputHasAlpha&&!s&&(a/=o,t=Math.min(Math.max(Math.round((1-a)*c.red+a*t),0),o),e=Math.min(Math.max(Math.round((1-a)*c.green+a*e),0),o),i=Math.min(Math.max(Math.round((1-a)*c.blue+a*i),0),o)),{red:t,green:e,blue:i,alpha:a}}(h,p);switch(n.colorType){case r.COLORTYPE_COLOR_ALPHA:case r.COLORTYPE_COLOR:8===n.bitDepth?(f[u]=t.red,f[u+1]=t.green,f[u+2]=t.blue,s&&(f[u+3]=t.alpha)):(f.writeUInt16BE(t.red,u),f.writeUInt16BE(t.green,u+2),f.writeUInt16BE(t.blue,u+4),s&&f.writeUInt16BE(t.alpha,u+6));break;case r.COLORTYPE_ALPHA:case r.COLORTYPE_GRAYSCALE:{let e=(t.red+t.green+t.blue)/3;8===n.bitDepth?(f[u]=e,s&&(f[u+1]=t.alpha)):(f.writeUInt16BE(e,u),s&&f.writeUInt16BE(t.alpha,u+2));break}default:throw Error("unrecognised color Type "+n.colorType)}p+=a,u+=l}return f}},50796,(t,e,i)=>{"use strict";let r=t.r(35352),n={0:function(t,e,i,r,n){for(let s=0;s<i;s++)r[n+s]=t[e+s]},1:function(t,e,i,r,n,s){for(let h=0;h<i;h++){let i=h>=s?t[e+h-s]:0,o=t[e+h]-i;r[n+h]=o}},2:function(t,e,i,r,n){for(let s=0;s<i;s++){let h=e>0?t[e+s-i]:0,o=t[e+s]-h;r[n+s]=o}},3:function(t,e,i,r,n,s){for(let h=0;h<i;h++){let o=h>=s?t[e+h-s]:0,a=e>0?t[e+h-i]:0,l=t[e+h]-(o+a>>1);r[n+h]=l}},4:function(t,e,i,n,s,h){for(let o=0;o<i;o++){let a=o>=h?t[e+o-h]:0,l=e>0?t[e+o-i]:0,f=e>0&&o>=h?t[e+o-(i+h)]:0,p=t[e+o]-r(a,l,f);n[s+o]=p}}},s={0:function(t,e,i){let r=0,n=e+i;for(let i=e;i<n;i++)r+=Math.abs(t[i]);return r},1:function(t,e,i,r){let n=0;for(let s=0;s<i;s++){let i=s>=r?t[e+s-r]:0;n+=Math.abs(t[e+s]-i)}return n},2:function(t,e,i){let r=0,n=e+i;for(let s=e;s<n;s++){let n=e>0?t[s-i]:0;r+=Math.abs(t[s]-n)}return r},3:function(t,e,i,r){let n=0;for(let s=0;s<i;s++){let h=s>=r?t[e+s-r]:0,o=e>0?t[e+s-i]:0;n+=Math.abs(t[e+s]-(h+o>>1))}return n},4:function(t,e,i,n){let s=0;for(let h=0;h<i;h++){let o=h>=n?t[e+h-n]:0,a=e>0?t[e+h-i]:0,l=e>0&&h>=n?t[e+h-(i+n)]:0;s+=Math.abs(t[e+h]-r(o,a,l))}return s}};e.exports=function(t,e,i,r,h){let o;if("filterType"in r&&-1!==r.filterType)if("number"==typeof r.filterType)o=[r.filterType];else throw Error("unrecognised filter types");else o=[0,1,2,3,4];16===r.bitDepth&&(h*=2);let a=e*h,l=0,f=0,p=Buffer.alloc((a+1)*i),u=o[0];for(let e=0;e<i;e++){if(o.length>1){let e=1/0;for(let i=0;i<o.length;i++){let r=s[o[i]](t,f,a,h);r<e&&(u=o[i],e=r)}}p[l]=u,l++,n[u](t,f,a,p,l,h),l+=a,f+=a}return p}},59029,(t,e,i)=>{"use strict";let r=t.r(86982),n=t.r(22352),s=t.r(55920),h=t.r(50796),o=t.r(6461),a=e.exports=function(t){if(this._options=t,t.deflateChunkSize=t.deflateChunkSize||32768,t.deflateLevel=null!=t.deflateLevel?t.deflateLevel:9,t.deflateStrategy=null!=t.deflateStrategy?t.deflateStrategy:3,t.inputHasAlpha=null==t.inputHasAlpha||t.inputHasAlpha,t.deflateFactory=t.deflateFactory||o.createDeflate,t.bitDepth=t.bitDepth||8,t.colorType="number"==typeof t.colorType?t.colorType:r.COLORTYPE_COLOR_ALPHA,t.inputColorType="number"==typeof t.inputColorType?t.inputColorType:r.COLORTYPE_COLOR_ALPHA,-1===[r.COLORTYPE_GRAYSCALE,r.COLORTYPE_COLOR,r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(t.colorType))throw Error("option color type:"+t.colorType+" is not supported at present");if(-1===[r.COLORTYPE_GRAYSCALE,r.COLORTYPE_COLOR,r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(t.inputColorType))throw Error("option input color type:"+t.inputColorType+" is not supported at present");if(8!==t.bitDepth&&16!==t.bitDepth)throw Error("option bit depth:"+t.bitDepth+" is not supported at present")};a.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},a.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},a.prototype.filterData=function(t,e,i){let n=s(t,e,i,this._options),o=r.COLORTYPE_TO_BPP_MAP[this._options.colorType];return h(n,e,i,this._options,o)},a.prototype._packChunk=function(t,e){let i=e?e.length:0,r=Buffer.alloc(i+12);return r.writeUInt32BE(i,0),r.writeUInt32BE(t,4),e&&e.copy(r,8),r.writeInt32BE(n.crc32(r.slice(4,r.length-4)),r.length-4),r},a.prototype.packGAMA=function(t){let e=Buffer.alloc(4);return e.writeUInt32BE(Math.floor(t*r.GAMMA_DIVISION),0),this._packChunk(r.TYPE_gAMA,e)},a.prototype.packIHDR=function(t,e){let i=Buffer.alloc(13);return i.writeUInt32BE(t,0),i.writeUInt32BE(e,4),i[8]=this._options.bitDepth,i[9]=this._options.colorType,i[10]=0,i[11]=0,i[12]=0,this._packChunk(r.TYPE_IHDR,i)},a.prototype.packIDAT=function(t){return this._packChunk(r.TYPE_IDAT,t)},a.prototype.packIEND=function(){return this._packChunk(r.TYPE_IEND,null)}},49152,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(88947),s=t.r(86982),h=t.r(59029),o=e.exports=function(t){n.call(this),this._packer=new h(t||{}),this._deflate=this._packer.createDeflate(),this.readable=!0};r.inherits(o,n),o.prototype.pack=function(t,e,i,r){this.emit("data",Buffer.from(s.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,i)),r&&this.emit("data",this._packer.packGAMA(r));let n=this._packer.filterData(t,e,i);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",(function(t){this.emit("data",this._packer.packIDAT(t))}).bind(this)),this._deflate.on("end",(function(){this.emit("data",this._packer.packIEND()),this.emit("end")}).bind(this)),this._deflate.end(n)}},26190,(t,e,i)=>{"use strict";let r=t.r(49719).ok,n=t.r(6461),s=t.r(24361),h=t.r(874).kMaxLength;function o(t){if(!(this instanceof o))return new o(t);t&&t.chunkSize<n.Z_MIN_CHUNK&&(t.chunkSize=n.Z_MIN_CHUNK),n.Inflate.call(this,t),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,t&&null!=t.maxLength&&(this._maxLength=t.maxLength)}function a(t,e){e&&process.nextTick(e),t._handle&&(t._handle.close(),t._handle=null)}function l(t,e){var i=new o(e),r=t;if("string"==typeof r&&(r=Buffer.from(r)),!(r instanceof Buffer))throw TypeError("Not a string or buffer");let s=i._finishFlushFlag;return null==s&&(s=n.Z_FINISH),i._processChunk(r,s)}o.prototype._processChunk=function(t,e,i){let s,o;if("function"==typeof i)return n.Inflate._processChunk.call(this,t,e,i);let l=this,f=t&&t.length,p=this._chunkSize-this._offset,u=this._maxLength,c=0,d=[],_=0;this.on("error",function(t){s=t}),r(this._handle,"zlib binding closed");do o=(o=this._handle.writeSync(e,t,c,f,this._buffer,this._offset,p))||this._writeState;while(!this._hadError&&function(t,e){if(l._hadError)return;let i=p-e;if(r(i>=0,"have should not go down"),i>0){let t=l._buffer.slice(l._offset,l._offset+i);if(l._offset+=i,t.length>u&&(t=t.slice(0,u)),d.push(t),_+=t.length,0==(u-=t.length))return!1}return(0===e||l._offset>=l._chunkSize)&&(p=l._chunkSize,l._offset=0,l._buffer=Buffer.allocUnsafe(l._chunkSize)),0===e&&(c+=f-t,f=t,!0)}(o[0],o[1]))if(this._hadError)throw s;if(_>=h)throw a(this),RangeError("Cannot create final Buffer. It would be larger than 0x"+h.toString(16)+" bytes");let g=Buffer.concat(d,_);return a(this),g},s.inherits(o,n.Inflate),e.exports=i=l,i.Inflate=o,i.createInflate=function(t){return new o(t)},i.inflateSync=l},75886,(t,e,i)=>{"use strict";let r=e.exports=function(t){this._buffer=t,this._reads=[]};r.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e})},r.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let t=this._reads[0];if(this._buffer.length&&(this._buffer.length>=t.length||t.allowLess)){this._reads.shift();let e=this._buffer;this._buffer=e.slice(t.length),t.func.call(this,e.slice(0,t.length))}else break}if(this._reads.length>0)throw Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw Error("unrecognised content at end of stream")}},36511,(t,e,i)=>{"use strict";let r=t.r(75886),n=t.r(28378);i.process=function(t,e){let i=[],s=new r(t);return new n(e,{read:s.read.bind(s),write:function(t){i.push(t)},complete:function(){}}).start(),s.process(),Buffer.concat(i)}},2291,(t,e,i)=>{"use strict";let r=!0,n=t.r(6461),s=t.r(26190);n.deflateSync||(r=!1);let h=t.r(75886),o=t.r(36511),a=t.r(23213),l=t.r(74047),f=t.r(37829);e.exports=function(t,e){let i,p,u,c;if(!r)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let d=[],_=new h(t);if(new a(e,{read:_.read.bind(_),error:function(t){i=t},metadata:function(t){p=t},gamma:function(t){u=t},palette:function(t){p.palette=t},transColor:function(t){p.transColor=t},inflateData:function(t){d.push(t)},simpleTransparency:function(){p.alpha=!0}}).start(),_.process(),i)throw i;let g=Buffer.concat(d);if(d.length=0,p.interlace)c=n.inflateSync(g);else{let t=((p.width*p.bpp*p.depth+7>>3)+1)*p.height;c=s(g,{chunkSize:t,maxLength:t})}if(g=null,!c||!c.length)throw Error("bad png - invalid inflate data response");let b=o.process(c,p);g=null;let y=l.dataToBitMap(b,p);b=null;let m=f(y,p,e.skipRescale);return p.data=m,p.gamma=u||0,p}},69762,(t,e,i)=>{"use strict";let r=!0,n=t.r(6461);n.deflateSync||(r=!1);let s=t.r(86982),h=t.r(59029);e.exports=function(t,e){if(!r)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let i=new h(e||{}),o=[];o.push(Buffer.from(s.PNG_SIGNATURE)),o.push(i.packIHDR(t.width,t.height)),t.gamma&&o.push(i.packGAMA(t.gamma));let a=i.filterData(t.data,t.width,t.height),l=n.deflateSync(a,i.getDeflateOptions());if(a=null,!l||!l.length)throw Error("bad png - invalid compressed data response");return o.push(i.packIDAT(l)),o.push(i.packIEND()),Buffer.concat(o)}},93079,(t,e,i)=>{"use strict";let r=t.r(2291),n=t.r(69762);i.read=function(t,e){return r(t,e||{})},i.write=function(t,e){return n(t,e)}},60801,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(88947),s=t.r(6183),h=t.r(49152),o=t.r(93079),a=i.PNG=function(t){n.call(this),t=t||{},this.width=0|t.width,this.height=0|t.height,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,t.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new s(t),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",(function(t){this.data=t,this.emit("parsed",t)}).bind(this)),this._packer=new h(t),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};r.inherits(a,n),a.sync=o,a.prototype.pack=function(){return this.data&&this.data.length?process.nextTick((function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}).bind(this)):this.emit("error","No data provided"),this},a.prototype.parse=function(t,e){if(e){let t,i;t=(function(t){this.removeListener("error",i),this.data=t,e(null,this)}).bind(this),i=(function(i){this.removeListener("parsed",t),e(i,null)}).bind(this),this.once("parsed",t),this.once("error",i)}return this.end(t),this},a.prototype.write=function(t){return this._parser.write(t),!0},a.prototype.end=function(t){this._parser.end(t)},a.prototype._metadata=function(t){this.width=t.width,this.height=t.height,this.emit("metadata",t)},a.prototype._gamma=function(t){this.gamma=t},a.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},a.bitblt=function(t,e,i,r,n,s,h,o){if(r|=0,n|=0,s|=0,h|=0,o|=0,(i|=0)>t.width||r>t.height||i+n>t.width||r+s>t.height)throw Error("bitblt reading outside image");if(h>e.width||o>e.height||h+n>e.width||o+s>e.height)throw Error("bitblt writing outside image");for(let a=0;a<s;a++)t.data.copy(e.data,(o+a)*e.width+h<<2,(r+a)*t.width+i<<2,(r+a)*t.width+i+n<<2)},a.prototype.bitblt=function(t,e,i,r,n,s,h){return a.bitblt(this,t,e,i,r,n,s,h),this},a.adjustGamma=function(t){if(t.gamma){for(let e=0;e<t.height;e++)for(let i=0;i<t.width;i++){let r=t.width*e+i<<2;for(let e=0;e<3;e++){let i=t.data[r+e]/255;i=Math.pow(i,1/2.2/t.gamma),t.data[r+e]=Math.round(255*i)}}t.gamma=0}},a.prototype.adjustGamma=function(){a.adjustGamma(this)}}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__340a77dc._.js.map
|