@angular/ssr 19.0.4 → 19.0.6

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/fesm2022/node.mjs CHANGED
@@ -242,18 +242,38 @@ function createRequestHeaders(nodeHeaders) {
242
242
  */
243
243
  function createRequestUrl(nodeRequest) {
244
244
  const { headers, socket, url = '', originalUrl, } = nodeRequest;
245
- const protocol = headers['x-forwarded-proto'] ?? ('encrypted' in socket && socket.encrypted ? 'https' : 'http');
246
- const hostname = headers['x-forwarded-host'] ?? headers.host ?? headers[':authority'];
247
- const port = headers['x-forwarded-port'] ?? socket.localPort;
245
+ const protocol = getFirstHeaderValue(headers['x-forwarded-proto']) ??
246
+ ('encrypted' in socket && socket.encrypted ? 'https' : 'http');
247
+ const hostname = getFirstHeaderValue(headers['x-forwarded-host']) ?? headers.host ?? headers[':authority'];
248
248
  if (Array.isArray(hostname)) {
249
249
  throw new Error('host value cannot be an array.');
250
250
  }
251
251
  let hostnameWithPort = hostname;
252
- if (port && !hostname?.includes(':')) {
253
- hostnameWithPort += `:${port}`;
252
+ if (!hostname?.includes(':')) {
253
+ const port = getFirstHeaderValue(headers['x-forwarded-port']);
254
+ if (port) {
255
+ hostnameWithPort += `:${port}`;
256
+ }
254
257
  }
255
258
  return new URL(originalUrl ?? url, `${protocol}://${hostnameWithPort}`);
256
259
  }
260
+ /**
261
+ * Extracts the first value from a multi-value header string.
262
+ *
263
+ * @param value - A string or an array of strings representing the header values.
264
+ * If it's a string, values are expected to be comma-separated.
265
+ * @returns The first trimmed value from the multi-value header, or `undefined` if the input is invalid or empty.
266
+ *
267
+ * @example
268
+ * ```typescript
269
+ * getFirstHeaderValue("value1, value2, value3"); // "value1"
270
+ * getFirstHeaderValue(["value1", "value2"]); // "value1"
271
+ * getFirstHeaderValue(undefined); // undefined
272
+ * ```
273
+ */
274
+ function getFirstHeaderValue(value) {
275
+ return value?.toString().split(',', 1)[0]?.trim();
276
+ }
257
277
 
258
278
  /**
259
279
  * Angular server application engine.
@@ -1 +1 @@
1
- {"version":3,"file":"node.mjs","sources":["../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/common-engine/inline-css-processor.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/common-engine/peformance-profiler.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/common-engine/common-engine.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/request.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/app-engine.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/handler.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/response.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/module.mjs"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { ɵInlineCriticalCssProcessor as InlineCriticalCssProcessor } from '@angular/ssr';\nimport { readFile } from 'node:fs/promises';\nexport class CommonEngineInlineCriticalCssProcessor {\n resourceCache = new Map();\n async process(html, outputPath) {\n const beasties = new InlineCriticalCssProcessor(async (path) => {\n let resourceContent = this.resourceCache.get(path);\n if (resourceContent === undefined) {\n resourceContent = await readFile(path, 'utf-8');\n this.resourceCache.set(path, resourceContent);\n }\n return resourceContent;\n }, outputPath);\n return beasties.process(html);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nconst PERFORMANCE_MARK_PREFIX = '🅰️';\nexport function printPerformanceLogs() {\n let maxWordLength = 0;\n const benchmarks = [];\n for (const { name, duration } of performance.getEntriesByType('measure')) {\n if (!name.startsWith(PERFORMANCE_MARK_PREFIX)) {\n continue;\n }\n // `🅰️:Retrieve SSG Page` -> `Retrieve SSG Page:`\n const step = name.slice(PERFORMANCE_MARK_PREFIX.length + 1) + ':';\n if (step.length > maxWordLength) {\n maxWordLength = step.length;\n }\n benchmarks.push([step, `${duration.toFixed(1)}ms`]);\n performance.clearMeasures(name);\n }\n /* eslint-disable no-console */\n console.log('********** Performance results **********');\n for (const [step, value] of benchmarks) {\n const spaces = maxWordLength - step.length + 5;\n console.log(step + ' '.repeat(spaces) + value);\n }\n console.log('*****************************************');\n /* eslint-enable no-console */\n}\nexport async function runMethodAndMeasurePerf(label, asyncMethod) {\n const labelName = `${PERFORMANCE_MARK_PREFIX}:${label}`;\n const startLabel = `start:${labelName}`;\n const endLabel = `end:${labelName}`;\n try {\n performance.mark(startLabel);\n return await asyncMethod();\n }\n finally {\n performance.mark(endLabel);\n performance.measure(labelName, startLabel, endLabel);\n performance.clearMarks(startLabel);\n performance.clearMarks(endLabel);\n }\n}\nexport function noopRunMethodAndMeasurePerf(label, asyncMethod) {\n return asyncMethod();\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { renderApplication, renderModule, ɵSERVER_CONTEXT } from '@angular/platform-server';\nimport * as fs from 'node:fs';\nimport { dirname, join, normalize, resolve } from 'node:path';\nimport { URL } from 'node:url';\nimport { CommonEngineInlineCriticalCssProcessor } from './inline-css-processor';\nimport { noopRunMethodAndMeasurePerf, printPerformanceLogs, runMethodAndMeasurePerf, } from './peformance-profiler';\nconst SSG_MARKER_REGEXP = /ng-server-context=[\"']\\w*\\|?ssg\\|?\\w*[\"']/;\n/**\n * A common engine to use to server render an application.\n */\nexport class CommonEngine {\n options;\n templateCache = new Map();\n inlineCriticalCssProcessor = new CommonEngineInlineCriticalCssProcessor();\n pageIsSSG = new Map();\n constructor(options) {\n this.options = options;\n }\n /**\n * Render an HTML document for a specific URL with specified\n * render options\n */\n async render(opts) {\n const enablePerformanceProfiler = this.options?.enablePerformanceProfiler;\n const runMethod = enablePerformanceProfiler\n ? runMethodAndMeasurePerf\n : noopRunMethodAndMeasurePerf;\n let html = await runMethod('Retrieve SSG Page', () => this.retrieveSSGPage(opts));\n if (html === undefined) {\n html = await runMethod('Render Page', () => this.renderApplication(opts));\n if (opts.inlineCriticalCss !== false) {\n const content = await runMethod('Inline Critical CSS', () => \n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.inlineCriticalCss(html, opts));\n html = content;\n }\n }\n if (enablePerformanceProfiler) {\n printPerformanceLogs();\n }\n return html;\n }\n inlineCriticalCss(html, opts) {\n const outputPath = opts.publicPath ?? (opts.documentFilePath ? dirname(opts.documentFilePath) : '');\n return this.inlineCriticalCssProcessor.process(html, outputPath);\n }\n async retrieveSSGPage(opts) {\n const { publicPath, documentFilePath, url } = opts;\n if (!publicPath || !documentFilePath || url === undefined) {\n return undefined;\n }\n const { pathname } = new URL(url, 'resolve://');\n // Do not use `resolve` here as otherwise it can lead to path traversal vulnerability.\n // See: https://portswigger.net/web-security/file-path-traversal\n const pagePath = join(publicPath, pathname, 'index.html');\n if (this.pageIsSSG.get(pagePath)) {\n // Serve pre-rendered page.\n return fs.promises.readFile(pagePath, 'utf-8');\n }\n if (!pagePath.startsWith(normalize(publicPath))) {\n // Potential path traversal detected.\n return undefined;\n }\n if (pagePath === resolve(documentFilePath) || !(await exists(pagePath))) {\n // View matches with prerender path or file does not exist.\n this.pageIsSSG.set(pagePath, false);\n return undefined;\n }\n // Static file exists.\n const content = await fs.promises.readFile(pagePath, 'utf-8');\n const isSSG = SSG_MARKER_REGEXP.test(content);\n this.pageIsSSG.set(pagePath, isSSG);\n return isSSG ? content : undefined;\n }\n async renderApplication(opts) {\n const moduleOrFactory = this.options?.bootstrap ?? opts.bootstrap;\n if (!moduleOrFactory) {\n throw new Error('A module or bootstrap option must be provided.');\n }\n const extraProviders = [\n { provide: ɵSERVER_CONTEXT, useValue: 'ssr' },\n ...(opts.providers ?? []),\n ...(this.options?.providers ?? []),\n ];\n let document = opts.document;\n if (!document && opts.documentFilePath) {\n document = await this.getDocument(opts.documentFilePath);\n }\n const commonRenderingOptions = {\n url: opts.url,\n document,\n };\n return isBootstrapFn(moduleOrFactory)\n ? renderApplication(moduleOrFactory, {\n platformProviders: extraProviders,\n ...commonRenderingOptions,\n })\n : renderModule(moduleOrFactory, { extraProviders, ...commonRenderingOptions });\n }\n /** Retrieve the document from the cache or the filesystem */\n async getDocument(filePath) {\n let doc = this.templateCache.get(filePath);\n if (!doc) {\n doc = await fs.promises.readFile(filePath, 'utf-8');\n this.templateCache.set(filePath, doc);\n }\n return doc;\n }\n}\nasync function exists(path) {\n try {\n await fs.promises.access(path, fs.constants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n}\nfunction isBootstrapFn(value) {\n // We can differentiate between a module and a bootstrap function by reading compiler-generated `ɵmod` static property:\n return typeof value === 'function' && !('ɵmod' in value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * A set containing all the pseudo-headers defined in the HTTP/2 specification.\n *\n * This set can be used to filter out pseudo-headers from a list of headers,\n * as they are not allowed to be set directly using the `Node.js` Undici API or\n * the web `Headers` API.\n */\nconst HTTP2_PSEUDO_HEADERS = new Set([':method', ':scheme', ':authority', ':path', ':status']);\n/**\n * Converts a Node.js `IncomingMessage` or `Http2ServerRequest` into a\n * Web Standard `Request` object.\n *\n * This function adapts the Node.js request objects to a format that can\n * be used by web platform APIs.\n *\n * @param nodeRequest - The Node.js request object (`IncomingMessage` or `Http2ServerRequest`) to convert.\n * @returns A Web Standard `Request` object.\n * @developerPreview\n */\nexport function createWebRequestFromNodeRequest(nodeRequest) {\n const { headers, method = 'GET' } = nodeRequest;\n const withBody = method !== 'GET' && method !== 'HEAD';\n return new Request(createRequestUrl(nodeRequest), {\n method,\n headers: createRequestHeaders(headers),\n body: withBody ? nodeRequest : undefined,\n duplex: withBody ? 'half' : undefined,\n });\n}\n/**\n * Creates a `Headers` object from Node.js `IncomingHttpHeaders`.\n *\n * @param nodeHeaders - The Node.js `IncomingHttpHeaders` object to convert.\n * @returns A `Headers` object containing the converted headers.\n */\nfunction createRequestHeaders(nodeHeaders) {\n const headers = new Headers();\n for (const [name, value] of Object.entries(nodeHeaders)) {\n if (HTTP2_PSEUDO_HEADERS.has(name)) {\n continue;\n }\n if (typeof value === 'string') {\n headers.append(name, value);\n }\n else if (Array.isArray(value)) {\n for (const item of value) {\n headers.append(name, item);\n }\n }\n }\n return headers;\n}\n/**\n * Creates a `URL` object from a Node.js `IncomingMessage`, taking into account the protocol, host, and port.\n *\n * @param nodeRequest - The Node.js `IncomingMessage` or `Http2ServerRequest` object to extract URL information from.\n * @returns A `URL` object representing the request URL.\n */\nfunction createRequestUrl(nodeRequest) {\n const { headers, socket, url = '', originalUrl, } = nodeRequest;\n const protocol = headers['x-forwarded-proto'] ?? ('encrypted' in socket && socket.encrypted ? 'https' : 'http');\n const hostname = headers['x-forwarded-host'] ?? headers.host ?? headers[':authority'];\n const port = headers['x-forwarded-port'] ?? socket.localPort;\n if (Array.isArray(hostname)) {\n throw new Error('host value cannot be an array.');\n }\n let hostnameWithPort = hostname;\n if (port && !hostname?.includes(':')) {\n hostnameWithPort += `:${port}`;\n }\n return new URL(originalUrl ?? url, `${protocol}://${hostnameWithPort}`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { AngularAppEngine } from '@angular/ssr';\nimport { createWebRequestFromNodeRequest } from './request';\n/**\n * Angular server application engine.\n * Manages Angular server applications (including localized ones), handles rendering requests,\n * and optionally transforms index HTML before rendering.\n *\n * @remarks This class should be instantiated once and used as a singleton across the server-side\n * application to ensure consistent handling of rendering requests and resource management.\n *\n * @developerPreview\n */\nexport class AngularNodeAppEngine {\n angularAppEngine = new AngularAppEngine();\n /**\n * Handles an incoming HTTP request by serving prerendered content, performing server-side rendering,\n * or delivering a static file for client-side rendered routes based on the `RenderMode` setting.\n *\n * This method adapts Node.js's `IncomingMessage` or `Http2ServerRequest`\n * to a format compatible with the `AngularAppEngine` and delegates the handling logic to it.\n *\n * @param request - The incoming HTTP request (`IncomingMessage` or `Http2ServerRequest`).\n * @param requestContext - Optional context for rendering, such as metadata associated with the request.\n * @returns A promise that resolves to the resulting HTTP response object, or `null` if no matching Angular route is found.\n *\n * @remarks A request to `https://www.example.com/page/index.html` will serve or render the Angular route\n * corresponding to `https://www.example.com/page`.\n */\n async handle(request, requestContext) {\n const webRequest = createWebRequestFromNodeRequest(request);\n return this.angularAppEngine.handle(webRequest, requestContext);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Attaches metadata to the handler function to mark it as a special handler for Node.js environments.\n *\n * @typeParam T - The type of the handler function.\n * @param handler - The handler function to be defined and annotated.\n * @returns The same handler function passed as an argument, with metadata attached.\n *\n * @example\n * Usage in an Express application:\n * ```ts\n * const app = express();\n * export default createNodeRequestHandler(app);\n * ```\n *\n * @example\n * Usage in a Hono application:\n * ```ts\n * const app = new Hono();\n * export default createNodeRequestHandler(async (req, res, next) => {\n * try {\n * const webRes = await app.fetch(createWebRequestFromNodeRequest(req));\n * if (webRes) {\n * await writeResponseToNodeResponse(webRes, res);\n * } else {\n * next();\n * }\n * } catch (error) {\n * next(error);\n * }\n * }));\n * ```\n *\n * @example\n * Usage in a Fastify application:\n * ```ts\n * const app = Fastify();\n * export default createNodeRequestHandler(async (req, res) => {\n * await app.ready();\n * app.server.emit('request', req, res);\n * res.send('Hello from Fastify with Node Next Handler!');\n * }));\n * ```\n * @developerPreview\n */\nexport function createNodeRequestHandler(handler) {\n handler['__ng_node_request_handler__'] = true;\n return handler;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Streams a web-standard `Response` into a Node.js `ServerResponse`\n * or `Http2ServerResponse`.\n *\n * This function adapts the web `Response` object to write its content\n * to a Node.js response object, handling both HTTP/1.1 and HTTP/2.\n *\n * @param source - The web-standard `Response` object to stream from.\n * @param destination - The Node.js response object (`ServerResponse` or `Http2ServerResponse`) to stream into.\n * @returns A promise that resolves once the streaming operation is complete.\n * @developerPreview\n */\nexport async function writeResponseToNodeResponse(source, destination) {\n const { status, headers, body } = source;\n destination.statusCode = status;\n let cookieHeaderSet = false;\n for (const [name, value] of headers.entries()) {\n if (name === 'set-cookie') {\n if (cookieHeaderSet) {\n continue;\n }\n // Sets the 'set-cookie' header only once to ensure it is correctly applied.\n // Concatenating 'set-cookie' values can lead to incorrect behavior, so we use a single value from `headers.getSetCookie()`.\n destination.setHeader(name, headers.getSetCookie());\n cookieHeaderSet = true;\n }\n else {\n destination.setHeader(name, value);\n }\n }\n if (!body) {\n destination.end();\n return;\n }\n try {\n const reader = body.getReader();\n destination.on('close', () => {\n reader.cancel().catch((error) => {\n // eslint-disable-next-line no-console\n console.error(`An error occurred while writing the response body for: ${destination.req.url}.`, error);\n });\n });\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n destination.end();\n break;\n }\n destination.write(value);\n }\n }\n catch {\n destination.end('Internal server error.');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { argv } from 'node:process';\nimport { fileURLToPath } from 'node:url';\n/**\n * Determines whether the provided URL represents the main entry point module.\n *\n * This function checks if the provided URL corresponds to the main ESM module being executed directly.\n * It's useful for conditionally executing code that should only run when a module is the entry point,\n * such as starting a server or initializing an application.\n *\n * It performs two key checks:\n * 1. Verifies if the URL starts with 'file:', ensuring it is a local file.\n * 2. Compares the URL's resolved file path with the first command-line argument (`process.argv[1]`),\n * which points to the file being executed.\n *\n * @param url The URL of the module to check. This should typically be `import.meta.url`.\n * @returns `true` if the provided URL represents the main entry point, otherwise `false`.\n * @developerPreview\n */\nexport function isMainModule(url) {\n return url.startsWith('file:') && argv[1] === fileURLToPath(url);\n}\n"],"names":["InlineCriticalCssProcessor","URL","ɵSERVER_CONTEXT"],"mappings":";;;;;;;;AASO,MAAM,sCAAsC,CAAC;AACpD,IAAI,aAAa,GAAG,IAAI,GAAG,EAAE;AAC7B,IAAI,MAAM,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE;AACpC,QAAQ,MAAM,QAAQ,GAAG,IAAIA,2BAA0B,CAAC,OAAO,IAAI,KAAK;AACxE,YAAY,IAAI,eAAe,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC;AAC9D,YAAY,IAAI,eAAe,KAAK,SAAS,EAAE;AAC/C,gBAAgB,eAAe,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;AAC/D,gBAAgB,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,eAAe,CAAC;AAC7D;AACA,YAAY,OAAO,eAAe;AAClC,SAAS,EAAE,UAAU,CAAC;AACtB,QAAQ,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;AACrC;AACA;;ACfA,MAAM,uBAAuB,GAAG,KAAK;AAC9B,SAAS,oBAAoB,GAAG;AACvC,IAAI,IAAI,aAAa,GAAG,CAAC;AACzB,IAAI,MAAM,UAAU,GAAG,EAAE;AACzB,IAAI,KAAK,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,WAAW,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE;AAC9E,QAAQ,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE;AACvD,YAAY;AACZ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AC,CAAC,EAAE,KAAK,CAAC;AACtH,aAAa,CAAC;AACd,SAAS,CAAC;AACV;AACA,QAAQ,OAAO,IAAI,EAAE;AACrB,YAAY,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE;AACvD,YAAY,IAAI,IAAI,EAAE;AACtB,gBAAgB,WAAW,CAAC,GAAG,EAAE;AACjC,gBAAgB;AAChB;AACA,YAAY,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC;AACpC;AACA;AACA,IAAI,MAAM;AACV,QAAQ,WAAW,CAAC,GAAG,CAAC,wBAAwB,CAAC;AACjD;AACA;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,YAAY,CAAC,GAAG,EAAE;AAClC,IAAI,OAAO,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,GAAG,CAAC;AACpE;;;;"}
1
+ {"version":3,"file":"node.mjs","sources":["../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/common-engine/inline-css-processor.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/common-engine/peformance-profiler.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/common-engine/common-engine.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/request.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/app-engine.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/handler.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/response.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/node/src/module.mjs"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { ɵInlineCriticalCssProcessor as InlineCriticalCssProcessor } from '@angular/ssr';\nimport { readFile } from 'node:fs/promises';\nexport class CommonEngineInlineCriticalCssProcessor {\n resourceCache = new Map();\n async process(html, outputPath) {\n const beasties = new InlineCriticalCssProcessor(async (path) => {\n let resourceContent = this.resourceCache.get(path);\n if (resourceContent === undefined) {\n resourceContent = await readFile(path, 'utf-8');\n this.resourceCache.set(path, resourceContent);\n }\n return resourceContent;\n }, outputPath);\n return beasties.process(html);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nconst PERFORMANCE_MARK_PREFIX = '🅰️';\nexport function printPerformanceLogs() {\n let maxWordLength = 0;\n const benchmarks = [];\n for (const { name, duration } of performance.getEntriesByType('measure')) {\n if (!name.startsWith(PERFORMANCE_MARK_PREFIX)) {\n continue;\n }\n // `🅰️:Retrieve SSG Page` -> `Retrieve SSG Page:`\n const step = name.slice(PERFORMANCE_MARK_PREFIX.length + 1) + ':';\n if (step.length > maxWordLength) {\n maxWordLength = step.length;\n }\n benchmarks.push([step, `${duration.toFixed(1)}ms`]);\n performance.clearMeasures(name);\n }\n /* eslint-disable no-console */\n console.log('********** Performance results **********');\n for (const [step, value] of benchmarks) {\n const spaces = maxWordLength - step.length + 5;\n console.log(step + ' '.repeat(spaces) + value);\n }\n console.log('*****************************************');\n /* eslint-enable no-console */\n}\nexport async function runMethodAndMeasurePerf(label, asyncMethod) {\n const labelName = `${PERFORMANCE_MARK_PREFIX}:${label}`;\n const startLabel = `start:${labelName}`;\n const endLabel = `end:${labelName}`;\n try {\n performance.mark(startLabel);\n return await asyncMethod();\n }\n finally {\n performance.mark(endLabel);\n performance.measure(labelName, startLabel, endLabel);\n performance.clearMarks(startLabel);\n performance.clearMarks(endLabel);\n }\n}\nexport function noopRunMethodAndMeasurePerf(label, asyncMethod) {\n return asyncMethod();\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { renderApplication, renderModule, ɵSERVER_CONTEXT } from '@angular/platform-server';\nimport * as fs from 'node:fs';\nimport { dirname, join, normalize, resolve } from 'node:path';\nimport { URL } from 'node:url';\nimport { CommonEngineInlineCriticalCssProcessor } from './inline-css-processor';\nimport { noopRunMethodAndMeasurePerf, printPerformanceLogs, runMethodAndMeasurePerf, } from './peformance-profiler';\nconst SSG_MARKER_REGEXP = /ng-server-context=[\"']\\w*\\|?ssg\\|?\\w*[\"']/;\n/**\n * A common engine to use to server render an application.\n */\nexport class CommonEngine {\n options;\n templateCache = new Map();\n inlineCriticalCssProcessor = new CommonEngineInlineCriticalCssProcessor();\n pageIsSSG = new Map();\n constructor(options) {\n this.options = options;\n }\n /**\n * Render an HTML document for a specific URL with specified\n * render options\n */\n async render(opts) {\n const enablePerformanceProfiler = this.options?.enablePerformanceProfiler;\n const runMethod = enablePerformanceProfiler\n ? runMethodAndMeasurePerf\n : noopRunMethodAndMeasurePerf;\n let html = await runMethod('Retrieve SSG Page', () => this.retrieveSSGPage(opts));\n if (html === undefined) {\n html = await runMethod('Render Page', () => this.renderApplication(opts));\n if (opts.inlineCriticalCss !== false) {\n const content = await runMethod('Inline Critical CSS', () => \n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.inlineCriticalCss(html, opts));\n html = content;\n }\n }\n if (enablePerformanceProfiler) {\n printPerformanceLogs();\n }\n return html;\n }\n inlineCriticalCss(html, opts) {\n const outputPath = opts.publicPath ?? (opts.documentFilePath ? dirname(opts.documentFilePath) : '');\n return this.inlineCriticalCssProcessor.process(html, outputPath);\n }\n async retrieveSSGPage(opts) {\n const { publicPath, documentFilePath, url } = opts;\n if (!publicPath || !documentFilePath || url === undefined) {\n return undefined;\n }\n const { pathname } = new URL(url, 'resolve://');\n // Do not use `resolve` here as otherwise it can lead to path traversal vulnerability.\n // See: https://portswigger.net/web-security/file-path-traversal\n const pagePath = join(publicPath, pathname, 'index.html');\n if (this.pageIsSSG.get(pagePath)) {\n // Serve pre-rendered page.\n return fs.promises.readFile(pagePath, 'utf-8');\n }\n if (!pagePath.startsWith(normalize(publicPath))) {\n // Potential path traversal detected.\n return undefined;\n }\n if (pagePath === resolve(documentFilePath) || !(await exists(pagePath))) {\n // View matches with prerender path or file does not exist.\n this.pageIsSSG.set(pagePath, false);\n return undefined;\n }\n // Static file exists.\n const content = await fs.promises.readFile(pagePath, 'utf-8');\n const isSSG = SSG_MARKER_REGEXP.test(content);\n this.pageIsSSG.set(pagePath, isSSG);\n return isSSG ? content : undefined;\n }\n async renderApplication(opts) {\n const moduleOrFactory = this.options?.bootstrap ?? opts.bootstrap;\n if (!moduleOrFactory) {\n throw new Error('A module or bootstrap option must be provided.');\n }\n const extraProviders = [\n { provide: ɵSERVER_CONTEXT, useValue: 'ssr' },\n ...(opts.providers ?? []),\n ...(this.options?.providers ?? []),\n ];\n let document = opts.document;\n if (!document && opts.documentFilePath) {\n document = await this.getDocument(opts.documentFilePath);\n }\n const commonRenderingOptions = {\n url: opts.url,\n document,\n };\n return isBootstrapFn(moduleOrFactory)\n ? renderApplication(moduleOrFactory, {\n platformProviders: extraProviders,\n ...commonRenderingOptions,\n })\n : renderModule(moduleOrFactory, { extraProviders, ...commonRenderingOptions });\n }\n /** Retrieve the document from the cache or the filesystem */\n async getDocument(filePath) {\n let doc = this.templateCache.get(filePath);\n if (!doc) {\n doc = await fs.promises.readFile(filePath, 'utf-8');\n this.templateCache.set(filePath, doc);\n }\n return doc;\n }\n}\nasync function exists(path) {\n try {\n await fs.promises.access(path, fs.constants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n}\nfunction isBootstrapFn(value) {\n // We can differentiate between a module and a bootstrap function by reading compiler-generated `ɵmod` static property:\n return typeof value === 'function' && !('ɵmod' in value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * A set containing all the pseudo-headers defined in the HTTP/2 specification.\n *\n * This set can be used to filter out pseudo-headers from a list of headers,\n * as they are not allowed to be set directly using the `Node.js` Undici API or\n * the web `Headers` API.\n */\nconst HTTP2_PSEUDO_HEADERS = new Set([':method', ':scheme', ':authority', ':path', ':status']);\n/**\n * Converts a Node.js `IncomingMessage` or `Http2ServerRequest` into a\n * Web Standard `Request` object.\n *\n * This function adapts the Node.js request objects to a format that can\n * be used by web platform APIs.\n *\n * @param nodeRequest - The Node.js request object (`IncomingMessage` or `Http2ServerRequest`) to convert.\n * @returns A Web Standard `Request` object.\n * @developerPreview\n */\nexport function createWebRequestFromNodeRequest(nodeRequest) {\n const { headers, method = 'GET' } = nodeRequest;\n const withBody = method !== 'GET' && method !== 'HEAD';\n return new Request(createRequestUrl(nodeRequest), {\n method,\n headers: createRequestHeaders(headers),\n body: withBody ? nodeRequest : undefined,\n duplex: withBody ? 'half' : undefined,\n });\n}\n/**\n * Creates a `Headers` object from Node.js `IncomingHttpHeaders`.\n *\n * @param nodeHeaders - The Node.js `IncomingHttpHeaders` object to convert.\n * @returns A `Headers` object containing the converted headers.\n */\nfunction createRequestHeaders(nodeHeaders) {\n const headers = new Headers();\n for (const [name, value] of Object.entries(nodeHeaders)) {\n if (HTTP2_PSEUDO_HEADERS.has(name)) {\n continue;\n }\n if (typeof value === 'string') {\n headers.append(name, value);\n }\n else if (Array.isArray(value)) {\n for (const item of value) {\n headers.append(name, item);\n }\n }\n }\n return headers;\n}\n/**\n * Creates a `URL` object from a Node.js `IncomingMessage`, taking into account the protocol, host, and port.\n *\n * @param nodeRequest - The Node.js `IncomingMessage` or `Http2ServerRequest` object to extract URL information from.\n * @returns A `URL` object representing the request URL.\n */\nfunction createRequestUrl(nodeRequest) {\n const { headers, socket, url = '', originalUrl, } = nodeRequest;\n const protocol = getFirstHeaderValue(headers['x-forwarded-proto']) ??\n ('encrypted' in socket && socket.encrypted ? 'https' : 'http');\n const hostname = getFirstHeaderValue(headers['x-forwarded-host']) ?? headers.host ?? headers[':authority'];\n if (Array.isArray(hostname)) {\n throw new Error('host value cannot be an array.');\n }\n let hostnameWithPort = hostname;\n if (!hostname?.includes(':')) {\n const port = getFirstHeaderValue(headers['x-forwarded-port']);\n if (port) {\n hostnameWithPort += `:${port}`;\n }\n }\n return new URL(originalUrl ?? url, `${protocol}://${hostnameWithPort}`);\n}\n/**\n * Extracts the first value from a multi-value header string.\n *\n * @param value - A string or an array of strings representing the header values.\n * If it's a string, values are expected to be comma-separated.\n * @returns The first trimmed value from the multi-value header, or `undefined` if the input is invalid or empty.\n *\n * @example\n * ```typescript\n * getFirstHeaderValue(\"value1, value2, value3\"); // \"value1\"\n * getFirstHeaderValue([\"value1\", \"value2\"]); // \"value1\"\n * getFirstHeaderValue(undefined); // undefined\n * ```\n */\nfunction getFirstHeaderValue(value) {\n return value?.toString().split(',', 1)[0]?.trim();\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { AngularAppEngine } from '@angular/ssr';\nimport { createWebRequestFromNodeRequest } from './request';\n/**\n * Angular server application engine.\n * Manages Angular server applications (including localized ones), handles rendering requests,\n * and optionally transforms index HTML before rendering.\n *\n * @remarks This class should be instantiated once and used as a singleton across the server-side\n * application to ensure consistent handling of rendering requests and resource management.\n *\n * @developerPreview\n */\nexport class AngularNodeAppEngine {\n angularAppEngine = new AngularAppEngine();\n /**\n * Handles an incoming HTTP request by serving prerendered content, performing server-side rendering,\n * or delivering a static file for client-side rendered routes based on the `RenderMode` setting.\n *\n * This method adapts Node.js's `IncomingMessage` or `Http2ServerRequest`\n * to a format compatible with the `AngularAppEngine` and delegates the handling logic to it.\n *\n * @param request - The incoming HTTP request (`IncomingMessage` or `Http2ServerRequest`).\n * @param requestContext - Optional context for rendering, such as metadata associated with the request.\n * @returns A promise that resolves to the resulting HTTP response object, or `null` if no matching Angular route is found.\n *\n * @remarks A request to `https://www.example.com/page/index.html` will serve or render the Angular route\n * corresponding to `https://www.example.com/page`.\n */\n async handle(request, requestContext) {\n const webRequest = createWebRequestFromNodeRequest(request);\n return this.angularAppEngine.handle(webRequest, requestContext);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Attaches metadata to the handler function to mark it as a special handler for Node.js environments.\n *\n * @typeParam T - The type of the handler function.\n * @param handler - The handler function to be defined and annotated.\n * @returns The same handler function passed as an argument, with metadata attached.\n *\n * @example\n * Usage in an Express application:\n * ```ts\n * const app = express();\n * export default createNodeRequestHandler(app);\n * ```\n *\n * @example\n * Usage in a Hono application:\n * ```ts\n * const app = new Hono();\n * export default createNodeRequestHandler(async (req, res, next) => {\n * try {\n * const webRes = await app.fetch(createWebRequestFromNodeRequest(req));\n * if (webRes) {\n * await writeResponseToNodeResponse(webRes, res);\n * } else {\n * next();\n * }\n * } catch (error) {\n * next(error);\n * }\n * }));\n * ```\n *\n * @example\n * Usage in a Fastify application:\n * ```ts\n * const app = Fastify();\n * export default createNodeRequestHandler(async (req, res) => {\n * await app.ready();\n * app.server.emit('request', req, res);\n * res.send('Hello from Fastify with Node Next Handler!');\n * }));\n * ```\n * @developerPreview\n */\nexport function createNodeRequestHandler(handler) {\n handler['__ng_node_request_handler__'] = true;\n return handler;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Streams a web-standard `Response` into a Node.js `ServerResponse`\n * or `Http2ServerResponse`.\n *\n * This function adapts the web `Response` object to write its content\n * to a Node.js response object, handling both HTTP/1.1 and HTTP/2.\n *\n * @param source - The web-standard `Response` object to stream from.\n * @param destination - The Node.js response object (`ServerResponse` or `Http2ServerResponse`) to stream into.\n * @returns A promise that resolves once the streaming operation is complete.\n * @developerPreview\n */\nexport async function writeResponseToNodeResponse(source, destination) {\n const { status, headers, body } = source;\n destination.statusCode = status;\n let cookieHeaderSet = false;\n for (const [name, value] of headers.entries()) {\n if (name === 'set-cookie') {\n if (cookieHeaderSet) {\n continue;\n }\n // Sets the 'set-cookie' header only once to ensure it is correctly applied.\n // Concatenating 'set-cookie' values can lead to incorrect behavior, so we use a single value from `headers.getSetCookie()`.\n destination.setHeader(name, headers.getSetCookie());\n cookieHeaderSet = true;\n }\n else {\n destination.setHeader(name, value);\n }\n }\n if (!body) {\n destination.end();\n return;\n }\n try {\n const reader = body.getReader();\n destination.on('close', () => {\n reader.cancel().catch((error) => {\n // eslint-disable-next-line no-console\n console.error(`An error occurred while writing the response body for: ${destination.req.url}.`, error);\n });\n });\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n destination.end();\n break;\n }\n destination.write(value);\n }\n }\n catch {\n destination.end('Internal server error.');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { argv } from 'node:process';\nimport { fileURLToPath } from 'node:url';\n/**\n * Determines whether the provided URL represents the main entry point module.\n *\n * This function checks if the provided URL corresponds to the main ESM module being executed directly.\n * It's useful for conditionally executing code that should only run when a module is the entry point,\n * such as starting a server or initializing an application.\n *\n * It performs two key checks:\n * 1. Verifies if the URL starts with 'file:', ensuring it is a local file.\n * 2. Compares the URL's resolved file path with the first command-line argument (`process.argv[1]`),\n * which points to the file being executed.\n *\n * @param url The URL of the module to check. This should typically be `import.meta.url`.\n * @returns `true` if the provided URL represents the main entry point, otherwise `false`.\n * @developerPreview\n */\nexport function isMainModule(url) {\n return url.startsWith('file:') && argv[1] === fileURLToPath(url);\n}\n"],"names":["Inl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,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC;AACtH,aAAa,CAAC;AACd,SAAS,CAAC;AACV;AACA,QAAQ,OAAO,IAAI,EAAE;AACrB,YAAY,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE;AACvD,YAAY,IAAI,IAAI,EAAE;AACtB,gBAAgB,WAAW,CAAC,GAAG,EAAE;AACjC,gBAAgB;AAChB;AACA,YAAY,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC;AACpC;AACA;AACA,IAAI,MAAM;AACV,QAAQ,WAAW,CAAC,GAAG,CAAC,wBAAwB,CAAC;AACjD;AACA;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,YAAY,CAAC,GAAG,EAAE;AAClC,IAAI,OAAO,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,GAAG,CAAC;AACpE;;;;"}
package/fesm2022/ssr.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { APP_BASE_HREF, PlatformLocation } from '@angular/common';
2
- import { ɵConsole as _Console, InjectionToken, makeEnvironmentProviders, runInInjectionContext, ApplicationRef, Compiler, REQUEST, REQUEST_CONTEXT, RESPONSE_INIT, LOCALE_ID, ɵresetCompiledComponents as _resetCompiledComponents } from '@angular/core';
2
+ import { ɵConsole as _Console, InjectionToken, makeEnvironmentProviders, runInInjectionContext, APP_INITIALIZER, inject, ApplicationRef, Compiler, REQUEST, REQUEST_CONTEXT, RESPONSE_INIT, LOCALE_ID, ɵresetCompiledComponents as _resetCompiledComponents } from '@angular/core';
3
3
  import { ɵSERVER_CONTEXT as _SERVER_CONTEXT, renderModule, renderApplication, platformServer, INITIAL_CONFIG } from '@angular/platform-server';
4
4
  import { ɵloadChildren as _loadChildren, Router } from '@angular/router';
5
5
  import Beasties from '../third_party/beasties/index.js';
@@ -51,6 +51,10 @@ class ServerAssets {
51
51
  }
52
52
  }
53
53
 
54
+ /**
55
+ * A set of log messages that should be ignored and not printed to the console.
56
+ */
57
+ const IGNORED_LOGS = new Set(['Angular is running in development mode.']);
54
58
  /**
55
59
  * Custom implementation of the Angular Console service that filters out specific log messages.
56
60
  *
@@ -58,21 +62,17 @@ class ServerAssets {
58
62
  * It overrides the `log` method to suppress logs that match certain predefined messages.
59
63
  */
60
64
  class Console extends _Console {
61
- /**
62
- * A set of log messages that should be ignored and not printed to the console.
63
- */
64
- ignoredLogs = new Set(['Angular is running in development mode.']);
65
65
  /**
66
66
  * Logs a message to the console if it is not in the set of ignored messages.
67
67
  *
68
68
  * @param message - The message to log to the console.
69
69
  *
70
70
  * This method overrides the `log` method of the `ɵConsole` class. It checks if the
71
- * message is in the `ignoredLogs` set. If it is not, it delegates the logging to
71
+ * message is in the `IGNORED_LOGS` set. If it is not, it delegates the logging to
72
72
  * the parent class's `log` method. Otherwise, the message is suppressed.
73
73
  */
74
74
  log(message) {
75
- if (!this.ignoredLogs.has(message)) {
75
+ if (!IGNORED_LOGS.has(message)) {
76
76
  super.log(message);
77
77
  }
78
78
  }
@@ -903,9 +903,25 @@ async function getRoutesFromAngularRouterConfig(bootstrap, document, url, invoke
903
903
  useValue: { document, url: `${protocol}//${host}/` },
904
904
  },
905
905
  {
906
+ // An Angular Console Provider that does not print a set of predefined logs.
906
907
  provide: _Console,
908
+ // Using `useClass` would necessitate decorating `Console` with `@Injectable`,
909
+ // which would require switching from `ts_library` to `ng_module`. This change
910
+ // would also necessitate various patches of `@angular/bazel` to support ESM.
907
911
  useFactory: () => new Console(),
908
912
  },
913
+ {
914
+ // We cannot replace `ApplicationRef` with a different provider here due to the dependency injection (DI) hierarchy.
915
+ // This code is running at the platform level, where `ApplicationRef` is provided in the root injector.
916
+ // As a result, any attempt to replace it will cause the root provider to override the platform provider.
917
+ // TODO(alanagius): investigate exporting the app config directly which would help with: https://github.com/angular/angular/issues/59144
918
+ provide: APP_INITIALIZER,
919
+ multi: true,
920
+ useFactory: () => () => {
921
+ const appRef = inject(ApplicationRef);
922
+ appRef.bootstrap = () => undefined;
923
+ },
924
+ },
909
925
  ]);
910
926
  try {
911
927
  let applicationRef;
@@ -1249,8 +1265,7 @@ const CSP_MEDIA_ATTR = 'ngCspMedia';
1249
1265
  * - Removes the event listener when all relevant `<link>` tags have been processed.
1250
1266
  * - Uses event capturing (the `true` parameter) since load events do not bubble up the DOM.
1251
1267
  */
1252
- const LINK_LOAD_SCRIPT_CONTENT = `
1253
- (() => {
1268
+ const LINK_LOAD_SCRIPT_CONTENT = /* @__PURE__ */ (() => `(() => {
1254
1269
  const CSP_MEDIA_ATTR = '${CSP_MEDIA_ATTR}';
1255
1270
  const documentElement = document.documentElement;
1256
1271
 
@@ -1274,7 +1289,7 @@ const LINK_LOAD_SCRIPT_CONTENT = `
1274
1289
  };
1275
1290
 
1276
1291
  documentElement.addEventListener('load', listener, true);
1277
- })();`;
1292
+ })();`)();
1278
1293
  class BeastiesBase extends Beasties {
1279
1294
  }
1280
1295
  /* eslint-enable @typescript-eslint/no-unsafe-declaration-merging */
@@ -1611,12 +1626,15 @@ class AngularServerApp {
1611
1626
  }
1612
1627
  const { redirectTo, status, renderMode } = matchedRoute;
1613
1628
  if (redirectTo !== undefined) {
1614
- return Response.redirect(new URL(buildPathWithParams(redirectTo, url.pathname), url),
1615
- // Note: The status code is validated during route extraction.
1616
- // 302 Found is used by default for redirections
1617
- // See: https://developer.mozilla.org/en-US/docs/Web/API/Response/redirect_static#status
1618
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1619
- status ?? 302);
1629
+ return new Response(null, {
1630
+ // Note: The status code is validated during route extraction.
1631
+ // 302 Found is used by default for redirections
1632
+ // See: https://developer.mozilla.org/en-US/docs/Web/API/Response/redirect_static#status
1633
+ status: status ?? 302,
1634
+ headers: {
1635
+ 'Location': buildPathWithParams(redirectTo, url.pathname),
1636
+ },
1637
+ });
1620
1638
  }
1621
1639
  if (renderMode === RenderMode.Prerender) {
1622
1640
  const response = await this.handleServe(request, matchedRoute);
@@ -1646,10 +1664,11 @@ class AngularServerApp {
1646
1664
  return null;
1647
1665
  }
1648
1666
  const assetPath = this.buildServerAssetPathFromRequest(request);
1649
- if (!this.assets.hasServerAsset(assetPath)) {
1667
+ const { manifest: { locale }, assets, } = this;
1668
+ if (!assets.hasServerAsset(assetPath)) {
1650
1669
  return null;
1651
1670
  }
1652
- const { text, hash, size } = this.assets.getServerAsset(assetPath);
1671
+ const { text, hash, size } = assets.getServerAsset(assetPath);
1653
1672
  const etag = `"${hash}"`;
1654
1673
  return request.headers.get('if-none-match') === etag
1655
1674
  ? new Response(undefined, { status: 304, statusText: 'Not Modified' })
@@ -1658,6 +1677,7 @@ class AngularServerApp {
1658
1677
  'Content-Length': size.toString(),
1659
1678
  'ETag': etag,
1660
1679
  'Content-Type': 'text/html;charset=UTF-8',
1680
+ ...(locale !== undefined ? { 'Content-Language': locale } : {}),
1661
1681
  ...headers,
1662
1682
  },
1663
1683
  });
@@ -1680,11 +1700,13 @@ class AngularServerApp {
1680
1700
  }
1681
1701
  const url = new URL(request.url);
1682
1702
  const platformProviders = [];
1703
+ const { manifest: { bootstrap, inlineCriticalCss, locale }, assets, } = this;
1683
1704
  // Initialize the response with status and headers if available.
1684
1705
  const responseInit = {
1685
1706
  status,
1686
1707
  headers: new Headers({
1687
1708
  'Content-Type': 'text/html;charset=UTF-8',
1709
+ ...(locale !== undefined ? { 'Content-Language': locale } : {}),
1688
1710
  ...headers,
1689
1711
  }),
1690
1712
  };
@@ -1703,11 +1725,10 @@ class AngularServerApp {
1703
1725
  }
1704
1726
  else if (renderMode === RenderMode.Client) {
1705
1727
  // Serve the client-side rendered version if the route is configured for CSR.
1706
- let html = await this.assets.getServerAsset('index.csr.html').text();
1728
+ let html = await assets.getServerAsset('index.csr.html').text();
1707
1729
  html = await this.runTransformsOnHtml(html, url);
1708
1730
  return new Response(html, responseInit);
1709
1731
  }
1710
- const { manifest: { bootstrap, inlineCriticalCss, locale }, hooks, assets, } = this;
1711
1732
  if (locale !== undefined) {
1712
1733
  platformProviders.push({
1713
1734
  provide: LOCALE_ID,
@@ -1 +1 @@
1
- {"version":3,"file":"ssr.mjs","sources":["../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/assets.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/console.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/manifest.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/url.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/ng.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/promise.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/route-config.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/route-tree.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/ng-routes.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/hooks.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/router.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/crypto.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/inline-critical-css.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/lru-cache.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/app.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/private_export.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/i18n.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/app-engine.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/handler.mjs"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Manages server-side assets.\n */\nexport class ServerAssets {\n manifest;\n /**\n * Creates an instance of ServerAsset.\n *\n * @param manifest - The manifest containing the server assets.\n */\n constructor(manifest) {\n this.manifest = manifest;\n }\n /**\n * Retrieves the content of a server-side asset using its path.\n *\n * @param path - The path to the server asset within the manifest.\n * @returns The server asset associated with the provided path, as a `ServerAsset` object.\n * @throws Error - Throws an error if the asset does not exist.\n */\n getServerAsset(path) {\n const asset = this.manifest.assets[path];\n if (!asset) {\n throw new Error(`Server asset '${path}' does not exist.`);\n }\n return asset;\n }\n /**\n * Checks if a specific server-side asset exists.\n *\n * @param path - The path to the server asset.\n * @returns A boolean indicating whether the asset exists.\n */\n hasServerAsset(path) {\n return !!this.manifest.assets[path];\n }\n /**\n * Retrieves the asset for 'index.server.html'.\n *\n * @returns The `ServerAsset` object for 'index.server.html'.\n * @throws Error - Throws an error if 'index.server.html' does not exist.\n */\n getIndexServerHtml() {\n return this.getServerAsset('index.server.html');\n }\n}\n//# sourceMappingURL=assets.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { ɵConsole } from '@angular/core';\n/**\n * Custom implementation of the Angular Console service that filters out specific log messages.\n *\n * This class extends the internal Angular `ɵConsole` class to provide customized logging behavior.\n * It overrides the `log` method to suppress logs that match certain predefined messages.\n */\nexport class Console extends ɵConsole {\n /**\n * A set of log messages that should be ignored and not printed to the console.\n */\n ignoredLogs = new Set(['Angular is running in development mode.']);\n /**\n * Logs a message to the console if it is not in the set of ignored messages.\n *\n * @param message - The message to log to the console.\n *\n * This method overrides the `log` method of the `ɵConsole` class. It checks if the\n * message is in the `ignoredLogs` set. If it is not, it delegates the logging to\n * the parent class's `log` method. Otherwise, the message is suppressed.\n */\n log(message) {\n if (!this.ignoredLogs.has(message)) {\n super.log(message);\n }\n }\n}\n//# sourceMappingURL=console.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * The Angular app manifest object.\n * This is used internally to store the current Angular app manifest.\n */\nlet angularAppManifest;\n/**\n * Sets the Angular app manifest.\n *\n * @param manifest - The manifest object to set for the Angular application.\n */\nexport function setAngularAppManifest(manifest) {\n angularAppManifest = manifest;\n}\n/**\n * Gets the Angular app manifest.\n *\n * @returns The Angular app manifest.\n * @throws Will throw an error if the Angular app manifest is not set.\n */\nexport function getAngularAppManifest() {\n if (!angularAppManifest) {\n throw new Error('Angular app manifest is not set. ' +\n `Please ensure you are using the '@angular/build:application' builder to build your server application.`);\n }\n return angularAppManifest;\n}\n/**\n * The Angular app engine manifest object.\n * This is used internally to store the current Angular app engine manifest.\n */\nlet angularAppEngineManifest;\n/**\n * Sets the Angular app engine manifest.\n *\n * @param manifest - The engine manifest object to set.\n */\nexport function setAngularAppEngineManifest(manifest) {\n angularAppEngineManifest = manifest;\n}\n/**\n * Gets the Angular app engine manifest.\n *\n * @returns The Angular app engine manifest.\n * @throws Will throw an error if the Angular app engine manifest is not set.\n */\nexport function getAngularAppEngineManifest() {\n if (!angularAppEngineManifest) {\n throw new Error('Angular app engine manifest is not set. ' +\n `Please ensure you are using the '@angular/build:application' builder to build your server application.`);\n }\n return angularAppEngineManifest;\n}\n//# sourceMappingURL=manifest.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Removes the trailing slash from a URL if it exists.\n *\n * @param url - The URL string from which to remove the trailing slash.\n * @returns The URL string without a trailing slash.\n *\n * @example\n * ```js\n * stripTrailingSlash('path/'); // 'path'\n * stripTrailingSlash('/path'); // '/path'\n * stripTrailingSlash('/'); // '/'\n * stripTrailingSlash(''); // ''\n * ```\n */\nexport function stripTrailingSlash(url) {\n // Check if the last character of the URL is a slash\n return url.length > 1 && url[url.length - 1] === '/' ? url.slice(0, -1) : url;\n}\n/**\n * Removes the leading slash from a URL if it exists.\n *\n * @param url - The URL string from which to remove the leading slash.\n * @returns The URL string without a leading slash.\n *\n * @example\n * ```js\n * stripLeadingSlash('/path'); // 'path'\n * stripLeadingSlash('/path/'); // 'path/'\n * stripLeadingSlash('/'); // '/'\n * stripLeadingSlash(''); // ''\n * ```\n */\nexport function stripLeadingSlash(url) {\n // Check if the first character of the URL is a slash\n return url.length > 1 && url[0] === '/' ? url.slice(1) : url;\n}\n/**\n * Adds a leading slash to a URL if it does not already have one.\n *\n * @param url - The URL string to which the leading slash will be added.\n * @returns The URL string with a leading slash.\n *\n * @example\n * ```js\n * addLeadingSlash('path'); // '/path'\n * addLeadingSlash('/path'); // '/path'\n * ```\n */\nexport function addLeadingSlash(url) {\n // Check if the URL already starts with a slash\n return url[0] === '/' ? url : `/${url}`;\n}\n/**\n * Adds a trailing slash to a URL if it does not already have one.\n *\n * @param url - The URL string to which the trailing slash will be added.\n * @returns The URL string with a trailing slash.\n *\n * @example\n * ```js\n * addTrailingSlash('path'); // 'path/'\n * addTrailingSlash('path/'); // 'path/'\n * ```\n */\nexport function addTrailingSlash(url) {\n // Check if the URL already end with a slash\n return url[url.length - 1] === '/' ? url : `${url}/`;\n}\n/**\n * Joins URL parts into a single URL string.\n *\n * This function takes multiple URL segments, normalizes them by removing leading\n * and trailing slashes where appropriate, and then joins them into a single URL.\n *\n * @param parts - The parts of the URL to join. Each part can be a string with or without slashes.\n * @returns The joined URL string, with normalized slashes.\n *\n * @example\n * ```js\n * joinUrlParts('path/', '/to/resource'); // '/path/to/resource'\n * joinUrlParts('/path/', 'to/resource'); // '/path/to/resource'\n * joinUrlParts('', ''); // '/'\n * ```\n */\nexport function joinUrlParts(...parts) {\n const normalizeParts = [];\n for (const part of parts) {\n if (part === '') {\n // Skip any empty parts\n continue;\n }\n let normalizedPart = part;\n if (part[0] === '/') {\n normalizedPart = normalizedPart.slice(1);\n }\n if (part[part.length - 1] === '/') {\n normalizedPart = normalizedPart.slice(0, -1);\n }\n if (normalizedPart !== '') {\n normalizeParts.push(normalizedPart);\n }\n }\n return addLeadingSlash(normalizeParts.join('/'));\n}\n/**\n * Strips `/index.html` from the end of a URL's path, if present.\n *\n * This function is used to convert URLs pointing to an `index.html` file into their directory\n * equivalents. For example, it transforms a URL like `http://www.example.com/page/index.html`\n * into `http://www.example.com/page`.\n *\n * @param url - The URL object to process.\n * @returns A new URL object with `/index.html` removed from the path, if it was present.\n *\n * @example\n * ```typescript\n * const originalUrl = new URL('http://www.example.com/page/index.html');\n * const cleanedUrl = stripIndexHtmlFromURL(originalUrl);\n * console.log(cleanedUrl.href); // Output: 'http://www.example.com/page'\n * ```\n */\nexport function stripIndexHtmlFromURL(url) {\n if (url.pathname.endsWith('/index.html')) {\n const modifiedURL = new URL(url);\n // Remove '/index.html' from the pathname\n modifiedURL.pathname = modifiedURL.pathname.slice(0, /** '/index.html'.length */ -11);\n return modifiedURL;\n }\n return url;\n}\n/**\n * Resolves `*` placeholders in a path template by mapping them to corresponding segments\n * from a base path. This is useful for constructing paths dynamically based on a given base path.\n *\n * The function processes the `toPath` string, replacing each `*` placeholder with\n * the corresponding segment from the `fromPath`. If the `toPath` contains no placeholders,\n * it is returned as-is. Invalid `toPath` formats (not starting with `/`) will throw an error.\n *\n * @param toPath - A path template string that may contain `*` placeholders. Each `*` is replaced\n * by the corresponding segment from the `fromPath`. Static paths (e.g., `/static/path`) are returned\n * directly without placeholder replacement.\n * @param fromPath - A base path string, split into segments, that provides values for\n * replacing `*` placeholders in the `toPath`.\n * @returns A resolved path string with `*` placeholders replaced by segments from the `fromPath`,\n * or the `toPath` returned unchanged if it contains no placeholders.\n *\n * @throws If the `toPath` does not start with a `/`, indicating an invalid path format.\n *\n * @example\n * ```typescript\n * // Example with placeholders resolved\n * const resolvedPath = buildPathWithParams('/*\\/details', '/123/abc');\n * console.log(resolvedPath); // Outputs: '/123/details'\n *\n * // Example with a static path\n * const staticPath = buildPathWithParams('/static/path', '/base/unused');\n * console.log(staticPath); // Outputs: '/static/path'\n * ```\n */\nexport function buildPathWithParams(toPath, fromPath) {\n if (toPath[0] !== '/') {\n throw new Error(`Invalid toPath: The string must start with a '/'. Received: '${toPath}'`);\n }\n if (fromPath[0] !== '/') {\n throw new Error(`Invalid fromPath: The string must start with a '/'. Received: '${fromPath}'`);\n }\n if (!toPath.includes('/*')) {\n return toPath;\n }\n const fromPathParts = fromPath.split('/');\n const toPathParts = toPath.split('/');\n const resolvedParts = toPathParts.map((part, index) => toPathParts[index] === '*' ? fromPathParts[index] : part);\n return joinUrlParts(...resolvedParts);\n}\n//# sourceMappingURL=url.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { ɵConsole } from '@angular/core';\nimport { ɵSERVER_CONTEXT as SERVER_CONTEXT, renderApplication, renderModule, } from '@angular/platform-server';\nimport { Console } from '../console';\nimport { stripIndexHtmlFromURL } from './url';\n/**\n * Renders an Angular application or module to an HTML string.\n *\n * This function determines whether the provided `bootstrap` value is an Angular module\n * or a bootstrap function and calls the appropriate rendering method (`renderModule` or\n * `renderApplication`) based on that determination.\n *\n * @param html - The HTML string to be used as the initial document content.\n * @param bootstrap - Either an Angular module type or a function that returns a promise\n * resolving to an `ApplicationRef`.\n * @param url - The URL of the application. This is used for server-side rendering to\n * correctly handle route-based rendering.\n * @param platformProviders - An array of platform providers to be used during the\n * rendering process.\n * @param serverContext - A string representing the server context, used to provide additional\n * context or metadata during server-side rendering.\n * @returns A promise that resolves to a string containing the rendered HTML.\n */\nexport function renderAngular(html, bootstrap, url, platformProviders, serverContext) {\n const providers = [\n {\n provide: SERVER_CONTEXT,\n useValue: serverContext,\n },\n {\n // An Angular Console Provider that does not print a set of predefined logs.\n provide: ɵConsole,\n // Using `useClass` would necessitate decorating `Console` with `@Injectable`,\n // which would require switching from `ts_library` to `ng_module`. This change\n // would also necessitate various patches of `@angular/bazel` to support ESM.\n useFactory: () => new Console(),\n },\n ...platformProviders,\n ];\n // A request to `http://www.example.com/page/index.html` will render the Angular route corresponding to `http://www.example.com/page`.\n const urlToRender = stripIndexHtmlFromURL(url).toString();\n return isNgModule(bootstrap)\n ? renderModule(bootstrap, {\n url: urlToRender,\n document: html,\n extraProviders: providers,\n })\n : renderApplication(bootstrap, {\n url: urlToRender,\n document: html,\n platformProviders: providers,\n });\n}\n/**\n * Type guard to determine if a given value is an Angular module.\n * Angular modules are identified by the presence of the `ɵmod` static property.\n * This function helps distinguish between Angular modules and bootstrap functions.\n *\n * @param value - The value to be checked.\n * @returns True if the value is an Angular module (i.e., it has the `ɵmod` property), false otherwise.\n */\nexport function isNgModule(value) {\n return 'ɵmod' in value;\n}\n//# sourceMappingURL=ng.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Creates a promise that resolves with the result of the provided `promise` or rejects with an\n * `AbortError` if the `AbortSignal` is triggered before the promise resolves.\n *\n * @param promise - The promise to monitor for completion.\n * @param signal - An `AbortSignal` used to monitor for an abort event. If the signal is aborted,\n * the returned promise will reject.\n * @param errorMessagePrefix - A custom message prefix to include in the error message when the operation is aborted.\n * @returns A promise that either resolves with the value of the provided `promise` or rejects with\n * an `AbortError` if the `AbortSignal` is triggered.\n *\n * @throws {AbortError} If the `AbortSignal` is triggered before the `promise` resolves.\n */\nexport function promiseWithAbort(promise, signal, errorMessagePrefix) {\n return new Promise((resolve, reject) => {\n const abortHandler = () => {\n reject(new DOMException(`${errorMessagePrefix} was aborted.\\n${signal.reason}`, 'AbortError'));\n };\n // Check for abort signal\n if (signal.aborted) {\n abortHandler();\n return;\n }\n signal.addEventListener('abort', abortHandler, { once: true });\n promise\n .then(resolve)\n .catch(reject)\n .finally(() => {\n signal.removeEventListener('abort', abortHandler);\n });\n });\n}\n//# sourceMappingURL=promise.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { InjectionToken, makeEnvironmentProviders } from '@angular/core';\n/**\n * Different rendering modes for server routes.\n * @see {@link provideServerRoutesConfig}\n * @see {@link ServerRoute}\n * @developerPreview\n */\nexport var RenderMode;\n(function (RenderMode) {\n /** Server-Side Rendering (SSR) mode, where content is rendered on the server for each request. */\n RenderMode[RenderMode[\"Server\"] = 0] = \"Server\";\n /** Client-Side Rendering (CSR) mode, where content is rendered on the client side in the browser. */\n RenderMode[RenderMode[\"Client\"] = 1] = \"Client\";\n /** Static Site Generation (SSG) mode, where content is pre-rendered at build time and served as static files. */\n RenderMode[RenderMode[\"Prerender\"] = 2] = \"Prerender\";\n})(RenderMode || (RenderMode = {}));\n/**\n * Defines the fallback strategies for Static Site Generation (SSG) routes when a pre-rendered path is not available.\n * This is particularly relevant for routes with parameterized URLs where some paths might not be pre-rendered at build time.\n * @see {@link ServerRoutePrerenderWithParams}\n * @developerPreview\n */\nexport var PrerenderFallback;\n(function (PrerenderFallback) {\n /**\n * Fallback to Server-Side Rendering (SSR) if the pre-rendered path is not available.\n * This strategy dynamically generates the page on the server at request time.\n */\n PrerenderFallback[PrerenderFallback[\"Server\"] = 0] = \"Server\";\n /**\n * Fallback to Client-Side Rendering (CSR) if the pre-rendered path is not available.\n * This strategy allows the page to be rendered on the client side.\n */\n PrerenderFallback[PrerenderFallback[\"Client\"] = 1] = \"Client\";\n /**\n * No fallback; if the path is not pre-rendered, the server will not handle the request.\n * This means the application will not provide any response for paths that are not pre-rendered.\n */\n PrerenderFallback[PrerenderFallback[\"None\"] = 2] = \"None\";\n})(PrerenderFallback || (PrerenderFallback = {}));\n/**\n * Token for providing the server routes configuration.\n * @internal\n */\nexport const SERVER_ROUTES_CONFIG = new InjectionToken('SERVER_ROUTES_CONFIG');\n/**\n/**\n * Sets up the necessary providers for configuring server routes.\n * This function accepts an array of server routes and optional configuration\n * options, returning an `EnvironmentProviders` object that encapsulates\n * the server routes and configuration settings.\n *\n * @param routes - An array of server routes to be provided.\n * @param options - (Optional) An object containing additional configuration options for server routes.\n * @returns An `EnvironmentProviders` instance with the server routes configuration.\n *\n * @see {@link ServerRoute}\n * @see {@link ServerRoutesConfigOptions}\n * @developerPreview\n */\nexport function provideServerRoutesConfig(routes, options) {\n if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n throw new Error(`The 'provideServerRoutesConfig' function should not be invoked within the browser portion of the application.`);\n }\n return makeEnvironmentProviders([\n {\n provide: SERVER_ROUTES_CONFIG,\n useValue: { routes, ...options },\n },\n ]);\n}\n//# sourceMappingURL=route-config.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { stripTrailingSlash } from '../utils/url';\n/**\n * A route tree implementation that supports efficient route matching, including support for wildcard routes.\n * This structure is useful for organizing and retrieving routes in a hierarchical manner,\n * enabling complex routing scenarios with nested paths.\n *\n * @typeParam AdditionalMetadata - Type of additional metadata that can be associated with route nodes.\n */\nexport class RouteTree {\n /**\n * The root node of the route tree.\n * All routes are stored and accessed relative to this root node.\n */\n root = this.createEmptyRouteTreeNode('');\n /**\n * A counter that tracks the order of route insertion.\n * This ensures that routes are matched in the order they were defined,\n * with earlier routes taking precedence.\n */\n insertionIndexCounter = 0;\n /**\n * Inserts a new route into the route tree.\n * The route is broken down into segments, and each segment is added to the tree.\n * Parameterized segments (e.g., :id) are normalized to wildcards (*) for matching purposes.\n *\n * @param route - The route path to insert into the tree.\n * @param metadata - Metadata associated with the route, excluding the route path itself.\n */\n insert(route, metadata) {\n let node = this.root;\n const segments = this.getPathSegments(route);\n const normalizedSegments = [];\n for (const segment of segments) {\n // Replace parameterized segments (e.g., :id) with a wildcard (*) for matching\n const normalizedSegment = segment[0] === ':' ? '*' : segment;\n let childNode = node.children.get(normalizedSegment);\n if (!childNode) {\n childNode = this.createEmptyRouteTreeNode(normalizedSegment);\n node.children.set(normalizedSegment, childNode);\n }\n node = childNode;\n normalizedSegments.push(normalizedSegment);\n }\n // At the leaf node, store the full route and its associated metadata\n node.metadata = {\n ...metadata,\n route: normalizedSegments.join('/'),\n };\n node.insertionIndex = this.insertionIndexCounter++;\n }\n /**\n * Matches a given route against the route tree and returns the best matching route's metadata.\n * The best match is determined by the lowest insertion index, meaning the earliest defined route\n * takes precedence.\n *\n * @param route - The route path to match against the route tree.\n * @returns The metadata of the best matching route or `undefined` if no match is found.\n */\n match(route) {\n const segments = this.getPathSegments(route);\n return this.traverseBySegments(segments)?.metadata;\n }\n /**\n * Converts the route tree into a serialized format representation.\n * This method converts the route tree into an array of metadata objects that describe the structure of the tree.\n * The array represents the routes in a nested manner where each entry includes the route and its associated metadata.\n *\n * @returns An array of `RouteTreeNodeMetadata` objects representing the route tree structure.\n * Each object includes the `route` and associated metadata of a route.\n */\n toObject() {\n return Array.from(this.traverse());\n }\n /**\n * Constructs a `RouteTree` from an object representation.\n * This method is used to recreate a `RouteTree` instance from an array of metadata objects.\n * The array should be in the format produced by `toObject`, allowing for the reconstruction of the route tree\n * with the same routes and metadata.\n *\n * @param value - An array of `RouteTreeNodeMetadata` objects that represent the serialized format of the route tree.\n * Each object should include a `route` and its associated metadata.\n * @returns A new `RouteTree` instance constructed from the provided metadata objects.\n */\n static fromObject(value) {\n const tree = new RouteTree();\n for (const { route, ...metadata } of value) {\n tree.insert(route, metadata);\n }\n return tree;\n }\n /**\n * A generator function that recursively traverses the route tree and yields the metadata of each node.\n * This allows for easy and efficient iteration over all nodes in the tree.\n *\n * @param node - The current node to start the traversal from. Defaults to the root node of the tree.\n */\n *traverse(node = this.root) {\n if (node.metadata) {\n yield node.metadata;\n }\n for (const childNode of node.children.values()) {\n yield* this.traverse(childNode);\n }\n }\n /**\n * Extracts the path segments from a given route string.\n *\n * @param route - The route string from which to extract segments.\n * @returns An array of path segments.\n */\n getPathSegments(route) {\n return stripTrailingSlash(route).split('/');\n }\n /**\n * Recursively traverses the route tree from a given node, attempting to match the remaining route segments.\n * If the node is a leaf node (no more segments to match) and contains metadata, the node is yielded.\n *\n * This function prioritizes exact segment matches first, followed by wildcard matches (`*`),\n * and finally deep wildcard matches (`**`) that consume all segments.\n *\n * @param remainingSegments - The remaining segments of the route path to match.\n * @param node - The current node in the route tree to start traversal from.\n *\n * @returns The node that best matches the remaining segments or `undefined` if no match is found.\n */\n traverseBySegments(remainingSegments, node = this.root) {\n const { metadata, children } = node;\n // If there are no remaining segments and the node has metadata, return this node\n if (!remainingSegments?.length) {\n if (metadata) {\n return node;\n }\n return;\n }\n // If the node has no children, end the traversal\n if (!children.size) {\n return;\n }\n const [segment, ...restSegments] = remainingSegments;\n let currentBestMatchNode;\n // 1. Exact segment match\n const exactMatchNode = node.children.get(segment);\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, this.traverseBySegments(restSegments, exactMatchNode));\n // 2. Wildcard segment match (`*`)\n const wildcardNode = node.children.get('*');\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, this.traverseBySegments(restSegments, wildcardNode));\n // 3. Deep wildcard segment match (`**`)\n const deepWildcardNode = node.children.get('**');\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, deepWildcardNode);\n return currentBestMatchNode;\n }\n /**\n * Compares two nodes and returns the node with higher priority based on insertion index.\n * A node with a lower insertion index is prioritized as it was defined earlier.\n *\n * @param currentBestMatchNode - The current best match node.\n * @param candidateNode - The node being evaluated for higher priority based on insertion index.\n * @returns The node with higher priority (i.e., lower insertion index). If one of the nodes is `undefined`, the other node is returned.\n */\n getHigherPriorityNode(currentBestMatchNode, candidateNode) {\n if (!candidateNode) {\n return currentBestMatchNode;\n }\n if (!currentBestMatchNode) {\n return candidateNode;\n }\n return candidateNode.insertionIndex < currentBestMatchNode.insertionIndex\n ? candidateNode\n : currentBestMatchNode;\n }\n /**\n * Creates an empty route tree node with the specified segment.\n * This helper function is used during the tree construction.\n *\n * @param segment - The route segment that this node represents.\n * @returns A new, empty route tree node.\n */\n createEmptyRouteTreeNode(segment) {\n return {\n segment,\n insertionIndex: -1,\n children: new Map(),\n };\n }\n}\n//# sourceMappingURL=route-tree.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { APP_BASE_HREF, PlatformLocation } from '@angular/common';\nimport { ApplicationRef, Compiler, runInInjectionContext, ɵConsole } from '@angular/core';\nimport { INITIAL_CONFIG, platformServer } from '@angular/platform-server';\nimport { Router, ɵloadChildren as loadChildrenHelper } from '@angular/router';\nimport { ServerAssets } from '../assets';\nimport { Console } from '../console';\nimport { getAngularAppManifest } from '../manifest';\nimport { isNgModule } from '../utils/ng';\nimport { promiseWithAbort } from '../utils/promise';\nimport { addTrailingSlash, joinUrlParts, stripLeadingSlash } from '../utils/url';\nimport { PrerenderFallback, RenderMode, SERVER_ROUTES_CONFIG, } from './route-config';\nimport { RouteTree } from './route-tree';\n/**\n * Regular expression to match segments preceded by a colon in a string.\n */\nconst URL_PARAMETER_REGEXP = /(?<!\\\\):([^/]+)/g;\n/**\n * An set of HTTP status codes that are considered valid for redirect responses.\n */\nconst VALID_REDIRECT_RESPONSE_CODES = new Set([301, 302, 303, 307, 308]);\n/**\n * Traverses an array of route configurations to generate route tree node metadata.\n *\n * This function processes each route and its children, handling redirects, SSG (Static Site Generation) settings,\n * and lazy-loaded routes. It yields route metadata for each route and its potential variants.\n *\n * @param options - The configuration options for traversing routes.\n * @returns An async iterable iterator yielding either route tree node metadata or an error object with an error message.\n */\nasync function* traverseRoutesConfig(options) {\n const { routes, compiler, parentInjector, parentRoute, serverConfigRouteTree, invokeGetPrerenderParams, includePrerenderFallbackRoutes, } = options;\n for (const route of routes) {\n try {\n const { path = '', redirectTo, loadChildren, children } = route;\n const currentRoutePath = joinUrlParts(parentRoute, path);\n // Get route metadata from the server config route tree, if available\n let matchedMetaData;\n if (serverConfigRouteTree) {\n matchedMetaData = serverConfigRouteTree.match(currentRoutePath);\n if (!matchedMetaData) {\n yield {\n error: `The '${stripLeadingSlash(currentRoutePath)}' route does not match any route defined in the server routing configuration. ` +\n 'Please ensure this route is added to the server routing configuration.',\n };\n continue;\n }\n matchedMetaData.presentInClientRouter = true;\n }\n const metadata = {\n renderMode: RenderMode.Prerender,\n ...matchedMetaData,\n // Match Angular router behavior\n // ['one', 'two', ''] -> 'one/two/'\n // ['one', 'two', 'three'] -> 'one/two/three'\n route: path === '' ? addTrailingSlash(currentRoutePath) : currentRoutePath,\n };\n delete metadata.presentInClientRouter;\n if (metadata.renderMode === RenderMode.Prerender) {\n // Handle SSG routes\n yield* handleSSGRoute(typeof redirectTo === 'string' ? redirectTo : undefined, metadata, parentInjector, invokeGetPrerenderParams, includePrerenderFallbackRoutes);\n }\n else if (typeof redirectTo === 'string') {\n // Handle redirects\n if (metadata.status && !VALID_REDIRECT_RESPONSE_CODES.has(metadata.status)) {\n yield {\n error: `The '${metadata.status}' status code is not a valid redirect response code. ` +\n `Please use one of the following redirect response codes: ${[...VALID_REDIRECT_RESPONSE_CODES.values()].join(', ')}.`,\n };\n continue;\n }\n yield { ...metadata, redirectTo: resolveRedirectTo(metadata.route, redirectTo) };\n }\n else {\n yield metadata;\n }\n // Recursively process child routes\n if (children?.length) {\n yield* traverseRoutesConfig({\n ...options,\n routes: children,\n parentRoute: currentRoutePath,\n });\n }\n // Load and process lazy-loaded child routes\n if (loadChildren) {\n const loadedChildRoutes = await loadChildrenHelper(route, compiler, parentInjector).toPromise();\n if (loadedChildRoutes) {\n const { routes: childRoutes, injector = parentInjector } = loadedChildRoutes;\n yield* traverseRoutesConfig({\n ...options,\n routes: childRoutes,\n parentInjector: injector,\n parentRoute: currentRoutePath,\n });\n }\n }\n }\n catch (error) {\n yield {\n error: `Error processing route '${stripLeadingSlash(route.path ?? '')}': ${error.message}`,\n };\n }\n }\n}\n/**\n * Handles SSG (Static Site Generation) routes by invoking `getPrerenderParams` and yielding\n * all parameterized paths, returning any errors encountered.\n *\n * @param redirectTo - Optional path to redirect to, if specified.\n * @param metadata - The metadata associated with the route tree node.\n * @param parentInjector - The dependency injection container for the parent route.\n * @param invokeGetPrerenderParams - A flag indicating whether to invoke the `getPrerenderParams` function.\n * @param includePrerenderFallbackRoutes - A flag indicating whether to include fallback routes in the result.\n * @returns An async iterable iterator that yields route tree node metadata for each SSG path or errors.\n */\nasync function* handleSSGRoute(redirectTo, metadata, parentInjector, invokeGetPrerenderParams, includePrerenderFallbackRoutes) {\n if (metadata.renderMode !== RenderMode.Prerender) {\n throw new Error(`'handleSSGRoute' was called for a route which rendering mode is not prerender.`);\n }\n const { route: currentRoutePath, fallback, ...meta } = metadata;\n const getPrerenderParams = 'getPrerenderParams' in meta ? meta.getPrerenderParams : undefined;\n if ('getPrerenderParams' in meta) {\n delete meta['getPrerenderParams'];\n }\n if (redirectTo !== undefined) {\n meta.redirectTo = resolveRedirectTo(currentRoutePath, redirectTo);\n }\n if (!URL_PARAMETER_REGEXP.test(currentRoutePath)) {\n // Route has no parameters\n yield {\n ...meta,\n route: currentRoutePath,\n };\n return;\n }\n if (invokeGetPrerenderParams) {\n if (!getPrerenderParams) {\n yield {\n error: `The '${stripLeadingSlash(currentRoutePath)}' route uses prerendering and includes parameters, but 'getPrerenderParams' ` +\n `is missing. Please define 'getPrerenderParams' function for this route in your server routing configuration ` +\n `or specify a different 'renderMode'.`,\n };\n return;\n }\n const parameters = await runInInjectionContext(parentInjector, () => getPrerenderParams());\n try {\n for (const params of parameters) {\n const routeWithResolvedParams = currentRoutePath.replace(URL_PARAMETER_REGEXP, (match) => {\n const parameterName = match.slice(1);\n const value = params[parameterName];\n if (typeof value !== 'string') {\n throw new Error(`The 'getPrerenderParams' function defined for the '${stripLeadingSlash(currentRoutePath)}' route ` +\n `returned a non-string value for parameter '${parameterName}'. ` +\n `Please make sure the 'getPrerenderParams' function returns values for all parameters ` +\n 'specified in this route.');\n }\n return value;\n });\n yield {\n ...meta,\n route: routeWithResolvedParams,\n redirectTo: redirectTo === undefined\n ? undefined\n : resolveRedirectTo(routeWithResolvedParams, redirectTo),\n };\n }\n }\n catch (error) {\n yield { error: `${error.message}` };\n return;\n }\n }\n // Handle fallback render modes\n if (includePrerenderFallbackRoutes &&\n (fallback !== PrerenderFallback.None || !invokeGetPrerenderParams)) {\n yield {\n ...meta,\n route: currentRoutePath,\n renderMode: fallback === PrerenderFallback.Client ? RenderMode.Client : RenderMode.Server,\n };\n }\n}\n/**\n * Resolves the `redirectTo` property for a given route.\n *\n * This function processes the `redirectTo` property to ensure that it correctly\n * resolves relative to the current route path. If `redirectTo` is an absolute path,\n * it is returned as is. If it is a relative path, it is resolved based on the current route path.\n *\n * @param routePath - The current route path.\n * @param redirectTo - The target path for redirection.\n * @returns The resolved redirect path as a string.\n */\nfunction resolveRedirectTo(routePath, redirectTo) {\n if (redirectTo[0] === '/') {\n // If the redirectTo path is absolute, return it as is.\n return redirectTo;\n }\n // Resolve relative redirectTo based on the current route path.\n const segments = routePath.replace(URL_PARAMETER_REGEXP, '*').split('/');\n segments.pop(); // Remove the last segment to make it relative.\n return joinUrlParts(...segments, redirectTo);\n}\n/**\n * Builds a server configuration route tree from the given server routes configuration.\n *\n * @param serverRoutesConfig - The server routes to be used for configuration.\n\n * @returns An object containing:\n * - `serverConfigRouteTree`: A populated `RouteTree` instance, which organizes the server routes\n * along with their additional metadata.\n * - `errors`: An array of strings that list any errors encountered during the route tree construction\n * process, such as invalid paths.\n */\nfunction buildServerConfigRouteTree({ routes, appShellRoute }) {\n const serverRoutes = [...routes];\n if (appShellRoute !== undefined) {\n serverRoutes.unshift({\n path: appShellRoute,\n renderMode: RenderMode.Prerender,\n });\n }\n const serverConfigRouteTree = new RouteTree();\n const errors = [];\n for (const { path, ...metadata } of serverRoutes) {\n if (path[0] === '/') {\n errors.push(`Invalid '${path}' route configuration: the path cannot start with a slash.`);\n continue;\n }\n serverConfigRouteTree.insert(path, metadata);\n }\n return { serverConfigRouteTree, errors };\n}\n/**\n * Retrieves routes from the given Angular application.\n *\n * This function initializes an Angular platform, bootstraps the application or module,\n * and retrieves routes from the Angular router configuration. It handles both module-based\n * and function-based bootstrapping. It yields the resulting routes as `RouteTreeNodeMetadata` objects or errors.\n *\n * @param bootstrap - A function that returns a promise resolving to an `ApplicationRef` or an Angular module to bootstrap.\n * @param document - The initial HTML document used for server-side rendering.\n * This document is necessary to render the application on the server.\n * @param url - The URL for server-side rendering. The URL is used to configure `ServerPlatformLocation`. This configuration is crucial\n * for ensuring that API requests for relative paths succeed, which is essential for accurate route extraction.\n * @param invokeGetPrerenderParams - A boolean flag indicating whether to invoke `getPrerenderParams` for parameterized SSG routes\n * to handle prerendering paths. Defaults to `false`.\n * @param includePrerenderFallbackRoutes - A flag indicating whether to include fallback routes in the result. Defaults to `true`.\n *\n * @returns A promise that resolves to an object of type `AngularRouterConfigResult` or errors.\n */\nexport async function getRoutesFromAngularRouterConfig(bootstrap, document, url, invokeGetPrerenderParams = false, includePrerenderFallbackRoutes = true) {\n const { protocol, host } = url;\n // Create and initialize the Angular platform for server-side rendering.\n const platformRef = platformServer([\n {\n provide: INITIAL_CONFIG,\n useValue: { document, url: `${protocol}//${host}/` },\n },\n {\n provide: ɵConsole,\n useFactory: () => new Console(),\n },\n ]);\n try {\n let applicationRef;\n if (isNgModule(bootstrap)) {\n const moduleRef = await platformRef.bootstrapModule(bootstrap);\n applicationRef = moduleRef.injector.get(ApplicationRef);\n }\n else {\n applicationRef = await bootstrap();\n }\n // Wait until the application is stable.\n await applicationRef.whenStable();\n const injector = applicationRef.injector;\n const router = injector.get(Router);\n const routesResults = [];\n const errors = [];\n let baseHref = injector.get(APP_BASE_HREF, null, { optional: true }) ??\n injector.get(PlatformLocation).getBaseHrefFromDOM();\n if (baseHref.startsWith('./')) {\n baseHref = baseHref.slice(2);\n }\n const compiler = injector.get(Compiler);\n const serverRoutesConfig = injector.get(SERVER_ROUTES_CONFIG, null, { optional: true });\n let serverConfigRouteTree;\n if (serverRoutesConfig) {\n const result = buildServerConfigRouteTree(serverRoutesConfig);\n serverConfigRouteTree = result.serverConfigRouteTree;\n errors.push(...result.errors);\n }\n if (errors.length) {\n return {\n baseHref,\n routes: routesResults,\n errors,\n };\n }\n if (router.config.length) {\n // Retrieve all routes from the Angular router configuration.\n const traverseRoutes = traverseRoutesConfig({\n routes: router.config,\n compiler,\n parentInjector: injector,\n parentRoute: '',\n serverConfigRouteTree,\n invokeGetPrerenderParams,\n includePrerenderFallbackRoutes,\n });\n for await (const result of traverseRoutes) {\n if ('error' in result) {\n errors.push(result.error);\n }\n else {\n routesResults.push(result);\n }\n }\n if (serverConfigRouteTree) {\n for (const { route, presentInClientRouter } of serverConfigRouteTree.traverse()) {\n if (presentInClientRouter || route === '**') {\n // Skip if matched or it's the catch-all route.\n continue;\n }\n errors.push(`The '${route}' server route does not match any routes defined in the Angular ` +\n `routing configuration (typically provided as a part of the 'provideRouter' call). ` +\n 'Please make sure that the mentioned server route is present in the Angular routing configuration.');\n }\n }\n }\n else {\n const rootRouteMetadata = serverConfigRouteTree?.match('') ?? {\n route: '',\n renderMode: RenderMode.Prerender,\n };\n routesResults.push({\n ...rootRouteMetadata,\n // Matched route might be `/*` or `/**`, which would make Angular serve all routes rather than just `/`.\n // So we limit to just `/` for the empty app router case.\n route: '',\n });\n }\n return {\n baseHref,\n routes: routesResults,\n errors,\n appShellRoute: serverRoutesConfig?.appShellRoute,\n };\n }\n finally {\n platformRef.destroy();\n }\n}\n/**\n * Asynchronously extracts routes from the Angular application configuration\n * and creates a `RouteTree` to manage server-side routing.\n *\n * @param options - An object containing the following options:\n * - `url`: The URL for server-side rendering. The URL is used to configure `ServerPlatformLocation`. This configuration is crucial\n * for ensuring that API requests for relative paths succeed, which is essential for accurate route extraction.\n * See:\n * - https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51\n * - https://github.com/angular/angular/blob/6882cc7d9eed26d3caeedca027452367ba25f2b9/packages/platform-server/src/http.ts#L44\n * - `manifest`: An optional `AngularAppManifest` that contains the application's routing and configuration details.\n * If not provided, the default manifest is retrieved using `getAngularAppManifest()`.\n * - `invokeGetPrerenderParams`: A boolean flag indicating whether to invoke `getPrerenderParams` for parameterized SSG routes\n * to handle prerendering paths. Defaults to `false`.\n * - `includePrerenderFallbackRoutes`: A flag indicating whether to include fallback routes in the result. Defaults to `true`.\n * - `signal`: An optional `AbortSignal` that can be used to abort the operation.\n *\n * @returns A promise that resolves to an object containing:\n * - `routeTree`: A populated `RouteTree` containing all extracted routes from the Angular application.\n * - `appShellRoute`: The specified route for the app-shell, if configured.\n * - `errors`: An array of strings representing any errors encountered during the route extraction process.\n */\nexport function extractRoutesAndCreateRouteTree(options) {\n const { url, manifest = getAngularAppManifest(), invokeGetPrerenderParams = false, includePrerenderFallbackRoutes = true, signal, } = options;\n async function extract() {\n const routeTree = new RouteTree();\n const document = await new ServerAssets(manifest).getIndexServerHtml().text();\n const bootstrap = await manifest.bootstrap();\n const { baseHref, appShellRoute, routes, errors } = await getRoutesFromAngularRouterConfig(bootstrap, document, url, invokeGetPrerenderParams, includePrerenderFallbackRoutes);\n for (const { route, ...metadata } of routes) {\n if (metadata.redirectTo !== undefined) {\n metadata.redirectTo = joinUrlParts(baseHref, metadata.redirectTo);\n }\n // Remove undefined fields\n // Helps avoid unnecessary test updates\n for (const [key, value] of Object.entries(metadata)) {\n if (value === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n delete metadata[key];\n }\n }\n const fullRoute = joinUrlParts(baseHref, route);\n routeTree.insert(fullRoute, metadata);\n }\n return {\n appShellRoute,\n routeTree,\n errors,\n };\n }\n return signal ? promiseWithAbort(extract(), signal, 'Routes extraction') : extract();\n}\n//# sourceMappingURL=ng-routes.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Manages a collection of hooks and provides methods to register and execute them.\n * Hooks are functions that can be invoked with specific arguments to allow modifications or enhancements.\n */\nexport class Hooks {\n /**\n * A map of hook names to arrays of hook functions.\n * Each hook name can have multiple associated functions, which are executed in sequence.\n */\n store = new Map();\n /**\n * Executes all hooks associated with the specified name, passing the given argument to each hook function.\n * The hooks are invoked sequentially, and the argument may be modified by each hook.\n *\n * @template Hook - The type of the hook name. It should be one of the keys of `HooksMapping`.\n * @param name - The name of the hook whose functions will be executed.\n * @param context - The input value to be passed to each hook function. The value is mutated by each hook function.\n * @returns A promise that resolves once all hook functions have been executed.\n *\n * @example\n * ```typescript\n * const hooks = new Hooks();\n * hooks.on('html:transform:pre', async (ctx) => {\n * ctx.html = ctx.html.replace(/foo/g, 'bar');\n * return ctx.html;\n * });\n * const result = await hooks.run('html:transform:pre', { html: '<div>foo</div>' });\n * console.log(result); // '<div>bar</div>'\n * ```\n * @internal\n */\n async run(name, context) {\n const hooks = this.store.get(name);\n switch (name) {\n case 'html:transform:pre': {\n if (!hooks) {\n return context.html;\n }\n const ctx = { ...context };\n for (const hook of hooks) {\n ctx.html = await hook(ctx);\n }\n return ctx.html;\n }\n default:\n throw new Error(`Running hook \"${name}\" is not supported.`);\n }\n }\n /**\n * Registers a new hook function under the specified hook name.\n * This function should be a function that takes an argument of type `T` and returns a `string` or `Promise<string>`.\n *\n * @template Hook - The type of the hook name. It should be one of the keys of `HooksMapping`.\n * @param name - The name of the hook under which the function will be registered.\n * @param handler - A function to be executed when the hook is triggered. The handler will be called with an argument\n * that may be modified by the hook functions.\n *\n * @remarks\n * - If there are existing handlers registered under the given hook name, the new handler will be added to the list.\n * - If no handlers are registered under the given hook name, a new list will be created with the handler as its first element.\n *\n * @example\n * ```typescript\n * hooks.on('html:transform:pre', async (ctx) => {\n * return ctx.html.replace(/foo/g, 'bar');\n * });\n * ```\n */\n on(name, handler) {\n const hooks = this.store.get(name);\n if (hooks) {\n hooks.push(handler);\n }\n else {\n this.store.set(name, [handler]);\n }\n }\n /**\n * Checks if there are any hooks registered under the specified name.\n *\n * @param name - The name of the hook to check.\n * @returns `true` if there are hooks registered under the specified name, otherwise `false`.\n */\n has(name) {\n return !!this.store.get(name)?.length;\n }\n}\n//# sourceMappingURL=hooks.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { stripIndexHtmlFromURL } from '../utils/url';\nimport { extractRoutesAndCreateRouteTree } from './ng-routes';\nimport { RouteTree } from './route-tree';\n/**\n * Manages the application's server routing logic by building and maintaining a route tree.\n *\n * This class is responsible for constructing the route tree from the Angular application\n * configuration and using it to match incoming requests to the appropriate routes.\n */\nexport class ServerRouter {\n routeTree;\n /**\n * Creates an instance of the `ServerRouter`.\n *\n * @param routeTree - An instance of `RouteTree` that holds the routing information.\n * The `RouteTree` is used to match request URLs to the appropriate route metadata.\n */\n constructor(routeTree) {\n this.routeTree = routeTree;\n }\n /**\n * Static property to track the ongoing build promise.\n */\n static #extractionPromise;\n /**\n * Creates or retrieves a `ServerRouter` instance based on the provided manifest and URL.\n *\n * If the manifest contains pre-built routes, a new `ServerRouter` is immediately created.\n * Otherwise, it builds the router by extracting routes from the Angular configuration\n * asynchronously. This method ensures that concurrent builds are prevented by re-using\n * the same promise.\n *\n * @param manifest - An instance of `AngularAppManifest` that contains the route information.\n * @param url - The URL for server-side rendering. The URL is needed to configure `ServerPlatformLocation`.\n * This is necessary to ensure that API requests for relative paths succeed, which is crucial for correct route extraction.\n * [Reference](https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51)\n * @returns A promise resolving to a `ServerRouter` instance.\n */\n static from(manifest, url) {\n if (manifest.routes) {\n const routeTree = RouteTree.fromObject(manifest.routes);\n return Promise.resolve(new ServerRouter(routeTree));\n }\n // Create and store a new promise for the build process.\n // This prevents concurrent builds by re-using the same promise.\n ServerRouter.#extractionPromise ??= extractRoutesAndCreateRouteTree({ url, manifest })\n .then(({ routeTree, errors }) => {\n if (errors.length > 0) {\n throw new Error('Error(s) occurred while extracting routes:\\n' +\n errors.map((error) => `- ${error}`).join('\\n'));\n }\n return new ServerRouter(routeTree);\n })\n .finally(() => {\n ServerRouter.#extractionPromise = undefined;\n });\n return ServerRouter.#extractionPromise;\n }\n /**\n * Matches a request URL against the route tree to retrieve route metadata.\n *\n * This method strips 'index.html' from the URL if it is present and then attempts\n * to find a match in the route tree. If a match is found, it returns the associated\n * route metadata; otherwise, it returns `undefined`.\n *\n * @param url - The URL to be matched against the route tree.\n * @returns The metadata for the matched route or `undefined` if no match is found.\n */\n match(url) {\n // Strip 'index.html' from URL if present.\n // A request to `http://www.example.com/page/index.html` will render the Angular route corresponding to `http://www.example.com/page`.\n const { pathname } = stripIndexHtmlFromURL(url);\n return this.routeTree.match(decodeURIComponent(pathname));\n }\n}\n//# sourceMappingURL=router.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Generates a SHA-256 hash of the provided string.\n *\n * @param data - The input string to be hashed.\n * @returns A promise that resolves to the SHA-256 hash of the input,\n * represented as a hexadecimal string.\n */\nexport async function sha256(data) {\n const encodedData = new TextEncoder().encode(data);\n const hashBuffer = await crypto.subtle.digest('SHA-256', encodedData);\n const hashParts = [];\n for (const h of new Uint8Array(hashBuffer)) {\n hashParts.push(h.toString(16).padStart(2, '0'));\n }\n return hashParts.join('');\n}\n//# sourceMappingURL=crypto.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport Beasties from '../../third_party/beasties';\n/**\n * Pattern used to extract the media query set by Beasties in an `onload` handler.\n */\nconst MEDIA_SET_HANDLER_PATTERN = /^this\\.media=[\"'](.*)[\"'];?$/;\n/**\n * Name of the attribute used to save the Beasties media query so it can be re-assigned on load.\n */\nconst CSP_MEDIA_ATTR = 'ngCspMedia';\n/**\n * Script that dynamically updates the `media` attribute of `<link>` tags based on a custom attribute (`CSP_MEDIA_ATTR`).\n *\n * NOTE:\n * We do not use `document.querySelectorAll('link').forEach((s) => s.addEventListener('load', ...)`\n * because load events are not always triggered reliably on Chrome.\n * See: https://github.com/angular/angular-cli/issues/26932 and https://crbug.com/1521256\n *\n * The script:\n * - Ensures the event target is a `<link>` tag with the `CSP_MEDIA_ATTR` attribute.\n * - Updates the `media` attribute with the value of `CSP_MEDIA_ATTR` and then removes the attribute.\n * - Removes the event listener when all relevant `<link>` tags have been processed.\n * - Uses event capturing (the `true` parameter) since load events do not bubble up the DOM.\n */\nconst LINK_LOAD_SCRIPT_CONTENT = `\n(() => {\n const CSP_MEDIA_ATTR = '${CSP_MEDIA_ATTR}';\n const documentElement = document.documentElement;\n\n // Listener for load events on link tags.\n const listener = (e) => {\n const target = e.target;\n if (\n !target ||\n target.tagName !== 'LINK' ||\n !target.hasAttribute(CSP_MEDIA_ATTR)\n ) {\n return;\n }\n\n target.media = target.getAttribute(CSP_MEDIA_ATTR);\n target.removeAttribute(CSP_MEDIA_ATTR);\n\n if (!document.head.querySelector(\\`link[\\${CSP_MEDIA_ATTR}]\\`)) {\n documentElement.removeEventListener('load', listener);\n }\n };\n\n documentElement.addEventListener('load', listener, true);\n})();`;\nclass BeastiesBase extends Beasties {\n}\n/* eslint-enable @typescript-eslint/no-unsafe-declaration-merging */\nexport class InlineCriticalCssProcessor extends BeastiesBase {\n readFile;\n outputPath;\n addedCspScriptsDocuments = new WeakSet();\n documentNonces = new WeakMap();\n constructor(readFile, outputPath) {\n super({\n logger: {\n // eslint-disable-next-line no-console\n warn: (s) => console.warn(s),\n // eslint-disable-next-line no-console\n error: (s) => console.error(s),\n info: () => { },\n },\n logLevel: 'warn',\n path: outputPath,\n publicPath: undefined,\n compress: false,\n pruneSource: false,\n reduceInlineStyles: false,\n mergeStylesheets: false,\n // Note: if `preload` changes to anything other than `media`, the logic in\n // `embedLinkedStylesheet` will have to be updated.\n preload: 'media',\n noscriptFallback: true,\n inlineFonts: true,\n });\n this.readFile = readFile;\n this.outputPath = outputPath;\n }\n /**\n * Override of the Beasties `embedLinkedStylesheet` method\n * that makes it work with Angular's CSP APIs.\n */\n async embedLinkedStylesheet(link, document) {\n if (link.getAttribute('media') === 'print' && link.next?.name === 'noscript') {\n // Workaround for https://github.com/GoogleChromeLabs/critters/issues/64\n // NB: this is only needed for the webpack based builders.\n const media = link.getAttribute('onload')?.match(MEDIA_SET_HANDLER_PATTERN);\n if (media) {\n link.removeAttribute('onload');\n link.setAttribute('media', media[1]);\n link?.next?.remove();\n }\n }\n const returnValue = await super.embedLinkedStylesheet(link, document);\n const cspNonce = this.findCspNonce(document);\n if (cspNonce) {\n const beastiesMedia = link.getAttribute('onload')?.match(MEDIA_SET_HANDLER_PATTERN);\n if (beastiesMedia) {\n // If there's a Beasties-generated `onload` handler and the file has an Angular CSP nonce,\n // we have to remove the handler, because it's incompatible with CSP. We save the value\n // in a different attribute and we generate a script tag with the nonce that uses\n // `addEventListener` to apply the media query instead.\n link.removeAttribute('onload');\n link.setAttribute(CSP_MEDIA_ATTR, beastiesMedia[1]);\n this.conditionallyInsertCspLoadingScript(document, cspNonce, link);\n }\n // Ideally we would hook in at the time Beasties inserts the `style` tags, but there isn't\n // a way of doing that at the moment so we fall back to doing it any time a `link` tag is\n // inserted. We mitigate it by only iterating the direct children of the `<head>` which\n // should be pretty shallow.\n document.head.children.forEach((child) => {\n if (child.tagName === 'style' && !child.hasAttribute('nonce')) {\n child.setAttribute('nonce', cspNonce);\n }\n });\n }\n return returnValue;\n }\n /**\n * Finds the CSP nonce for a specific document.\n */\n findCspNonce(document) {\n if (this.documentNonces.has(document)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this.documentNonces.get(document);\n }\n // HTML attribute are case-insensitive, but the parser used by Beasties is case-sensitive.\n const nonceElement = document.querySelector('[ngCspNonce], [ngcspnonce]');\n const cspNonce = nonceElement?.getAttribute('ngCspNonce') || nonceElement?.getAttribute('ngcspnonce') || null;\n this.documentNonces.set(document, cspNonce);\n return cspNonce;\n }\n /**\n * Inserts the `script` tag that swaps the critical CSS at runtime,\n * if one hasn't been inserted into the document already.\n */\n conditionallyInsertCspLoadingScript(document, nonce, link) {\n if (this.addedCspScriptsDocuments.has(document)) {\n return;\n }\n if (document.head.textContent.includes(LINK_LOAD_SCRIPT_CONTENT)) {\n // Script was already added during the build.\n this.addedCspScriptsDocuments.add(document);\n return;\n }\n const script = document.createElement('script');\n script.setAttribute('nonce', nonce);\n script.textContent = LINK_LOAD_SCRIPT_CONTENT;\n // Prepend the script to the head since it needs to\n // run as early as possible, before the `link` tags.\n document.head.insertBefore(script, link);\n this.addedCspScriptsDocuments.add(document);\n }\n}\n//# sourceMappingURL=inline-critical-css.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * A Least Recently Used (LRU) cache implementation.\n *\n * This cache stores a fixed number of key-value pairs, and when the cache exceeds its capacity,\n * the least recently accessed items are evicted.\n *\n * @template Key - The type of the cache keys.\n * @template Value - The type of the cache values.\n */\nexport class LRUCache {\n /**\n * The maximum number of items the cache can hold.\n */\n capacity;\n /**\n * Internal storage for the cache, mapping keys to their associated nodes in the linked list.\n */\n cache = new Map();\n /**\n * Head of the doubly linked list, representing the most recently used item.\n */\n head;\n /**\n * Tail of the doubly linked list, representing the least recently used item.\n */\n tail;\n /**\n * Creates a new LRUCache instance.\n * @param capacity The maximum number of items the cache can hold.\n */\n constructor(capacity) {\n this.capacity = capacity;\n }\n /**\n * Gets the value associated with the given key.\n * @param key The key to retrieve the value for.\n * @returns The value associated with the key, or undefined if the key is not found.\n */\n get(key) {\n const node = this.cache.get(key);\n if (node) {\n this.moveToHead(node);\n return node.value;\n }\n return undefined;\n }\n /**\n * Puts a key-value pair into the cache.\n * If the key already exists, the value is updated.\n * If the cache is full, the least recently used item is evicted.\n * @param key The key to insert or update.\n * @param value The value to associate with the key.\n */\n put(key, value) {\n const cachedNode = this.cache.get(key);\n if (cachedNode) {\n // Update existing node\n cachedNode.value = value;\n this.moveToHead(cachedNode);\n return;\n }\n // Create a new node\n const newNode = { key, value, prev: undefined, next: undefined };\n this.cache.set(key, newNode);\n this.addToHead(newNode);\n if (this.cache.size > this.capacity) {\n // Evict the LRU item\n const tail = this.removeTail();\n if (tail) {\n this.cache.delete(tail.key);\n }\n }\n }\n /**\n * Adds a node to the head of the linked list.\n * @param node The node to add.\n */\n addToHead(node) {\n node.next = this.head;\n node.prev = undefined;\n if (this.head) {\n this.head.prev = node;\n }\n this.head = node;\n if (!this.tail) {\n this.tail = node;\n }\n }\n /**\n * Removes a node from the linked list.\n * @param node The node to remove.\n */\n removeNode(node) {\n if (node.prev) {\n node.prev.next = node.next;\n }\n else {\n this.head = node.next;\n }\n if (node.next) {\n node.next.prev = node.prev;\n }\n else {\n this.tail = node.prev;\n }\n }\n /**\n * Moves a node to the head of the linked list.\n * @param node The node to move.\n */\n moveToHead(node) {\n this.removeNode(node);\n this.addToHead(node);\n }\n /**\n * Removes the tail node from the linked list.\n * @returns The removed tail node, or undefined if the list is empty.\n */\n removeTail() {\n const node = this.tail;\n if (node) {\n this.removeNode(node);\n }\n return node;\n }\n}\n//# sourceMappingURL=lru-cache.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { LOCALE_ID, REQUEST, REQUEST_CONTEXT, RESPONSE_INIT, ɵresetCompiledComponents, } from '@angular/core';\nimport { ServerAssets } from './assets';\nimport { Hooks } from './hooks';\nimport { getAngularAppManifest } from './manifest';\nimport { RenderMode } from './routes/route-config';\nimport { ServerRouter } from './routes/router';\nimport { sha256 } from './utils/crypto';\nimport { InlineCriticalCssProcessor } from './utils/inline-critical-css';\nimport { LRUCache } from './utils/lru-cache';\nimport { renderAngular } from './utils/ng';\nimport { promiseWithAbort } from './utils/promise';\nimport { buildPathWithParams, joinUrlParts, stripLeadingSlash } from './utils/url';\n/**\n * Maximum number of critical CSS entries the cache can store.\n * This value determines the capacity of the LRU (Least Recently Used) cache, which stores critical CSS for pages.\n */\nconst MAX_INLINE_CSS_CACHE_ENTRIES = 50;\n/**\n * A mapping of `RenderMode` enum values to corresponding string representations.\n *\n * This record is used to map each `RenderMode` to a specific string value that represents\n * the server context. The string values are used internally to differentiate\n * between various rendering strategies when processing routes.\n *\n * - `RenderMode.Prerender` maps to `'ssg'` (Static Site Generation).\n * - `RenderMode.Server` maps to `'ssr'` (Server-Side Rendering).\n * - `RenderMode.Client` maps to an empty string `''` (Client-Side Rendering, no server context needed).\n */\nconst SERVER_CONTEXT_VALUE = {\n [RenderMode.Prerender]: 'ssg',\n [RenderMode.Server]: 'ssr',\n [RenderMode.Client]: '',\n};\n/**\n * Represents a locale-specific Angular server application managed by the server application engine.\n *\n * The `AngularServerApp` class handles server-side rendering and asset management for a specific locale.\n */\nexport class AngularServerApp {\n options;\n /**\n * Whether prerendered routes should be rendered on demand or served directly.\n *\n * @see {@link AngularServerAppOptions.allowStaticRouteRender} for more details.\n */\n allowStaticRouteRender;\n /**\n * Hooks for extending or modifying server behavior.\n *\n * @see {@link AngularServerAppOptions.hooks} for more details.\n */\n hooks;\n /**\n * Constructs an instance of `AngularServerApp`.\n *\n * @param options Optional configuration options for the server application.\n */\n constructor(options = {}) {\n this.options = options;\n this.allowStaticRouteRender = this.options.allowStaticRouteRender ?? false;\n this.hooks = options.hooks ?? new Hooks();\n }\n /**\n * The manifest associated with this server application.\n */\n manifest = getAngularAppManifest();\n /**\n * An instance of ServerAsset that handles server-side asset.\n */\n assets = new ServerAssets(this.manifest);\n /**\n * The router instance used for route matching and handling.\n */\n router;\n /**\n * The `inlineCriticalCssProcessor` is responsible for handling critical CSS inlining.\n */\n inlineCriticalCssProcessor;\n /**\n * The bootstrap mechanism for the server application.\n */\n boostrap;\n /**\n * Cache for storing critical CSS for pages.\n * Stores a maximum of MAX_INLINE_CSS_CACHE_ENTRIES entries.\n *\n * Uses an LRU (Least Recently Used) eviction policy, meaning that when the cache is full,\n * the least recently accessed page's critical CSS will be removed to make space for new entries.\n */\n criticalCssLRUCache = new LRUCache(MAX_INLINE_CSS_CACHE_ENTRIES);\n /**\n * Handles an incoming HTTP request by serving prerendered content, performing server-side rendering,\n * or delivering a static file for client-side rendered routes based on the `RenderMode` setting.\n *\n * @param request - The HTTP request to handle.\n * @param requestContext - Optional context for rendering, such as metadata associated with the request.\n * @returns A promise that resolves to the resulting HTTP response object, or `null` if no matching Angular route is found.\n *\n * @remarks A request to `https://www.example.com/page/index.html` will serve or render the Angular route\n * corresponding to `https://www.example.com/page`.\n */\n async handle(request, requestContext) {\n const url = new URL(request.url);\n this.router ??= await ServerRouter.from(this.manifest, url);\n const matchedRoute = this.router.match(url);\n if (!matchedRoute) {\n // Not a known Angular route.\n return null;\n }\n const { redirectTo, status, renderMode } = matchedRoute;\n if (redirectTo !== undefined) {\n return Response.redirect(new URL(buildPathWithParams(redirectTo, url.pathname), url), \n // Note: The status code is validated during route extraction.\n // 302 Found is used by default for redirections\n // See: https://developer.mozilla.org/en-US/docs/Web/API/Response/redirect_static#status\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n status ?? 302);\n }\n if (renderMode === RenderMode.Prerender) {\n const response = await this.handleServe(request, matchedRoute);\n if (response) {\n return response;\n }\n }\n return promiseWithAbort(this.handleRendering(request, matchedRoute, requestContext), request.signal, `Request for: ${request.url}`);\n }\n /**\n * Handles serving a prerendered static asset if available for the matched route.\n *\n * This method only supports `GET` and `HEAD` requests.\n *\n * @param request - The incoming HTTP request for serving a static page.\n * @param matchedRoute - The metadata of the matched route for rendering.\n * If not provided, the method attempts to find a matching route based on the request URL.\n * @returns A promise that resolves to a `Response` object if the prerendered page is found, or `null`.\n */\n async handleServe(request, matchedRoute) {\n const { headers, renderMode } = matchedRoute;\n if (renderMode !== RenderMode.Prerender) {\n return null;\n }\n const { method } = request;\n if (method !== 'GET' && method !== 'HEAD') {\n return null;\n }\n const assetPath = this.buildServerAssetPathFromRequest(request);\n if (!this.assets.hasServerAsset(assetPath)) {\n return null;\n }\n const { text, hash, size } = this.assets.getServerAsset(assetPath);\n const etag = `\"${hash}\"`;\n return request.headers.get('if-none-match') === etag\n ? new Response(undefined, { status: 304, statusText: 'Not Modified' })\n : new Response(await text(), {\n headers: {\n 'Content-Length': size.toString(),\n 'ETag': etag,\n 'Content-Type': 'text/html;charset=UTF-8',\n ...headers,\n },\n });\n }\n /**\n * Handles the server-side rendering process for the given HTTP request.\n * This method matches the request URL to a route and performs rendering if a matching route is found.\n *\n * @param request - The incoming HTTP request to be processed.\n * @param matchedRoute - The metadata of the matched route for rendering.\n * If not provided, the method attempts to find a matching route based on the request URL.\n * @param requestContext - Optional additional context for rendering, such as request metadata.\n *\n * @returns A promise that resolves to the rendered response, or null if no matching route is found.\n */\n async handleRendering(request, matchedRoute, requestContext) {\n const { renderMode, headers, status } = matchedRoute;\n if (!this.allowStaticRouteRender && renderMode === RenderMode.Prerender) {\n return null;\n }\n const url = new URL(request.url);\n const platformProviders = [];\n // Initialize the response with status and headers if available.\n const responseInit = {\n status,\n headers: new Headers({\n 'Content-Type': 'text/html;charset=UTF-8',\n ...headers,\n }),\n };\n if (renderMode === RenderMode.Server) {\n // Configure platform providers for request and response only for SSR.\n platformProviders.push({\n provide: REQUEST,\n useValue: request,\n }, {\n provide: REQUEST_CONTEXT,\n useValue: requestContext,\n }, {\n provide: RESPONSE_INIT,\n useValue: responseInit,\n });\n }\n else if (renderMode === RenderMode.Client) {\n // Serve the client-side rendered version if the route is configured for CSR.\n let html = await this.assets.getServerAsset('index.csr.html').text();\n html = await this.runTransformsOnHtml(html, url);\n return new Response(html, responseInit);\n }\n const { manifest: { bootstrap, inlineCriticalCss, locale }, hooks, assets, } = this;\n if (locale !== undefined) {\n platformProviders.push({\n provide: LOCALE_ID,\n useValue: locale,\n });\n }\n this.boostrap ??= await bootstrap();\n let html = await assets.getIndexServerHtml().text();\n html = await this.runTransformsOnHtml(html, url);\n html = await renderAngular(html, this.boostrap, url, platformProviders, SERVER_CONTEXT_VALUE[renderMode]);\n if (inlineCriticalCss) {\n // Optionally inline critical CSS.\n this.inlineCriticalCssProcessor ??= new InlineCriticalCssProcessor((path) => {\n const fileName = path.split('/').pop() ?? path;\n return this.assets.getServerAsset(fileName).text();\n });\n // TODO(alanagius): remove once Node.js version 18 is no longer supported.\n if (renderMode === RenderMode.Server && typeof crypto === 'undefined') {\n // eslint-disable-next-line no-console\n console.error(`The global 'crypto' module is unavailable. ` +\n `If you are running on Node.js, please ensure you are using version 20 or later, ` +\n `which includes built-in support for the Web Crypto module.`);\n }\n if (renderMode === RenderMode.Server && typeof crypto !== 'undefined') {\n // Only cache if we are running in SSR Mode.\n const cacheKey = await sha256(html);\n let htmlWithCriticalCss = this.criticalCssLRUCache.get(cacheKey);\n if (htmlWithCriticalCss === undefined) {\n htmlWithCriticalCss = await this.inlineCriticalCssProcessor.process(html);\n this.criticalCssLRUCache.put(cacheKey, htmlWithCriticalCss);\n }\n html = htmlWithCriticalCss;\n }\n else {\n html = await this.inlineCriticalCssProcessor.process(html);\n }\n }\n return new Response(html, responseInit);\n }\n /**\n * Constructs the asset path on the server based on the provided HTTP request.\n *\n * This method processes the incoming request URL to derive a path corresponding\n * to the requested asset. It ensures the path points to the correct file (e.g.,\n * `index.html`) and removes any base href if it is not part of the asset path.\n *\n * @param request - The incoming HTTP request object.\n * @returns The server-relative asset path derived from the request.\n */\n buildServerAssetPathFromRequest(request) {\n let { pathname: assetPath } = new URL(request.url);\n if (!assetPath.endsWith('/index.html')) {\n // Append \"index.html\" to build the default asset path.\n assetPath = joinUrlParts(assetPath, 'index.html');\n }\n const { baseHref } = this.manifest;\n // Check if the asset path starts with the base href and the base href is not (`/` or ``).\n if (baseHref.length > 1 && assetPath.startsWith(baseHref)) {\n // Remove the base href from the start of the asset path to align with server-asset expectations.\n assetPath = assetPath.slice(baseHref.length);\n }\n return stripLeadingSlash(assetPath);\n }\n /**\n * Runs the registered transform hooks on the given HTML content.\n *\n * @param html - The raw HTML content to be transformed.\n * @param url - The URL associated with the HTML content, used for context during transformations.\n * @returns A promise that resolves to the transformed HTML string.\n */\n async runTransformsOnHtml(html, url) {\n if (this.hooks.has('html:transform:pre')) {\n html = await this.hooks.run('html:transform:pre', { html, url });\n }\n return html;\n }\n}\nlet angularServerApp;\n/**\n * Retrieves or creates an instance of `AngularServerApp`.\n * - If an instance of `AngularServerApp` already exists, it will return the existing one.\n * - If no instance exists, it will create a new one with the provided options.\n *\n * @param options Optional configuration options for the server application.\n *\n * @returns The existing or newly created instance of `AngularServerApp`.\n */\nexport function getOrCreateAngularServerApp(options) {\n return (angularServerApp ??= new AngularServerApp(options));\n}\n/**\n * Destroys the existing `AngularServerApp` instance, releasing associated resources and resetting the\n * reference to `undefined`.\n *\n * This function is primarily used to enable the recreation of the `AngularServerApp` instance,\n * typically when server configuration or application state needs to be refreshed.\n */\nexport function destroyAngularServerApp() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Need to clean up GENERATED_COMP_IDS map in `@angular/core`.\n // Otherwise an incorrect component ID generation collision detected warning will be displayed in development.\n // See: https://github.com/angular/angular-cli/issues/25924\n ɵresetCompiledComponents();\n }\n angularServerApp = undefined;\n}\n//# sourceMappingURL=app.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n// ɵgetRoutesFromAngularRouterConfig is only used by the Webpack based server builder.\nexport { getRoutesFromAngularRouterConfig as ɵgetRoutesFromAngularRouterConfig, extractRoutesAndCreateRouteTree as ɵextractRoutesAndCreateRouteTree, } from './src/routes/ng-routes';\nexport { getOrCreateAngularServerApp as ɵgetOrCreateAngularServerApp, destroyAngularServerApp as ɵdestroyAngularServerApp, } from './src/app';\nexport { setAngularAppManifest as ɵsetAngularAppManifest, setAngularAppEngineManifest as ɵsetAngularAppEngineManifest, } from './src/manifest';\nexport { InlineCriticalCssProcessor as ɵInlineCriticalCssProcessor } from './src/utils/inline-critical-css';\n//# sourceMappingURL=private_export.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Extracts a potential locale ID from a given URL based on the specified base path.\n *\n * This function parses the URL to locate a potential locale identifier that immediately\n * follows the base path segment in the URL's pathname. If the URL does not contain a valid\n * locale ID, an empty string is returned.\n *\n * @param url - The full URL from which to extract the locale ID.\n * @param basePath - The base path used as the reference point for extracting the locale ID.\n * @returns The extracted locale ID if present, or an empty string if no valid locale ID is found.\n *\n * @example\n * ```js\n * const url = new URL('https://example.com/base/en/page');\n * const basePath = '/base';\n * const localeId = getPotentialLocaleIdFromUrl(url, basePath);\n * console.log(localeId); // Output: 'en'\n * ```\n */\nexport function getPotentialLocaleIdFromUrl(url, basePath) {\n const { pathname } = url;\n // Move forward of the base path section.\n let start = basePath.length;\n if (pathname[start] === '/') {\n start++;\n }\n // Find the next forward slash.\n let end = pathname.indexOf('/', start);\n if (end === -1) {\n end = pathname.length;\n }\n // Extract the potential locale id.\n return pathname.slice(start, end);\n}\n//# sourceMappingURL=i18n.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { Hooks } from './hooks';\nimport { getPotentialLocaleIdFromUrl } from './i18n';\nimport { getAngularAppEngineManifest } from './manifest';\n/**\n * Angular server application engine.\n * Manages Angular server applications (including localized ones), handles rendering requests,\n * and optionally transforms index HTML before rendering.\n *\n * @remarks This class should be instantiated once and used as a singleton across the server-side\n * application to ensure consistent handling of rendering requests and resource management.\n *\n * @developerPreview\n */\nexport class AngularAppEngine {\n /**\n * A flag to enable or disable the rendering of prerendered routes.\n *\n * Typically used during development to avoid prerendering all routes ahead of time,\n * allowing them to be rendered on the fly as requested.\n *\n * @private\n */\n static ɵallowStaticRouteRender = false;\n /**\n * Hooks for extending or modifying the behavior of the server application.\n * These hooks are used by the Angular CLI when running the development server and\n * provide extensibility points for the application lifecycle.\n *\n * @private\n */\n static ɵhooks = /* #__PURE__*/ new Hooks();\n /**\n * The manifest for the server application.\n */\n manifest = getAngularAppEngineManifest();\n /**\n * The number of entry points available in the server application's manifest.\n */\n entryPointsCount = Object.keys(this.manifest.entryPoints).length;\n /**\n * A cache that holds entry points, keyed by their potential locale string.\n */\n entryPointsCache = new Map();\n /**\n * Handles an incoming HTTP request by serving prerendered content, performing server-side rendering,\n * or delivering a static file for client-side rendered routes based on the `RenderMode` setting.\n *\n * @param request - The HTTP request to handle.\n * @param requestContext - Optional context for rendering, such as metadata associated with the request.\n * @returns A promise that resolves to the resulting HTTP response object, or `null` if no matching Angular route is found.\n *\n * @remarks A request to `https://www.example.com/page/index.html` will serve or render the Angular route\n * corresponding to `https://www.example.com/page`.\n */\n async handle(request, requestContext) {\n const serverApp = await this.getAngularServerAppForRequest(request);\n return serverApp ? serverApp.handle(request, requestContext) : null;\n }\n /**\n * Retrieves the Angular server application instance for a given request.\n *\n * This method checks if the request URL corresponds to an Angular application entry point.\n * If so, it initializes or retrieves an instance of the Angular server application for that entry point.\n * Requests that resemble file requests (except for `/index.html`) are skipped.\n *\n * @param request - The incoming HTTP request object.\n * @returns A promise that resolves to an `AngularServerApp` instance if a valid entry point is found,\n * or `null` if no entry point matches the request URL.\n */\n async getAngularServerAppForRequest(request) {\n // Skip if the request looks like a file but not `/index.html`.\n const url = new URL(request.url);\n const entryPoint = await this.getEntryPointExportsForUrl(url);\n if (!entryPoint) {\n return null;\n }\n // Note: Using `instanceof` is not feasible here because `AngularServerApp` will\n // be located in separate bundles, making `instanceof` checks unreliable.\n const ɵgetOrCreateAngularServerApp = entryPoint.ɵgetOrCreateAngularServerApp;\n const serverApp = ɵgetOrCreateAngularServerApp({\n allowStaticRouteRender: AngularAppEngine.ɵallowStaticRouteRender,\n hooks: AngularAppEngine.ɵhooks,\n });\n return serverApp;\n }\n /**\n * Retrieves the exports for a specific entry point, caching the result.\n *\n * @param potentialLocale - The locale string used to find the corresponding entry point.\n * @returns A promise that resolves to the entry point exports or `undefined` if not found.\n */\n getEntryPointExports(potentialLocale) {\n const cachedEntryPoint = this.entryPointsCache.get(potentialLocale);\n if (cachedEntryPoint) {\n return cachedEntryPoint;\n }\n const { entryPoints } = this.manifest;\n const entryPoint = entryPoints[potentialLocale];\n if (!entryPoint) {\n return undefined;\n }\n const entryPointExports = entryPoint();\n this.entryPointsCache.set(potentialLocale, entryPointExports);\n return entryPointExports;\n }\n /**\n * Retrieves the entry point for a given URL by determining the locale and mapping it to\n * the appropriate application bundle.\n *\n * This method determines the appropriate entry point and locale for rendering the application by examining the URL.\n * If there is only one entry point available, it is returned regardless of the URL.\n * Otherwise, the method extracts a potential locale identifier from the URL and looks up the corresponding entry point.\n *\n * @param url - The URL of the request.\n * @returns A promise that resolves to the entry point exports or `undefined` if not found.\n */\n getEntryPointExportsForUrl(url) {\n const { basePath } = this.manifest;\n if (this.entryPointsCount === 1) {\n return this.getEntryPointExports('');\n }\n const potentialLocale = getPotentialLocaleIdFromUrl(url, basePath);\n return this.getEntryPointExports(potentialLocale);\n }\n}\n//# sourceMappingURL=app-engine.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Annotates a request handler function with metadata, marking it as a special\n * handler.\n *\n * @param handler - The request handler function to be annotated.\n * @returns The same handler function passed in, with metadata attached.\n *\n * @example\n * Example usage in a Hono application:\n * ```ts\n * const app = new Hono();\n * export default createRequestHandler(app.fetch);\n * ```\n *\n * @example\n * Example usage in a H3 application:\n * ```ts\n * const app = createApp();\n * const handler = toWebHandler(app);\n * export default createRequestHandler(handler);\n * ```\n * @developerPreview\n */\nexport function createRequestHandler(handler) {\n handler['__ng_request_handler__'] = true;\n return handler;\n}\n//# sourceMappingURL=handler.js.map"],"names":["ɵConsole","SERVER_CONTEXT","loadChildrenHelper","ɵresetCompiledComponents"],"mappings":";;;;;;AAOA;AACA;AACA;AACO,MAAM,YAAY,CAAC;AAC1B,IAAI,QAAQ;AACZ;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,QAAQ,EAAE;AAC1B,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc,CAAC,IAAI,EAAE;AACzB,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;AAChD,QAAQ,IAAI,CAAC,KAAK,EAAE;AACpB,YAAY,MAAM,IAAI,KAAK,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;AACrE;AACA,QAAQ,OAAO,KAAK;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc,CAAC,IAAI,EAAE;AACzB,QAAQ,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,kBAAkB,GAAG;AACzB,QAAQ,OAAO,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC;AACvD;AACA;;AC5CA;AACA;AACA;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gBAAgB,CAAC,GAAG,CAAC,eAAe,CAAC;AAC3E,QAAQ,IAAI,gBAAgB,EAAE;AAC9B,YAAY,OAAO,gBAAgB;AACnC;AACA,QAAQ,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,QAAQ;AAC7C,QAAQ,MAAM,UAAU,GAAG,WAAW,CAAC,eAAe,CAAC;AACvD,QAAQ,IAAI,CAAC,UAAU,EAAE;AACzB,YAAY,OAAO,SAAS;AAC5B;AACA,QAAQ,MAAM,iBAAiB,GAAG,UAAU,EAAE;AAC9C,QAAQ,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,eAAe,EAAE,iBAAiB,CAAC;AACrE,QAAQ,OAAO,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,0BAA0B,CAAC,GAAG,EAAE;AACpC,QAAQ,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ;AAC1C,QAAQ,IAAI,IAAI,CAAC,gBAAgB,KAAK,CAAC,EAAE;AACzC,YAAY,OAAO,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC;AAChD;AACA,QAAQ,MAAM,eAAe,GAAG,2BAA2B,CAAC,GAAG,EAAE,QAAQ,CAAC;AAC1E,QAAQ,OAAO,IAAI,CAAC,oBAAoB,CAAC,eAAe,CAAC;AACzD;AACA;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,oBAAoB,CAAC,OAAO,EAAE;AAC9C,IAAI,OAAO,CAAC,wBAAwB,CAAC,GAAG,IAAI;AAC5C,IAAI,OAAO,OAAO;AAClB;;;;"}
1
+ {"version":3,"file":"ssr.mjs","sources":["../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/assets.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/console.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/manifest.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/url.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/ng.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/promise.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/route-config.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/route-tree.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/ng-routes.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/hooks.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/router.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/crypto.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/inline-critical-css.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/lru-cache.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/app.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/private_export.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/i18n.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/app-engine.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/handler.mjs"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Manages server-side assets.\n */\nexport class ServerAssets {\n manifest;\n /**\n * Creates an instance of ServerAsset.\n *\n * @param manifest - The manifest containing the server assets.\n */\n constructor(manifest) {\n this.manifest = manifest;\n }\n /**\n * Retrieves the content of a server-side asset using its path.\n *\n * @param path - The path to the server asset within the manifest.\n * @returns The server asset associated with the provided path, as a `ServerAsset` object.\n * @throws Error - Throws an error if the asset does not exist.\n */\n getServerAsset(path) {\n const asset = this.manifest.assets[path];\n if (!asset) {\n throw new Error(`Server asset '${path}' does not exist.`);\n }\n return asset;\n }\n /**\n * Checks if a specific server-side asset exists.\n *\n * @param path - The path to the server asset.\n * @returns A boolean indicating whether the asset exists.\n */\n hasServerAsset(path) {\n return !!this.manifest.assets[path];\n }\n /**\n * Retrieves the asset for 'index.server.html'.\n *\n * @returns The `ServerAsset` object for 'index.server.html'.\n * @throws Error - Throws an error if 'index.server.html' does not exist.\n */\n getIndexServerHtml() {\n return this.getServerAsset('index.server.html');\n }\n}\n//# sourceMappingURL=assets.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { ɵConsole } from '@angular/core';\n/**\n * A set of log messages that should be ignored and not printed to the console.\n */\nconst IGNORED_LOGS = new Set(['Angular is running in development mode.']);\n/**\n * Custom implementation of the Angular Console service that filters out specific log messages.\n *\n * This class extends the internal Angular `ɵConsole` class to provide customized logging behavior.\n * It overrides the `log` method to suppress logs that match certain predefined messages.\n */\nexport class Console extends ɵConsole {\n /**\n * Logs a message to the console if it is not in the set of ignored messages.\n *\n * @param message - The message to log to the console.\n *\n * This method overrides the `log` method of the `ɵConsole` class. It checks if the\n * message is in the `IGNORED_LOGS` set. If it is not, it delegates the logging to\n * the parent class's `log` method. Otherwise, the message is suppressed.\n */\n log(message) {\n if (!IGNORED_LOGS.has(message)) {\n super.log(message);\n }\n }\n}\n//# sourceMappingURL=console.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * The Angular app manifest object.\n * This is used internally to store the current Angular app manifest.\n */\nlet angularAppManifest;\n/**\n * Sets the Angular app manifest.\n *\n * @param manifest - The manifest object to set for the Angular application.\n */\nexport function setAngularAppManifest(manifest) {\n angularAppManifest = manifest;\n}\n/**\n * Gets the Angular app manifest.\n *\n * @returns The Angular app manifest.\n * @throws Will throw an error if the Angular app manifest is not set.\n */\nexport function getAngularAppManifest() {\n if (!angularAppManifest) {\n throw new Error('Angular app manifest is not set. ' +\n `Please ensure you are using the '@angular/build:application' builder to build your server application.`);\n }\n return angularAppManifest;\n}\n/**\n * The Angular app engine manifest object.\n * This is used internally to store the current Angular app engine manifest.\n */\nlet angularAppEngineManifest;\n/**\n * Sets the Angular app engine manifest.\n *\n * @param manifest - The engine manifest object to set.\n */\nexport function setAngularAppEngineManifest(manifest) {\n angularAppEngineManifest = manifest;\n}\n/**\n * Gets the Angular app engine manifest.\n *\n * @returns The Angular app engine manifest.\n * @throws Will throw an error if the Angular app engine manifest is not set.\n */\nexport function getAngularAppEngineManifest() {\n if (!angularAppEngineManifest) {\n throw new Error('Angular app engine manifest is not set. ' +\n `Please ensure you are using the '@angular/build:application' builder to build your server application.`);\n }\n return angularAppEngineManifest;\n}\n//# sourceMappingURL=manifest.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Removes the trailing slash from a URL if it exists.\n *\n * @param url - The URL string from which to remove the trailing slash.\n * @returns The URL string without a trailing slash.\n *\n * @example\n * ```js\n * stripTrailingSlash('path/'); // 'path'\n * stripTrailingSlash('/path'); // '/path'\n * stripTrailingSlash('/'); // '/'\n * stripTrailingSlash(''); // ''\n * ```\n */\nexport function stripTrailingSlash(url) {\n // Check if the last character of the URL is a slash\n return url.length > 1 && url[url.length - 1] === '/' ? url.slice(0, -1) : url;\n}\n/**\n * Removes the leading slash from a URL if it exists.\n *\n * @param url - The URL string from which to remove the leading slash.\n * @returns The URL string without a leading slash.\n *\n * @example\n * ```js\n * stripLeadingSlash('/path'); // 'path'\n * stripLeadingSlash('/path/'); // 'path/'\n * stripLeadingSlash('/'); // '/'\n * stripLeadingSlash(''); // ''\n * ```\n */\nexport function stripLeadingSlash(url) {\n // Check if the first character of the URL is a slash\n return url.length > 1 && url[0] === '/' ? url.slice(1) : url;\n}\n/**\n * Adds a leading slash to a URL if it does not already have one.\n *\n * @param url - The URL string to which the leading slash will be added.\n * @returns The URL string with a leading slash.\n *\n * @example\n * ```js\n * addLeadingSlash('path'); // '/path'\n * addLeadingSlash('/path'); // '/path'\n * ```\n */\nexport function addLeadingSlash(url) {\n // Check if the URL already starts with a slash\n return url[0] === '/' ? url : `/${url}`;\n}\n/**\n * Adds a trailing slash to a URL if it does not already have one.\n *\n * @param url - The URL string to which the trailing slash will be added.\n * @returns The URL string with a trailing slash.\n *\n * @example\n * ```js\n * addTrailingSlash('path'); // 'path/'\n * addTrailingSlash('path/'); // 'path/'\n * ```\n */\nexport function addTrailingSlash(url) {\n // Check if the URL already end with a slash\n return url[url.length - 1] === '/' ? url : `${url}/`;\n}\n/**\n * Joins URL parts into a single URL string.\n *\n * This function takes multiple URL segments, normalizes them by removing leading\n * and trailing slashes where appropriate, and then joins them into a single URL.\n *\n * @param parts - The parts of the URL to join. Each part can be a string with or without slashes.\n * @returns The joined URL string, with normalized slashes.\n *\n * @example\n * ```js\n * joinUrlParts('path/', '/to/resource'); // '/path/to/resource'\n * joinUrlParts('/path/', 'to/resource'); // '/path/to/resource'\n * joinUrlParts('', ''); // '/'\n * ```\n */\nexport function joinUrlParts(...parts) {\n const normalizeParts = [];\n for (const part of parts) {\n if (part === '') {\n // Skip any empty parts\n continue;\n }\n let normalizedPart = part;\n if (part[0] === '/') {\n normalizedPart = normalizedPart.slice(1);\n }\n if (part[part.length - 1] === '/') {\n normalizedPart = normalizedPart.slice(0, -1);\n }\n if (normalizedPart !== '') {\n normalizeParts.push(normalizedPart);\n }\n }\n return addLeadingSlash(normalizeParts.join('/'));\n}\n/**\n * Strips `/index.html` from the end of a URL's path, if present.\n *\n * This function is used to convert URLs pointing to an `index.html` file into their directory\n * equivalents. For example, it transforms a URL like `http://www.example.com/page/index.html`\n * into `http://www.example.com/page`.\n *\n * @param url - The URL object to process.\n * @returns A new URL object with `/index.html` removed from the path, if it was present.\n *\n * @example\n * ```typescript\n * const originalUrl = new URL('http://www.example.com/page/index.html');\n * const cleanedUrl = stripIndexHtmlFromURL(originalUrl);\n * console.log(cleanedUrl.href); // Output: 'http://www.example.com/page'\n * ```\n */\nexport function stripIndexHtmlFromURL(url) {\n if (url.pathname.endsWith('/index.html')) {\n const modifiedURL = new URL(url);\n // Remove '/index.html' from the pathname\n modifiedURL.pathname = modifiedURL.pathname.slice(0, /** '/index.html'.length */ -11);\n return modifiedURL;\n }\n return url;\n}\n/**\n * Resolves `*` placeholders in a path template by mapping them to corresponding segments\n * from a base path. This is useful for constructing paths dynamically based on a given base path.\n *\n * The function processes the `toPath` string, replacing each `*` placeholder with\n * the corresponding segment from the `fromPath`. If the `toPath` contains no placeholders,\n * it is returned as-is. Invalid `toPath` formats (not starting with `/`) will throw an error.\n *\n * @param toPath - A path template string that may contain `*` placeholders. Each `*` is replaced\n * by the corresponding segment from the `fromPath`. Static paths (e.g., `/static/path`) are returned\n * directly without placeholder replacement.\n * @param fromPath - A base path string, split into segments, that provides values for\n * replacing `*` placeholders in the `toPath`.\n * @returns A resolved path string with `*` placeholders replaced by segments from the `fromPath`,\n * or the `toPath` returned unchanged if it contains no placeholders.\n *\n * @throws If the `toPath` does not start with a `/`, indicating an invalid path format.\n *\n * @example\n * ```typescript\n * // Example with placeholders resolved\n * const resolvedPath = buildPathWithParams('/*\\/details', '/123/abc');\n * console.log(resolvedPath); // Outputs: '/123/details'\n *\n * // Example with a static path\n * const staticPath = buildPathWithParams('/static/path', '/base/unused');\n * console.log(staticPath); // Outputs: '/static/path'\n * ```\n */\nexport function buildPathWithParams(toPath, fromPath) {\n if (toPath[0] !== '/') {\n throw new Error(`Invalid toPath: The string must start with a '/'. Received: '${toPath}'`);\n }\n if (fromPath[0] !== '/') {\n throw new Error(`Invalid fromPath: The string must start with a '/'. Received: '${fromPath}'`);\n }\n if (!toPath.includes('/*')) {\n return toPath;\n }\n const fromPathParts = fromPath.split('/');\n const toPathParts = toPath.split('/');\n const resolvedParts = toPathParts.map((part, index) => toPathParts[index] === '*' ? fromPathParts[index] : part);\n return joinUrlParts(...resolvedParts);\n}\n//# sourceMappingURL=url.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { ɵConsole } from '@angular/core';\nimport { ɵSERVER_CONTEXT as SERVER_CONTEXT, renderApplication, renderModule, } from '@angular/platform-server';\nimport { Console } from '../console';\nimport { stripIndexHtmlFromURL } from './url';\n/**\n * Renders an Angular application or module to an HTML string.\n *\n * This function determines whether the provided `bootstrap` value is an Angular module\n * or a bootstrap function and calls the appropriate rendering method (`renderModule` or\n * `renderApplication`) based on that determination.\n *\n * @param html - The HTML string to be used as the initial document content.\n * @param bootstrap - Either an Angular module type or a function that returns a promise\n * resolving to an `ApplicationRef`.\n * @param url - The URL of the application. This is used for server-side rendering to\n * correctly handle route-based rendering.\n * @param platformProviders - An array of platform providers to be used during the\n * rendering process.\n * @param serverContext - A string representing the server context, used to provide additional\n * context or metadata during server-side rendering.\n * @returns A promise that resolves to a string containing the rendered HTML.\n */\nexport function renderAngular(html, bootstrap, url, platformProviders, serverContext) {\n const providers = [\n {\n provide: SERVER_CONTEXT,\n useValue: serverContext,\n },\n {\n // An Angular Console Provider that does not print a set of predefined logs.\n provide: ɵConsole,\n // Using `useClass` would necessitate decorating `Console` with `@Injectable`,\n // which would require switching from `ts_library` to `ng_module`. This change\n // would also necessitate various patches of `@angular/bazel` to support ESM.\n useFactory: () => new Console(),\n },\n ...platformProviders,\n ];\n // A request to `http://www.example.com/page/index.html` will render the Angular route corresponding to `http://www.example.com/page`.\n const urlToRender = stripIndexHtmlFromURL(url).toString();\n return isNgModule(bootstrap)\n ? renderModule(bootstrap, {\n url: urlToRender,\n document: html,\n extraProviders: providers,\n })\n : renderApplication(bootstrap, {\n url: urlToRender,\n document: html,\n platformProviders: providers,\n });\n}\n/**\n * Type guard to determine if a given value is an Angular module.\n * Angular modules are identified by the presence of the `ɵmod` static property.\n * This function helps distinguish between Angular modules and bootstrap functions.\n *\n * @param value - The value to be checked.\n * @returns True if the value is an Angular module (i.e., it has the `ɵmod` property), false otherwise.\n */\nexport function isNgModule(value) {\n return 'ɵmod' in value;\n}\n//# sourceMappingURL=ng.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Creates a promise that resolves with the result of the provided `promise` or rejects with an\n * `AbortError` if the `AbortSignal` is triggered before the promise resolves.\n *\n * @param promise - The promise to monitor for completion.\n * @param signal - An `AbortSignal` used to monitor for an abort event. If the signal is aborted,\n * the returned promise will reject.\n * @param errorMessagePrefix - A custom message prefix to include in the error message when the operation is aborted.\n * @returns A promise that either resolves with the value of the provided `promise` or rejects with\n * an `AbortError` if the `AbortSignal` is triggered.\n *\n * @throws {AbortError} If the `AbortSignal` is triggered before the `promise` resolves.\n */\nexport function promiseWithAbort(promise, signal, errorMessagePrefix) {\n return new Promise((resolve, reject) => {\n const abortHandler = () => {\n reject(new DOMException(`${errorMessagePrefix} was aborted.\\n${signal.reason}`, 'AbortError'));\n };\n // Check for abort signal\n if (signal.aborted) {\n abortHandler();\n return;\n }\n signal.addEventListener('abort', abortHandler, { once: true });\n promise\n .then(resolve)\n .catch(reject)\n .finally(() => {\n signal.removeEventListener('abort', abortHandler);\n });\n });\n}\n//# sourceMappingURL=promise.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { InjectionToken, makeEnvironmentProviders } from '@angular/core';\n/**\n * Different rendering modes for server routes.\n * @see {@link provideServerRoutesConfig}\n * @see {@link ServerRoute}\n * @developerPreview\n */\nexport var RenderMode;\n(function (RenderMode) {\n /** Server-Side Rendering (SSR) mode, where content is rendered on the server for each request. */\n RenderMode[RenderMode[\"Server\"] = 0] = \"Server\";\n /** Client-Side Rendering (CSR) mode, where content is rendered on the client side in the browser. */\n RenderMode[RenderMode[\"Client\"] = 1] = \"Client\";\n /** Static Site Generation (SSG) mode, where content is pre-rendered at build time and served as static files. */\n RenderMode[RenderMode[\"Prerender\"] = 2] = \"Prerender\";\n})(RenderMode || (RenderMode = {}));\n/**\n * Defines the fallback strategies for Static Site Generation (SSG) routes when a pre-rendered path is not available.\n * This is particularly relevant for routes with parameterized URLs where some paths might not be pre-rendered at build time.\n * @see {@link ServerRoutePrerenderWithParams}\n * @developerPreview\n */\nexport var PrerenderFallback;\n(function (PrerenderFallback) {\n /**\n * Fallback to Server-Side Rendering (SSR) if the pre-rendered path is not available.\n * This strategy dynamically generates the page on the server at request time.\n */\n PrerenderFallback[PrerenderFallback[\"Server\"] = 0] = \"Server\";\n /**\n * Fallback to Client-Side Rendering (CSR) if the pre-rendered path is not available.\n * This strategy allows the page to be rendered on the client side.\n */\n PrerenderFallback[PrerenderFallback[\"Client\"] = 1] = \"Client\";\n /**\n * No fallback; if the path is not pre-rendered, the server will not handle the request.\n * This means the application will not provide any response for paths that are not pre-rendered.\n */\n PrerenderFallback[PrerenderFallback[\"None\"] = 2] = \"None\";\n})(PrerenderFallback || (PrerenderFallback = {}));\n/**\n * Token for providing the server routes configuration.\n * @internal\n */\nexport const SERVER_ROUTES_CONFIG = new InjectionToken('SERVER_ROUTES_CONFIG');\n/**\n/**\n * Sets up the necessary providers for configuring server routes.\n * This function accepts an array of server routes and optional configuration\n * options, returning an `EnvironmentProviders` object that encapsulates\n * the server routes and configuration settings.\n *\n * @param routes - An array of server routes to be provided.\n * @param options - (Optional) An object containing additional configuration options for server routes.\n * @returns An `EnvironmentProviders` instance with the server routes configuration.\n *\n * @see {@link ServerRoute}\n * @see {@link ServerRoutesConfigOptions}\n * @developerPreview\n */\nexport function provideServerRoutesConfig(routes, options) {\n if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n throw new Error(`The 'provideServerRoutesConfig' function should not be invoked within the browser portion of the application.`);\n }\n return makeEnvironmentProviders([\n {\n provide: SERVER_ROUTES_CONFIG,\n useValue: { routes, ...options },\n },\n ]);\n}\n//# sourceMappingURL=route-config.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { stripTrailingSlash } from '../utils/url';\n/**\n * A route tree implementation that supports efficient route matching, including support for wildcard routes.\n * This structure is useful for organizing and retrieving routes in a hierarchical manner,\n * enabling complex routing scenarios with nested paths.\n *\n * @typeParam AdditionalMetadata - Type of additional metadata that can be associated with route nodes.\n */\nexport class RouteTree {\n /**\n * The root node of the route tree.\n * All routes are stored and accessed relative to this root node.\n */\n root = this.createEmptyRouteTreeNode('');\n /**\n * A counter that tracks the order of route insertion.\n * This ensures that routes are matched in the order they were defined,\n * with earlier routes taking precedence.\n */\n insertionIndexCounter = 0;\n /**\n * Inserts a new route into the route tree.\n * The route is broken down into segments, and each segment is added to the tree.\n * Parameterized segments (e.g., :id) are normalized to wildcards (*) for matching purposes.\n *\n * @param route - The route path to insert into the tree.\n * @param metadata - Metadata associated with the route, excluding the route path itself.\n */\n insert(route, metadata) {\n let node = this.root;\n const segments = this.getPathSegments(route);\n const normalizedSegments = [];\n for (const segment of segments) {\n // Replace parameterized segments (e.g., :id) with a wildcard (*) for matching\n const normalizedSegment = segment[0] === ':' ? '*' : segment;\n let childNode = node.children.get(normalizedSegment);\n if (!childNode) {\n childNode = this.createEmptyRouteTreeNode(normalizedSegment);\n node.children.set(normalizedSegment, childNode);\n }\n node = childNode;\n normalizedSegments.push(normalizedSegment);\n }\n // At the leaf node, store the full route and its associated metadata\n node.metadata = {\n ...metadata,\n route: normalizedSegments.join('/'),\n };\n node.insertionIndex = this.insertionIndexCounter++;\n }\n /**\n * Matches a given route against the route tree and returns the best matching route's metadata.\n * The best match is determined by the lowest insertion index, meaning the earliest defined route\n * takes precedence.\n *\n * @param route - The route path to match against the route tree.\n * @returns The metadata of the best matching route or `undefined` if no match is found.\n */\n match(route) {\n const segments = this.getPathSegments(route);\n return this.traverseBySegments(segments)?.metadata;\n }\n /**\n * Converts the route tree into a serialized format representation.\n * This method converts the route tree into an array of metadata objects that describe the structure of the tree.\n * The array represents the routes in a nested manner where each entry includes the route and its associated metadata.\n *\n * @returns An array of `RouteTreeNodeMetadata` objects representing the route tree structure.\n * Each object includes the `route` and associated metadata of a route.\n */\n toObject() {\n return Array.from(this.traverse());\n }\n /**\n * Constructs a `RouteTree` from an object representation.\n * This method is used to recreate a `RouteTree` instance from an array of metadata objects.\n * The array should be in the format produced by `toObject`, allowing for the reconstruction of the route tree\n * with the same routes and metadata.\n *\n * @param value - An array of `RouteTreeNodeMetadata` objects that represent the serialized format of the route tree.\n * Each object should include a `route` and its associated metadata.\n * @returns A new `RouteTree` instance constructed from the provided metadata objects.\n */\n static fromObject(value) {\n const tree = new RouteTree();\n for (const { route, ...metadata } of value) {\n tree.insert(route, metadata);\n }\n return tree;\n }\n /**\n * A generator function that recursively traverses the route tree and yields the metadata of each node.\n * This allows for easy and efficient iteration over all nodes in the tree.\n *\n * @param node - The current node to start the traversal from. Defaults to the root node of the tree.\n */\n *traverse(node = this.root) {\n if (node.metadata) {\n yield node.metadata;\n }\n for (const childNode of node.children.values()) {\n yield* this.traverse(childNode);\n }\n }\n /**\n * Extracts the path segments from a given route string.\n *\n * @param route - The route string from which to extract segments.\n * @returns An array of path segments.\n */\n getPathSegments(route) {\n return stripTrailingSlash(route).split('/');\n }\n /**\n * Recursively traverses the route tree from a given node, attempting to match the remaining route segments.\n * If the node is a leaf node (no more segments to match) and contains metadata, the node is yielded.\n *\n * This function prioritizes exact segment matches first, followed by wildcard matches (`*`),\n * and finally deep wildcard matches (`**`) that consume all segments.\n *\n * @param remainingSegments - The remaining segments of the route path to match.\n * @param node - The current node in the route tree to start traversal from.\n *\n * @returns The node that best matches the remaining segments or `undefined` if no match is found.\n */\n traverseBySegments(remainingSegments, node = this.root) {\n const { metadata, children } = node;\n // If there are no remaining segments and the node has metadata, return this node\n if (!remainingSegments?.length) {\n if (metadata) {\n return node;\n }\n return;\n }\n // If the node has no children, end the traversal\n if (!children.size) {\n return;\n }\n const [segment, ...restSegments] = remainingSegments;\n let currentBestMatchNode;\n // 1. Exact segment match\n const exactMatchNode = node.children.get(segment);\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, this.traverseBySegments(restSegments, exactMatchNode));\n // 2. Wildcard segment match (`*`)\n const wildcardNode = node.children.get('*');\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, this.traverseBySegments(restSegments, wildcardNode));\n // 3. Deep wildcard segment match (`**`)\n const deepWildcardNode = node.children.get('**');\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, deepWildcardNode);\n return currentBestMatchNode;\n }\n /**\n * Compares two nodes and returns the node with higher priority based on insertion index.\n * A node with a lower insertion index is prioritized as it was defined earlier.\n *\n * @param currentBestMatchNode - The current best match node.\n * @param candidateNode - The node being evaluated for higher priority based on insertion index.\n * @returns The node with higher priority (i.e., lower insertion index). If one of the nodes is `undefined`, the other node is returned.\n */\n getHigherPriorityNode(currentBestMatchNode, candidateNode) {\n if (!candidateNode) {\n return currentBestMatchNode;\n }\n if (!currentBestMatchNode) {\n return candidateNode;\n }\n return candidateNode.insertionIndex < currentBestMatchNode.insertionIndex\n ? candidateNode\n : currentBestMatchNode;\n }\n /**\n * Creates an empty route tree node with the specified segment.\n * This helper function is used during the tree construction.\n *\n * @param segment - The route segment that this node represents.\n * @returns A new, empty route tree node.\n */\n createEmptyRouteTreeNode(segment) {\n return {\n segment,\n insertionIndex: -1,\n children: new Map(),\n };\n }\n}\n//# sourceMappingURL=route-tree.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { APP_BASE_HREF, PlatformLocation } from '@angular/common';\nimport { APP_INITIALIZER, ApplicationRef, Compiler, inject, runInInjectionContext, ɵConsole, } from '@angular/core';\nimport { INITIAL_CONFIG, platformServer } from '@angular/platform-server';\nimport { Router, ɵloadChildren as loadChildrenHelper } from '@angular/router';\nimport { ServerAssets } from '../assets';\nimport { Console } from '../console';\nimport { getAngularAppManifest } from '../manifest';\nimport { isNgModule } from '../utils/ng';\nimport { promiseWithAbort } from '../utils/promise';\nimport { addTrailingSlash, joinUrlParts, stripLeadingSlash } from '../utils/url';\nimport { PrerenderFallback, RenderMode, SERVER_ROUTES_CONFIG, } from './route-config';\nimport { RouteTree } from './route-tree';\n/**\n * Regular expression to match segments preceded by a colon in a string.\n */\nconst URL_PARAMETER_REGEXP = /(?<!\\\\):([^/]+)/g;\n/**\n * An set of HTTP status codes that are considered valid for redirect responses.\n */\nconst VALID_REDIRECT_RESPONSE_CODES = new Set([301, 302, 303, 307, 308]);\n/**\n * Traverses an array of route configurations to generate route tree node metadata.\n *\n * This function processes each route and its children, handling redirects, SSG (Static Site Generation) settings,\n * and lazy-loaded routes. It yields route metadata for each route and its potential variants.\n *\n * @param options - The configuration options for traversing routes.\n * @returns An async iterable iterator yielding either route tree node metadata or an error object with an error message.\n */\nasync function* traverseRoutesConfig(options) {\n const { routes, compiler, parentInjector, parentRoute, serverConfigRouteTree, invokeGetPrerenderParams, includePrerenderFallbackRoutes, } = options;\n for (const route of routes) {\n try {\n const { path = '', redirectTo, loadChildren, children } = route;\n const currentRoutePath = joinUrlParts(parentRoute, path);\n // Get route metadata from the server config route tree, if available\n let matchedMetaData;\n if (serverConfigRouteTree) {\n matchedMetaData = serverConfigRouteTree.match(currentRoutePath);\n if (!matchedMetaData) {\n yield {\n error: `The '${stripLeadingSlash(currentRoutePath)}' route does not match any route defined in the server routing configuration. ` +\n 'Please ensure this route is added to the server routing configuration.',\n };\n continue;\n }\n matchedMetaData.presentInClientRouter = true;\n }\n const metadata = {\n renderMode: RenderMode.Prerender,\n ...matchedMetaData,\n // Match Angular router behavior\n // ['one', 'two', ''] -> 'one/two/'\n // ['one', 'two', 'three'] -> 'one/two/three'\n route: path === '' ? addTrailingSlash(currentRoutePath) : currentRoutePath,\n };\n delete metadata.presentInClientRouter;\n if (metadata.renderMode === RenderMode.Prerender) {\n // Handle SSG routes\n yield* handleSSGRoute(typeof redirectTo === 'string' ? redirectTo : undefined, metadata, parentInjector, invokeGetPrerenderParams, includePrerenderFallbackRoutes);\n }\n else if (typeof redirectTo === 'string') {\n // Handle redirects\n if (metadata.status && !VALID_REDIRECT_RESPONSE_CODES.has(metadata.status)) {\n yield {\n error: `The '${metadata.status}' status code is not a valid redirect response code. ` +\n `Please use one of the following redirect response codes: ${[...VALID_REDIRECT_RESPONSE_CODES.values()].join(', ')}.`,\n };\n continue;\n }\n yield { ...metadata, redirectTo: resolveRedirectTo(metadata.route, redirectTo) };\n }\n else {\n yield metadata;\n }\n // Recursively process child routes\n if (children?.length) {\n yield* traverseRoutesConfig({\n ...options,\n routes: children,\n parentRoute: currentRoutePath,\n });\n }\n // Load and process lazy-loaded child routes\n if (loadChildren) {\n const loadedChildRoutes = await loadChildrenHelper(route, compiler, parentInjector).toPromise();\n if (loadedChildRoutes) {\n const { routes: childRoutes, injector = parentInjector } = loadedChildRoutes;\n yield* traverseRoutesConfig({\n ...options,\n routes: childRoutes,\n parentInjector: injector,\n parentRoute: currentRoutePath,\n });\n }\n }\n }\n catch (error) {\n yield {\n error: `Error processing route '${stripLeadingSlash(route.path ?? '')}': ${error.message}`,\n };\n }\n }\n}\n/**\n * Handles SSG (Static Site Generation) routes by invoking `getPrerenderParams` and yielding\n * all parameterized paths, returning any errors encountered.\n *\n * @param redirectTo - Optional path to redirect to, if specified.\n * @param metadata - The metadata associated with the route tree node.\n * @param parentInjector - The dependency injection container for the parent route.\n * @param invokeGetPrerenderParams - A flag indicating whether to invoke the `getPrerenderParams` function.\n * @param includePrerenderFallbackRoutes - A flag indicating whether to include fallback routes in the result.\n * @returns An async iterable iterator that yields route tree node metadata for each SSG path or errors.\n */\nasync function* handleSSGRoute(redirectTo, metadata, parentInjector, invokeGetPrerenderParams, includePrerenderFallbackRoutes) {\n if (metadata.renderMode !== RenderMode.Prerender) {\n throw new Error(`'handleSSGRoute' was called for a route which rendering mode is not prerender.`);\n }\n const { route: currentRoutePath, fallback, ...meta } = metadata;\n const getPrerenderParams = 'getPrerenderParams' in meta ? meta.getPrerenderParams : undefined;\n if ('getPrerenderParams' in meta) {\n delete meta['getPrerenderParams'];\n }\n if (redirectTo !== undefined) {\n meta.redirectTo = resolveRedirectTo(currentRoutePath, redirectTo);\n }\n if (!URL_PARAMETER_REGEXP.test(currentRoutePath)) {\n // Route has no parameters\n yield {\n ...meta,\n route: currentRoutePath,\n };\n return;\n }\n if (invokeGetPrerenderParams) {\n if (!getPrerenderParams) {\n yield {\n error: `The '${stripLeadingSlash(currentRoutePath)}' route uses prerendering and includes parameters, but 'getPrerenderParams' ` +\n `is missing. Please define 'getPrerenderParams' function for this route in your server routing configuration ` +\n `or specify a different 'renderMode'.`,\n };\n return;\n }\n const parameters = await runInInjectionContext(parentInjector, () => getPrerenderParams());\n try {\n for (const params of parameters) {\n const routeWithResolvedParams = currentRoutePath.replace(URL_PARAMETER_REGEXP, (match) => {\n const parameterName = match.slice(1);\n const value = params[parameterName];\n if (typeof value !== 'string') {\n throw new Error(`The 'getPrerenderParams' function defined for the '${stripLeadingSlash(currentRoutePath)}' route ` +\n `returned a non-string value for parameter '${parameterName}'. ` +\n `Please make sure the 'getPrerenderParams' function returns values for all parameters ` +\n 'specified in this route.');\n }\n return value;\n });\n yield {\n ...meta,\n route: routeWithResolvedParams,\n redirectTo: redirectTo === undefined\n ? undefined\n : resolveRedirectTo(routeWithResolvedParams, redirectTo),\n };\n }\n }\n catch (error) {\n yield { error: `${error.message}` };\n return;\n }\n }\n // Handle fallback render modes\n if (includePrerenderFallbackRoutes &&\n (fallback !== PrerenderFallback.None || !invokeGetPrerenderParams)) {\n yield {\n ...meta,\n route: currentRoutePath,\n renderMode: fallback === PrerenderFallback.Client ? RenderMode.Client : RenderMode.Server,\n };\n }\n}\n/**\n * Resolves the `redirectTo` property for a given route.\n *\n * This function processes the `redirectTo` property to ensure that it correctly\n * resolves relative to the current route path. If `redirectTo` is an absolute path,\n * it is returned as is. If it is a relative path, it is resolved based on the current route path.\n *\n * @param routePath - The current route path.\n * @param redirectTo - The target path for redirection.\n * @returns The resolved redirect path as a string.\n */\nfunction resolveRedirectTo(routePath, redirectTo) {\n if (redirectTo[0] === '/') {\n // If the redirectTo path is absolute, return it as is.\n return redirectTo;\n }\n // Resolve relative redirectTo based on the current route path.\n const segments = routePath.replace(URL_PARAMETER_REGEXP, '*').split('/');\n segments.pop(); // Remove the last segment to make it relative.\n return joinUrlParts(...segments, redirectTo);\n}\n/**\n * Builds a server configuration route tree from the given server routes configuration.\n *\n * @param serverRoutesConfig - The server routes to be used for configuration.\n\n * @returns An object containing:\n * - `serverConfigRouteTree`: A populated `RouteTree` instance, which organizes the server routes\n * along with their additional metadata.\n * - `errors`: An array of strings that list any errors encountered during the route tree construction\n * process, such as invalid paths.\n */\nfunction buildServerConfigRouteTree({ routes, appShellRoute }) {\n const serverRoutes = [...routes];\n if (appShellRoute !== undefined) {\n serverRoutes.unshift({\n path: appShellRoute,\n renderMode: RenderMode.Prerender,\n });\n }\n const serverConfigRouteTree = new RouteTree();\n const errors = [];\n for (const { path, ...metadata } of serverRoutes) {\n if (path[0] === '/') {\n errors.push(`Invalid '${path}' route configuration: the path cannot start with a slash.`);\n continue;\n }\n serverConfigRouteTree.insert(path, metadata);\n }\n return { serverConfigRouteTree, errors };\n}\n/**\n * Retrieves routes from the given Angular application.\n *\n * This function initializes an Angular platform, bootstraps the application or module,\n * and retrieves routes from the Angular router configuration. It handles both module-based\n * and function-based bootstrapping. It yields the resulting routes as `RouteTreeNodeMetadata` objects or errors.\n *\n * @param bootstrap - A function that returns a promise resolving to an `ApplicationRef` or an Angular module to bootstrap.\n * @param document - The initial HTML document used for server-side rendering.\n * This document is necessary to render the application on the server.\n * @param url - The URL for server-side rendering. The URL is used to configure `ServerPlatformLocation`. This configuration is crucial\n * for ensuring that API requests for relative paths succeed, which is essential for accurate route extraction.\n * @param invokeGetPrerenderParams - A boolean flag indicating whether to invoke `getPrerenderParams` for parameterized SSG routes\n * to handle prerendering paths. Defaults to `false`.\n * @param includePrerenderFallbackRoutes - A flag indicating whether to include fallback routes in the result. Defaults to `true`.\n *\n * @returns A promise that resolves to an object of type `AngularRouterConfigResult` or errors.\n */\nexport async function getRoutesFromAngularRouterConfig(bootstrap, document, url, invokeGetPrerenderParams = false, includePrerenderFallbackRoutes = true) {\n const { protocol, host } = url;\n // Create and initialize the Angular platform for server-side rendering.\n const platformRef = platformServer([\n {\n provide: INITIAL_CONFIG,\n useValue: { document, url: `${protocol}//${host}/` },\n },\n {\n // An Angular Console Provider that does not print a set of predefined logs.\n provide: ɵConsole,\n // Using `useClass` would necessitate decorating `Console` with `@Injectable`,\n // which would require switching from `ts_library` to `ng_module`. This change\n // would also necessitate various patches of `@angular/bazel` to support ESM.\n useFactory: () => new Console(),\n },\n {\n // We cannot replace `ApplicationRef` with a different provider here due to the dependency injection (DI) hierarchy.\n // This code is running at the platform level, where `ApplicationRef` is provided in the root injector.\n // As a result, any attempt to replace it will cause the root provider to override the platform provider.\n // TODO(alanagius): investigate exporting the app config directly which would help with: https://github.com/angular/angular/issues/59144\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: () => () => {\n const appRef = inject(ApplicationRef);\n appRef.bootstrap = () => undefined;\n },\n },\n ]);\n try {\n let applicationRef;\n if (isNgModule(bootstrap)) {\n const moduleRef = await platformRef.bootstrapModule(bootstrap);\n applicationRef = moduleRef.injector.get(ApplicationRef);\n }\n else {\n applicationRef = await bootstrap();\n }\n // Wait until the application is stable.\n await applicationRef.whenStable();\n const injector = applicationRef.injector;\n const router = injector.get(Router);\n const routesResults = [];\n const errors = [];\n let baseHref = injector.get(APP_BASE_HREF, null, { optional: true }) ??\n injector.get(PlatformLocation).getBaseHrefFromDOM();\n if (baseHref.startsWith('./')) {\n baseHref = baseHref.slice(2);\n }\n const compiler = injector.get(Compiler);\n const serverRoutesConfig = injector.get(SERVER_ROUTES_CONFIG, null, { optional: true });\n let serverConfigRouteTree;\n if (serverRoutesConfig) {\n const result = buildServerConfigRouteTree(serverRoutesConfig);\n serverConfigRouteTree = result.serverConfigRouteTree;\n errors.push(...result.errors);\n }\n if (errors.length) {\n return {\n baseHref,\n routes: routesResults,\n errors,\n };\n }\n if (router.config.length) {\n // Retrieve all routes from the Angular router configuration.\n const traverseRoutes = traverseRoutesConfig({\n routes: router.config,\n compiler,\n parentInjector: injector,\n parentRoute: '',\n serverConfigRouteTree,\n invokeGetPrerenderParams,\n includePrerenderFallbackRoutes,\n });\n for await (const result of traverseRoutes) {\n if ('error' in result) {\n errors.push(result.error);\n }\n else {\n routesResults.push(result);\n }\n }\n if (serverConfigRouteTree) {\n for (const { route, presentInClientRouter } of serverConfigRouteTree.traverse()) {\n if (presentInClientRouter || route === '**') {\n // Skip if matched or it's the catch-all route.\n continue;\n }\n errors.push(`The '${route}' server route does not match any routes defined in the Angular ` +\n `routing configuration (typically provided as a part of the 'provideRouter' call). ` +\n 'Please make sure that the mentioned server route is present in the Angular routing configuration.');\n }\n }\n }\n else {\n const rootRouteMetadata = serverConfigRouteTree?.match('') ?? {\n route: '',\n renderMode: RenderMode.Prerender,\n };\n routesResults.push({\n ...rootRouteMetadata,\n // Matched route might be `/*` or `/**`, which would make Angular serve all routes rather than just `/`.\n // So we limit to just `/` for the empty app router case.\n route: '',\n });\n }\n return {\n baseHref,\n routes: routesResults,\n errors,\n appShellRoute: serverRoutesConfig?.appShellRoute,\n };\n }\n finally {\n platformRef.destroy();\n }\n}\n/**\n * Asynchronously extracts routes from the Angular application configuration\n * and creates a `RouteTree` to manage server-side routing.\n *\n * @param options - An object containing the following options:\n * - `url`: The URL for server-side rendering. The URL is used to configure `ServerPlatformLocation`. This configuration is crucial\n * for ensuring that API requests for relative paths succeed, which is essential for accurate route extraction.\n * See:\n * - https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51\n * - https://github.com/angular/angular/blob/6882cc7d9eed26d3caeedca027452367ba25f2b9/packages/platform-server/src/http.ts#L44\n * - `manifest`: An optional `AngularAppManifest` that contains the application's routing and configuration details.\n * If not provided, the default manifest is retrieved using `getAngularAppManifest()`.\n * - `invokeGetPrerenderParams`: A boolean flag indicating whether to invoke `getPrerenderParams` for parameterized SSG routes\n * to handle prerendering paths. Defaults to `false`.\n * - `includePrerenderFallbackRoutes`: A flag indicating whether to include fallback routes in the result. Defaults to `true`.\n * - `signal`: An optional `AbortSignal` that can be used to abort the operation.\n *\n * @returns A promise that resolves to an object containing:\n * - `routeTree`: A populated `RouteTree` containing all extracted routes from the Angular application.\n * - `appShellRoute`: The specified route for the app-shell, if configured.\n * - `errors`: An array of strings representing any errors encountered during the route extraction process.\n */\nexport function extractRoutesAndCreateRouteTree(options) {\n const { url, manifest = getAngularAppManifest(), invokeGetPrerenderParams = false, includePrerenderFallbackRoutes = true, signal, } = options;\n async function extract() {\n const routeTree = new RouteTree();\n const document = await new ServerAssets(manifest).getIndexServerHtml().text();\n const bootstrap = await manifest.bootstrap();\n const { baseHref, appShellRoute, routes, errors } = await getRoutesFromAngularRouterConfig(bootstrap, document, url, invokeGetPrerenderParams, includePrerenderFallbackRoutes);\n for (const { route, ...metadata } of routes) {\n if (metadata.redirectTo !== undefined) {\n metadata.redirectTo = joinUrlParts(baseHref, metadata.redirectTo);\n }\n // Remove undefined fields\n // Helps avoid unnecessary test updates\n for (const [key, value] of Object.entries(metadata)) {\n if (value === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n delete metadata[key];\n }\n }\n const fullRoute = joinUrlParts(baseHref, route);\n routeTree.insert(fullRoute, metadata);\n }\n return {\n appShellRoute,\n routeTree,\n errors,\n };\n }\n return signal ? promiseWithAbort(extract(), signal, 'Routes extraction') : extract();\n}\n//# sourceMappingURL=ng-routes.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Manages a collection of hooks and provides methods to register and execute them.\n * Hooks are functions that can be invoked with specific arguments to allow modifications or enhancements.\n */\nexport class Hooks {\n /**\n * A map of hook names to arrays of hook functions.\n * Each hook name can have multiple associated functions, which are executed in sequence.\n */\n store = new Map();\n /**\n * Executes all hooks associated with the specified name, passing the given argument to each hook function.\n * The hooks are invoked sequentially, and the argument may be modified by each hook.\n *\n * @template Hook - The type of the hook name. It should be one of the keys of `HooksMapping`.\n * @param name - The name of the hook whose functions will be executed.\n * @param context - The input value to be passed to each hook function. The value is mutated by each hook function.\n * @returns A promise that resolves once all hook functions have been executed.\n *\n * @example\n * ```typescript\n * const hooks = new Hooks();\n * hooks.on('html:transform:pre', async (ctx) => {\n * ctx.html = ctx.html.replace(/foo/g, 'bar');\n * return ctx.html;\n * });\n * const result = await hooks.run('html:transform:pre', { html: '<div>foo</div>' });\n * console.log(result); // '<div>bar</div>'\n * ```\n * @internal\n */\n async run(name, context) {\n const hooks = this.store.get(name);\n switch (name) {\n case 'html:transform:pre': {\n if (!hooks) {\n return context.html;\n }\n const ctx = { ...context };\n for (const hook of hooks) {\n ctx.html = await hook(ctx);\n }\n return ctx.html;\n }\n default:\n throw new Error(`Running hook \"${name}\" is not supported.`);\n }\n }\n /**\n * Registers a new hook function under the specified hook name.\n * This function should be a function that takes an argument of type `T` and returns a `string` or `Promise<string>`.\n *\n * @template Hook - The type of the hook name. It should be one of the keys of `HooksMapping`.\n * @param name - The name of the hook under which the function will be registered.\n * @param handler - A function to be executed when the hook is triggered. The handler will be called with an argument\n * that may be modified by the hook functions.\n *\n * @remarks\n * - If there are existing handlers registered under the given hook name, the new handler will be added to the list.\n * - If no handlers are registered under the given hook name, a new list will be created with the handler as its first element.\n *\n * @example\n * ```typescript\n * hooks.on('html:transform:pre', async (ctx) => {\n * return ctx.html.replace(/foo/g, 'bar');\n * });\n * ```\n */\n on(name, handler) {\n const hooks = this.store.get(name);\n if (hooks) {\n hooks.push(handler);\n }\n else {\n this.store.set(name, [handler]);\n }\n }\n /**\n * Checks if there are any hooks registered under the specified name.\n *\n * @param name - The name of the hook to check.\n * @returns `true` if there are hooks registered under the specified name, otherwise `false`.\n */\n has(name) {\n return !!this.store.get(name)?.length;\n }\n}\n//# sourceMappingURL=hooks.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { stripIndexHtmlFromURL } from '../utils/url';\nimport { extractRoutesAndCreateRouteTree } from './ng-routes';\nimport { RouteTree } from './route-tree';\n/**\n * Manages the application's server routing logic by building and maintaining a route tree.\n *\n * This class is responsible for constructing the route tree from the Angular application\n * configuration and using it to match incoming requests to the appropriate routes.\n */\nexport class ServerRouter {\n routeTree;\n /**\n * Creates an instance of the `ServerRouter`.\n *\n * @param routeTree - An instance of `RouteTree` that holds the routing information.\n * The `RouteTree` is used to match request URLs to the appropriate route metadata.\n */\n constructor(routeTree) {\n this.routeTree = routeTree;\n }\n /**\n * Static property to track the ongoing build promise.\n */\n static #extractionPromise;\n /**\n * Creates or retrieves a `ServerRouter` instance based on the provided manifest and URL.\n *\n * If the manifest contains pre-built routes, a new `ServerRouter` is immediately created.\n * Otherwise, it builds the router by extracting routes from the Angular configuration\n * asynchronously. This method ensures that concurrent builds are prevented by re-using\n * the same promise.\n *\n * @param manifest - An instance of `AngularAppManifest` that contains the route information.\n * @param url - The URL for server-side rendering. The URL is needed to configure `ServerPlatformLocation`.\n * This is necessary to ensure that API requests for relative paths succeed, which is crucial for correct route extraction.\n * [Reference](https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51)\n * @returns A promise resolving to a `ServerRouter` instance.\n */\n static from(manifest, url) {\n if (manifest.routes) {\n const routeTree = RouteTree.fromObject(manifest.routes);\n return Promise.resolve(new ServerRouter(routeTree));\n }\n // Create and store a new promise for the build process.\n // This prevents concurrent builds by re-using the same promise.\n ServerRouter.#extractionPromise ??= extractRoutesAndCreateRouteTree({ url, manifest })\n .then(({ routeTree, errors }) => {\n if (errors.length > 0) {\n throw new Error('Error(s) occurred while extracting routes:\\n' +\n errors.map((error) => `- ${error}`).join('\\n'));\n }\n return new ServerRouter(routeTree);\n })\n .finally(() => {\n ServerRouter.#extractionPromise = undefined;\n });\n return ServerRouter.#extractionPromise;\n }\n /**\n * Matches a request URL against the route tree to retrieve route metadata.\n *\n * This method strips 'index.html' from the URL if it is present and then attempts\n * to find a match in the route tree. If a match is found, it returns the associated\n * route metadata; otherwise, it returns `undefined`.\n *\n * @param url - The URL to be matched against the route tree.\n * @returns The metadata for the matched route or `undefined` if no match is found.\n */\n match(url) {\n // Strip 'index.html' from URL if present.\n // A request to `http://www.example.com/page/index.html` will render the Angular route corresponding to `http://www.example.com/page`.\n const { pathname } = stripIndexHtmlFromURL(url);\n return this.routeTree.match(decodeURIComponent(pathname));\n }\n}\n//# sourceMappingURL=router.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Generates a SHA-256 hash of the provided string.\n *\n * @param data - The input string to be hashed.\n * @returns A promise that resolves to the SHA-256 hash of the input,\n * represented as a hexadecimal string.\n */\nexport async function sha256(data) {\n const encodedData = new TextEncoder().encode(data);\n const hashBuffer = await crypto.subtle.digest('SHA-256', encodedData);\n const hashParts = [];\n for (const h of new Uint8Array(hashBuffer)) {\n hashParts.push(h.toString(16).padStart(2, '0'));\n }\n return hashParts.join('');\n}\n//# sourceMappingURL=crypto.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport Beasties from '../../third_party/beasties';\n/**\n * Pattern used to extract the media query set by Beasties in an `onload` handler.\n */\nconst MEDIA_SET_HANDLER_PATTERN = /^this\\.media=[\"'](.*)[\"'];?$/;\n/**\n * Name of the attribute used to save the Beasties media query so it can be re-assigned on load.\n */\nconst CSP_MEDIA_ATTR = 'ngCspMedia';\n/**\n * Script that dynamically updates the `media` attribute of `<link>` tags based on a custom attribute (`CSP_MEDIA_ATTR`).\n *\n * NOTE:\n * We do not use `document.querySelectorAll('link').forEach((s) => s.addEventListener('load', ...)`\n * because load events are not always triggered reliably on Chrome.\n * See: https://github.com/angular/angular-cli/issues/26932 and https://crbug.com/1521256\n *\n * The script:\n * - Ensures the event target is a `<link>` tag with the `CSP_MEDIA_ATTR` attribute.\n * - Updates the `media` attribute with the value of `CSP_MEDIA_ATTR` and then removes the attribute.\n * - Removes the event listener when all relevant `<link>` tags have been processed.\n * - Uses event capturing (the `true` parameter) since load events do not bubble up the DOM.\n */\nconst LINK_LOAD_SCRIPT_CONTENT = /* @__PURE__ */ (() => `(() => {\n const CSP_MEDIA_ATTR = '${CSP_MEDIA_ATTR}';\n const documentElement = document.documentElement;\n\n // Listener for load events on link tags.\n const listener = (e) => {\n const target = e.target;\n if (\n !target ||\n target.tagName !== 'LINK' ||\n !target.hasAttribute(CSP_MEDIA_ATTR)\n ) {\n return;\n }\n\n target.media = target.getAttribute(CSP_MEDIA_ATTR);\n target.removeAttribute(CSP_MEDIA_ATTR);\n\n if (!document.head.querySelector(\\`link[\\${CSP_MEDIA_ATTR}]\\`)) {\n documentElement.removeEventListener('load', listener);\n }\n };\n\n documentElement.addEventListener('load', listener, true);\n})();`)();\nclass BeastiesBase extends Beasties {\n}\n/* eslint-enable @typescript-eslint/no-unsafe-declaration-merging */\nexport class InlineCriticalCssProcessor extends BeastiesBase {\n readFile;\n outputPath;\n addedCspScriptsDocuments = new WeakSet();\n documentNonces = new WeakMap();\n constructor(readFile, outputPath) {\n super({\n logger: {\n // eslint-disable-next-line no-console\n warn: (s) => console.warn(s),\n // eslint-disable-next-line no-console\n error: (s) => console.error(s),\n info: () => { },\n },\n logLevel: 'warn',\n path: outputPath,\n publicPath: undefined,\n compress: false,\n pruneSource: false,\n reduceInlineStyles: false,\n mergeStylesheets: false,\n // Note: if `preload` changes to anything other than `media`, the logic in\n // `embedLinkedStylesheet` will have to be updated.\n preload: 'media',\n noscriptFallback: true,\n inlineFonts: true,\n });\n this.readFile = readFile;\n this.outputPath = outputPath;\n }\n /**\n * Override of the Beasties `embedLinkedStylesheet` method\n * that makes it work with Angular's CSP APIs.\n */\n async embedLinkedStylesheet(link, document) {\n if (link.getAttribute('media') === 'print' && link.next?.name === 'noscript') {\n // Workaround for https://github.com/GoogleChromeLabs/critters/issues/64\n // NB: this is only needed for the webpack based builders.\n const media = link.getAttribute('onload')?.match(MEDIA_SET_HANDLER_PATTERN);\n if (media) {\n link.removeAttribute('onload');\n link.setAttribute('media', media[1]);\n link?.next?.remove();\n }\n }\n const returnValue = await super.embedLinkedStylesheet(link, document);\n const cspNonce = this.findCspNonce(document);\n if (cspNonce) {\n const beastiesMedia = link.getAttribute('onload')?.match(MEDIA_SET_HANDLER_PATTERN);\n if (beastiesMedia) {\n // If there's a Beasties-generated `onload` handler and the file has an Angular CSP nonce,\n // we have to remove the handler, because it's incompatible with CSP. We save the value\n // in a different attribute and we generate a script tag with the nonce that uses\n // `addEventListener` to apply the media query instead.\n link.removeAttribute('onload');\n link.setAttribute(CSP_MEDIA_ATTR, beastiesMedia[1]);\n this.conditionallyInsertCspLoadingScript(document, cspNonce, link);\n }\n // Ideally we would hook in at the time Beasties inserts the `style` tags, but there isn't\n // a way of doing that at the moment so we fall back to doing it any time a `link` tag is\n // inserted. We mitigate it by only iterating the direct children of the `<head>` which\n // should be pretty shallow.\n document.head.children.forEach((child) => {\n if (child.tagName === 'style' && !child.hasAttribute('nonce')) {\n child.setAttribute('nonce', cspNonce);\n }\n });\n }\n return returnValue;\n }\n /**\n * Finds the CSP nonce for a specific document.\n */\n findCspNonce(document) {\n if (this.documentNonces.has(document)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this.documentNonces.get(document);\n }\n // HTML attribute are case-insensitive, but the parser used by Beasties is case-sensitive.\n const nonceElement = document.querySelector('[ngCspNonce], [ngcspnonce]');\n const cspNonce = nonceElement?.getAttribute('ngCspNonce') || nonceElement?.getAttribute('ngcspnonce') || null;\n this.documentNonces.set(document, cspNonce);\n return cspNonce;\n }\n /**\n * Inserts the `script` tag that swaps the critical CSS at runtime,\n * if one hasn't been inserted into the document already.\n */\n conditionallyInsertCspLoadingScript(document, nonce, link) {\n if (this.addedCspScriptsDocuments.has(document)) {\n return;\n }\n if (document.head.textContent.includes(LINK_LOAD_SCRIPT_CONTENT)) {\n // Script was already added during the build.\n this.addedCspScriptsDocuments.add(document);\n return;\n }\n const script = document.createElement('script');\n script.setAttribute('nonce', nonce);\n script.textContent = LINK_LOAD_SCRIPT_CONTENT;\n // Prepend the script to the head since it needs to\n // run as early as possible, before the `link` tags.\n document.head.insertBefore(script, link);\n this.addedCspScriptsDocuments.add(document);\n }\n}\n//# sourceMappingURL=inline-critical-css.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * A Least Recently Used (LRU) cache implementation.\n *\n * This cache stores a fixed number of key-value pairs, and when the cache exceeds its capacity,\n * the least recently accessed items are evicted.\n *\n * @template Key - The type of the cache keys.\n * @template Value - The type of the cache values.\n */\nexport class LRUCache {\n /**\n * The maximum number of items the cache can hold.\n */\n capacity;\n /**\n * Internal storage for the cache, mapping keys to their associated nodes in the linked list.\n */\n cache = new Map();\n /**\n * Head of the doubly linked list, representing the most recently used item.\n */\n head;\n /**\n * Tail of the doubly linked list, representing the least recently used item.\n */\n tail;\n /**\n * Creates a new LRUCache instance.\n * @param capacity The maximum number of items the cache can hold.\n */\n constructor(capacity) {\n this.capacity = capacity;\n }\n /**\n * Gets the value associated with the given key.\n * @param key The key to retrieve the value for.\n * @returns The value associated with the key, or undefined if the key is not found.\n */\n get(key) {\n const node = this.cache.get(key);\n if (node) {\n this.moveToHead(node);\n return node.value;\n }\n return undefined;\n }\n /**\n * Puts a key-value pair into the cache.\n * If the key already exists, the value is updated.\n * If the cache is full, the least recently used item is evicted.\n * @param key The key to insert or update.\n * @param value The value to associate with the key.\n */\n put(key, value) {\n const cachedNode = this.cache.get(key);\n if (cachedNode) {\n // Update existing node\n cachedNode.value = value;\n this.moveToHead(cachedNode);\n return;\n }\n // Create a new node\n const newNode = { key, value, prev: undefined, next: undefined };\n this.cache.set(key, newNode);\n this.addToHead(newNode);\n if (this.cache.size > this.capacity) {\n // Evict the LRU item\n const tail = this.removeTail();\n if (tail) {\n this.cache.delete(tail.key);\n }\n }\n }\n /**\n * Adds a node to the head of the linked list.\n * @param node The node to add.\n */\n addToHead(node) {\n node.next = this.head;\n node.prev = undefined;\n if (this.head) {\n this.head.prev = node;\n }\n this.head = node;\n if (!this.tail) {\n this.tail = node;\n }\n }\n /**\n * Removes a node from the linked list.\n * @param node The node to remove.\n */\n removeNode(node) {\n if (node.prev) {\n node.prev.next = node.next;\n }\n else {\n this.head = node.next;\n }\n if (node.next) {\n node.next.prev = node.prev;\n }\n else {\n this.tail = node.prev;\n }\n }\n /**\n * Moves a node to the head of the linked list.\n * @param node The node to move.\n */\n moveToHead(node) {\n this.removeNode(node);\n this.addToHead(node);\n }\n /**\n * Removes the tail node from the linked list.\n * @returns The removed tail node, or undefined if the list is empty.\n */\n removeTail() {\n const node = this.tail;\n if (node) {\n this.removeNode(node);\n }\n return node;\n }\n}\n//# sourceMappingURL=lru-cache.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { LOCALE_ID, REQUEST, REQUEST_CONTEXT, RESPONSE_INIT, ɵresetCompiledComponents, } from '@angular/core';\nimport { ServerAssets } from './assets';\nimport { Hooks } from './hooks';\nimport { getAngularAppManifest } from './manifest';\nimport { RenderMode } from './routes/route-config';\nimport { ServerRouter } from './routes/router';\nimport { sha256 } from './utils/crypto';\nimport { InlineCriticalCssProcessor } from './utils/inline-critical-css';\nimport { LRUCache } from './utils/lru-cache';\nimport { renderAngular } from './utils/ng';\nimport { promiseWithAbort } from './utils/promise';\nimport { buildPathWithParams, joinUrlParts, stripLeadingSlash } from './utils/url';\n/**\n * Maximum number of critical CSS entries the cache can store.\n * This value determines the capacity of the LRU (Least Recently Used) cache, which stores critical CSS for pages.\n */\nconst MAX_INLINE_CSS_CACHE_ENTRIES = 50;\n/**\n * A mapping of `RenderMode` enum values to corresponding string representations.\n *\n * This record is used to map each `RenderMode` to a specific string value that represents\n * the server context. The string values are used internally to differentiate\n * between various rendering strategies when processing routes.\n *\n * - `RenderMode.Prerender` maps to `'ssg'` (Static Site Generation).\n * - `RenderMode.Server` maps to `'ssr'` (Server-Side Rendering).\n * - `RenderMode.Client` maps to an empty string `''` (Client-Side Rendering, no server context needed).\n */\nconst SERVER_CONTEXT_VALUE = {\n [RenderMode.Prerender]: 'ssg',\n [RenderMode.Server]: 'ssr',\n [RenderMode.Client]: '',\n};\n/**\n * Represents a locale-specific Angular server application managed by the server application engine.\n *\n * The `AngularServerApp` class handles server-side rendering and asset management for a specific locale.\n */\nexport class AngularServerApp {\n options;\n /**\n * Whether prerendered routes should be rendered on demand or served directly.\n *\n * @see {@link AngularServerAppOptions.allowStaticRouteRender} for more details.\n */\n allowStaticRouteRender;\n /**\n * Hooks for extending or modifying server behavior.\n *\n * @see {@link AngularServerAppOptions.hooks} for more details.\n */\n hooks;\n /**\n * Constructs an instance of `AngularServerApp`.\n *\n * @param options Optional configuration options for the server application.\n */\n constructor(options = {}) {\n this.options = options;\n this.allowStaticRouteRender = this.options.allowStaticRouteRender ?? false;\n this.hooks = options.hooks ?? new Hooks();\n }\n /**\n * The manifest associated with this server application.\n */\n manifest = getAngularAppManifest();\n /**\n * An instance of ServerAsset that handles server-side asset.\n */\n assets = new ServerAssets(this.manifest);\n /**\n * The router instance used for route matching and handling.\n */\n router;\n /**\n * The `inlineCriticalCssProcessor` is responsible for handling critical CSS inlining.\n */\n inlineCriticalCssProcessor;\n /**\n * The bootstrap mechanism for the server application.\n */\n boostrap;\n /**\n * Cache for storing critical CSS for pages.\n * Stores a maximum of MAX_INLINE_CSS_CACHE_ENTRIES entries.\n *\n * Uses an LRU (Least Recently Used) eviction policy, meaning that when the cache is full,\n * the least recently accessed page's critical CSS will be removed to make space for new entries.\n */\n criticalCssLRUCache = new LRUCache(MAX_INLINE_CSS_CACHE_ENTRIES);\n /**\n * Handles an incoming HTTP request by serving prerendered content, performing server-side rendering,\n * or delivering a static file for client-side rendered routes based on the `RenderMode` setting.\n *\n * @param request - The HTTP request to handle.\n * @param requestContext - Optional context for rendering, such as metadata associated with the request.\n * @returns A promise that resolves to the resulting HTTP response object, or `null` if no matching Angular route is found.\n *\n * @remarks A request to `https://www.example.com/page/index.html` will serve or render the Angular route\n * corresponding to `https://www.example.com/page`.\n */\n async handle(request, requestContext) {\n const url = new URL(request.url);\n this.router ??= await ServerRouter.from(this.manifest, url);\n const matchedRoute = this.router.match(url);\n if (!matchedRoute) {\n // Not a known Angular route.\n return null;\n }\n const { redirectTo, status, renderMode } = matchedRoute;\n if (redirectTo !== undefined) {\n return new Response(null, {\n // Note: The status code is validated during route extraction.\n // 302 Found is used by default for redirections\n // See: https://developer.mozilla.org/en-US/docs/Web/API/Response/redirect_static#status\n status: status ?? 302,\n headers: {\n 'Location': buildPathWithParams(redirectTo, url.pathname),\n },\n });\n }\n if (renderMode === RenderMode.Prerender) {\n const response = await this.handleServe(request, matchedRoute);\n if (response) {\n return response;\n }\n }\n return promiseWithAbort(this.handleRendering(request, matchedRoute, requestContext), request.signal, `Request for: ${request.url}`);\n }\n /**\n * Handles serving a prerendered static asset if available for the matched route.\n *\n * This method only supports `GET` and `HEAD` requests.\n *\n * @param request - The incoming HTTP request for serving a static page.\n * @param matchedRoute - The metadata of the matched route for rendering.\n * If not provided, the method attempts to find a matching route based on the request URL.\n * @returns A promise that resolves to a `Response` object if the prerendered page is found, or `null`.\n */\n async handleServe(request, matchedRoute) {\n const { headers, renderMode } = matchedRoute;\n if (renderMode !== RenderMode.Prerender) {\n return null;\n }\n const { method } = request;\n if (method !== 'GET' && method !== 'HEAD') {\n return null;\n }\n const assetPath = this.buildServerAssetPathFromRequest(request);\n const { manifest: { locale }, assets, } = this;\n if (!assets.hasServerAsset(assetPath)) {\n return null;\n }\n const { text, hash, size } = assets.getServerAsset(assetPath);\n const etag = `\"${hash}\"`;\n return request.headers.get('if-none-match') === etag\n ? new Response(undefined, { status: 304, statusText: 'Not Modified' })\n : new Response(await text(), {\n headers: {\n 'Content-Length': size.toString(),\n 'ETag': etag,\n 'Content-Type': 'text/html;charset=UTF-8',\n ...(locale !== undefined ? { 'Content-Language': locale } : {}),\n ...headers,\n },\n });\n }\n /**\n * Handles the server-side rendering process for the given HTTP request.\n * This method matches the request URL to a route and performs rendering if a matching route is found.\n *\n * @param request - The incoming HTTP request to be processed.\n * @param matchedRoute - The metadata of the matched route for rendering.\n * If not provided, the method attempts to find a matching route based on the request URL.\n * @param requestContext - Optional additional context for rendering, such as request metadata.\n *\n * @returns A promise that resolves to the rendered response, or null if no matching route is found.\n */\n async handleRendering(request, matchedRoute, requestContext) {\n const { renderMode, headers, status } = matchedRoute;\n if (!this.allowStaticRouteRender && renderMode === RenderMode.Prerender) {\n return null;\n }\n const url = new URL(request.url);\n const platformProviders = [];\n const { manifest: { bootstrap, inlineCriticalCss, locale }, assets, } = this;\n // Initialize the response with status and headers if available.\n const responseInit = {\n status,\n headers: new Headers({\n 'Content-Type': 'text/html;charset=UTF-8',\n ...(locale !== undefined ? { 'Content-Language': locale } : {}),\n ...headers,\n }),\n };\n if (renderMode === RenderMode.Server) {\n // Configure platform providers for request and response only for SSR.\n platformProviders.push({\n provide: REQUEST,\n useValue: request,\n }, {\n provide: REQUEST_CONTEXT,\n useValue: requestContext,\n }, {\n provide: RESPONSE_INIT,\n useValue: responseInit,\n });\n }\n else if (renderMode === RenderMode.Client) {\n // Serve the client-side rendered version if the route is configured for CSR.\n let html = await assets.getServerAsset('index.csr.html').text();\n html = await this.runTransformsOnHtml(html, url);\n return new Response(html, responseInit);\n }\n if (locale !== undefined) {\n platformProviders.push({\n provide: LOCALE_ID,\n useValue: locale,\n });\n }\n this.boostrap ??= await bootstrap();\n let html = await assets.getIndexServerHtml().text();\n html = await this.runTransformsOnHtml(html, url);\n html = await renderAngular(html, this.boostrap, url, platformProviders, SERVER_CONTEXT_VALUE[renderMode]);\n if (inlineCriticalCss) {\n // Optionally inline critical CSS.\n this.inlineCriticalCssProcessor ??= new InlineCriticalCssProcessor((path) => {\n const fileName = path.split('/').pop() ?? path;\n return this.assets.getServerAsset(fileName).text();\n });\n // TODO(alanagius): remove once Node.js version 18 is no longer supported.\n if (renderMode === RenderMode.Server && typeof crypto === 'undefined') {\n // eslint-disable-next-line no-console\n console.error(`The global 'crypto' module is unavailable. ` +\n `If you are running on Node.js, please ensure you are using version 20 or later, ` +\n `which includes built-in support for the Web Crypto module.`);\n }\n if (renderMode === RenderMode.Server && typeof crypto !== 'undefined') {\n // Only cache if we are running in SSR Mode.\n const cacheKey = await sha256(html);\n let htmlWithCriticalCss = this.criticalCssLRUCache.get(cacheKey);\n if (htmlWithCriticalCss === undefined) {\n htmlWithCriticalCss = await this.inlineCriticalCssProcessor.process(html);\n this.criticalCssLRUCache.put(cacheKey, htmlWithCriticalCss);\n }\n html = htmlWithCriticalCss;\n }\n else {\n html = await this.inlineCriticalCssProcessor.process(html);\n }\n }\n return new Response(html, responseInit);\n }\n /**\n * Constructs the asset path on the server based on the provided HTTP request.\n *\n * This method processes the incoming request URL to derive a path corresponding\n * to the requested asset. It ensures the path points to the correct file (e.g.,\n * `index.html`) and removes any base href if it is not part of the asset path.\n *\n * @param request - The incoming HTTP request object.\n * @returns The server-relative asset path derived from the request.\n */\n buildServerAssetPathFromRequest(request) {\n let { pathname: assetPath } = new URL(request.url);\n if (!assetPath.endsWith('/index.html')) {\n // Append \"index.html\" to build the default asset path.\n assetPath = joinUrlParts(assetPath, 'index.html');\n }\n const { baseHref } = this.manifest;\n // Check if the asset path starts with the base href and the base href is not (`/` or ``).\n if (baseHref.length > 1 && assetPath.startsWith(baseHref)) {\n // Remove the base href from the start of the asset path to align with server-asset expectations.\n assetPath = assetPath.slice(baseHref.length);\n }\n return stripLeadingSlash(assetPath);\n }\n /**\n * Runs the registered transform hooks on the given HTML content.\n *\n * @param html - The raw HTML content to be transformed.\n * @param url - The URL associated with the HTML content, used for context during transformations.\n * @returns A promise that resolves to the transformed HTML string.\n */\n async runTransformsOnHtml(html, url) {\n if (this.hooks.has('html:transform:pre')) {\n html = await this.hooks.run('html:transform:pre', { html, url });\n }\n return html;\n }\n}\nlet angularServerApp;\n/**\n * Retrieves or creates an instance of `AngularServerApp`.\n * - If an instance of `AngularServerApp` already exists, it will return the existing one.\n * - If no instance exists, it will create a new one with the provided options.\n *\n * @param options Optional configuration options for the server application.\n *\n * @returns The existing or newly created instance of `AngularServerApp`.\n */\nexport function getOrCreateAngularServerApp(options) {\n return (angularServerApp ??= new AngularServerApp(options));\n}\n/**\n * Destroys the existing `AngularServerApp` instance, releasing associated resources and resetting the\n * reference to `undefined`.\n *\n * This function is primarily used to enable the recreation of the `AngularServerApp` instance,\n * typically when server configuration or application state needs to be refreshed.\n */\nexport function destroyAngularServerApp() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Need to clean up GENERATED_COMP_IDS map in `@angular/core`.\n // Otherwise an incorrect component ID generation collision detected warning will be displayed in development.\n // See: https://github.com/angular/angular-cli/issues/25924\n ɵresetCompiledComponents();\n }\n angularServerApp = undefined;\n}\n//# sourceMappingURL=app.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n// ɵgetRoutesFromAngularRouterConfig is only used by the Webpack based server builder.\nexport { getRoutesFromAngularRouterConfig as ɵgetRoutesFromAngularRouterConfig, extractRoutesAndCreateRouteTree as ɵextractRoutesAndCreateRouteTree, } from './src/routes/ng-routes';\nexport { getOrCreateAngularServerApp as ɵgetOrCreateAngularServerApp, destroyAngularServerApp as ɵdestroyAngularServerApp, } from './src/app';\nexport { setAngularAppManifest as ɵsetAngularAppManifest, setAngularAppEngineManifest as ɵsetAngularAppEngineManifest, } from './src/manifest';\nexport { InlineCriticalCssProcessor as ɵInlineCriticalCssProcessor } from './src/utils/inline-critical-css';\n//# sourceMappingURL=private_export.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Extracts a potential locale ID from a given URL based on the specified base path.\n *\n * This function parses the URL to locate a potential locale identifier that immediately\n * follows the base path segment in the URL's pathname. If the URL does not contain a valid\n * locale ID, an empty string is returned.\n *\n * @param url - The full URL from which to extract the locale ID.\n * @param basePath - The base path used as the reference point for extracting the locale ID.\n * @returns The extracted locale ID if present, or an empty string if no valid locale ID is found.\n *\n * @example\n * ```js\n * const url = new URL('https://example.com/base/en/page');\n * const basePath = '/base';\n * const localeId = getPotentialLocaleIdFromUrl(url, basePath);\n * console.log(localeId); // Output: 'en'\n * ```\n */\nexport function getPotentialLocaleIdFromUrl(url, basePath) {\n const { pathname } = url;\n // Move forward of the base path section.\n let start = basePath.length;\n if (pathname[start] === '/') {\n start++;\n }\n // Find the next forward slash.\n let end = pathname.indexOf('/', start);\n if (end === -1) {\n end = pathname.length;\n }\n // Extract the potential locale id.\n return pathname.slice(start, end);\n}\n//# sourceMappingURL=i18n.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { Hooks } from './hooks';\nimport { getPotentialLocaleIdFromUrl } from './i18n';\nimport { getAngularAppEngineManifest } from './manifest';\n/**\n * Angular server application engine.\n * Manages Angular server applications (including localized ones), handles rendering requests,\n * and optionally transforms index HTML before rendering.\n *\n * @remarks This class should be instantiated once and used as a singleton across the server-side\n * application to ensure consistent handling of rendering requests and resource management.\n *\n * @developerPreview\n */\nexport class AngularAppEngine {\n /**\n * A flag to enable or disable the rendering of prerendered routes.\n *\n * Typically used during development to avoid prerendering all routes ahead of time,\n * allowing them to be rendered on the fly as requested.\n *\n * @private\n */\n static ɵallowStaticRouteRender = false;\n /**\n * Hooks for extending or modifying the behavior of the server application.\n * These hooks are used by the Angular CLI when running the development server and\n * provide extensibility points for the application lifecycle.\n *\n * @private\n */\n static ɵhooks = /* #__PURE__*/ new Hooks();\n /**\n * The manifest for the server application.\n */\n manifest = getAngularAppEngineManifest();\n /**\n * The number of entry points available in the server application's manifest.\n */\n entryPointsCount = Object.keys(this.manifest.entryPoints).length;\n /**\n * A cache that holds entry points, keyed by their potential locale string.\n */\n entryPointsCache = new Map();\n /**\n * Handles an incoming HTTP request by serving prerendered content, performing server-side rendering,\n * or delivering a static file for client-side rendered routes based on the `RenderMode` setting.\n *\n * @param request - The HTTP request to handle.\n * @param requestContext - Optional context for rendering, such as metadata associated with the request.\n * @returns A promise that resolves to the resulting HTTP response object, or `null` if no matching Angular route is found.\n *\n * @remarks A request to `https://www.example.com/page/index.html` will serve or render the Angular route\n * corresponding to `https://www.example.com/page`.\n */\n async handle(request, requestContext) {\n const serverApp = await this.getAngularServerAppForRequest(request);\n return serverApp ? serverApp.handle(request, requestContext) : null;\n }\n /**\n * Retrieves the Angular server application instance for a given request.\n *\n * This method checks if the request URL corresponds to an Angular application entry point.\n * If so, it initializes or retrieves an instance of the Angular server application for that entry point.\n * Requests that resemble file requests (except for `/index.html`) are skipped.\n *\n * @param request - The incoming HTTP request object.\n * @returns A promise that resolves to an `AngularServerApp` instance if a valid entry point is found,\n * or `null` if no entry point matches the request URL.\n */\n async getAngularServerAppForRequest(request) {\n // Skip if the request looks like a file but not `/index.html`.\n const url = new URL(request.url);\n const entryPoint = await this.getEntryPointExportsForUrl(url);\n if (!entryPoint) {\n return null;\n }\n // Note: Using `instanceof` is not feasible here because `AngularServerApp` will\n // be located in separate bundles, making `instanceof` checks unreliable.\n const ɵgetOrCreateAngularServerApp = entryPoint.ɵgetOrCreateAngularServerApp;\n const serverApp = ɵgetOrCreateAngularServerApp({\n allowStaticRouteRender: AngularAppEngine.ɵallowStaticRouteRender,\n hooks: AngularAppEngine.ɵhooks,\n });\n return serverApp;\n }\n /**\n * Retrieves the exports for a specific entry point, caching the result.\n *\n * @param potentialLocale - The locale string used to find the corresponding entry point.\n * @returns A promise that resolves to the entry point exports or `undefined` if not found.\n */\n getEntryPointExports(potentialLocale) {\n const cachedEntryPoint = this.entryPointsCache.get(potentialLocale);\n if (cachedEntryPoint) {\n return cachedEntryPoint;\n }\n const { entryPoints } = this.manifest;\n const entryPoint = entryPoints[potentialLocale];\n if (!entryPoint) {\n return undefined;\n }\n const entryPointExports = entryPoint();\n this.entryPointsCache.set(potentialLocale, entryPointExports);\n return entryPointExports;\n }\n /**\n * Retrieves the entry point for a given URL by determining the locale and mapping it to\n * the appropriate application bundle.\n *\n * This method determines the appropriate entry point and locale for rendering the application by examining the URL.\n * If there is only one entry point available, it is returned regardless of the URL.\n * Otherwise, the method extracts a potential locale identifier from the URL and looks up the corresponding entry point.\n *\n * @param url - The URL of the request.\n * @returns A promise that resolves to the entry point exports or `undefined` if not found.\n */\n getEntryPointExportsForUrl(url) {\n const { basePath } = this.manifest;\n if (this.entryPointsCount === 1) {\n return this.getEntryPointExports('');\n }\n const potentialLocale = getPotentialLocaleIdFromUrl(url, basePath);\n return this.getEntryPointExports(potentialLocale);\n }\n}\n//# sourceMappingURL=app-engine.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Annotates a request handler function with metadata, marking it as a special\n * handler.\n *\n * @param handler - The request handler function to be annotated.\n * @returns The same handler function passed in, with metadata attached.\n *\n * @example\n * Example usage in a Hono application:\n * ```ts\n * const app = new Hono();\n * export default createRequestHandler(app.fetch);\n * ```\n *\n * @example\n * Example usage in a H3 application:\n * ```ts\n * const app = createApp();\n * const handler = toWebHandler(app);\n * export default createRequestHandler(handler);\n * ```\n * @developerPreview\n */\nexport function createRequestHandler(handler) {\n handler['__ng_request_handler__'] = true;\n return handler;\n}\n//# sourceMappingURL=handler.js.map"],"names":["ɵConsole","SERVER_CONTEXT","loadChildrenHelper","ɵresetCompiledComponents"],"mappings":";;;;;;AAOA;AACA;AACA;AACO,MAAM,YAAY,CAAC;AAC1B,IAAI,QAAQ;AACZ;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,QAAQ,EAAE;AAC1B,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc,CAAC,IAAI,EAAE;AACzB,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;AAChD,QAAQ,IAAI,CAAC,KAAK,EAAE;AACpB,YAAY,MAAM,IAAI,KAAK,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;AACrE;AACA,QAAQ,OAAO,KAAK;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc,CAAC,IAAI,EAAE;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AO,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,0BAA0B,CAAC,GAAG,EAAE;AACpC,QAAQ,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ;AAC1C,QAAQ,IAAI,IAAI,CAAC,gBAAgB,KAAK,CAAC,EAAE;AACzC,YAAY,OAAO,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC;AAChD;AACA,QAAQ,MAAM,eAAe,GAAG,2BAA2B,CAAC,GAAG,EAAE,QAAQ,CAAC;AAC1E,QAAQ,OAAO,IAAI,CAAC,oBAAoB,CAAC,eAAe,CAAC;AACzD;AACA;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,oBAAoB,CAAC,OAAO,EAAE;AAC9C,IAAI,OAAO,CAAC,wBAAwB,CAAC,GAAG,IAAI;AAC5C,IAAI,OAAO,OAAO;AAClB;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/ssr",
3
- "version": "19.0.4",
3
+ "version": "19.0.6",
4
4
  "description": "Angular server side rendering utilities",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/angular/angular-cli",