{"version":3,"sources":["../../../src/server/request/params.ts"],"sourcesContent":["import {\n  workAsyncStorage,\n  type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport type { OpaqueFallbackRouteParams } from './fallback-params'\nimport type { VaryParamsAccumulator } from '../app-render/vary-params'\nimport {\n  createVaryingParams,\n  getMetadataVaryParamsAccumulator,\n} from '../app-render/vary-params'\n\nimport { ReflectAdapter } from '../web/spec-extension/adapters/reflect'\nimport {\n  throwToInterruptStaticGeneration,\n  postponeWithTracking,\n} from '../app-render/dynamic-rendering'\n\nimport {\n  workUnitAsyncStorage,\n  type PrerenderStorePPR,\n  type PrerenderStoreLegacy,\n  type StaticPrerenderStoreModern,\n  type StaticPrerenderStore,\n  throwInvariantForMissingStore,\n  type PrerenderStoreModernRuntime,\n  type RequestStore,\n  type ValidationStoreClient,\n} from '../app-render/work-unit-async-storage.external'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n  describeStringPropertyAccess,\n  wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport {\n  makeDevtoolsIOAwarePromise,\n  makeHangingPromise,\n} from '../dynamic-rendering-utils'\nimport { createDedupedByCallsiteServerErrorLoggerDev } from '../create-deduped-by-callsite-server-error-logger'\nimport { dynamicAccessAsyncStorage } from '../app-render/dynamic-access-async-storage.external'\nimport { RenderStage } from '../app-render/staged-rendering'\n\nexport type ParamValue = string | Array<string> | undefined\nexport type Params = Record<string, ParamValue>\n\nexport function createParamsFromClient(\n  underlyingParams: Params\n): Promise<Params> {\n  const workStore = workAsyncStorage.getStore()\n  if (!workStore) {\n    throw new InvariantError('Expected workStore to be initialized')\n  }\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'prerender':\n      case 'prerender-client':\n      case 'prerender-ppr':\n      case 'prerender-legacy':\n        // Client params don't need additional vary tracking because by the\n        // time they reach the client, the access would have already been\n        // tracked by the server.\n        const varyParamsAccumulator = null\n        return createStaticPrerenderParams(\n          underlyingParams,\n          null,\n          workStore,\n          workUnitStore,\n          varyParamsAccumulator\n        )\n      case 'validation-client':\n        return createClientParamsInInstantValidation(\n          underlyingParams,\n          workStore,\n          workUnitStore.validationSamples\n        )\n      case 'cache':\n      case 'private-cache':\n      case 'unstable-cache':\n        throw new InvariantError(\n          'createParamsFromClient should not be called in cache contexts.'\n        )\n      case 'prerender-runtime':\n        throw new InvariantError(\n          'createParamsFromClient should not be called in a runtime prerender.'\n        )\n      case 'generate-static-params':\n        throw new InvariantError(\n          'createParamsFromClient should not be called inside generateStaticParams.'\n        )\n      case 'request':\n        if (process.env.NODE_ENV === 'development') {\n          // Semantically we only need the dev tracking when running in `next dev`\n          // but since you would never use next dev with production NODE_ENV we use this\n          // as a proxy so we can statically exclude this code from production builds.\n          const fallbackParams = workUnitStore.fallbackParams\n          // Client params are not runtime prefetchable\n          const isRuntimePrefetchable = false\n          return createRenderParamsInDev(\n            underlyingParams,\n            fallbackParams,\n            workStore,\n            workUnitStore,\n            isRuntimePrefetchable\n          )\n        } else if (workUnitStore.validationSamples) {\n          return createClientParamsInInstantValidation(\n            underlyingParams,\n            workStore,\n            workUnitStore.validationSamples\n          )\n        } else {\n          return createRenderParamsInProd(underlyingParams)\n        }\n      default:\n        workUnitStore satisfies never\n    }\n  }\n  throwInvariantForMissingStore()\n}\n\n// generateMetadata always runs in RSC context so it is equivalent to a Server Page Component\nexport type CreateServerParamsForMetadata = typeof createServerParamsForMetadata\nexport function createServerParamsForMetadata(\n  underlyingParams: Params,\n  optionalCatchAllParamName: string | null,\n  isRuntimePrefetchable: boolean\n): Promise<Params> {\n  const metadataVaryParamsAccumulator = getMetadataVaryParamsAccumulator()\n  return createServerParamsForServerSegment(\n    underlyingParams,\n    optionalCatchAllParamName,\n    metadataVaryParamsAccumulator,\n    isRuntimePrefetchable\n  )\n}\n\n// routes always runs in RSC context so it is equivalent to a Server Page Component\nexport function createServerParamsForRoute(\n  underlyingParams: Params,\n  varyParamsAccumulator: VaryParamsAccumulator | null = null\n): Promise<Params> {\n  const workStore = workAsyncStorage.getStore()\n  if (!workStore) {\n    throw new InvariantError('Expected workStore to be initialized')\n  }\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'prerender':\n      case 'prerender-ppr':\n      case 'prerender-legacy':\n        return createStaticPrerenderParams(\n          underlyingParams,\n          null,\n          workStore,\n          workUnitStore,\n          varyParamsAccumulator\n        )\n      case 'prerender-client':\n      case 'validation-client':\n        throw new InvariantError(\n          'createServerParamsForRoute should not be called in client contexts.'\n        )\n      case 'cache':\n      case 'private-cache':\n      case 'unstable-cache':\n        throw new InvariantError(\n          'createServerParamsForRoute should not be called in cache contexts.'\n        )\n      case 'generate-static-params':\n        throw new InvariantError(\n          'createServerParamsForRoute should not be called inside generateStaticParams.'\n        )\n      case 'prerender-runtime': {\n        // Route params are not runtime prefetchable\n        const isRuntimePrefetchable = false\n        return createRuntimePrerenderParams(\n          underlyingParams,\n          null,\n          workUnitStore,\n          varyParamsAccumulator,\n          isRuntimePrefetchable\n        )\n      }\n      case 'request':\n        if (process.env.NODE_ENV === 'development') {\n          // Semantically we only need the dev tracking when running in `next dev`\n          // but since you would never use next dev with production NODE_ENV we use this\n          // as a proxy so we can statically exclude this code from production builds.\n          const fallbackParams = workUnitStore.fallbackParams\n          // Route params are not runtime prefetchable\n          const isRuntimePrefetchable = false\n          return createRenderParamsInDev(\n            underlyingParams,\n            fallbackParams,\n            workStore,\n            workUnitStore,\n            isRuntimePrefetchable\n          )\n        } else {\n          return createRenderParamsInProd(underlyingParams)\n        }\n      default:\n        workUnitStore satisfies never\n    }\n  }\n  throwInvariantForMissingStore()\n}\n\nexport function createServerParamsForServerSegment(\n  underlyingParams: Params,\n  optionalCatchAllParamName: string | null,\n  varyParamsAccumulator: VaryParamsAccumulator | null,\n  isRuntimePrefetchable: boolean\n): Promise<Params> {\n  const workStore = workAsyncStorage.getStore()\n  if (!workStore) {\n    throw new InvariantError('Expected workStore to be initialized')\n  }\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'prerender':\n      case 'prerender-client':\n      case 'prerender-ppr':\n      case 'prerender-legacy':\n        return createStaticPrerenderParams(\n          underlyingParams,\n          optionalCatchAllParamName,\n          workStore,\n          workUnitStore,\n          varyParamsAccumulator\n        )\n      case 'validation-client':\n        throw new InvariantError(\n          'createServerParamsForServerSegment should not be called in client contexts.'\n        )\n      case 'cache':\n      case 'private-cache':\n      case 'unstable-cache':\n        throw new InvariantError(\n          'createServerParamsForServerSegment should not be called in cache contexts.'\n        )\n      case 'generate-static-params':\n        throw new InvariantError(\n          'createServerParamsForServerSegment should not be called inside generateStaticParams.'\n        )\n      case 'prerender-runtime':\n        return createRuntimePrerenderParams(\n          underlyingParams,\n          optionalCatchAllParamName,\n          workUnitStore,\n          varyParamsAccumulator,\n          isRuntimePrefetchable\n        )\n      case 'request':\n        if (process.env.NODE_ENV === 'development') {\n          // Semantically we only need the dev tracking when running in `next dev`\n          // but since you would never use next dev with production NODE_ENV we use this\n          // as a proxy so we can statically exclude this code from production builds.\n          const fallbackParams = workUnitStore.fallbackParams\n          return createRenderParamsInDev(\n            underlyingParams,\n            fallbackParams,\n            workStore,\n            workUnitStore,\n            isRuntimePrefetchable\n          )\n        } else if (\n          workUnitStore.asyncApiPromises &&\n          workUnitStore.validationSamples\n        ) {\n          return createServerParamsInInstantValidation(\n            underlyingParams,\n            workStore,\n            workUnitStore.validationSamples,\n            workUnitStore.asyncApiPromises,\n            isRuntimePrefetchable\n          )\n        } else if (\n          workUnitStore.asyncApiPromises &&\n          hasFallbackRouteParams(underlyingParams, workUnitStore.fallbackParams)\n        ) {\n          return (\n            isRuntimePrefetchable\n              ? workUnitStore.asyncApiPromises.earlySharedParamsParent\n              : workUnitStore.asyncApiPromises.sharedParamsParent\n          ).then(() => underlyingParams)\n        } else {\n          return createRenderParamsInProd(underlyingParams)\n        }\n      default:\n        workUnitStore satisfies never\n    }\n  }\n  throwInvariantForMissingStore()\n}\n\nexport function createPrerenderParamsForClientSegment(\n  underlyingParams: Params\n): Promise<Params> {\n  const workStore = workAsyncStorage.getStore()\n  if (!workStore) {\n    throw new InvariantError(\n      'Missing workStore in createPrerenderParamsForClientSegment'\n    )\n  }\n\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'prerender':\n      case 'prerender-client':\n        const fallbackParams = workUnitStore.fallbackRouteParams\n        if (fallbackParams) {\n          for (let key in underlyingParams) {\n            if (fallbackParams.has(key)) {\n              // This params object has one or more fallback params, so we need\n              // to consider the awaiting of this params object \"dynamic\". Since\n              // we are in cacheComponents mode we encode this as a promise that never\n              // resolves.\n              return makeHangingPromise(\n                workUnitStore.renderSignal,\n                workStore.route,\n                '`params`'\n              )\n            }\n          }\n        }\n        break\n      case 'validation-client':\n        throw new InvariantError(\n          'createPrerenderParamsForClientSegment should not be called in validation contexts.'\n        )\n        break\n      case 'cache':\n      case 'private-cache':\n      case 'unstable-cache':\n        throw new InvariantError(\n          'createPrerenderParamsForClientSegment should not be called in cache contexts.'\n        )\n      case 'generate-static-params':\n        throw new InvariantError(\n          'createPrerenderParamsForClientSegment should not be called inside generateStaticParams.'\n        )\n      case 'prerender-ppr':\n      case 'prerender-legacy':\n      case 'prerender-runtime':\n      case 'request':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n  // We're prerendering in a mode that does not abort. We resolve the promise without\n  // any tracking because we're just transporting a value from server to client where the tracking\n  // will be applied.\n  return Promise.resolve(underlyingParams)\n}\n\nfunction createStaticPrerenderParams(\n  underlyingParams: Params,\n  optionalCatchAllParamName: string | null,\n  workStore: WorkStore,\n  prerenderStore: StaticPrerenderStore,\n  varyParamsAccumulator: VaryParamsAccumulator | null\n): Promise<Params> {\n  const underlyingParamsWithVarying =\n    varyParamsAccumulator !== null\n      ? createVaryingParams(\n          varyParamsAccumulator,\n          underlyingParams,\n          optionalCatchAllParamName\n        )\n      : underlyingParams\n\n  switch (prerenderStore.type) {\n    case 'prerender':\n    case 'prerender-client': {\n      const fallbackParams = prerenderStore.fallbackRouteParams\n      if (fallbackParams) {\n        for (const key in underlyingParams) {\n          if (fallbackParams.has(key)) {\n            // This params object has one or more fallback params, so we need\n            // to consider the awaiting of this params object \"dynamic\". Since\n            // we are in cacheComponents mode we encode this as a promise that never\n            // resolves.\n            return makeHangingParams(\n              underlyingParamsWithVarying,\n              workStore,\n              prerenderStore\n            )\n          }\n        }\n      }\n      break\n    }\n    case 'prerender-ppr': {\n      const fallbackParams = prerenderStore.fallbackRouteParams\n      if (fallbackParams) {\n        for (const key in underlyingParams) {\n          if (fallbackParams.has(key)) {\n            return makeErroringParams(\n              underlyingParamsWithVarying,\n              fallbackParams,\n              workStore,\n              prerenderStore\n            )\n          }\n        }\n      }\n      break\n    }\n    case 'prerender-legacy':\n      break\n    default:\n      prerenderStore satisfies never\n  }\n\n  return makeUntrackedParams(underlyingParamsWithVarying)\n}\n\nfunction createRuntimePrerenderParams(\n  underlyingParams: Params,\n  optionalCatchAllParamName: string | null,\n  workUnitStore: PrerenderStoreModernRuntime,\n  varyParamsAccumulator: VaryParamsAccumulator | null,\n  isRuntimePrefetchable: boolean\n): Promise<Params> {\n  const underlyingParamsWithVarying =\n    varyParamsAccumulator !== null\n      ? createVaryingParams(\n          varyParamsAccumulator,\n          underlyingParams,\n          optionalCatchAllParamName\n        )\n      : underlyingParams\n\n  const result = makeUntrackedParams(underlyingParamsWithVarying)\n  const { stagedRendering } = workUnitStore\n  if (!stagedRendering) {\n    return result\n  }\n  const stage = isRuntimePrefetchable\n    ? RenderStage.EarlyRuntime\n    : RenderStage.Runtime\n  return stagedRendering.waitForStage(stage).then(() => result)\n}\n\nfunction hasFallbackRouteParams(\n  underlyingParams: Params,\n  fallbackParams: OpaqueFallbackRouteParams | null | undefined\n): boolean {\n  if (fallbackParams) {\n    for (let key in underlyingParams) {\n      if (fallbackParams.has(key)) {\n        return true\n      }\n    }\n  }\n  return false\n}\n\nfunction createServerParamsInInstantValidation(\n  underlyingParams: Params,\n  workStore: WorkStore,\n  validationSamples: NonNullable<RequestStore['validationSamples']>,\n  asyncApiPromises: NonNullable<RequestStore['asyncApiPromises']>,\n  isRuntimePrefetchable: boolean\n): Promise<Params> {\n  const { createExhaustiveParamsProxy } =\n    require('../app-render/instant-validation/instant-samples') as typeof import('../app-render/instant-validation/instant-samples')\n  const declaredParams = new Set(Object.keys(validationSamples.params ?? {}))\n  const proxiedUnderlying = createExhaustiveParamsProxy(\n    underlyingParams,\n    declaredParams,\n    workStore.route\n  )\n  return (\n    isRuntimePrefetchable\n      ? asyncApiPromises.earlySharedParamsParent\n      : asyncApiPromises.sharedParamsParent\n  ).then(() => proxiedUnderlying)\n}\n\nfunction createClientParamsInInstantValidation(\n  underlyingParams: Params,\n  workStore: WorkStore,\n  validationSamples: ValidationStoreClient['validationSamples']\n): Promise<Params> {\n  const { createExhaustiveParamsProxy } =\n    require('../app-render/instant-validation/instant-samples') as typeof import('../app-render/instant-validation/instant-samples')\n  const declaredParams = new Set(Object.keys(validationSamples?.params ?? {}))\n  const proxiedUnderlying = createExhaustiveParamsProxy(\n    underlyingParams,\n    declaredParams,\n    workStore.route\n  )\n  return Promise.resolve(proxiedUnderlying)\n}\n\nfunction createRenderParamsInProd(underlyingParams: Params): Promise<Params> {\n  return makeUntrackedParams(underlyingParams)\n}\n\nfunction createRenderParamsInDev(\n  underlyingParams: Params,\n  fallbackParams: OpaqueFallbackRouteParams | null | undefined,\n  workStore: WorkStore,\n  requestStore: RequestStore,\n  isRuntimePrefetchable: boolean\n): Promise<Params> {\n  return makeDynamicallyTrackedParamsWithDevWarnings(\n    underlyingParams,\n    hasFallbackRouteParams(underlyingParams, fallbackParams),\n    workStore,\n    requestStore,\n    isRuntimePrefetchable\n  )\n}\n\ninterface CacheLifetime {}\nconst CachedParams = new WeakMap<CacheLifetime, Promise<Params>>()\n\nconst fallbackParamsProxyHandler: ProxyHandler<Promise<Params>> = {\n  get: function get(target, prop, receiver) {\n    if (prop === 'then' || prop === 'catch' || prop === 'finally') {\n      const originalMethod = ReflectAdapter.get(target, prop, receiver)\n\n      return {\n        [prop]: (...args: unknown[]) => {\n          const store = dynamicAccessAsyncStorage.getStore()\n\n          if (store) {\n            store.abortController.abort(\n              new Error(`Accessed fallback \\`params\\` during prerendering.`)\n            )\n          }\n\n          return new Proxy(\n            originalMethod.apply(target, args),\n            fallbackParamsProxyHandler\n          )\n        },\n      }[prop]\n    }\n\n    return ReflectAdapter.get(target, prop, receiver)\n  },\n}\n\nfunction makeHangingParams(\n  underlyingParams: Params,\n  workStore: WorkStore,\n  prerenderStore: StaticPrerenderStoreModern\n): Promise<Params> {\n  const cachedParams = CachedParams.get(underlyingParams)\n  if (cachedParams) {\n    return cachedParams\n  }\n\n  const promise = new Proxy(\n    makeHangingPromise<Params>(\n      prerenderStore.renderSignal,\n      workStore.route,\n      '`params`'\n    ),\n    fallbackParamsProxyHandler\n  )\n\n  CachedParams.set(underlyingParams, promise)\n\n  return promise\n}\n\nfunction makeErroringParams(\n  underlyingParams: Params,\n  fallbackParams: OpaqueFallbackRouteParams,\n  workStore: WorkStore,\n  prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy\n): Promise<Params> {\n  const cachedParams = CachedParams.get(underlyingParams)\n  if (cachedParams) {\n    return cachedParams\n  }\n\n  const augmentedUnderlying = { ...underlyingParams }\n\n  // We don't use makeResolvedReactPromise here because params\n  // supports copying with spread and we don't want to unnecessarily\n  // instrument the promise with spreadable properties of ReactPromise.\n  const promise = Promise.resolve(augmentedUnderlying)\n  CachedParams.set(underlyingParams, promise)\n\n  Object.keys(underlyingParams).forEach((prop) => {\n    if (wellKnownProperties.has(prop)) {\n      // These properties cannot be shadowed because they need to be the\n      // true underlying value for Promises to work correctly at runtime\n    } else {\n      if (fallbackParams.has(prop)) {\n        Object.defineProperty(augmentedUnderlying, prop, {\n          get() {\n            const expression = describeStringPropertyAccess('params', prop)\n            // In most dynamic APIs we also throw if `dynamic = \"error\"` however\n            // for params is only dynamic when we're generating a fallback shell\n            // and even when `dynamic = \"error\"` we still support generating dynamic\n            // fallback shells\n            // TODO remove this comment when cacheComponents is the default since there\n            // will be no `dynamic = \"error\"`\n            if (prerenderStore.type === 'prerender-ppr') {\n              // PPR Prerender (no cacheComponents)\n              postponeWithTracking(\n                workStore.route,\n                expression,\n                prerenderStore.dynamicTracking\n              )\n            } else {\n              // Legacy Prerender\n              throwToInterruptStaticGeneration(\n                expression,\n                workStore,\n                prerenderStore\n              )\n            }\n          },\n          enumerable: true,\n        })\n      }\n    }\n  })\n\n  return promise\n}\n\nfunction makeUntrackedParams(underlyingParams: Params): Promise<Params> {\n  const cachedParams = CachedParams.get(underlyingParams)\n  if (cachedParams) {\n    return cachedParams\n  }\n\n  const promise = Promise.resolve(underlyingParams)\n  CachedParams.set(underlyingParams, promise)\n\n  return promise\n}\n\nfunction makeDynamicallyTrackedParamsWithDevWarnings(\n  underlyingParams: Params,\n  hasFallbackParams: boolean,\n  workStore: WorkStore,\n  requestStore: RequestStore,\n  isRuntimePrefetchable: boolean\n): Promise<Params> {\n  if (requestStore.asyncApiPromises && hasFallbackParams) {\n    // We wrap each instance of params in a `new Promise()`, because deduping\n    // them across requests doesn't work anyway and this let us show each\n    // await a different set of values. This is important when all awaits\n    // are in third party which would otherwise track all the way to the\n    // internal params.\n    const sharedParamsParent = isRuntimePrefetchable\n      ? requestStore.asyncApiPromises.earlySharedParamsParent\n      : requestStore.asyncApiPromises.sharedParamsParent\n    const promise: Promise<Params> = new Promise((resolve, reject) => {\n      sharedParamsParent.then(() => resolve(underlyingParams), reject)\n    })\n    // @ts-expect-error\n    promise.displayName = 'params'\n    return instrumentParamsPromiseWithDevWarnings(\n      underlyingParams,\n      promise,\n      workStore\n    )\n  }\n\n  const cachedParams = CachedParams.get(underlyingParams)\n  if (cachedParams) {\n    return cachedParams\n  }\n\n  // We don't use makeResolvedReactPromise here because params\n  // supports copying with spread and we don't want to unnecessarily\n  // instrument the promise with spreadable properties of ReactPromise.\n  const promise = hasFallbackParams\n    ? makeDevtoolsIOAwarePromise(\n        underlyingParams,\n        requestStore,\n        RenderStage.Runtime\n      )\n    : // We don't want to force an environment transition when this params is not part of the fallback params set\n      Promise.resolve(underlyingParams)\n\n  const proxiedPromise = instrumentParamsPromiseWithDevWarnings(\n    underlyingParams,\n    promise,\n    workStore\n  )\n  CachedParams.set(underlyingParams, proxiedPromise)\n  return proxiedPromise\n}\n\nfunction instrumentParamsPromiseWithDevWarnings(\n  underlyingParams: Params,\n  promise: Promise<Params>,\n  workStore: WorkStore\n): Promise<Params> {\n  // Track which properties we should warn for.\n  const proxiedProperties = new Set<string>()\n\n  Object.keys(underlyingParams).forEach((prop) => {\n    if (wellKnownProperties.has(prop)) {\n      // These properties cannot be shadowed because they need to be the\n      // true underlying value for Promises to work correctly at runtime\n    } else {\n      proxiedProperties.add(prop)\n    }\n  })\n\n  return new Proxy(promise, {\n    get(target, prop, receiver) {\n      if (typeof prop === 'string') {\n        if (\n          // We are accessing a property that was proxied to the promise instance\n          proxiedProperties.has(prop)\n        ) {\n          const expression = describeStringPropertyAccess('params', prop)\n          warnForSyncAccess(workStore.route, expression)\n        }\n      }\n      return ReflectAdapter.get(target, prop, receiver)\n    },\n    set(target, prop, value, receiver) {\n      if (typeof prop === 'string') {\n        proxiedProperties.delete(prop)\n      }\n      return ReflectAdapter.set(target, prop, value, receiver)\n    },\n    ownKeys(target) {\n      const expression = '`...params` or similar expression'\n      warnForSyncAccess(workStore.route, expression)\n      return Reflect.ownKeys(target)\n    },\n  })\n}\n\nconst warnForSyncAccess = createDedupedByCallsiteServerErrorLoggerDev(\n  createParamsAccessError\n)\n\nfunction createParamsAccessError(\n  route: string | undefined,\n  expression: string\n) {\n  const prefix = route ? `Route \"${route}\" ` : 'This route '\n  return new Error(\n    `${prefix}used ${expression}. ` +\n      `\\`params\\` is a Promise and must be unwrapped with \\`await\\` or \\`React.use()\\` before accessing its properties. ` +\n      `Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`\n  )\n}\n"],"names":["createParamsFromClient","createPrerenderParamsForClientSegment","createServerParamsForMetadata","createServerParamsForRoute","createServerParamsForServerSegment","underlyingParams","workStore","workAsyncStorage","getStore","InvariantError","workUnitStore","workUnitAsyncStorage","type","varyParamsAccumulator","createStaticPrerenderParams","createClientParamsInInstantValidation","validationSamples","process","env","NODE_ENV","fallbackParams","isRuntimePrefetchable","createRenderParamsInDev","createRenderParamsInProd","throwInvariantForMissingStore","optionalCatchAllParamName","metadataVaryParamsAccumulator","getMetadataVaryParamsAccumulator","createRuntimePrerenderParams","asyncApiPromises","createServerParamsInInstantValidation","hasFallbackRouteParams","earlySharedParamsParent","sharedParamsParent","then","fallbackRouteParams","key","has","makeHangingPromise","renderSignal","route","Promise","resolve","prerenderStore","underlyingParamsWithVarying","createVaryingParams","makeHangingParams","makeErroringParams","makeUntrackedParams","result","stagedRendering","stage","RenderStage","EarlyRuntime","Runtime","waitForStage","createExhaustiveParamsProxy","require","declaredParams","Set","Object","keys","params","proxiedUnderlying","requestStore","makeDynamicallyTrackedParamsWithDevWarnings","CachedParams","WeakMap","fallbackParamsProxyHandler","get","target","prop","receiver","originalMethod","ReflectAdapter","args","store","dynamicAccessAsyncStorage","abortController","abort","Error","Proxy","apply","cachedParams","promise","set","augmentedUnderlying","forEach","wellKnownProperties","defineProperty","expression","describeStringPropertyAccess","postponeWithTracking","dynamicTracking","throwToInterruptStaticGeneration","enumerable","hasFallbackParams","reject","displayName","instrumentParamsPromiseWithDevWarnings","makeDevtoolsIOAwarePromise","proxiedPromise","proxiedProperties","add","warnForSyncAccess","value","delete","ownKeys","Reflect","createDedupedByCallsiteServerErrorLoggerDev","createParamsAccessError","prefix"],"mappings":";;;;;;;;;;;;;;;;;;IA4CgBA,sBAAsB;eAAtBA;;IA8PAC,qCAAqC;eAArCA;;IAhLAC,6BAA6B;eAA7BA;;IAeAC,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