@vasfal/vellum 0.1.0 → 0.1.2
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +5 -5
- package/.next/build-manifest.json +13 -14
- package/.next/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.js +2 -0
- package/.next/required-server-files.json +2 -0
- package/.next/server/app/(app)/page.js +2 -15
- package/.next/server/app/(app)/page.js.nft.json +1 -1
- package/.next/server/app/(app)/page_client-reference-manifest.js +1 -3
- package/.next/server/app/(app)/session/[name]/page.js +2 -15
- package/.next/server/app/(app)/session/[name]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/session/[name]/page_client-reference-manifest.js +1 -3
- package/.next/server/app/(app)/settings/key/page.js +2 -15
- package/.next/server/app/(app)/settings/key/page.js.nft.json +1 -1
- package/.next/server/app/(app)/settings/key/page_client-reference-manifest.js +1 -3
- package/.next/server/app/_global-error/page.js +32 -9
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.meta +2 -1
- package/.next/server/app/_global-error.rsc +7 -7
- package/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/server/app/_global-error.segments/{__PAGE__.segment.rsc → _global-error/__PAGE__.segment.rsc} +2 -2
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -13
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -3
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +14 -12
- package/.next/server/app/_not-found.segments/_full.segment.rsc +14 -12
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -2
- package/.next/server/app/api/analyze/route.js +12 -9
- package/.next/server/app/api/analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/analyze/route_client-reference-manifest.js +1 -3
- package/.next/server/app/api/key/route.js +1 -8
- package/.next/server/app/api/key/route.js.nft.json +1 -1
- package/.next/server/app/api/key/route_client-reference-manifest.js +1 -3
- package/.next/server/app/api/key-status/route.js +1 -7
- package/.next/server/app/api/key-status/route.js.nft.json +1 -1
- package/.next/server/app/api/key-status/route_client-reference-manifest.js +1 -3
- package/.next/server/app/api/models/route.js +1 -7
- package/.next/server/app/api/models/route.js.nft.json +1 -1
- package/.next/server/app/api/models/route_client-reference-manifest.js +1 -3
- package/.next/server/app/api/revise/route.js +1 -8
- package/.next/server/app/api/revise/route.js.nft.json +1 -1
- package/.next/server/app/api/revise/route_client-reference-manifest.js +1 -3
- package/.next/server/app/icon.svg/route.js +1 -7
- package/.next/server/app/icon.svg/route.js.nft.json +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +24 -27
- package/.next/server/app/index.segments/!KGFwcCk/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/index.segments/!KGFwcCk.segment.rsc +9 -9
- package/.next/server/app/index.segments/_full.segment.rsc +24 -27
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +6 -6
- package/.next/server/app/index.segments/_tree.segment.rsc +4 -4
- package/.next/server/app/record-test/page.js +8 -14
- package/.next/server/app/record-test/page.js.nft.json +1 -1
- package/.next/server/app/record-test/page_client-reference-manifest.js +1 -3
- package/.next/server/app/record-test.html +2 -2
- package/.next/server/app/record-test.rsc +16 -16
- package/.next/server/app/record-test.segments/_full.segment.rsc +16 -16
- package/.next/server/app/record-test.segments/_head.segment.rsc +4 -4
- package/.next/server/app/record-test.segments/_index.segment.rsc +6 -6
- package/.next/server/app/record-test.segments/_tree.segment.rsc +4 -4
- package/.next/server/app/record-test.segments/record-test/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/record-test.segments/record-test.segment.rsc +3 -3
- package/.next/server/app/settings/key.html +1 -1
- package/.next/server/app/settings/key.rsc +28 -34
- package/.next/server/app/settings/key.segments/!KGFwcCk/settings/key/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/settings/key.segments/!KGFwcCk/settings/key.segment.rsc +3 -3
- package/.next/server/app/settings/key.segments/!KGFwcCk/settings.segment.rsc +3 -3
- package/.next/server/app/settings/key.segments/!KGFwcCk.segment.rsc +9 -9
- package/.next/server/app/settings/key.segments/_full.segment.rsc +28 -34
- package/.next/server/app/settings/key.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/key.segments/_index.segment.rsc +6 -6
- package/.next/server/app/settings/key.segments/_tree.segment.rsc +4 -4
- package/.next/server/app/styleguide/page.js +2 -15
- package/.next/server/app/styleguide/page.js.nft.json +1 -1
- package/.next/server/app/styleguide/page_client-reference-manifest.js +1 -3
- package/.next/server/app/styleguide.html +1 -1
- package/.next/server/app/styleguide.rsc +68 -71
- package/.next/server/app/styleguide.segments/_full.segment.rsc +68 -71
- package/.next/server/app/styleguide.segments/_head.segment.rsc +4 -4
- package/.next/server/app/styleguide.segments/_index.segment.rsc +6 -6
- package/.next/server/app/styleguide.segments/_tree.segment.rsc +4 -4
- package/.next/server/app/styleguide.segments/styleguide/__PAGE__.segment.rsc +43 -45
- package/.next/server/app/styleguide.segments/styleguide.segment.rsc +3 -3
- package/.next/server/app-paths-manifest.json +5 -5
- package/.next/server/chunks/15.js +1 -0
- package/.next/server/chunks/319.js +45 -0
- package/.next/server/chunks/367.js +122 -0
- package/.next/server/chunks/393.js +4 -0
- package/.next/server/chunks/491.js +2 -0
- package/.next/server/chunks/497.js +1 -0
- package/.next/server/chunks/546.js +1 -0
- package/.next/server/chunks/592.js +44 -0
- package/.next/server/chunks/607.js +4 -0
- package/.next/server/chunks/724.js +1 -0
- package/.next/server/chunks/741.js +18 -0
- package/.next/server/chunks/813.js +1 -0
- package/.next/server/chunks/837.js +75 -0
- package/.next/server/chunks/852.js +14 -0
- package/.next/server/chunks/907.js +62 -0
- package/.next/server/chunks/915.js +8 -0
- package/.next/server/chunks/994.js +8 -0
- package/.next/server/middleware-build-manifest.js +1 -21
- package/.next/server/middleware-manifest.json +2 -2
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +1 -31
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -5
- package/.next/server/webpack-runtime.js +1 -0
- package/.next/static/FExJe2q2O67X3zxf-SYQ_/_buildManifest.js +1 -0
- package/.next/static/chunks/185-9c51ded7cd36ca7e.js +1 -0
- package/.next/static/chunks/20-cca33f633fa125b2.js +1 -0
- package/.next/static/chunks/27-02413cc56fbb4570.js +1 -0
- package/.next/static/chunks/376-6f7bc95550542e0b.js +62 -0
- package/.next/static/chunks/479-ea67f878851afbcd.js +1 -0
- package/.next/static/chunks/493-6bd8c75c972d3abd.js +2 -0
- package/.next/static/chunks/4bd1b696-deb4a0a1da1923b0.js +1 -0
- package/.next/static/chunks/603-6235d4d53b37035c.js +1 -0
- package/.next/static/chunks/743-c183133e0fbf1564.js +44 -0
- package/.next/static/chunks/793-5e37343b804eb1d9.js +1 -0
- package/.next/static/chunks/794-dc751ec6c8c611f8.js +32 -0
- package/.next/static/chunks/924-9226750edc5c2c2f.js +1 -0
- package/.next/static/chunks/95247769-a29d70f7fbba27c6.js +1 -0
- package/.next/static/chunks/app/(app)/layout-aad46049bfd54648.js +1 -0
- package/.next/static/chunks/app/(app)/page-d75e1fccccdbe30e.js +1 -0
- package/.next/static/chunks/app/(app)/session/[name]/page-60529ed1fd7a66a1.js +1 -0
- package/.next/static/chunks/app/(app)/settings/key/page-c2aab9f11db98d4e.js +1 -0
- package/.next/static/chunks/app/_global-error/page-b1c3f51315835726.js +1 -0
- package/.next/static/chunks/app/_not-found/page-6830be21b0ed0c95.js +1 -0
- package/.next/static/chunks/app/api/analyze/route-b1c3f51315835726.js +1 -0
- package/.next/static/chunks/app/api/key/route-b1c3f51315835726.js +1 -0
- package/.next/static/chunks/app/api/key-status/route-b1c3f51315835726.js +1 -0
- package/.next/static/chunks/app/api/models/route-b1c3f51315835726.js +1 -0
- package/.next/static/chunks/app/api/revise/route-b1c3f51315835726.js +1 -0
- package/.next/static/chunks/app/layout-aa71ca14e7f13c0c.js +1 -0
- package/.next/static/chunks/app/record-test/page-efb4287dda79ede4.js +7 -0
- package/.next/static/chunks/app/styleguide/page-f39510e82c1f9f31.js +1 -0
- package/.next/static/chunks/framework-b29f9083d3cda3b2.js +1 -0
- package/.next/static/chunks/main-app-39f57c6e6702740e.js +1 -0
- package/.next/static/chunks/main-fac8900b4f9c4833.js +5 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-b1c3f51315835726.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-b1c3f51315835726.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-c1d4bb24e31b66a2.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-b1c3f51315835726.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b1c3f51315835726.js +1 -0
- package/.next/static/chunks/webpack-ceb933bd5f77076f.js +1 -0
- package/.next/static/css/e2905f0858acd77d.css +3 -0
- package/.next/types/app/(app)/page.ts +87 -0
- package/.next/types/app/(app)/session/[name]/page.ts +87 -0
- package/.next/types/app/(app)/settings/key/page.ts +87 -0
- package/.next/types/app/api/analyze/route.ts +351 -0
- package/.next/types/app/api/key/route.ts +351 -0
- package/.next/types/app/api/key-status/route.ts +351 -0
- package/.next/types/app/api/models/route.ts +351 -0
- package/.next/types/app/api/revise/route.ts +351 -0
- package/.next/types/app/layout.ts +87 -0
- package/.next/types/app/record-test/page.ts +87 -0
- package/.next/types/app/styleguide/page.ts +87 -0
- package/.next/types/package.json +1 -0
- package/README.md +4 -6
- package/next.config.ts +8 -0
- package/package.json +4 -4
- package/.next/build/56416d4ae4ce586f.js +0 -6
- package/.next/build/56416d4ae4ce586f.js.map +0 -5
- package/.next/build/chunks/[root-of-the-server]__0oj80bi._.js +0 -206
- package/.next/build/chunks/[root-of-the-server]__0oj80bi._.js.map +0 -8
- package/.next/build/chunks/[root-of-the-server]__1f933tp._.js +0 -500
- package/.next/build/chunks/[root-of-the-server]__1f933tp._.js.map +0 -11
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_0b7xl6g._.js +0 -13
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_0b7xl6g._.js.map +0 -5
- package/.next/build/chunks/[turbopack]_runtime.js +0 -890
- package/.next/build/chunks/[turbopack]_runtime.js.map +0 -11
- package/.next/build/chunks/node_modules_20v-8wl._.js +0 -6832
- package/.next/build/chunks/node_modules_20v-8wl._.js.map +0 -47
- package/.next/build/package.json +0 -1
- package/.next/cache/.previewinfo +0 -1
- package/.next/cache/.rscinfo +0 -1
- package/.next/cache/.tsbuildinfo +0 -1
- package/.next/diagnostics/route-bundle-stats.json +0 -111
- package/.next/fallback-build-manifest.json +0 -13
- package/.next/server/app/(app)/page/app-paths-manifest.json +0 -3
- package/.next/server/app/(app)/page/build-manifest.json +0 -17
- package/.next/server/app/(app)/page/next-font-manifest.json +0 -11
- package/.next/server/app/(app)/page/server-reference-manifest.json +0 -4
- package/.next/server/app/(app)/page.js.map +0 -5
- package/.next/server/app/(app)/session/[name]/page/app-paths-manifest.json +0 -3
- package/.next/server/app/(app)/session/[name]/page/build-manifest.json +0 -17
- package/.next/server/app/(app)/session/[name]/page/next-font-manifest.json +0 -11
- package/.next/server/app/(app)/session/[name]/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/(app)/session/[name]/page/server-reference-manifest.json +0 -4
- package/.next/server/app/(app)/session/[name]/page.js.map +0 -5
- package/.next/server/app/(app)/settings/key/page/app-paths-manifest.json +0 -3
- package/.next/server/app/(app)/settings/key/page/build-manifest.json +0 -17
- package/.next/server/app/(app)/settings/key/page/next-font-manifest.json +0 -11
- package/.next/server/app/(app)/settings/key/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/(app)/settings/key/page/server-reference-manifest.json +0 -4
- package/.next/server/app/(app)/settings/key/page.js.map +0 -5
- package/.next/server/app/_global-error/page/app-paths-manifest.json +0 -3
- package/.next/server/app/_global-error/page/build-manifest.json +0 -17
- package/.next/server/app/_global-error/page/next-font-manifest.json +0 -6
- package/.next/server/app/_global-error/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/_global-error/page/server-reference-manifest.json +0 -4
- package/.next/server/app/_global-error/page.js.map +0 -5
- package/.next/server/app/_not-found/page/app-paths-manifest.json +0 -3
- package/.next/server/app/_not-found/page/build-manifest.json +0 -17
- package/.next/server/app/_not-found/page/next-font-manifest.json +0 -11
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/_not-found/page/server-reference-manifest.json +0 -4
- package/.next/server/app/_not-found/page.js.map +0 -5
- package/.next/server/app/api/analyze/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/analyze/route/build-manifest.json +0 -9
- package/.next/server/app/api/analyze/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/analyze/route.js.map +0 -5
- package/.next/server/app/api/key/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/key/route/build-manifest.json +0 -9
- package/.next/server/app/api/key/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/key/route.js.map +0 -5
- package/.next/server/app/api/key-status/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/key-status/route/build-manifest.json +0 -9
- package/.next/server/app/api/key-status/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/key-status/route.js.map +0 -5
- package/.next/server/app/api/models/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/models/route/build-manifest.json +0 -9
- package/.next/server/app/api/models/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/models/route.js.map +0 -5
- package/.next/server/app/api/revise/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/revise/route/build-manifest.json +0 -9
- package/.next/server/app/api/revise/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/revise/route.js.map +0 -5
- package/.next/server/app/icon.svg/route/app-paths-manifest.json +0 -3
- package/.next/server/app/icon.svg/route/build-manifest.json +0 -9
- package/.next/server/app/icon.svg/route.js.map +0 -5
- package/.next/server/app/record-test/page/app-paths-manifest.json +0 -3
- package/.next/server/app/record-test/page/build-manifest.json +0 -17
- package/.next/server/app/record-test/page/next-font-manifest.json +0 -11
- package/.next/server/app/record-test/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/record-test/page/server-reference-manifest.json +0 -4
- package/.next/server/app/record-test/page.js.map +0 -5
- package/.next/server/app/styleguide/page/app-paths-manifest.json +0 -3
- package/.next/server/app/styleguide/page/build-manifest.json +0 -17
- package/.next/server/app/styleguide/page/next-font-manifest.json +0 -11
- package/.next/server/app/styleguide/page/react-loadable-manifest.json +0 -1
- package/.next/server/app/styleguide/page/server-reference-manifest.json +0 -4
- package/.next/server/app/styleguide/page.js.map +0 -5
- package/.next/server/chunks/[externals]__1l0bqbz._.js +0 -3
- package/.next/server/chunks/[externals]__1l0bqbz._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__00u0a0m._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__00u0a0m._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__02oblj7._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__02oblj7._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__04dzkv1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__04dzkv1._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__081zp1m._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__081zp1m._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0dkua3v._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0dkua3v._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0ezil_h._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ezil_h._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0ww_12a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ww_12a._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0x-kpif._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0x-kpif._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__15bjnu5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__15bjnu5._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__1kmbnvv._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1kmbnvv._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__1kp4vwc._.js +0 -14
- package/.next/server/chunks/[root-of-the-server]__1kp4vwc._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__1lbd3kd._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1lbd3kd._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__1ra6psc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1ra6psc._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__1zn977r._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1zn977r._.js.map +0 -1
- package/.next/server/chunks/[turbopack]_runtime.js +0 -903
- package/.next/server/chunks/[turbopack]_runtime.js.map +0 -11
- package/.next/server/chunks/_04h1cv_._.js +0 -185
- package/.next/server/chunks/_04h1cv_._.js.map +0 -1
- package/.next/server/chunks/_0pqmhjh._.js +0 -185
- package/.next/server/chunks/_0pqmhjh._.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_analyze_route_actions_0lx-23h.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_analyze_route_actions_0lx-23h.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_key-status_route_actions_1qgztm2.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_key-status_route_actions_1qgztm2.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_key_route_actions_15n2qsb.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_key_route_actions_15n2qsb.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_models_route_actions_1h6mkqp.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_models_route_actions_1h6mkqp.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_revise_route_actions_19kk3m-.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_revise_route_actions_19kk3m-.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_icon_svg_route_actions_1r2h_ub.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_icon_svg_route_actions_1r2h_ub.js.map +0 -1
- package/.next/server/chunks/node_modules_0x51oh_._.js +0 -10
- package/.next/server/chunks/node_modules_0x51oh_._.js.map +0 -1
- package/.next/server/chunks/node_modules_19bvt3l._.js +0 -6
- package/.next/server/chunks/node_modules_19bvt3l._.js.map +0 -1
- package/.next/server/chunks/node_modules_1_-az43._.js +0 -16
- package/.next/server/chunks/node_modules_1_-az43._.js.map +0 -1
- package/.next/server/chunks/node_modules_1t2pqct._.js +0 -10
- package/.next/server/chunks/node_modules_1t2pqct._.js.map +0 -1
- package/.next/server/chunks/node_modules_next_08s853w._.js +0 -13
- package/.next/server/chunks/node_modules_next_08s853w._.js.map +0 -1
- package/.next/server/chunks/node_modules_node-fetch_src_index_1gf-_pn.js +0 -3
- package/.next/server/chunks/node_modules_node-fetch_src_index_1gf-_pn.js.map +0 -1
- package/.next/server/chunks/ssr/[externals]__1l0bqbz._.js +0 -3
- package/.next/server/chunks/ssr/[externals]__1l0bqbz._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__06ync7f._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__06ync7f._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0hml-pd._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0hml-pd._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0ntia6u._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0ntia6u._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0sdpd0o._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0sdpd0o._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0w2pa_y._.js +0 -33
- package/.next/server/chunks/ssr/[root-of-the-server]__0w2pa_y._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__10y0-wv._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__10y0-wv._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__11_7weu._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__11_7weu._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1_stkwn._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1_stkwn._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1dky4g0._.js +0 -33
- package/.next/server/chunks/ssr/[root-of-the-server]__1dky4g0._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1k6ey-q._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1k6ey-q._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1la73u1._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1la73u1._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1nshnxm._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1nshnxm._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1pssg49._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1pssg49._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1q6zd30._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1q6zd30._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1qlmg27._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1qlmg27._.js.map +0 -1
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +0 -903
- package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +0 -11
- package/.next/server/chunks/ssr/_01pksvc._.js +0 -78
- package/.next/server/chunks/ssr/_01pksvc._.js.map +0 -1
- package/.next/server/chunks/ssr/_03lgii8._.js +0 -3
- package/.next/server/chunks/ssr/_03lgii8._.js.map +0 -1
- package/.next/server/chunks/ssr/_05tft_r._.js +0 -3
- package/.next/server/chunks/ssr/_05tft_r._.js.map +0 -1
- package/.next/server/chunks/ssr/_06gt995._.js +0 -3
- package/.next/server/chunks/ssr/_06gt995._.js.map +0 -1
- package/.next/server/chunks/ssr/_0jrh37c._.js +0 -46
- package/.next/server/chunks/ssr/_0jrh37c._.js.map +0 -1
- package/.next/server/chunks/ssr/_0kw6yq_._.js +0 -3
- package/.next/server/chunks/ssr/_0kw6yq_._.js.map +0 -1
- package/.next/server/chunks/ssr/_0l3c05z._.js +0 -3
- package/.next/server/chunks/ssr/_0l3c05z._.js.map +0 -1
- package/.next/server/chunks/ssr/_0n-ojw-._.js +0 -3
- package/.next/server/chunks/ssr/_0n-ojw-._.js.map +0 -1
- package/.next/server/chunks/ssr/_0t6a1ln._.js +0 -6
- package/.next/server/chunks/ssr/_0t6a1ln._.js.map +0 -1
- package/.next/server/chunks/ssr/_0td-xk-._.js +0 -3
- package/.next/server/chunks/ssr/_0td-xk-._.js.map +0 -1
- package/.next/server/chunks/ssr/_0y92f-y._.js +0 -46
- package/.next/server/chunks/ssr/_0y92f-y._.js.map +0 -1
- package/.next/server/chunks/ssr/_1b6au28._.js +0 -3
- package/.next/server/chunks/ssr/_1b6au28._.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_(app)_page_actions_1gxdy57.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_(app)_page_actions_1gxdy57.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_(app)_session_[name]_page_actions_115d_ja.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_(app)_session_[name]_page_actions_115d_ja.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_(app)_settings_key_page_actions_1jsc3or.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_(app)_settings_key_page_actions_1jsc3or.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_record-test_page_actions_0a_yofw.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_record-test_page_actions_0a_yofw.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_styleguide_page_actions_174h7x7.js +0 -3
- package/.next/server/chunks/ssr/_next-internal_server_app_styleguide_page_actions_174h7x7.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_0el53_h._.js +0 -10
- package/.next/server/chunks/ssr/node_modules_0el53_h._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_0h91jdk._.js +0 -33
- package/.next/server/chunks/ssr/node_modules_0h91jdk._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_1fxqp22._.js +0 -10
- package/.next/server/chunks/ssr/node_modules_1fxqp22._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_1loo6j7._.js +0 -6
- package/.next/server/chunks/ssr/node_modules_1loo6j7._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_1pvqj0r._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_1pvqj0r._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_0uboya6._.js +0 -6
- package/.next/server/chunks/ssr/node_modules_next_dist_0uboya6._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_172hvm-._.js +0 -19
- package/.next/server/chunks/ssr/node_modules_next_dist_172hvm-._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js +0 -3
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0-o-goa.js +0 -3
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0-o-goa.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js +0 -3
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0_q50sh.js +0 -4
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0_q50sh.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0_xbpm0.js +0 -4
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0_xbpm0.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_119i6eu.js +0 -4
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_119i6eu.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_14nl2rs.js +0 -4
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_14nl2rs.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_18u8k23.js +0 -4
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_18u8k23.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z.js +0 -4
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1_iwj0a.js +0 -4
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1_iwj0a.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_node-fetch_src_index_1e0t9p6.js +0 -3
- package/.next/server/chunks/ssr/node_modules_node-fetch_src_index_1e0t9p6.js.map +0 -1
- package/.next/server/chunks/ssr/src_19oqe9t._.js +0 -3
- package/.next/server/chunks/ssr/src_19oqe9t._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_record-test_page_tsx_08-2bld._.js +0 -9
- package/.next/server/chunks/ssr/src_app_record-test_page_tsx_08-2bld._.js.map +0 -1
- package/.next/server/chunks/ssr/src_components_app-sidebar_tsx_1xx2k53._.js +0 -3
- package/.next/server/chunks/ssr/src_components_app-sidebar_tsx_1xx2k53._.js.map +0 -1
- package/.next/server/chunks/ssr/src_components_settings_key-setup_tsx_0jxhnpa._.js +0 -3
- package/.next/server/chunks/ssr/src_components_settings_key-setup_tsx_0jxhnpa._.js.map +0 -1
- package/.next/server/chunks/ssr/src_components_ui_0lq7ewx._.js +0 -3
- package/.next/server/chunks/ssr/src_components_ui_0lq7ewx._.js.map +0 -1
- package/.next/static/CIZxngYjzUw1Kb0KrE473/_buildManifest.js +0 -11
- package/.next/static/CIZxngYjzUw1Kb0KrE473/_clientMiddlewareManifest.js +0 -1
- package/.next/static/chunks/05-c3ty_6dwfk.js +0 -1
- package/.next/static/chunks/07-hzktxqjvzd.js +0 -4
- package/.next/static/chunks/09bn0buuu6k2x.js +0 -1
- package/.next/static/chunks/0kkimqpuecvfn.js +0 -1
- package/.next/static/chunks/0mk1g55o6kl1e.js +0 -2
- package/.next/static/chunks/0ul837-9k0zx_.js +0 -63
- package/.next/static/chunks/0wpges32btt_p.js +0 -1
- package/.next/static/chunks/18qo-4_hfuwko.js +0 -1
- package/.next/static/chunks/1_dsevxz78b97.js +0 -1
- package/.next/static/chunks/2-oqhnxovgl_2.js +0 -44
- package/.next/static/chunks/2et_7fxuzt9cq.js +0 -31
- package/.next/static/chunks/2im7c515bo69p.js +0 -1
- package/.next/static/chunks/2merpuxt1zcvf.js +0 -1
- package/.next/static/chunks/2qb8lge1e2sv2.js +0 -1
- package/.next/static/chunks/2sj0gufu0lojq.css +0 -3
- package/.next/static/chunks/2zloaj9ja_vpy.js +0 -1
- package/.next/static/chunks/3rvy2rc9d_hwt.js +0 -1
- package/.next/static/chunks/3uci2qhsbp444.js +0 -50
- package/.next/static/chunks/3yao5u25-bf0g.js +0 -1
- package/.next/static/chunks/41_0qs6kjmoek.js +0 -1
- package/.next/static/chunks/4395sbjm36lbl.js +0 -1
- package/.next/static/chunks/turbopack-2cevjmbuh84ft.js +0 -1
- package/.next/static/media/icon.2_sgat73yt9an.svg +0 -7
- package/.next/trace +0 -1
- package/.next/trace-build +0 -1
- package/.next/turbopack +0 -0
- /package/.next/{server/app/(app)/page/react-loadable-manifest.json → react-loadable-manifest.json} +0 -0
- /package/.next/static/{CIZxngYjzUw1Kb0KrE473 → FExJe2q2O67X3zxf-SYQ_}/_ssgManifest.js +0 -0
- /package/.next/static/chunks/{0cz1d0mv5g_q7.js → polyfills-42372ed130431b0a.js} +0 -0
- /package/.next/static/media/{5ce348bf30bf5439-s.31988l_ccedte.woff2 → 013b72fa676f92e0-s.woff2} +0 -0
- /package/.next/static/media/{5476f68d60460930-s.2uwcyprjm3xu3.woff2 → 19cfc7226ec3afaa-s.woff2} +0 -0
- /package/.next/static/media/{9c72aa0f40e4eef8-s.1y4-pdgsjb-pw.woff2 → 21350d82a1f187e9-s.woff2} +0 -0
- /package/.next/static/media/{bbc41e54d2fcbd21-s.1rgnod-3esatf.woff2 → 2b5b02fc7e511755-s.woff2} +0 -0
- /package/.next/static/media/{6306c77e7c8268e4-s.2dbetqa9o8jxf.woff2 → 65f03d54ccadf4a8-s.woff2} +0 -0
- /package/.next/static/media/{797e433ab948586e-s.p.0r6juujl39pe6.woff2 → 7d4881bb7e1bf84d-s.p.woff2} +0 -0
- /package/.next/static/media/{1bffadaabf893a1e-s.3-6t-g6q0vh0a.woff2 → 8e9860b6e62d6359-s.woff2} +0 -0
- /package/.next/static/media/{4fa387ec64143e14-s.2tuy5pz7dlieh.woff2 → b9408752a0c24fb9-s.woff2} +0 -0
- /package/.next/static/media/{2c55a0e60120577a-s.0-dom-5bn10r2.woff2 → ba9851c3c22cd980-s.woff2} +0 -0
- /package/.next/static/media/{ad66f9afd8947f86-s.3lvt2whj97whp.woff2 → c5fe6dc8356a8c31-s.woff2} +0 -0
- /package/.next/static/media/{2bbe8d2671613f1f-s.0k62hbripvv8p.woff2 → df0a9ae256c0569c-s.woff2} +0 -0
- /package/.next/static/media/{7d817b4c03b0c5f1-s.1uyisp29ctx0d.woff2 → e038a29029a234f2-s.woff2} +0 -0
- /package/.next/static/media/{83afe278b6a6bb3c-s.p.2bn3s6zvc0dyp.woff2 → e4af272ccee01ff0-s.p.woff2} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[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"))},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"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},1235,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),s=e.i(61916),i=e.i(74677),o=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),p=e.i(47587),c=e.i(66012),h=e.i(70101),x=e.i(74838),v=e.i(10372),R=e.i(93695);e.i(52474);var f=e.i(220),m=e.i(89171),g=e.i(12714),E=e.i(60526);let w=(0,e.i(50227).join)((0,E.homedir)(),".vellum",".env");async function y(){var e;let t=process.env.GEMINI_API_KEY?.trim()??"";if(e=t,!((e?.trim()??"").length>=20))return m.NextResponse.json({present:!1,source:null});let r=await C();return m.NextResponse.json({present:!0,source:r&&t===r?"file":"env"})}async function C(){for(let e of(await (0,g.readFile)(w,"utf8").catch(()=>"")).split("\n")){let t=e.trim();if(!t||t.startsWith("#"))continue;let r=t.indexOf("=");if(-1===r||"GEMINI_API_KEY"!==t.slice(0,r).trim())continue;let n=t.slice(r+1).trim();return(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1)),n.trim()||null}return null}e.s(["GET",0,y,"runtime",0,"nodejs"],38963);var A=e.i(38963);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/key-status/route",pathname:"/api/key-status",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/key-status/route.ts",nextConfigOutput:"",userland:A,...{}}),{workAsyncStorage:N,workUnitAsyncStorage:q,serverHooks:P}=b;async function T(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),b.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/key-status/route";m=m.replace(/\/index$/,"")||"/";let g=await b.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:E,deploymentId:w,params:y,nextConfig:C,parsedUrl:A,isDraftMode:N,prerenderManifest:q,routerServerContext:P,isOnDemandRevalidate:T,revalidateOnlyGenerated:_,resolvedPathname:k,clientReferenceManifest:I,serverActionsManifest:O}=g,S=(0,o.normalizeAppPath)(m),j=!!(q.dynamicRoutes[S]||q.routes[k]),H=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,A,!1):t.end("This page could not be found"),null);if(j&&!N){let e=!!q.routes[k],t=q.dynamicRoutes[S];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await H();throw new R.NoFallbackError}}let M=null;!j||b.isDev||N||(M="/index"===(M=k)?"/":M);let U=!0===b.isDev||!j,D=j&&!U;O&&I&&(0,i.setManifestsSingleton)({page:m,clientReferenceManifest:I,serverActionsManifest:O});let K=e.method||"GET",F=(0,s.getTracer)(),$=F.getActiveScopeSpan(),W=!!(null==P?void 0:P.isWrappedByNextServer),B=!!(0,a.getRequestMeta)(e,"minimalMode"),G=(0,a.getRequestMeta)(e,"incrementalCache")||await b.getIncrementalCache(e,C,q,B);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let L={params:y,previewProps:q.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:U,incrementalCache:G,cacheLifeProfiles:C.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>b.onRequestError(e,t,n,a,P)},sharedContext:{buildId:E,deploymentId:w}},V=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),Y=u.NextRequestAdapter.fromNodeNextRequest(V,(0,u.signalFromNodeResponse)(t));try{let a,i=async e=>b.handle(Y,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.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=`${K} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",n),a.updateName(t))}else e.updateName(`${K} ${m}`)}),o=async a=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!B&&T&&_&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=L.renderOpts.fetchMetrics;let o=L.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=L.renderOpts.collectedTags;if(!j)return await (0,c.sendResponse)(V,X,s,L.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[v.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,n=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=v.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:T})},!1,P),t}},u=await b.handleResponse({req:e,nextConfig:C,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:q,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:_,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:B});if(!j)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",T?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return B&&j||d.delete(v.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(V,X,new Response(u.value.body,{headers:d,status:u.value.status||200})),null};W&&$?await o($):(a=F.getActiveScopeSpan(),await F.withPropagatedContext(e.headers,()=>F.trace(d.BaseServerSpan.handleRequest,{spanName:`${K} ${m}`,kind:s.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},o),void 0,!W))}catch(t){if(t instanceof R.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:S,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:T})},!1,P),j)throw t;return await (0,c.sendResponse)(V,X,new Response(null,{status:500})),null}}e.s(["handler",0,T,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:q})},"routeModule",0,b,"serverHooks",0,P,"workAsyncStorage",0,N,"workUnitAsyncStorage",0,q],1235)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__00u0a0m._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/app/api/key-status/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, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\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/key-status/route\",\n pathname: \"/api/key-status\",\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]/src/app/api/key-status/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\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 (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/key-status/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, deploymentId, 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.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 setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n 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, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId,\n deploymentId\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 let parentSpan;\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 // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\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 const silenceLog = false;\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 }, silenceLog, 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 (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\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), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\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 }, silenceLog, routerServerContext);\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 { NextResponse } from \"next/server\";\nimport { readFile } from \"node:fs/promises\";\nimport { homedir } from \"node:os\";\nimport { join } from \"node:path\";\n\n/**\n * GET /api/key-status — a light, read-only check of whether a Gemini key is\n * configured and WHERE it comes from, so the app can steer the user to setup\n * (TASK-29, S11) and decide whether the key is user-removable (TASK-65).\n *\n * Privacy stance (ARCHITECTURE §Privacy): GEMINI_API_KEY NEVER leaves the\n * server. This route reads it server-side and returns ONLY a boolean plus a\n * source label — the key value itself is never serialized into the response.\n *\n * We deliberately do NOT probe Gemini here: a live probe would be a paid call on\n * every Settings open, and it isn't needed for this signal. `present` means \"a\n * key is set and looks plausible\"; a syntactically-fine but revoked/wrong key\n * still reads as present and only fails loud at analyze time. (Validation now\n * happens at SAVE, in POST /api/key.)\n */\nexport const runtime = \"nodejs\";\n\nconst ENV_FILE = join(homedir(), \".vellum\", \".env\");\n\n/**\n * The wire shape. NO key material, ever — only whether one is present and which\n * source it came from. This is a cross-task contract (TASK-65.2/65.3 build\n * against it): don't change the shape.\n *\n * `source` tells a removable saved key from an env-provided one:\n * - \"file\" — the active key is the one saved in ~/.vellum/.env; the UI may\n * offer \"remove\" (DELETE /api/key clears it).\n * - \"env\" — the active key comes from an exported env var or .env.local,\n * which shadows the file (bin/vellum.mjs precedence). Not removable from\n * the UI — deleting the file wouldn't clear it.\n * - null — no key present.\n */\nexport interface KeyStatus {\n present: boolean;\n source: \"env\" | \"file\" | null;\n}\n\nexport async function GET(): Promise<NextResponse<KeyStatus>> {\n const effective = process.env.GEMINI_API_KEY?.trim() ?? \"\";\n if (!isPlausibleKey(effective)) {\n return NextResponse.json({ present: false, source: null });\n }\n\n // The effective key is present. If it byte-for-byte matches what's saved in\n // ~/.vellum/.env, treat it as file-sourced (removable); otherwise something\n // else (exported var / .env.local, or nothing in the file) is the source.\n const fileKey = await readFileKey();\n const source: KeyStatus[\"source\"] = fileKey && effective === fileKey ? \"file\" : \"env\";\n\n return NextResponse.json({ present: true, source });\n}\n\n/**\n * Read the GEMINI_API_KEY value stored in ~/.vellum/.env, or null if the file\n * or line is absent. Parsing mirrors the launcher's loadHomeEnv (bin/vellum.mjs):\n * skip blanks/comments, split on the first '=', strip matching quotes.\n */\nasync function readFileKey(): Promise<string | null> {\n const raw = await readFile(ENV_FILE, \"utf8\").catch(() => \"\");\n for (const line of raw.split(\"\\n\")) {\n const trimmed = line.trim();\n if (!trimmed || trimmed.startsWith(\"#\")) continue;\n const eq = trimmed.indexOf(\"=\");\n if (eq === -1) continue;\n if (trimmed.slice(0, eq).trim() !== \"GEMINI_API_KEY\") continue;\n\n let value = trimmed.slice(eq + 1).trim();\n if (\n (value.startsWith('\"') && value.endsWith('\"')) ||\n (value.startsWith(\"'\") && value.endsWith(\"'\"))\n ) {\n value = value.slice(1, -1);\n }\n return value.trim() || null;\n }\n return null;\n}\n\n/**\n * A cheap sanity gate, not validation: trim, require non-empty, and require a\n * non-trivial length so an empty value or an obvious placeholder (\"...\", \"your\n * key here\") reads as \"no key\". We don't hard-gate on the \"AIza\" prefix —\n * key formats drift, and a real invalid key is caught at save time now.\n */\nfunction isPlausibleKey(raw: string | undefined): boolean {\n const key = raw?.trim() ?? \"\";\n return key.length >= 20;\n}\n"],"names":["runtime","ENV_FILE","source","GET","effective","process","env","GEMINI_API_KEY","trim","isPlausibleKey","json","present","catch","raw","fileKey","readFileKey","slice","line","split","trimmed","startsWith","eq","indexOf","value","endsWith","key","length"],"mappings":"2sCAAA,IAAA,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,EA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AW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA5TA,SAASH,EACL,MAAO,CAAA,EAAA,EAAA,UAAW,AAAX,EAAY,kBACf,uBACA,CACJ,EACJ","ignoreList":[0]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[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"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},24361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},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"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},24836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},21517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},4446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},55004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},92509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},88947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},27699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},5365,(e,t,r)=>{t.exports=e.x("process",()=>require("process"))},45706,(e,t,r)=>{t.exports=e.x("querystring",()=>require("querystring"))},24868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},88646,(e,t,r)=>{t.exports=e.x("node:stream/promises",()=>require("node:stream/promises"))},6461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},13571,e=>{"use strict";let t={"gemini-2.5-pro":{input:{threshold:2e5,below:1.25,above:2.5},output:{threshold:2e5,below:10,above:15}},"gemini-2.5-flash":{input:.3,output:2.5},"gemini-2.5-flash-lite":{input:.1,output:.4}};function r(){let e=process.env.GEMINI_PRICING?.trim();if(!e)return t;try{let r=JSON.parse(e);return{...t,...r}}catch{return console.warn("[pricing] GEMINI_PRICING is not valid JSON — using built-in prices."),t}}function s(e,t){return"number"==typeof e?e:t>e.threshold?e.above:e.below}function n(e){return"number"==typeof e?e:e.below}e.s(["basePrice",0,function(e){let t=r()[e];if(t)return{input:n(t.input),output:n(t.output)}},"costUsd",0,function(e,t,n,a){let i=r()[e];if(i)return t/1e6*s(i.input,a)+n/1e6*s(i.output,a)}])},49558,e=>{"use strict";var t=e.i(47909),r=e.i(74017),s=e.i(96250),n=e.i(59756),a=e.i(61916),i=e.i(74677),o=e.i(69741),u=e.i(16795),l=e.i(87718),p=e.i(95169),d=e.i(47587),c=e.i(66012),h=e.i(70101),v=e.i(74838),x=e.i(10372),m=e.i(93695);e.i(52474);var g=e.i(220),f=e.i(69719),R=e.i(76655),w=e.i(418),_=e.i(29242);let y=R.AnalysisResultSchema.omit({suggested_name:!0,run:!0}).extend({suggested_name:f.z.string().optional()});async function b({source:e,comments:t,language:r="en",model:s,signal:n}){let a=await (0,w.runStructured)({prompt:(0,_.buildRevisePrompt)(e,t,r),responseSchema:R.ANALYSIS_RESPONSE_SCHEMA,signal:n,chosenModel:s}),i=y.safeParse(a.data);if(!i.success){var o;throw new w.AnalyzeError("schema_invalid",`Revise output failed schema validation: ${(o=i.error)instanceof Error?o.message:String(o)}`)}return{...R.AnalysisResultSchema.parse({review_type:i.data.review_type,overview:i.data.overview,suggested_name:(0,R.kebabCase)(i.data.suggested_name??""),tasks:i.data.tasks}),run:(0,w.buildRun)([a.usage],"thorough",r,"revise-text")}}var E=e.i(94708),q=e.i(5846);let C=f.z.object({result:f.z.union([E.StoredAnalysisResultSchema,R.AnalysisResultSchema]),comments:f.z.array(q.CommentSchema),language:f.z.enum(R.ANALYSIS_LANGUAGES).optional(),model:f.z.string().trim().min(1).optional()});async function S(e){var t,r;let s,n;try{s=await e.json()}catch{return A(400,{kind:"bad_request",message:"Request body is not valid JSON."})}let a=C.safeParse(s);if(!a.success)return A(400,{kind:"bad_request",message:`Invalid revise request: ${a.error.message}`});let{result:i,comments:o,language:u,model:l}=a.data,p=(n=(t=i).tasks.map((e,t)=>"id"in e?e:{...e,id:`t${t+1}`,origin:"ai"}),{overview:t.overview,review_type:t.review_type,tasks:n}),d=u??i.run?.language??"en";try{let t=await b({source:p,comments:o,language:d,model:l,signal:e.signal});return A(200,{result:t})}catch(t){if(e.signal.aborted)return new Response(null,{status:499});return console.error("[revise] pipeline error:",t),A(200,{error:(r=t)instanceof w.AnalyzeError?{kind:r.kind,message:r.message}:{kind:"internal",message:r instanceof Error?r.message:String(r)}})}}function A(e,t){return new Response(JSON.stringify(t),{status:e,headers:{"Content-Type":"application/json; charset=utf-8","Cache-Control":"no-store"}})}e.s(["POST",0,S,"runtime",0,"nodejs"],11979);var N=e.i(11979);let P=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/revise/route",pathname:"/api/revise",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/revise/route.ts",nextConfigOutput:"",userland:N,...{}}),{workAsyncStorage:k,workUnitAsyncStorage:I,serverHooks:O}=P;async function T(e,t,s){s.requestMeta&&(0,n.setRequestMeta)(e,s.requestMeta),P.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/revise/route";f=f.replace(/\/index$/,"")||"/";let R=await P.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:w,deploymentId:_,params:y,nextConfig:b,parsedUrl:E,isDraftMode:q,prerenderManifest:C,routerServerContext:S,isOnDemandRevalidate:A,revalidateOnlyGenerated:N,resolvedPathname:k,clientReferenceManifest:I,serverActionsManifest:O}=R,T=(0,o.normalizeAppPath)(f),j=!!(C.dynamicRoutes[T]||C.routes[k]),M=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,E,!1):t.end("This page could not be found"),null);if(j&&!q){let e=!!C.routes[k],t=C.dynamicRoutes[T];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await M();throw new m.NoFallbackError}}let H=null;!j||P.isDev||q||(H="/index"===(H=k)?"/":H);let U=!0===P.isDev||!j,D=j&&!U;O&&I&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:I,serverActionsManifest:O});let z=e.method||"GET",$=(0,a.getTracer)(),G=$.getActiveScopeSpan(),F=!!(null==S?void 0:S.isWrappedByNextServer),K=!!(0,n.getRequestMeta)(e,"minimalMode"),L=(0,n.getRequestMeta)(e,"incrementalCache")||await P.getIncrementalCache(e,b,C,K);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let B={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:U,incrementalCache:L,cacheLifeProfiles:b.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,n)=>P.onRequestError(e,t,s,n,S)},sharedContext:{buildId:w,deploymentId:_}},J=new u.NodeNextRequest(e),V=new u.NodeNextResponse(t),W=l.NextRequestAdapter.fromNodeNextRequest(J,(0,l.signalFromNodeResponse)(t));try{let n,i=async e=>P.handle(W,B).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.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 s=r.get("next.route");if(s){let t=`${z} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",s),n.updateName(t))}else e.updateName(`${z} ${f}`)}),o=async n=>{var a,o;let u=async({previousCacheEntry:r})=>{try{if(!K&&A&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await i(n);e.fetchMetrics=B.renderOpts.fetchMetrics;let o=B.renderOpts.pendingWaitUntil;o&&s.waitUntil&&(s.waitUntil(o),o=void 0);let u=B.renderOpts.collectedTags;if(!j)return await (0,c.sendResponse)(J,V,a,B.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);u&&(t[x.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,s=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:B.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await P.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:A})},!1,S),t}},l=await P.handleResponse({req:e,nextConfig:b,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:N,responseGenerator:u,waitUntil:s.waitUntil,isMinimalMode:K});if(!j)return null;if((null==l||null==(a=l.value)?void 0:a.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==l||null==(o=l.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",A?"REVALIDATED":l.isMiss?"MISS":l.isStale?"STALE":"HIT"),q&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,h.fromNodeOutgoingHttpHeaders)(l.value.headers);return K&&j||p.delete(x.NEXT_CACHE_TAGS_HEADER),!l.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,v.getCacheControlHeader)(l.cacheControl)),await (0,c.sendResponse)(J,V,new Response(l.value.body,{headers:p,status:l.value.status||200})),null};F&&G?await o(G):(n=$.getActiveScopeSpan(),await $.withPropagatedContext(e.headers,()=>$.trace(p.BaseServerSpan.handleRequest,{spanName:`${z} ${f}`,kind:a.SpanKind.SERVER,attributes:{"http.method":z,"http.target":e.url}},o),void 0,!F))}catch(t){if(t instanceof m.NoFallbackError||await P.onRequestError(e,t,{routerKind:"App Router",routePath:T,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:A})},!1,S),j)throw t;return await (0,c.sendResponse)(J,V,new Response(null,{status:500})),null}}e.s(["handler",0,T,"patchFetch",0,function(){return(0,s.patchFetch)({workAsyncStorage:k,workUnitAsyncStorage:I})},"routeModule",0,P,"serverHooks",0,O,"workAsyncStorage",0,k,"workUnitAsyncStorage",0,I],49558)},85685,e=>{e.v(e=>Promise.resolve().then(()=>e(54799)))},91961,e=>{e.v(t=>Promise.all(["server/chunks/[externals]__1l0bqbz._.js","server/chunks/node_modules_19bvt3l._.js"].map(t=>e.l(t))).then(()=>t(12111)))},72331,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__0dkua3v._.js","server/chunks/node_modules_0x51oh_._.js","server/chunks/node_modules_node-fetch_src_index_1gf-_pn.js"].map(t=>e.l(t))).then(()=>t(20442)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__02oblj7._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/gemini/pricing.ts","../../../src/app/api/revise/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/lib/gemini/revise.ts"],"sourcesContent":["// TASK-45 — per-model Gemini pricing, so a run's captured token usage can be\n// turned into a dollar estimate for the info tab (TASK-48) and picker (TASK-47).\n//\n// Cost is an ESTIMATE, deliberately labelled as of a date: prices move, and the\n// authoritative source is Google's page (see PRICES_AS_OF). An unknown model —\n// or a run that used one — yields NO cost rather than a wrong one (callers omit\n// the field). Prices can be overridden at runtime via the GEMINI_PRICING env var\n// (JSON) without a code change, mirroring how MODEL/FALLBACK_MODELS are env-tunable.\n\n/** prices as of 2026-07; verify at https://ai.google.dev/gemini-api/docs/pricing */\nexport const PRICES_AS_OF = \"2026-07\";\n\n/**\n * A price in USD per 1,000,000 tokens. Either a flat rate, or a two-tier rate\n * that switches at a prompt-size `threshold` (gemini-2.5-pro charges more once a\n * single request's prompt exceeds 200k tokens — for both input and output).\n */\nexport type Rate = number | { threshold: number; below: number; above: number };\n\nexport interface ModelPricing {\n /** USD / 1M input (prompt) tokens. */\n input: Rate;\n /** USD / 1M output tokens — candidates PLUS thinking tokens, both billed here. */\n output: Rate;\n}\n\n/**\n * Built-in table (USD per 1M tokens). gemini-2.5-pro is tiered at 200k prompt\n * tokens; the flash tiers are flat. Keep in step with PRICES_AS_OF above.\n */\nconst DEFAULT_PRICING: Record<string, ModelPricing> = {\n \"gemini-2.5-pro\": {\n input: { threshold: 200_000, below: 1.25, above: 2.5 },\n output: { threshold: 200_000, below: 10.0, above: 15.0 },\n },\n \"gemini-2.5-flash\": { input: 0.3, output: 2.5 },\n \"gemini-2.5-flash-lite\": { input: 0.1, output: 0.4 },\n};\n\n/**\n * The active pricing table: the built-in defaults, with any entries from the\n * GEMINI_PRICING env var merged over the top (per-model replacement, not a deep\n * merge). Malformed JSON is ignored with a warning rather than crashing the\n * pipeline — a bad override must never take down analysis (fail soft, telemetry).\n */\nfunction pricingTable(): Record<string, ModelPricing> {\n const raw = process.env.GEMINI_PRICING?.trim();\n if (!raw) return DEFAULT_PRICING;\n try {\n // Trusted-but-loose: the operator sets this, so we parse and shallow-merge\n // without validating every field. The `as` is the intentional escape hatch\n // (env-provided JSON has no compile-time type). A malformed shape simply\n // produces NaN costs downstream for that model, not a crash.\n const override = JSON.parse(raw) as Record<string, ModelPricing>;\n return { ...DEFAULT_PRICING, ...override };\n } catch {\n console.warn(\"[pricing] GEMINI_PRICING is not valid JSON — using built-in prices.\");\n return DEFAULT_PRICING;\n }\n}\n\n/** Resolve a possibly-tiered rate for a given prompt size. */\nfunction rateFor(rate: Rate, promptTokens: number): number {\n if (typeof rate === \"number\") return rate;\n return promptTokens > rate.threshold ? rate.above : rate.below;\n}\n\n/** The headline rate for display/comparison: a flat rate as-is, a tiered rate's\n * `below` (the price a typical sub-threshold run pays — gemini-2.5-pro's cheaper\n * tier). Not for costing a real call (use costUsd, which knows the prompt size). */\nfunction baseRate(rate: Rate): number {\n return typeof rate === \"number\" ? rate : rate.below;\n}\n\n/**\n * The lower-tier (or flat) USD-per-1M input/output rates for a model, for the\n * model picker's price labels (TASK-47/50) and the fallback-chain \"not pricier\"\n * comparison (analyze.ts). Tiered models report their `below` rate. Returns\n * `undefined` for a model with no known price, so callers OMIT the field —\n * mirroring costUsd (a missing price is not a $0 price).\n */\nexport function basePrice(model: string): { input: number; output: number } | undefined {\n const pricing = pricingTable()[model];\n if (!pricing) return undefined;\n return { input: baseRate(pricing.input), output: baseRate(pricing.output) };\n}\n\n/**\n * Estimated USD cost of one Gemini call. `promptTokens` selects the pricing tier\n * for tiered models (gemini-2.5-pro splits at 200k); pass the call's own input\n * token count. Returns `undefined` when the model has no known price, so callers\n * OMIT cost rather than reporting $0 (a missing price ≠ free).\n *\n * Worked example (gemini-2.5-pro, a small run under the 200k tier):\n * in 120_000, out 8_000 → 120_000/1e6 * 1.25 + 8_000/1e6 * 10.0\n * = 0.15 + 0.08 = $0.23\n */\nexport function costUsd(\n model: string,\n tokensIn: number,\n tokensOut: number,\n promptTokens: number,\n): number | undefined {\n const pricing = pricingTable()[model];\n if (!pricing) return undefined;\n const inRate = rateFor(pricing.input, promptTokens);\n const outRate = rateFor(pricing.output, promptTokens);\n return (tokensIn / 1_000_000) * inRate + (tokensOut / 1_000_000) * outRate;\n}\n","import { z } from \"zod\";\nimport { revise } from \"@/lib/gemini/revise\";\nimport { AnalyzeError } from \"@/lib/gemini/analyze\";\nimport {\n ANALYSIS_LANGUAGES,\n AnalysisResultSchema,\n type AnalysisLanguage,\n} from \"@/lib/gemini/schema\";\nimport {\n StoredAnalysisResultSchema,\n type StoredVellumTask,\n} from \"@/lib/gemini/stored\";\nimport type { VellumTask } from \"@/lib/gemini/schema\";\nimport { CommentSchema } from \"@/lib/comments/comment\";\nimport type { ReviseSource } from \"@/lib/gemini/prompts/revise-tasks\";\n\n/**\n * POST /api/revise — the stateless TEXT-ONLY comment→AI-revise bridge (TASK-60,\n * ADR-024). It is the sibling of /api/analyze MINUS the video: no upload, no\n * ffmpeg. The browser POSTs the current analysis + all comments as JSON; this\n * route runs the revise Gemini call (runStructured retry/fallback, ADR-021) and\n * returns a validated, revised AnalysisResult. Nothing is persisted server-side\n * (ADR-014) — the browser owns writing the new run.\n *\n * The re-run-WITH-video revise is NOT here — that reuses /api/analyze (which\n * accepts an optional revise part and weaves the comments into the video prompt).\n *\n * Wire format: plain JSON in, plain JSON out (a single fast call — no streaming).\n * Success → 200 { result }. A bad body → 400 { kind, message }. A pipeline\n * failure → 200 { error: { kind, message } } so the failure rides the payload\n * (HTTP transport is fine), matching /api/analyze's fail-loud-but-structured\n * stance. The key stays server-side; a missing/invalid key surfaces as an error.\n */\nexport const runtime = \"nodejs\";\n\n// The result may arrive as the stored shape (ids on tasks — the normal case, the\n// live editable run) or a bare legacy AnalysisResult. Accept both; legacy tasks\n// get synthesized ids so the prompt can still tie comments to them by position.\nconst RequestSchema = z.object({\n result: z.union([StoredAnalysisResultSchema, AnalysisResultSchema]),\n comments: z.array(CommentSchema),\n language: z.enum(ANALYSIS_LANGUAGES).optional(),\n model: z.string().trim().min(1).optional(),\n});\n\nexport async function POST(req: Request): Promise<Response> {\n let body: unknown;\n try {\n body = await req.json();\n } catch {\n return json(400, { kind: \"bad_request\", message: \"Request body is not valid JSON.\" });\n }\n\n const parsed = RequestSchema.safeParse(body);\n if (!parsed.success) {\n return json(400, {\n kind: \"bad_request\",\n message: `Invalid revise request: ${parsed.error.message}`,\n });\n }\n\n const { result, comments, language, model } = parsed.data;\n const source = toReviseSource(result);\n const lang: AnalysisLanguage = language ?? result.run?.language ?? \"en\";\n\n try {\n const revised = await revise({\n source,\n comments,\n language: lang,\n model,\n signal: req.signal,\n });\n return json(200, { result: revised });\n } catch (err) {\n // A client Cancel (aborted) needs no body — the browser already tore down.\n if (req.signal.aborted) return new Response(null, { status: 499 });\n console.error(\"[revise] pipeline error:\", err);\n return json(200, { error: toError(err) });\n }\n}\n\n/**\n * Build the prompt source from whatever result shape arrived. Stored tasks already\n * carry ids; a legacy task gets a positional `t{i+1}` id and origin \"ai\" so the\n * ReviseSource type is satisfied and comments can still resolve by id/quote.\n */\nfunction toReviseSource(result: z.infer<typeof RequestSchema>[\"result\"]): ReviseSource {\n const rawTasks: (StoredVellumTask | VellumTask)[] = result.tasks;\n const tasks: StoredVellumTask[] = rawTasks.map((task, i) =>\n \"id\" in task ? task : { ...task, id: `t${i + 1}`, origin: \"ai\" },\n );\n return {\n overview: result.overview,\n review_type: result.review_type,\n tasks,\n };\n}\n\nfunction toError(err: unknown): { kind: string; message: string } {\n if (err instanceof AnalyzeError) return { kind: err.kind, message: err.message };\n return { kind: \"internal\", message: err instanceof Error ? err.message : String(err) };\n}\n\nfunction json(status: number, payload: unknown): Response {\n return new Response(JSON.stringify(payload), {\n status,\n headers: { \"Content-Type\": \"application/json; charset=utf-8\", \"Cache-Control\": \"no-store\" },\n });\n}\n","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, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\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/revise/route\",\n pathname: \"/api/revise\",\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]/src/app/api/revise/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\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 (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/revise/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, deploymentId, 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.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 setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n 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, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId,\n deploymentId\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 let parentSpan;\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 // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\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 const silenceLog = false;\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 }, silenceLog, 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 (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\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), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\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 }, silenceLog, routerServerContext);\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","/**\n * TASK-60 (ADR-024) — the TEXT-ONLY comment→AI-revise call. Mirrors analyze()'s\n * ergonomics (a plain async function returning a validated AnalysisResult + run\n * telemetry), but there is NO video: it reuses runStructured (analyze.ts) so the\n * ADR-021 retry-then-model-fallback machinery is shared, not re-implemented, then\n * validates the reply through the SAME schema analyze uses.\n *\n * The re-run-WITH-video revise does NOT live here — that is the existing video\n * pipeline plus a revise context, wired in /api/analyze (buildReviseVideoContext).\n *\n * Error philosophy (ARCHITECTURE §Error handling): fail loud. Auth / empty /\n * bad-output throw an AnalyzeError with actionable text; transient 503/429 is\n * absorbed by runStructured's retry+fallback.\n */\nimport { z } from \"zod\";\nimport {\n ANALYSIS_RESPONSE_SCHEMA,\n AnalysisResultSchema,\n kebabCase,\n type AnalysisLanguage,\n type AnalysisResult,\n} from \"./schema\";\nimport { AnalyzeError, buildRun, runStructured } from \"./analyze\";\nimport {\n buildRevisePrompt,\n REVISE_PROMPT_VERSION,\n type ReviseSource,\n} from \"./prompts/revise-tasks\";\nimport type { Comment } from \"@/lib/comments/comment\";\n\nexport { REVISE_PROMPT_VERSION };\n\n// The revised reply is the full result MINUS the pipeline-assembled `run` (added\n// below by buildRun), and with suggested_name validated LENIENTLY — a slightly-off\n// name is kebab-normalized rather than failing the whole revise (same rationale as\n// analyze.ts's CombinedSchema).\nconst RevisedSchema = AnalysisResultSchema.omit({\n suggested_name: true,\n run: true,\n}).extend({\n suggested_name: z.string().optional(),\n});\n\nexport interface ReviseArgs {\n /** The prior analysis being revised (tasks carry their stored ids for anchoring). */\n source: ReviseSource;\n /** All the reviewer's comments for this version (anchored + global). */\n comments: Comment[];\n /** Output language (ADR-022). Defaults to \"en\". */\n language?: AnalysisLanguage;\n /** Chosen PRIMARY model, or undefined for the built-in MODEL (ADR-021/TASK-50). */\n model?: string;\n /** Aborts the in-flight Gemini call (ADR-021 cancellable). */\n signal?: AbortSignal;\n}\n\n/**\n * Text-only revise: prior analysis + comments -> a revised AnalysisResult. The\n * result carries run telemetry stamped `origin: \"revise-text\"` so the Details tab\n * can label it apart from a fresh analysis.\n */\nexport async function revise({\n source,\n comments,\n language = \"en\",\n model,\n signal,\n}: ReviseArgs): Promise<AnalysisResult> {\n const call = await runStructured({\n prompt: buildRevisePrompt(source, comments, language),\n responseSchema: ANALYSIS_RESPONSE_SCHEMA,\n signal,\n chosenModel: model,\n });\n\n const parsed = RevisedSchema.safeParse(call.data);\n if (!parsed.success) {\n throw new AnalyzeError(\n \"schema_invalid\",\n `Revise output failed schema validation: ${messageOf(parsed.error)}`,\n );\n }\n\n // Assemble + validate once more so the returned object is guaranteed valid, and\n // normalize the (leniently-parsed) suggested_name to kebab-case — or drop it, so\n // the folder name is the display-name fallback downstream.\n const result = AnalysisResultSchema.parse({\n review_type: parsed.data.review_type,\n overview: parsed.data.overview,\n suggested_name: kebabCase(parsed.data.suggested_name ?? \"\"),\n tasks: parsed.data.tasks,\n });\n\n return { ...result, run: buildRun([call.usage], \"thorough\", language, \"revise-text\") };\n}\n\nfunction messageOf(err: unknown): string {\n return err instanceof Error ? err.message : String(err);\n}\n"],"names":["PRICES_AS_OF","DEFAULT_PRICING","input","threshold","below","above","output","pricingTable","raw","process","env","GEMINI_PRICING","trim","override","JSON","parse","console","warn","rateFor","rate","promptTokens","baseRate","basePrice","model","pricing","undefined","costUsd","tokensIn","tokensOut","inRate","outRate","optional","RevisedSchema","omit","suggested_name","run","extend","string","language","review_type","revise","source","comments","signal","call","prompt","success","responseSchema","chosenModel","parsed","safeParse","data","messageOf","error","result","overview","String","tasks","usage","err","Error","message"],"mappings":"6jEA8BA,IAAMC,EAAgD,CACpD,iBAAkB,CAChBC,MAAO,CAAEC,UAAW,IAASC,MAAO,KAAMC,MAAO,GAAI,EACrDC,OAAQ,CAAEH,UAAW,IAASC,MAAO,GAAMC,MAAO,EAAK,CACzD,EACA,mBAAoB,CAAEH,MAAO,GAAKI,OAAQ,GAAI,EAC9C,wBAAyB,CAAEJ,MAAO,GAAKI,OAAQ,EAAI,CACrD,EAQA,SAASC,IACP,IAAMC,EAAMC,QAAQC,GAAG,CAACC,cAAc,EAAEC,OACxC,GAAI,CAACJ,EAAK,OAAOP,EACjB,GAAI,CAKF,IAAMY,EAAWC,K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W,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,GAAyB,EACzB,MAAM,EAAe,EADgB,EAGrC,EAAa,EAAO,kBAAkB,GACtC,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,GACvB,AAD0B,CAE9B,EAAG,GAAiB,OAAW,CAAC,GAE5C,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GATmB,AAShB,EAAY,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA5TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAW,AAAX,EAAY,kBACf,uBACA,CACJ,EACJ","ignoreList":[2]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[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"))},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"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},61233,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),p=e.i(47587),c=e.i(66012),h=e.i(70101),g=e.i(74838),x=e.i(10372),v=e.i(93695);e.i(52474);var R=e.i(220),I=e.i(89171);let m=Buffer.from("PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iNiIgZmlsbD0iYmxhY2siLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjIiIGhlaWdodD0iMTQiIGZpbGw9IndoaXRlIi8+CjxyZWN0IHg9IjE0IiB5PSI1IiB3aWR0aD0iMiIgaGVpZ2h0PSIxNCIgZmlsbD0id2hpdGUiLz4KPHJlY3QgeD0iMTkiIHk9IjgiIHdpZHRoPSIyIiBoZWlnaHQ9IjE0IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCAxOSA4KSIgZmlsbD0id2hpdGUiLz4KPHJlY3QgeD0iMTkiIHk9IjE0IiB3aWR0aD0iMiIgaGVpZ2h0PSIxNCIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgMTkgMTQpIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K","base64");e.s(["GET",0,function(){return new I.NextResponse(m,{headers:{"Content-Type":"image/svg+xml","Cache-Control":"public, max-age=0, must-revalidate"}})},"dynamic",0,"force-static"],91785);var f=e.i(91785);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/icon.svg/route",pathname:"/icon.svg",filename:"icon.svg--route-entry",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/icon.svg--route-entry.js",nextConfigOutput:"",userland:f,...{}}),{workAsyncStorage:y,workUnitAsyncStorage:w,serverHooks:E}=C;async function b(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),C.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let I="/icon.svg/route";I=I.replace(/\/index$/,"")||"/";let m=await C.prepare(e,t,{srcPage:I,multiZoneDraftMode:!1});if(!m)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:f,deploymentId:y,params:w,nextConfig:E,parsedUrl:b,isDraftMode:A,prerenderManifest:N,routerServerContext:P,isOnDemandRevalidate:S,revalidateOnlyGenerated:T,resolvedPathname:H,clientReferenceManifest:j,serverActionsManifest:M}=m,k=(0,o.normalizeAppPath)(I),D=!!(N.dynamicRoutes[k]||N.routes[H]),q=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,b,!1):t.end("This page could not be found"),null);if(D&&!A){let e=!!N.routes[H],t=N.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await q();throw new v.NoFallbackError}}let O=null;!D||C.isDev||A||(O="/index"===(O=H)?"/":O);let _=!0===C.isDev||!D,Z=D&&!_;M&&j&&(0,s.setManifestsSingleton)({page:I,clientReferenceManifest:j,serverActionsManifest:M});let U=e.method||"GET",G=(0,i.getTracer)(),B=G.getActiveScopeSpan(),K=!!(null==P?void 0:P.isWrappedByNextServer),W=!!(0,n.getRequestMeta)(e,"minimalMode"),L=(0,n.getRequestMeta)(e,"incrementalCache")||await C.getIncrementalCache(e,E,N,W);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let F={params:w,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:_,incrementalCache:L,cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>C.onRequestError(e,t,a,n,P)},sharedContext:{buildId:f,deploymentId:y}},J=new l.NodeNextRequest(e),Q=new l.NodeNextResponse(t),$=d.NextRequestAdapter.fromNodeNextRequest(J,(0,d.signalFromNodeResponse)(t));try{let n,s=async e=>C.handle($,F).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=G.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.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 a=r.get("next.route");if(a){let t=`${U} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${U} ${I}`)}),o=async n=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!W&&S&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(n);e.fetchMetrics=F.renderOpts.fetchMetrics;let o=F.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=F.renderOpts.collectedTags;if(!D)return await (0,c.sendResponse)(J,Q,i,F.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[x.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==F.renderOpts.collectedRevalidate&&!(F.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&F.renderOpts.collectedRevalidate,a=void 0===F.renderOpts.collectedExpire||F.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:F.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:Z,isOnDemandRevalidate:S})},!1,P),t}},d=await C.handleResponse({req:e,nextConfig:E,cacheKey:O,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:W});if(!D)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});W||t.setHeader("x-nextjs-cache",S?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return W&&D||u.delete(x.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,g.getCacheControlHeader)(d.cacheControl)),await (0,c.sendResponse)(J,Q,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};K&&B?await o(B):(n=G.getActiveScopeSpan(),await G.withPropagatedContext(e.headers,()=>G.trace(u.BaseServerSpan.handleRequest,{spanName:`${U} ${I}`,kind:i.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},o),void 0,!K))}catch(t){if(t instanceof v.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:Z,isOnDemandRevalidate:S})},!1,P),D)throw t;return await (0,c.sendResponse)(J,Q,new Response(null,{status:500})),null}}e.s(["handler",0,b,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:w})},"routeModule",0,C,"serverHooks",0,E,"workAsyncStorage",0,y,"workUnitAsyncStorage",0,w],61233)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__04dzkv1._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/app/icon.svg--route-entry.js"],"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, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\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: \"/icon.svg/route\",\n pathname: \"/icon.svg\",\n filename: \"icon.svg--route-entry\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/icon.svg--route-entry.js\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\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 (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/icon.svg/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, deploymentId, 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.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 setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n 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, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId,\n deploymentId\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 let parentSpan;\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 // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\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 const silenceLog = false;\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 }, silenceLog, 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 (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\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), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\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 }, silenceLog, routerServerContext);\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 { NextResponse } from 'next/server'\n\nconst contentType = \"image/svg+xml\"\nconst cacheControl = \"public, max-age=0, must-revalidate\"\nconst buffer = Buffer.from(\"PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iNiIgZmlsbD0iYmxhY2siLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjIiIGhlaWdodD0iMTQiIGZpbGw9IndoaXRlIi8+CjxyZWN0IHg9IjE0IiB5PSI1IiB3aWR0aD0iMiIgaGVpZ2h0PSIxNCIgZmlsbD0id2hpdGUiLz4KPHJlY3QgeD0iMTkiIHk9IjgiIHdpZHRoPSIyIiBoZWlnaHQ9IjE0IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCAxOSA4KSIgZmlsbD0id2hpdGUiLz4KPHJlY3QgeD0iMTkiIHk9IjE0IiB3aWR0aD0iMiIgaGVpZ2h0PSIxNCIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgMTkgMTQpIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K\", 'base64')\n\nexport function GET() {\n return new NextResponse(buffer, {\n headers: {\n 'Content-Type': contentType,\n 'Cache-Control': cacheControl,\n },\n })\n}\n\nexport const dynamic = 'force-static'\n"],"names":["contentType","cacheControl","buffer","Buffer","from","GET","headers","dynamic"],"mappings":"m/BAAA,IAAA,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,EAA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,CACJ,EAAG,QAAiB,EAAW,CAAC,GAE5C,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,EACA,sBACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA5TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAW,AAAX,EAAY,kBACf,uBACA,CACJ,EACJ","ignoreList":[0]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[59639,(e,t,r)=>{t.exports=e.x("node:process",()=>require("node:process"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},37702,(e,t,r)=>{t.exports=e.x("worker_threads",()=>require("worker_threads"))},18352,(e,t,r)=>{t.exports=e.x("node:stream/web",()=>require("node:stream/web"))},20585,e=>{"use strict";e.i(34636);var t=e.i(99029),r=e.i(33329);let n=0,a={START_BOUNDARY:n++,HEADER_FIELD_START:n++,HEADER_FIELD:n++,HEADER_VALUE_START:n++,HEADER_VALUE:n++,HEADER_VALUE_ALMOST_DONE:n++,HEADERS_ALMOST_DONE:n++,PART_DATA_START:n++,PART_DATA:n++,END:n++},i=1,o=2,s=e=>32|e,d=()=>{};class E{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=d,this.onHeaderField=d,this.onHeadersEnd=d,this.onHeaderValue=d,this.onPartBegin=d,this.onPartData=d,this.onPartEnd=d,this.boundaryChars={};const t=new Uint8Array((e="\r\n--"+e).length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r),this.boundaryChars[t[r]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=a.START_BOUNDARY}write(e){let t,r,n=0,d=e.length,E=this.index,{lookbehind:A,boundary:h,boundaryChars:l,index:D,state:_,flags:T}=this,f=this.boundary.length,R=f-1,u=e.length,c=e=>{this[e+"Mark"]=n},H=e=>{delete this[e+"Mark"]},b=(e,t,r,n)=>{(void 0===t||t!==r)&&this[e](n&&n.subarray(t,r))},L=(t,r)=>{let a=t+"Mark";a in this&&(r?(b(t,this[a],n,e),delete this[a]):(b(t,this[a],e.length,e),this[a]=0))};for(n=0;n<d;n++)switch(t=e[n],_){case a.START_BOUNDARY:if(D===h.length-2){if(45===t)T|=o;else if(13!==t)return;D++;break}if(D-1==h.length-2){if(T&o&&45===t)_=a.END,T=0;else{if(T&o||10!==t)return;D=0,b("onPartBegin"),_=a.HEADER_FIELD_START}break}t!==h[D+2]&&(D=-2),t===h[D+2]&&D++;break;case a.HEADER_FIELD_START:_=a.HEADER_FIELD,c("onHeaderField"),D=0;case a.HEADER_FIELD:if(13===t){H("onHeaderField"),_=a.HEADERS_ALMOST_DONE;break}if(D++,45===t)break;if(58===t){if(1===D)return;L("onHeaderField",!0),_=a.HEADER_VALUE_START;break}if((r=s(t))<97||r>122)return;break;case a.HEADER_VALUE_START:if(32===t)break;c("onHeaderValue"),_=a.HEADER_VALUE;case a.HEADER_VALUE:13===t&&(L("onHeaderValue",!0),b("onHeaderEnd"),_=a.HEADER_VALUE_ALMOST_DONE);break;case a.HEADER_VALUE_ALMOST_DONE:if(10!==t)return;_=a.HEADER_FIELD_START;break;case a.HEADERS_ALMOST_DONE:if(10!==t)return;b("onHeadersEnd"),_=a.PART_DATA_START;break;case a.PART_DATA_START:_=a.PART_DATA,c("onPartData");case a.PART_DATA:if(E=D,0===D){for(n+=R;n<u&&!(e[n]in l);)n+=f;n-=R,t=e[n]}if(D<h.length)h[D]===t?(0===D&&L("onPartData",!0),D++):D=0;else if(D===h.length)D++,13===t?T|=i:45===t?T|=o:D=0;else if(D-1===h.length)if(T&i){if(D=0,10===t){T&=~i,b("onPartEnd"),b("onPartBegin"),_=a.HEADER_FIELD_START;break}}else T&o&&45===t?(b("onPartEnd"),_=a.END,T=0):D=0;D>0?A[D-1]=t:E>0&&(b("onPartData",0,E,new Uint8Array(A.buffer,A.byteOffset,A.byteLength)),E=0,c("onPartData"),n--);break;case a.END:break;default:throw Error(`Unexpected state entered: ${_}`)}L("onHeaderField"),L("onHeaderValue"),L("onPartData"),this.index=D,this.state=_,this.flags=T}end(){if(this.state===a.HEADER_FIELD_START&&0===this.index||this.state===a.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==a.END)throw Error("MultipartParser.end(): stream ended unexpectedly")}}async function A(e,n){let a,i,o,s,d,A;if(!/multipart/i.test(n))throw TypeError("Failed to fetch");let h=n.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!h)throw TypeError("no or bad content-type header, no multipart boundary");let l=new E(h[1]||h[2]),D=[],_=new r.FormData,T=e=>{o+=c.decode(e,{stream:!0})},f=e=>{D.push(e)},R=()=>{let e=new t.File(D,A,{type:d});_.append(s,e)},u=()=>{_.append(s,o)},c=new TextDecoder("utf-8");for await(let t of(c.decode(),l.onPartBegin=function(){l.onPartData=T,l.onPartEnd=u,a="",i="",o="",s="",d="",A=null,D.length=0},l.onHeaderField=function(e){a+=c.decode(e,{stream:!0})},l.onHeaderValue=function(e){i+=c.decode(e,{stream:!0})},l.onHeaderEnd=function(){if(i+=c.decode(),"content-disposition"===(a=a.toLowerCase())){let e=i.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);e&&(s=e[2]||e[3]||""),(A=function(e){let t=e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!t)return;let r=t[2]||t[3]||"",n=r.slice(r.lastIndexOf("\\")+1);return(n=n.replace(/%22/g,'"')).replace(/&#(\d{4});/g,(e,t)=>String.fromCharCode(t))}(i))&&(l.onPartData=f,l.onPartEnd=R)}else"content-type"===a&&(d=i);i="",a=""},e))l.write(t);return l.end(),_}e.s(["toFormData",0,A])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__081zp1m._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/node-fetch/src/utils/multipart-parser.js"],"sourcesContent":["import {File} from 'fetch-blob/from.js';\nimport {FormData} from 'formdata-polyfill/esm.min.js';\n\nlet s = 0;\nconst S = {\n\tSTART_BOUNDARY: s++,\n\tHEADER_FIELD_START: s++,\n\tHEADER_FIELD: s++,\n\tHEADER_VALUE_START: s++,\n\tHEADER_VALUE: s++,\n\tHEADER_VALUE_ALMOST_DONE: s++,\n\tHEADERS_ALMOST_DONE: s++,\n\tPART_DATA_START: s++,\n\tPART_DATA: s++,\n\tEND: s++\n};\n\nlet f = 1;\nconst F = {\n\tPART_BOUNDARY: f,\n\tLAST_BOUNDARY: f *= 2\n};\n\nconst LF = 10;\nconst CR = 13;\nconst SPACE = 32;\nconst HYPHEN = 45;\nconst COLON = 58;\nconst A = 97;\nconst Z = 122;\n\nconst lower = c => c | 0x20;\n\nconst noop = () => {};\n\nclass MultipartParser {\n\t/**\n\t * @param {string} boundary\n\t */\n\tconstructor(boundary) {\n\t\tthis.index = 0;\n\t\tthis.flags = 0;\n\n\t\tthis.onHeaderEnd = noop;\n\t\tthis.onHeaderField = noop;\n\t\tthis.onHeadersEnd = noop;\n\t\tthis.onHeaderValue = noop;\n\t\tthis.onPartBegin = noop;\n\t\tthis.onPartData = noop;\n\t\tthis.onPartEnd = noop;\n\n\t\tthis.boundaryChars = {};\n\n\t\tboundary = '\\r\\n--' + boundary;\n\t\tconst ui8a = new Uint8Array(boundary.length);\n\t\tfor (let i = 0; i < boundary.length; i++) {\n\t\t\tui8a[i] = boundary.charCodeAt(i);\n\t\t\tthis.boundaryChars[ui8a[i]] = true;\n\t\t}\n\n\t\tthis.boundary = ui8a;\n\t\tthis.lookbehind = new Uint8Array(this.boundary.length + 8);\n\t\tthis.state = S.START_BOUNDARY;\n\t}\n\n\t/**\n\t * @param {Uint8Array} data\n\t */\n\twrite(data) {\n\t\tlet i = 0;\n\t\tconst length_ = data.length;\n\t\tlet previousIndex = this.index;\n\t\tlet {lookbehind, boundary, boundaryChars, index, state, flags} = this;\n\t\tconst boundaryLength = this.boundary.length;\n\t\tconst boundaryEnd = boundaryLength - 1;\n\t\tconst bufferLength = data.length;\n\t\tlet c;\n\t\tlet cl;\n\n\t\tconst mark = name => {\n\t\t\tthis[name + 'Mark'] = i;\n\t\t};\n\n\t\tconst clear = name => {\n\t\t\tdelete this[name + 'Mark'];\n\t\t};\n\n\t\tconst callback = (callbackSymbol, start, end, ui8a) => {\n\t\t\tif (start === undefined || start !== end) {\n\t\t\t\tthis[callbackSymbol](ui8a && ui8a.subarray(start, end));\n\t\t\t}\n\t\t};\n\n\t\tconst dataCallback = (name, clear) => {\n\t\t\tconst markSymbol = name + 'Mark';\n\t\t\tif (!(markSymbol in this)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (clear) {\n\t\t\t\tcallback(name, this[markSymbol], i, data);\n\t\t\t\tdelete this[markSymbol];\n\t\t\t} else {\n\t\t\t\tcallback(name, this[markSymbol], data.length, data);\n\t\t\t\tthis[markSymbol] = 0;\n\t\t\t}\n\t\t};\n\n\t\tfor (i = 0; i < length_; i++) {\n\t\t\tc = data[i];\n\n\t\t\tswitch (state) {\n\t\t\t\tcase S.START_BOUNDARY:\n\t\t\t\t\tif (index === boundary.length - 2) {\n\t\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\t\tflags |= F.LAST_BOUNDARY;\n\t\t\t\t\t\t} else if (c !== CR) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (index - 1 === boundary.length - 2) {\n\t\t\t\t\t\tif (flags & F.LAST_BOUNDARY && c === HYPHEN) {\n\t\t\t\t\t\t\tstate = S.END;\n\t\t\t\t\t\t\tflags = 0;\n\t\t\t\t\t\t} else if (!(flags & F.LAST_BOUNDARY) && c === LF) {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\tcallback('onPartBegin');\n\t\t\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c !== boundary[index + 2]) {\n\t\t\t\t\t\tindex = -2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c === boundary[index + 2]) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_FIELD_START:\n\t\t\t\t\tstate = S.HEADER_FIELD;\n\t\t\t\t\tmark('onHeaderField');\n\t\t\t\t\tindex = 0;\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.HEADER_FIELD:\n\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\tclear('onHeaderField');\n\t\t\t\t\t\tstate = S.HEADERS_ALMOST_DONE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tindex++;\n\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c === COLON) {\n\t\t\t\t\t\tif (index === 1) {\n\t\t\t\t\t\t\t// empty header field\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdataCallback('onHeaderField', true);\n\t\t\t\t\t\tstate = S.HEADER_VALUE_START;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcl = lower(c);\n\t\t\t\t\tif (cl < A || cl > Z) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_VALUE_START:\n\t\t\t\t\tif (c === SPACE) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tmark('onHeaderValue');\n\t\t\t\t\tstate = S.HEADER_VALUE;\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.HEADER_VALUE:\n\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\tdataCallback('onHeaderValue', true);\n\t\t\t\t\t\tcallback('onHeaderEnd');\n\t\t\t\t\t\tstate = S.HEADER_VALUE_ALMOST_DONE;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_VALUE_ALMOST_DONE:\n\t\t\t\t\tif (c !== LF) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADERS_ALMOST_DONE:\n\t\t\t\t\tif (c !== LF) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tcallback('onHeadersEnd');\n\t\t\t\t\tstate = S.PART_DATA_START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.PART_DATA_START:\n\t\t\t\t\tstate = S.PART_DATA;\n\t\t\t\t\tmark('onPartData');\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.PART_DATA:\n\t\t\t\t\tpreviousIndex = index;\n\n\t\t\t\t\tif (index === 0) {\n\t\t\t\t\t\t// boyer-moore derrived algorithm to safely skip non-boundary data\n\t\t\t\t\t\ti += boundaryEnd;\n\t\t\t\t\t\twhile (i < bufferLength && !(data[i] in boundaryChars)) {\n\t\t\t\t\t\t\ti += boundaryLength;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ti -= boundaryEnd;\n\t\t\t\t\t\tc = data[i];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (index < boundary.length) {\n\t\t\t\t\t\tif (boundary[index] === c) {\n\t\t\t\t\t\t\tif (index === 0) {\n\t\t\t\t\t\t\t\tdataCallback('onPartData', true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index === boundary.length) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\t\t// CR = part boundary\n\t\t\t\t\t\t\tflags |= F.PART_BOUNDARY;\n\t\t\t\t\t\t} else if (c === HYPHEN) {\n\t\t\t\t\t\t\t// HYPHEN = end boundary\n\t\t\t\t\t\t\tflags |= F.LAST_BOUNDARY;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index - 1 === boundary.length) {\n\t\t\t\t\t\tif (flags & F.PART_BOUNDARY) {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\tif (c === LF) {\n\t\t\t\t\t\t\t\t// unset the PART_BOUNDARY flag\n\t\t\t\t\t\t\t\tflags &= ~F.PART_BOUNDARY;\n\t\t\t\t\t\t\t\tcallback('onPartEnd');\n\t\t\t\t\t\t\t\tcallback('onPartBegin');\n\t\t\t\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (flags & F.LAST_BOUNDARY) {\n\t\t\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\t\t\tcallback('onPartEnd');\n\t\t\t\t\t\t\t\tstate = S.END;\n\t\t\t\t\t\t\t\tflags = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (index > 0) {\n\t\t\t\t\t\t// when matching a possible boundary, keep a lookbehind reference\n\t\t\t\t\t\t// in case it turns out to be a false lead\n\t\t\t\t\t\tlookbehind[index - 1] = c;\n\t\t\t\t\t} else if (previousIndex > 0) {\n\t\t\t\t\t\t// if our boundary turned out to be rubbish, the captured lookbehind\n\t\t\t\t\t\t// belongs to partData\n\t\t\t\t\t\tconst _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);\n\t\t\t\t\t\tcallback('onPartData', 0, previousIndex, _lookbehind);\n\t\t\t\t\t\tpreviousIndex = 0;\n\t\t\t\t\t\tmark('onPartData');\n\n\t\t\t\t\t\t// reconsider the current character even so it interrupted the sequence\n\t\t\t\t\t\t// it could be the beginning of a new sequence\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.END:\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error(`Unexpected state entered: ${state}`);\n\t\t\t}\n\t\t}\n\n\t\tdataCallback('onHeaderField');\n\t\tdataCallback('onHeaderValue');\n\t\tdataCallback('onPartData');\n\n\t\t// Update properties for the next call\n\t\tthis.index = index;\n\t\tthis.state = state;\n\t\tthis.flags = flags;\n\t}\n\n\tend() {\n\t\tif ((this.state === S.HEADER_FIELD_START && this.index === 0) ||\n\t\t\t(this.state === S.PART_DATA && this.index === this.boundary.length)) {\n\t\t\tthis.onPartEnd();\n\t\t} else if (this.state !== S.END) {\n\t\t\tthrow new Error('MultipartParser.end(): stream ended unexpectedly');\n\t\t}\n\t}\n}\n\nfunction _fileName(headerValue) {\n\t// matches either a quoted-string or a token (RFC 2616 section 19.5.1)\n\tconst m = headerValue.match(/\\bfilename=(\"(.*?)\"|([^()<>@,;:\\\\\"/[\\]?={}\\s\\t]+))($|;\\s)/i);\n\tif (!m) {\n\t\treturn;\n\t}\n\n\tconst match = m[2] || m[3] || '';\n\tlet filename = match.slice(match.lastIndexOf('\\\\') + 1);\n\tfilename = filename.replace(/%22/g, '\"');\n\tfilename = filename.replace(/&#(\\d{4});/g, (m, code) => {\n\t\treturn String.fromCharCode(code);\n\t});\n\treturn filename;\n}\n\nexport async function toFormData(Body, ct) {\n\tif (!/multipart/i.test(ct)) {\n\t\tthrow new TypeError('Failed to fetch');\n\t}\n\n\tconst m = ct.match(/boundary=(?:\"([^\"]+)\"|([^;]+))/i);\n\n\tif (!m) {\n\t\tthrow new TypeError('no or bad content-type header, no multipart boundary');\n\t}\n\n\tconst parser = new MultipartParser(m[1] || m[2]);\n\n\tlet headerField;\n\tlet headerValue;\n\tlet entryValue;\n\tlet entryName;\n\tlet contentType;\n\tlet filename;\n\tconst entryChunks = [];\n\tconst formData = new FormData();\n\n\tconst onPartData = ui8a => {\n\t\tentryValue += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tconst appendToFile = ui8a => {\n\t\tentryChunks.push(ui8a);\n\t};\n\n\tconst appendFileToFormData = () => {\n\t\tconst file = new File(entryChunks, filename, {type: contentType});\n\t\tformData.append(entryName, file);\n\t};\n\n\tconst appendEntryToFormData = () => {\n\t\tformData.append(entryName, entryValue);\n\t};\n\n\tconst decoder = new TextDecoder('utf-8');\n\tdecoder.decode();\n\n\tparser.onPartBegin = function () {\n\t\tparser.onPartData = onPartData;\n\t\tparser.onPartEnd = appendEntryToFormData;\n\n\t\theaderField = '';\n\t\theaderValue = '';\n\t\tentryValue = '';\n\t\tentryName = '';\n\t\tcontentType = '';\n\t\tfilename = null;\n\t\tentryChunks.length = 0;\n\t};\n\n\tparser.onHeaderField = function (ui8a) {\n\t\theaderField += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tparser.onHeaderValue = function (ui8a) {\n\t\theaderValue += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tparser.onHeaderEnd = function () {\n\t\theaderValue += decoder.decode();\n\t\theaderField = headerField.toLowerCase();\n\n\t\tif (headerField === 'content-disposition') {\n\t\t\t// matches either a quoted-string or a token (RFC 2616 section 19.5.1)\n\t\t\tconst m = headerValue.match(/\\bname=(\"([^\"]*)\"|([^()<>@,;:\\\\\"/[\\]?={}\\s\\t]+))/i);\n\n\t\t\tif (m) {\n\t\t\t\tentryName = m[2] || m[3] || '';\n\t\t\t}\n\n\t\t\tfilename = _fileName(headerValue);\n\n\t\t\tif (filename) {\n\t\t\t\tparser.onPartData = appendToFile;\n\t\t\t\tparser.onPartEnd = appendFileToFormData;\n\t\t\t}\n\t\t} else if (headerField === 'content-type') {\n\t\t\tcontentType = headerValue;\n\t\t}\n\n\t\theaderValue = '';\n\t\theaderField = '';\n\t};\n\n\tfor await (const chunk of Body) {\n\t\tparser.write(chunk);\n\t}\n\n\tparser.end();\n\n\treturn formData;\n}\n"],"names":["s","S","START_BOUNDARY","HEADER_FIELD_START","HEADER_FIELD","HEADER_VALUE_START","HEADER_VALUE","HEADER_VALUE_ALMOST_DONE","HEADERS_ALMOST_DONE","PART_DATA_START","PART_DATA","END","f","F","PART_BOUNDARY","LAST_BOUNDARY","LF","CR","SPACE","HYPHEN","COLON","A","Z","lower","c","noop","MultipartParser","boundary","index","flags","onHeaderEnd","onHeaderField","onHeadersEnd","onHeaderValue","onPartBegin","onPartData","onPartEnd","boundaryChars","ui8a","Uint8Array","length","i","charCodeAt","lookbehind","state","write","data","length_","previousIndex","boundaryLength","boundaryEnd","bufferLength","cl","mark","name","clear","callback","callbackSymbol","start","end","undefined","subarray","dataCallback","markSymbol","_lookbehind","buffer","byteOffset","byteLength","Error","_fileName","headerValue","m","match","filename","slice","lastIndexOf","replace","code","String","fromCharCode","toFormData","Body","ct","test","TypeError","parser","headerField","entryValue","entryName","contentType","entryChunks","formData","decoder","decode","stream","appendToFile","push","appendFileToFormData","file","type","append","appendEntryToFormData","TextDecoder","toLowerCase","chunk"],"mappings":"kVAAA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,IAAIA,EAAI,EACFC,EAAI,CACTC,eAAgBF,IAChBG,mBAAoBH,IAC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EHgC,CACR","ignoreList":[0]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[50227,(e,r,o)=>{r.exports=e.x("node:path",()=>require("node:path"))},59639,(e,r,o)=>{r.exports=e.x("node:process",()=>require("node:process"))},2157,(e,r,o)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},18352,(e,r,o)=>{r.exports=e.x("node:stream/web",()=>require("node:stream/web"))},37702,(e,r,o)=>{r.exports=e.x("worker_threads",()=>require("worker_threads"))},57764,(e,r,o)=>{r.exports=e.x("node:url",()=>require("node:url"))},47299,(e,r,o)=>{r.exports=e.x("node:http",()=>require("node:http"))},43698,(e,r,o)=>{r.exports=e.x("node:https",()=>require("node:https"))},27028,(e,r,o)=>{r.exports=e.x("node:zlib",()=>require("node:zlib"))},51615,(e,r,o)=>{r.exports=e.x("node:buffer",()=>require("node:buffer"))},12057,(e,r,o)=>{r.exports=e.x("node:util",()=>require("node:util"))},61095,(e,r,o)=>{r.exports=e.x("node:net",()=>require("node:net"))},25897,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__0ezil_h._.js","server/chunks/node_modules_1t2pqct._.js"].map(r=>e.l(r))).then(()=>r(20585)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0dkua3v._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},59639,(e,t,r)=>{t.exports=e.x("node:process",()=>require("node:process"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},37702,(e,t,r)=>{t.exports=e.x("worker_threads",()=>require("worker_threads"))},18352,(e,t,r)=>{t.exports=e.x("node:stream/web",()=>require("node:stream/web"))},20585,e=>{"use strict";e.i(34636);var t=e.i(99029),r=e.i(33329);let n=0,a={START_BOUNDARY:n++,HEADER_FIELD_START:n++,HEADER_FIELD:n++,HEADER_VALUE_START:n++,HEADER_VALUE:n++,HEADER_VALUE_ALMOST_DONE:n++,HEADERS_ALMOST_DONE:n++,PART_DATA_START:n++,PART_DATA:n++,END:n++},i=1,o=2,s=e=>32|e,d=()=>{};class E{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=d,this.onHeaderField=d,this.onHeadersEnd=d,this.onHeaderValue=d,this.onPartBegin=d,this.onPartData=d,this.onPartEnd=d,this.boundaryChars={};const t=new Uint8Array((e="\r\n--"+e).length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r),this.boundaryChars[t[r]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=a.START_BOUNDARY}write(e){let t,r,n=0,d=e.length,E=this.index,{lookbehind:A,boundary:h,boundaryChars:l,index:D,state:_,flags:T}=this,f=this.boundary.length,u=f-1,R=e.length,c=e=>{this[e+"Mark"]=n},H=e=>{delete this[e+"Mark"]},b=(e,t,r,n)=>{(void 0===t||t!==r)&&this[e](n&&n.subarray(t,r))},p=(t,r)=>{let a=t+"Mark";a in this&&(r?(b(t,this[a],n,e),delete this[a]):(b(t,this[a],e.length,e),this[a]=0))};for(n=0;n<d;n++)switch(t=e[n],_){case a.START_BOUNDARY:if(D===h.length-2){if(45===t)T|=o;else if(13!==t)return;D++;break}if(D-1==h.length-2){if(T&o&&45===t)_=a.END,T=0;else{if(T&o||10!==t)return;D=0,b("onPartBegin"),_=a.HEADER_FIELD_START}break}t!==h[D+2]&&(D=-2),t===h[D+2]&&D++;break;case a.HEADER_FIELD_START:_=a.HEADER_FIELD,c("onHeaderField"),D=0;case a.HEADER_FIELD:if(13===t){H("onHeaderField"),_=a.HEADERS_ALMOST_DONE;break}if(D++,45===t)break;if(58===t){if(1===D)return;p("onHeaderField",!0),_=a.HEADER_VALUE_START;break}if((r=s(t))<97||r>122)return;break;case a.HEADER_VALUE_START:if(32===t)break;c("onHeaderValue"),_=a.HEADER_VALUE;case a.HEADER_VALUE:13===t&&(p("onHeaderValue",!0),b("onHeaderEnd"),_=a.HEADER_VALUE_ALMOST_DONE);break;case a.HEADER_VALUE_ALMOST_DONE:if(10!==t)return;_=a.HEADER_FIELD_START;break;case a.HEADERS_ALMOST_DONE:if(10!==t)return;b("onHeadersEnd"),_=a.PART_DATA_START;break;case a.PART_DATA_START:_=a.PART_DATA,c("onPartData");case a.PART_DATA:if(E=D,0===D){for(n+=u;n<R&&!(e[n]in l);)n+=f;n-=u,t=e[n]}if(D<h.length)h[D]===t?(0===D&&p("onPartData",!0),D++):D=0;else if(D===h.length)D++,13===t?T|=i:45===t?T|=o:D=0;else if(D-1===h.length)if(T&i){if(D=0,10===t){T&=~i,b("onPartEnd"),b("onPartBegin"),_=a.HEADER_FIELD_START;break}}else T&o&&45===t?(b("onPartEnd"),_=a.END,T=0):D=0;D>0?A[D-1]=t:E>0&&(b("onPartData",0,E,new Uint8Array(A.buffer,A.byteOffset,A.byteLength)),E=0,c("onPartData"),n--);break;case a.END:break;default:throw Error(`Unexpected state entered: ${_}`)}p("onHeaderField"),p("onHeaderValue"),p("onPartData"),this.index=D,this.state=_,this.flags=T}end(){if(this.state===a.HEADER_FIELD_START&&0===this.index||this.state===a.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==a.END)throw Error("MultipartParser.end(): stream ended unexpectedly")}}async function A(e,n){let a,i,o,s,d,A;if(!/multipart/i.test(n))throw TypeError("Failed to fetch");let h=n.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!h)throw TypeError("no or bad content-type header, no multipart boundary");let l=new E(h[1]||h[2]),D=[],_=new r.FormData,T=e=>{o+=c.decode(e,{stream:!0})},f=e=>{D.push(e)},u=()=>{let e=new t.File(D,A,{type:d});_.append(s,e)},R=()=>{_.append(s,o)},c=new TextDecoder("utf-8");for await(let t of(c.decode(),l.onPartBegin=function(){l.onPartData=T,l.onPartEnd=R,a="",i="",o="",s="",d="",A=null,D.length=0},l.onHeaderField=function(e){a+=c.decode(e,{stream:!0})},l.onHeaderValue=function(e){i+=c.decode(e,{stream:!0})},l.onHeaderEnd=function(){if(i+=c.decode(),"content-disposition"===(a=a.toLowerCase())){let e=i.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);e&&(s=e[2]||e[3]||""),(A=function(e){let t=e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!t)return;let r=t[2]||t[3]||"",n=r.slice(r.lastIndexOf("\\")+1);return(n=n.replace(/%22/g,'"')).replace(/&#(\d{4});/g,(e,t)=>String.fromCharCode(t))}(i))&&(l.onPartData=f,l.onPartEnd=u)}else"content-type"===a&&(d=i);i="",a=""},e))l.write(t);return l.end(),_}e.s(["toFormData",0,A])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0ezil_h._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/node-fetch/src/utils/multipart-parser.js"],"sourcesContent":["import {File} from 'fetch-blob/from.js';\nimport {FormData} from 'formdata-polyfill/esm.min.js';\n\nlet s = 0;\nconst S = {\n\tSTART_BOUNDARY: s++,\n\tHEADER_FIELD_START: s++,\n\tHEADER_FIELD: s++,\n\tHEADER_VALUE_START: s++,\n\tHEADER_VALUE: s++,\n\tHEADER_VALUE_ALMOST_DONE: s++,\n\tHEADERS_ALMOST_DONE: s++,\n\tPART_DATA_START: s++,\n\tPART_DATA: s++,\n\tEND: s++\n};\n\nlet f = 1;\nconst F = {\n\tPART_BOUNDARY: f,\n\tLAST_BOUNDARY: f *= 2\n};\n\nconst LF = 10;\nconst CR = 13;\nconst SPACE = 32;\nconst HYPHEN = 45;\nconst COLON = 58;\nconst A = 97;\nconst Z = 122;\n\nconst lower = c => c | 0x20;\n\nconst noop = () => {};\n\nclass MultipartParser {\n\t/**\n\t * @param {string} boundary\n\t */\n\tconstructor(boundary) {\n\t\tthis.index = 0;\n\t\tthis.flags = 0;\n\n\t\tthis.onHeaderEnd = noop;\n\t\tthis.onHeaderField = noop;\n\t\tthis.onHeadersEnd = noop;\n\t\tthis.onHeaderValue = noop;\n\t\tthis.onPartBegin = noop;\n\t\tthis.onPartData = noop;\n\t\tthis.onPartEnd = noop;\n\n\t\tthis.boundaryChars = {};\n\n\t\tboundary = '\\r\\n--' + boundary;\n\t\tconst ui8a = new Uint8Array(boundary.length);\n\t\tfor (let i = 0; i < boundary.length; i++) {\n\t\t\tui8a[i] = boundary.charCodeAt(i);\n\t\t\tthis.boundaryChars[ui8a[i]] = true;\n\t\t}\n\n\t\tthis.boundary = ui8a;\n\t\tthis.lookbehind = new Uint8Array(this.boundary.length + 8);\n\t\tthis.state = S.START_BOUNDARY;\n\t}\n\n\t/**\n\t * @param {Uint8Array} data\n\t */\n\twrite(data) {\n\t\tlet i = 0;\n\t\tconst length_ = data.length;\n\t\tlet previousIndex = this.index;\n\t\tlet {lookbehind, boundary, boundaryChars, index, state, flags} = this;\n\t\tconst boundaryLength = this.boundary.length;\n\t\tconst boundaryEnd = boundaryLength - 1;\n\t\tconst bufferLength = data.length;\n\t\tlet c;\n\t\tlet cl;\n\n\t\tconst mark = name => {\n\t\t\tthis[name + 'Mark'] = i;\n\t\t};\n\n\t\tconst clear = name => {\n\t\t\tdelete this[name + 'Mark'];\n\t\t};\n\n\t\tconst callback = (callbackSymbol, start, end, ui8a) => {\n\t\t\tif (start === undefined || start !== end) {\n\t\t\t\tthis[callbackSymbol](ui8a && ui8a.subarray(start, end));\n\t\t\t}\n\t\t};\n\n\t\tconst dataCallback = (name, clear) => {\n\t\t\tconst markSymbol = name + 'Mark';\n\t\t\tif (!(markSymbol in this)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (clear) {\n\t\t\t\tcallback(name, this[markSymbol], i, data);\n\t\t\t\tdelete this[markSymbol];\n\t\t\t} else {\n\t\t\t\tcallback(name, this[markSymbol], data.length, data);\n\t\t\t\tthis[markSymbol] = 0;\n\t\t\t}\n\t\t};\n\n\t\tfor (i = 0; i < length_; i++) {\n\t\t\tc = data[i];\n\n\t\t\tswitch (state) {\n\t\t\t\tcase S.START_BOUNDARY:\n\t\t\t\t\tif (index === boundary.length - 2) {\n\t\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\t\tflags |= F.LAST_BOUNDARY;\n\t\t\t\t\t\t} else if (c !== CR) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (index - 1 === boundary.length - 2) {\n\t\t\t\t\t\tif (flags & F.LAST_BOUNDARY && c === HYPHEN) {\n\t\t\t\t\t\t\tstate = S.END;\n\t\t\t\t\t\t\tflags = 0;\n\t\t\t\t\t\t} else if (!(flags & F.LAST_BOUNDARY) && c === LF) {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\tcallback('onPartBegin');\n\t\t\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c !== boundary[index + 2]) {\n\t\t\t\t\t\tindex = -2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c === boundary[index + 2]) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_FIELD_START:\n\t\t\t\t\tstate = S.HEADER_FIELD;\n\t\t\t\t\tmark('onHeaderField');\n\t\t\t\t\tindex = 0;\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.HEADER_FIELD:\n\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\tclear('onHeaderField');\n\t\t\t\t\t\tstate = S.HEADERS_ALMOST_DONE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tindex++;\n\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c === COLON) {\n\t\t\t\t\t\tif (index === 1) {\n\t\t\t\t\t\t\t// empty header field\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdataCallback('onHeaderField', true);\n\t\t\t\t\t\tstate = S.HEADER_VALUE_START;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcl = lower(c);\n\t\t\t\t\tif (cl < A || cl > Z) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_VALUE_START:\n\t\t\t\t\tif (c === SPACE) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tmark('onHeaderValue');\n\t\t\t\t\tstate = S.HEADER_VALUE;\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.HEADER_VALUE:\n\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\tdataCallback('onHeaderValue', true);\n\t\t\t\t\t\tcallback('onHeaderEnd');\n\t\t\t\t\t\tstate = S.HEADER_VALUE_ALMOST_DONE;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_VALUE_ALMOST_DONE:\n\t\t\t\t\tif (c !== LF) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADERS_ALMOST_DONE:\n\t\t\t\t\tif (c !== LF) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tcallback('onHeadersEnd');\n\t\t\t\t\tstate = S.PART_DATA_START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.PART_DATA_START:\n\t\t\t\t\tstate = S.PART_DATA;\n\t\t\t\t\tmark('onPartData');\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.PART_DATA:\n\t\t\t\t\tpreviousIndex = index;\n\n\t\t\t\t\tif (index === 0) {\n\t\t\t\t\t\t// boyer-moore derrived algorithm to safely skip non-boundary data\n\t\t\t\t\t\ti += boundaryEnd;\n\t\t\t\t\t\twhile (i < bufferLength && !(data[i] in boundaryChars)) {\n\t\t\t\t\t\t\ti += boundaryLength;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ti -= boundaryEnd;\n\t\t\t\t\t\tc = data[i];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (index < boundary.length) {\n\t\t\t\t\t\tif (boundary[index] === c) {\n\t\t\t\t\t\t\tif (index === 0) {\n\t\t\t\t\t\t\t\tdataCallback('onPartData', true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index === boundary.length) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\t\t// CR = part boundary\n\t\t\t\t\t\t\tflags |= F.PART_BOUNDARY;\n\t\t\t\t\t\t} else if (c === HYPHEN) {\n\t\t\t\t\t\t\t// HYPHEN = end boundary\n\t\t\t\t\t\t\tflags |= F.LAST_BOUNDARY;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index - 1 === boundary.length) {\n\t\t\t\t\t\tif (flags & F.PART_BOUNDARY) {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\tif (c === LF) {\n\t\t\t\t\t\t\t\t// unset the PART_BOUNDARY flag\n\t\t\t\t\t\t\t\tflags &= ~F.PART_BOUNDARY;\n\t\t\t\t\t\t\t\tcallback('onPartEnd');\n\t\t\t\t\t\t\t\tcallback('onPartBegin');\n\t\t\t\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (flags & F.LAST_BOUNDARY) {\n\t\t\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\t\t\tcallback('onPartEnd');\n\t\t\t\t\t\t\t\tstate = S.END;\n\t\t\t\t\t\t\t\tflags = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (index > 0) {\n\t\t\t\t\t\t// when matching a possible boundary, keep a lookbehind reference\n\t\t\t\t\t\t// in case it turns out to be a false lead\n\t\t\t\t\t\tlookbehind[index - 1] = c;\n\t\t\t\t\t} else if (previousIndex > 0) {\n\t\t\t\t\t\t// if our boundary turned out to be rubbish, the captured lookbehind\n\t\t\t\t\t\t// belongs to partData\n\t\t\t\t\t\tconst _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);\n\t\t\t\t\t\tcallback('onPartData', 0, previousIndex, _lookbehind);\n\t\t\t\t\t\tpreviousIndex = 0;\n\t\t\t\t\t\tmark('onPartData');\n\n\t\t\t\t\t\t// reconsider the current character even so it interrupted the sequence\n\t\t\t\t\t\t// it could be the beginning of a new sequence\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.END:\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error(`Unexpected state entered: ${state}`);\n\t\t\t}\n\t\t}\n\n\t\tdataCallback('onHeaderField');\n\t\tdataCallback('onHeaderValue');\n\t\tdataCallback('onPartData');\n\n\t\t// Update properties for the next call\n\t\tthis.index = index;\n\t\tthis.state = state;\n\t\tthis.flags = flags;\n\t}\n\n\tend() {\n\t\tif ((this.state === S.HEADER_FIELD_START && this.index === 0) ||\n\t\t\t(this.state === S.PART_DATA && this.index === this.boundary.length)) {\n\t\t\tthis.onPartEnd();\n\t\t} else if (this.state !== S.END) {\n\t\t\tthrow new Error('MultipartParser.end(): stream ended unexpectedly');\n\t\t}\n\t}\n}\n\nfunction _fileName(headerValue) {\n\t// matches either a quoted-string or a token (RFC 2616 section 19.5.1)\n\tconst m = headerValue.match(/\\bfilename=(\"(.*?)\"|([^()<>@,;:\\\\\"/[\\]?={}\\s\\t]+))($|;\\s)/i);\n\tif (!m) {\n\t\treturn;\n\t}\n\n\tconst match = m[2] || m[3] || '';\n\tlet filename = match.slice(match.lastIndexOf('\\\\') + 1);\n\tfilename = filename.replace(/%22/g, '\"');\n\tfilename = filename.replace(/&#(\\d{4});/g, (m, code) => {\n\t\treturn String.fromCharCode(code);\n\t});\n\treturn filename;\n}\n\nexport async function toFormData(Body, ct) {\n\tif (!/multipart/i.test(ct)) {\n\t\tthrow new TypeError('Failed to fetch');\n\t}\n\n\tconst m = ct.match(/boundary=(?:\"([^\"]+)\"|([^;]+))/i);\n\n\tif (!m) {\n\t\tthrow new TypeError('no or bad content-type header, no multipart boundary');\n\t}\n\n\tconst parser = new MultipartParser(m[1] || m[2]);\n\n\tlet headerField;\n\tlet headerValue;\n\tlet entryValue;\n\tlet entryName;\n\tlet contentType;\n\tlet filename;\n\tconst entryChunks = [];\n\tconst formData = new FormData();\n\n\tconst onPartData = ui8a => {\n\t\tentryValue += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tconst appendToFile = ui8a => {\n\t\tentryChunks.push(ui8a);\n\t};\n\n\tconst appendFileToFormData = () => {\n\t\tconst file = new File(entryChunks, filename, {type: contentType});\n\t\tformData.append(entryName, file);\n\t};\n\n\tconst appendEntryToFormData = () => {\n\t\tformData.append(entryName, entryValue);\n\t};\n\n\tconst decoder = new TextDecoder('utf-8');\n\tdecoder.decode();\n\n\tparser.onPartBegin = function () {\n\t\tparser.onPartData = onPartData;\n\t\tparser.onPartEnd = appendEntryToFormData;\n\n\t\theaderField = '';\n\t\theaderValue = '';\n\t\tentryValue = '';\n\t\tentryName = '';\n\t\tcontentType = '';\n\t\tfilename = null;\n\t\tentryChunks.length = 0;\n\t};\n\n\tparser.onHeaderField = function (ui8a) {\n\t\theaderField += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tparser.onHeaderValue = function (ui8a) {\n\t\theaderValue += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tparser.onHeaderEnd = function () {\n\t\theaderValue += decoder.decode();\n\t\theaderField = headerField.toLowerCase();\n\n\t\tif (headerField === 'content-disposition') {\n\t\t\t// matches either a quoted-string or a token (RFC 2616 section 19.5.1)\n\t\t\tconst m = headerValue.match(/\\bname=(\"([^\"]*)\"|([^()<>@,;:\\\\\"/[\\]?={}\\s\\t]+))/i);\n\n\t\t\tif (m) {\n\t\t\t\tentryName = m[2] || m[3] || '';\n\t\t\t}\n\n\t\t\tfilename = _fileName(headerValue);\n\n\t\t\tif (filename) {\n\t\t\t\tparser.onPartData = appendToFile;\n\t\t\t\tparser.onPartEnd = appendFileToFormData;\n\t\t\t}\n\t\t} else if (headerField === 'content-type') {\n\t\t\tcontentType = headerValue;\n\t\t}\n\n\t\theaderValue = '';\n\t\theaderField = '';\n\t};\n\n\tfor await (const chunk of Body) {\n\t\tparser.write(chunk);\n\t}\n\n\tparser.end();\n\n\treturn formData;\n}\n"],"names":["s","S","START_BOUNDARY","HEADER_FIELD_START","HEADER_FIELD","HEADER_VALUE_START","HEADER_VALUE","HEADER_VALUE_ALMOST_DONE","HEADERS_ALMOST_DONE","PART_DATA_START","PART_DATA","END","f","F","PART_BOUNDARY","LAST_BOUNDARY","LF","CR","SPACE","HYPHEN","COLON","A","Z","lower","c","noop","MultipartParser","boundary","index","flags","onHeaderEnd","onHeaderField","onHeadersEnd","onHeaderValue","onPartBegin","onPartData","onPartEnd","boundaryChars","ui8a","Uint8Array","length","i","charCodeAt","lookbehind","state","write","data","length_","previousIndex","boundaryLength","boundaryEnd","bufferLength","cl","mark","name","clear","callback","callbackSymbol","start","end","undefined","subarray","dataCallback","markSymbol","_lookbehind","buffer","byteOffset","byteLength","Error","_fileName","headerValue","m","match","filename","slice","lastIndexOf","replace","code","String","fromCharCode","toFormData","Body","ct","test","TypeError","parser","headerField","entryValue","entryName","contentType","entryChunks","formData","decoder","decode","stream","appendToFile","push","appendFileToFormData","file","type","append","appendEntryToFormData","TextDecoder","toLowerCase","chunk"],"mappings":"uZAAA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,IAAIA,EAAI,EACFC,EAAI,CACTC,eAAgBF,IAChBG,mBAAoBH,IACpBI,aAAcJ,IACdK,mBAAoBL,IACpBM,aAAcN,IACdO,yBAA0BP,IAC1BQ,oBAAqBR,IACrBS,gBAAiBT,IACjBU,UAAWV,IACXW,IAAKX,GACN,IAEQ,MAcFuB,EAAQC,GAAS,GAAJA,EAEbC,EAAO,KAAO,CAEpB,OAAMC,EAILA,YAAYC,CAAQ,CAAE,CACrB,IAAI,CAACC,KAAK,CAAG,EACb,IAAI,CAACC,KAAK,CAAG,EAEb,IAAI,CAACC,WAAW,CAAGL,EACnB,IAAI,CAACM,aAAa,CAAGN,EACrB,IAAI,CAACO,YAAY,CAAGP,EACpB,IAAI,CAACQ,aAAa,CAAGR,EACrB,IAAI,CAACS,WAAW,CAAGT,EACnB,IAAI,CAACU,UAAU,CAAGV,EAClB,IAAI,CAACW,SAAS,CAAGX,EAEjB,IAAI,CAACY,aAAa,CAAG,CAAC,EAGtB,MAAMC,EAAO,IAAIC,WAAWZ,AAD5BA,GAAW,SAAWA,CAAAA,EACea,MAAM,EAC3C,IAAK,IAAIC,EAAI,EAAGA,EAAId,EAASa,MAAM,CAAEC,IAAK,AACzCH,CAAI,CAACG,EAAE,CAAGd,EAASe,UAAU,CAACD,GAC9B,IAAI,CAACJ,aAAa,CAACC,CAAI,CAACG,EAAE,CAAC,EAAG,EAG/B,IAAI,CAACd,QA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,CAACF,EAAMG,WAAW,CAAC,MAAQ,GAKrD,MAHWF,CAGJA,AAJPA,EAAWA,EAASG,OAAO,CAAC,OAAQ,IAAA,EAChBA,OAAO,CAAC,cAAe,CAACL,EAAGM,IACvCC,OAAOC,YAAY,CAACF,GAG7B,EA6EwBP,EAAAA,IAGpBe,EAAOlD,UAAU,CAAG4D,EACpBV,EAAOjD,SAAS,CAAG6D,EAErB,KAA2B,EAApB,cAAoC,CAAhCX,GACVG,GAAcnB,CAAAA,EAGfA,EAAc,GACdgB,EAAc,EACf,EAE0BL,GACzBI,EAD+B,AACxBxC,KAAK,CAAC2D,GAKd,OAFAnB,EAAO1B,GAAG,GAEHgC,CACR","ignoreList":[0]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[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"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},24361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},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"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},24836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},21517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},4446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},55004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},92509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},88947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},27699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},5365,(e,t,r)=>{t.exports=e.x("process",()=>require("process"))},45706,(e,t,r)=>{t.exports=e.x("querystring",()=>require("querystring"))},24868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},88646,(e,t,r)=>{t.exports=e.x("node:stream/promises",()=>require("node:stream/promises"))},6461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},44799,e=>{"use strict";var t=e.i(47909),r=e.i(74017),s=e.i(96250),n=e.i(59756),o=e.i(61916),a=e.i(74677),i=e.i(69741),l=e.i(16795),u=e.i(87718),p=e.i(95169),d=e.i(47587),c=e.i(66012),x=e.i(70101),h=e.i(74838),m=e.i(10372),v=e.i(93695);e.i(52474);var f=e.i(220),R=e.i(34731),g=e.i(89171),y=e.i(12714),w=e.i(60526),E=e.i(50227);let _=(0,E.join)((0,w.homedir)(),".vellum"),q=(0,E.join)(_,".env");async function k(e){let t;try{({key:t}=await e.json())}catch{return g.NextResponse.json({ok:!1,error:"Malformed request."},{status:400})}let r="string"==typeof t?t.trim():"";if(r.length<20)return g.NextResponse.json({ok:!1,error:"That doesn't look like a key. Paste the full value from AI Studio."},{status:400});let s=await b(r);if("rejected"===s)return g.NextResponse.json({ok:!1,error:"That key was rejected by Google — check it's active in AI Studio."},{status:400});if("unreachable"===s)return g.NextResponse.json({ok:!1,error:"Couldn't reach Google to verify the key — check your connection."},{status:502});try{await A(r)}catch{return g.NextResponse.json({ok:!1,error:"Couldn't save the key to ~/.vellum/.env. Check folder permissions."},{status:500})}return process.env.GEMINI_API_KEY=r,g.NextResponse.json({ok:!0})}async function C(){try{await j()}catch{return g.NextResponse.json({ok:!1,error:"Couldn't update ~/.vellum/.env. Check folder permissions."},{status:500})}return delete process.env.GEMINI_API_KEY,g.NextResponse.json({ok:!0})}async function b(e){let t=new AbortController,r=setTimeout(()=>t.abort(),8e3);try{let r=new R.GoogleGenAI({apiKey:e});return await r.models.get({model:"gemini-2.5-flash",config:{abortSignal:t.signal}}),"ok"}catch(e){if(e instanceof R.ApiError&&[400,401,403].includes(e.status))return"rejected";return"unreachable"}finally{clearTimeout(r)}}async function A(e){await (0,y.mkdir)(_,{recursive:!0,mode:448});let t=[...(await (0,y.readFile)(q,"utf8").catch(()=>"")).split("\n").filter(e=>e.trim()&&!/^\s*GEMINI_API_KEY\s*=/.test(e)),`GEMINI_API_KEY=${e}`].join("\n")+"\n";await (0,y.writeFile)(q,t,{mode:384}),await (0,y.chmod)(q,384)}async function j(){let e=await (0,y.readFile)(q,"utf8").catch(()=>"");if(!e)return;let t=e.split("\n").filter(e=>e.trim()&&!/^\s*GEMINI_API_KEY\s*=/.test(e)),r=t.length?t.join("\n")+"\n":"";await (0,y.writeFile)(q,r,{mode:384}),await (0,y.chmod)(q,384)}e.s(["DELETE",0,C,"POST",0,k,"runtime",0,"nodejs"],51780);var N=e.i(51780);let I=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/key/route",pathname:"/api/key",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/key/route.ts",nextConfigOutput:"",userland:N,...{}}),{workAsyncStorage:P,workUnitAsyncStorage:T,serverHooks:S}=I;async function O(e,t,s){s.requestMeta&&(0,n.setRequestMeta)(e,s.requestMeta),I.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/key/route";R=R.replace(/\/index$/,"")||"/";let g=await I.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:y,deploymentId:w,params:E,nextConfig:_,parsedUrl:q,isDraftMode:k,prerenderManifest:C,routerServerContext:b,isOnDemandRevalidate:A,revalidateOnlyGenerated:j,resolvedPathname:N,clientReferenceManifest:P,serverActionsManifest:T}=g,S=(0,i.normalizeAppPath)(R),O=!!(C.dynamicRoutes[S]||C.routes[N]),M=async()=>((null==b?void 0:b.render404)?await b.render404(e,t,q,!1):t.end("This page could not be found"),null);if(O&&!k){let e=!!C.routes[N],t=C.dynamicRoutes[S];if(t&&!1===t.fallback&&!e){if(_.adapterPath)return await M();throw new v.NoFallbackError}}let H=null;!O||I.isDev||k||(H="/index"===(H=N)?"/":H);let U=!0===I.isDev||!O,D=O&&!U;T&&P&&(0,a.setManifestsSingleton)({page:R,clientReferenceManifest:P,serverActionsManifest:T});let K=e.method||"GET",F=(0,o.getTracer)(),G=F.getActiveScopeSpan(),$=!!(null==b?void 0:b.isWrappedByNextServer),B=!!(0,n.getRequestMeta)(e,"minimalMode"),L=(0,n.getRequestMeta)(e,"incrementalCache")||await I.getIncrementalCache(e,_,C,B);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let Y={params:E,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!_.experimental.authInterrupts},cacheComponents:!!_.cacheComponents,supportsDynamicResponse:U,incrementalCache:L,cacheLifeProfiles:_.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,n)=>I.onRequestError(e,t,s,n,b)},sharedContext:{buildId:y,deploymentId:w}},z=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),W=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t));try{let n,a=async e=>I.handle(W,Y).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.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 s=r.get("next.route");if(s){let t=`${K} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",s),n.updateName(t))}else e.updateName(`${K} ${R}`)}),i=async n=>{var o,i;let l=async({previousCacheEntry:r})=>{try{if(!B&&A&&j&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await a(n);e.fetchMetrics=Y.renderOpts.fetchMetrics;let i=Y.renderOpts.pendingWaitUntil;i&&s.waitUntil&&(s.waitUntil(i),i=void 0);let l=Y.renderOpts.collectedTags;if(!O)return await (0,c.sendResponse)(z,V,o,Y.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,x.toNodeOutgoingHttpHeaders)(o.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==Y.renderOpts.collectedRevalidate&&!(Y.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&Y.renderOpts.collectedRevalidate,s=void 0===Y.renderOpts.collectedExpire||Y.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:Y.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await I.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:A})},!1,b),t}},u=await I.handleResponse({req:e,nextConfig:_,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:j,responseGenerator:l,waitUntil:s.waitUntil,isMinimalMode:B});if(!O)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==(i=u.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",A?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),k&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,x.fromNodeOutgoingHttpHeaders)(u.value.headers);return B&&O||p.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,h.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(z,V,new Response(u.value.body,{headers:p,status:u.value.status||200})),null};$&&G?await i(G):(n=F.getActiveScopeSpan(),await F.withPropagatedContext(e.headers,()=>F.trace(p.BaseServerSpan.handleRequest,{spanName:`${K} ${R}`,kind:o.SpanKind.SERVER,attributes:{"http.method":K,"http.target":e.url}},i),void 0,!$))}catch(t){if(t instanceof v.NoFallbackError||await I.onRequestError(e,t,{routerKind:"App Router",routePath:S,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:A})},!1,b),O)throw t;return await (0,c.sendResponse)(z,V,new Response(null,{status:500})),null}}e.s(["handler",0,O,"patchFetch",0,function(){return(0,s.patchFetch)({workAsyncStorage:P,workUnitAsyncStorage:T})},"routeModule",0,I,"serverHooks",0,S,"workAsyncStorage",0,P,"workUnitAsyncStorage",0,T],44799)},85685,e=>{e.v(e=>Promise.resolve().then(()=>e(54799)))},91961,e=>{e.v(t=>Promise.all(["server/chunks/[externals]__1l0bqbz._.js","server/chunks/node_modules_19bvt3l._.js"].map(t=>e.l(t))).then(()=>t(12111)))},72331,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__1ra6psc._.js","server/chunks/node_modules_0x51oh_._.js","server/chunks/node_modules_node-fetch_src_index_1gf-_pn.js"].map(t=>e.l(t))).then(()=>t(20442)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0ww_12a._.js.map
|