{"version":3,"sources":["../../../src/server/app-render/make-get-server-inserted-html.tsx"],"sourcesContent":["/* eslint-disable @next/internal/no-ambiguous-jsx -- whole module is used in React Client */\nimport React, { type JSX } from 'react'\nimport { isHTTPAccessFallbackError } from '../../client/components/http-access-fallback/http-access-fallback'\nimport {\n getURLFromRedirectError,\n getRedirectStatusCodeFromError,\n} from '../../client/components/redirect'\nimport { isRedirectError } from '../../client/components/redirect-error'\nimport { renderToReadableStream } from 'react-dom/server'\nimport { streamToString } from '../stream-utils/node-web-streams-helper'\nimport { RedirectStatusCode } from '../../client/components/redirect-status-code'\nimport { addPathPrefix } from '../../shared/lib/router/utils/add-path-prefix'\nimport type { ClientTraceDataEntry } from '../lib/trace/tracer'\n\nexport function makeGetServerInsertedHTML({\n polyfills,\n renderServerInsertedHTML,\n serverCapturedErrors,\n tracingMetadata,\n basePath,\n}: {\n polyfills: JSX.IntrinsicElements['script'][]\n renderServerInsertedHTML: () => React.ReactNode\n tracingMetadata: ClientTraceDataEntry[] | undefined\n serverCapturedErrors: Array\n basePath: string\n}) {\n let flushedErrorMetaTagsUntilIndex = 0\n // flag for static content that only needs to be flushed once\n let hasFlushedInitially = false\n\n const polyfillTags = polyfills.map((polyfill) => {\n return