{"version":3,"file":"smartsoft001-mobilems-angular-ssr.mjs","names":[],"sources":["../../../../../packages/shared/angular/ssr/src/lib/site-url.ts","../../../../../packages/shared/angular/ssr/src/lib/allowed-hosts.ts","../../../../../packages/shared/angular/ssr/src/lib/env-script.ts","../../../../../packages/shared/angular/ssr/src/lib/sitemap.ts","../../../../../packages/shared/angular/ssr/src/lib/robots.ts","../../../../../packages/shared/angular/ssr/src/lib/translations.ts","../../../../../packages/shared/angular/ssr/src/lib/create-server.ts"],"sourcesContent":["export interface SiteUrlRequest {\n  protocol: string;\n  get(name: string): string | undefined;\n}\n\n/** Prepends `https://` when the scheme is missing. */\nexport function withProtocol(value: string): string {\n  return value.startsWith('http') ? value : `https://${value}`;\n}\n\n/** Hostname of a URL-ish env value, or `undefined` when it does not parse. */\nexport function hostnameOf(value: string | undefined): string | undefined {\n  if (!value) {\n    return undefined;\n  }\n  try {\n    return new URL(withProtocol(value)).hostname;\n  } catch {\n    return undefined;\n  }\n}\n\n/**\n * Canonical site origin without a trailing slash: `SITE_URL` when configured,\n * otherwise the request's own protocol + host.\n */\nexport function resolveSiteUrl(\n  req: SiteUrlRequest,\n  configured: string | undefined = process.env['SITE_URL'],\n): string {\n  if (configured) {\n    return withProtocol(configured).replace(/\\/$/, '');\n  }\n  return `${req.protocol}://${req.get('host')}`;\n}\n","import { hostnameOf } from './site-url';\n\nexport const DEFAULT_ALLOWED_HOSTS_ENV_VARS = [\n  'SITE_URL',\n  'MULTIMEDIA_URL',\n  'API_URL',\n];\n\nexport interface BuildAllowedHostsOptions {\n  /** Env vars to derive hostnames from. */\n  envVars?: string[];\n  /** Hosts appended verbatim. */\n  extra?: string[];\n  processEnv?: NodeJS.ProcessEnv;\n}\n\n/**\n * SSRF allow-list for `AngularNodeAppEngine`: hostnames of the configured\n * env URLs (the site host in both `www.` and bare form), plus `localhost`\n * outside production or when nothing is configured.\n */\nexport function buildAllowedHosts(\n  options: BuildAllowedHostsOptions = {},\n): string[] {\n  const {\n    envVars = DEFAULT_ALLOWED_HOSTS_ENV_VARS,\n    extra = [],\n    processEnv = process.env,\n  } = options;\n  const hosts: string[] = [];\n\n  for (const envVar of envVars) {\n    const host = hostnameOf(processEnv[envVar]);\n    if (!host) {\n      continue;\n    }\n    hosts.push(host);\n    if (envVar === 'SITE_URL') {\n      hosts.push(host.startsWith('www.') ? host.slice(4) : `www.${host}`);\n    }\n  }\n\n  hosts.push(...extra);\n\n  if (hosts.length === 0 || processEnv['NODE_ENV'] !== 'production') {\n    hosts.push('localhost');\n  }\n\n  return Array.from(new Set(hosts));\n}\n","import type { RequestHandler } from 'express';\n\nimport { EnvMap } from './types';\n\n/** `window.env` keys every MobilEMS app exposes. */\nexport const DEFAULT_ENV_MAP: EnvMap = {\n  apiUrl: 'API_URL',\n  siteUrl: 'SITE_URL',\n  multimediaUrl: 'MULTIMEDIA_URL',\n  // Same rule as `EnvironmentService.initFromProcessEnv` on the server: museum\n  // Dockerfiles set `VERSION` (from the build arg), some deployments `APP_VERSION`.\n  version: ['APP_VERSION', 'VERSION'],\n  useLocalTranslations: 'USE_LOCAL_TRANSLATIONS',\n};\n\n/** Resolves the defaults merged with `env` (same key overrides) to plain strings. */\nexport function resolveEnvValues(\n  env: EnvMap = {},\n  processEnv: NodeJS.ProcessEnv = process.env,\n): Record<string, string> {\n  const merged: EnvMap = { ...DEFAULT_ENV_MAP, ...env };\n  const values: Record<string, string> = {};\n  for (const [key, source] of Object.entries(merged)) {\n    const value =\n      typeof source === 'function'\n        ? source()\n        : typeof source === 'string'\n          ? processEnv[source]\n          : source.map((name) => processEnv[name]).find((v) => !!v);\n    values[key] = value ?? '';\n  }\n  return values;\n}\n\n/** Renders the `/env.js` body. Values are JSON-encoded, so any string is safe. */\nexport function renderEnvScript(values: Record<string, string>): string {\n  const lines = Object.entries(values).map(\n    ([key, value]) =>\n      `  window['env'][${JSON.stringify(key)}] = ${JSON.stringify(value)};`,\n  );\n  return [\n    '(function (window) {',\n    \"  window['env'] = window['env'] || {};\",\n    ...lines,\n    '})(this);',\n    '',\n  ].join('\\n');\n}\n\nexport function createEnvScriptHandler(env?: EnvMap): RequestHandler {\n  return (_req, res) => {\n    res.setHeader('Content-Type', 'application/javascript; charset=utf-8');\n    res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate');\n    res.send(renderEnvScript(resolveEnvValues(env)));\n  };\n}\n","import type { RequestHandler } from 'express';\n\nimport { resolveSiteUrl } from './site-url';\nimport { SitemapOptions, SitemapRoute } from './types';\n\nexport const DEFAULT_SITEMAP_LANGUAGES = ['pl', 'en'];\nexport const DEFAULT_SITEMAP_LANGUAGE = 'pl';\n\nfunction escapeXml(value: string): string {\n  return value\n    .replace(/&/g, '&amp;')\n    .replace(/</g, '&lt;')\n    .replace(/>/g, '&gt;')\n    .replace(/\"/g, '&quot;');\n}\n\nfunction formatPriority(\n  priority: SitemapRoute['priority'],\n): string | undefined {\n  if (priority === undefined) {\n    return undefined;\n  }\n  return typeof priority === 'number' ? priority.toFixed(1) : priority;\n}\n\n/** Route URL for a language: the default language has no query param. */\nexport function localizedUrl(\n  siteUrl: string,\n  path: string,\n  lang: string,\n  options: Pick<SitemapOptions, 'defaultLanguage' | 'langQueryParam'> = {},\n): string {\n  const {\n    defaultLanguage = DEFAULT_SITEMAP_LANGUAGE,\n    langQueryParam = 'lang',\n  } = options;\n  return lang === defaultLanguage\n    ? `${siteUrl}${path}`\n    : `${siteUrl}${path}?${langQueryParam}=${lang}`;\n}\n\nexport function buildSitemapXml(\n  siteUrl: string,\n  options: SitemapOptions,\n  lastmod: string = new Date().toISOString().slice(0, 10),\n): string {\n  const languages = options.languages ?? DEFAULT_SITEMAP_LANGUAGES;\n\n  const urls = options.routes.map((route) => {\n    const alternates = languages.map(\n      (lang) =>\n        `    <xhtml:link rel=\"alternate\" hreflang=\"${lang}\" href=\"${escapeXml(localizedUrl(siteUrl, route.path, lang, options))}\"/>`,\n    );\n    const priority = formatPriority(route.priority);\n    return [\n      '  <url>',\n      `    <loc>${escapeXml(siteUrl + route.path)}</loc>`,\n      `    <lastmod>${lastmod}</lastmod>`,\n      ...(route.changefreq\n        ? [`    <changefreq>${route.changefreq}</changefreq>`]\n        : []),\n      ...(priority ? [`    <priority>${priority}</priority>`] : []),\n      ...alternates,\n      '  </url>',\n    ].join('\\n');\n  });\n\n  return [\n    '<?xml version=\"1.0\" encoding=\"UTF-8\"?>',\n    '<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">',\n    ...urls,\n    '</urlset>',\n    '',\n  ].join('\\n');\n}\n\nexport function createSitemapHandler(options: SitemapOptions): RequestHandler {\n  return (req, res) => {\n    res.setHeader('Content-Type', 'application/xml; charset=utf-8');\n    res.setHeader('Cache-Control', 'public, max-age=3600');\n    res.send(buildSitemapXml(resolveSiteUrl(req), options));\n  };\n}\n","import type { RequestHandler } from 'express';\n\nimport { resolveSiteUrl } from './site-url';\nimport { RobotsOptions } from './types';\n\nexport interface BuildRobotsTxtOptions extends RobotsOptions {\n  /** Emit the `Sitemap:` line pointing at `<siteUrl>/sitemap.xml`. */\n  sitemap?: boolean;\n}\n\nexport function buildRobotsTxt(\n  siteUrl: string,\n  options: BuildRobotsTxtOptions = {},\n): string {\n  const lines = [\n    'User-agent: *',\n    'Allow: /',\n    ...(options.disallow ?? []).map((path) => `Disallow: ${path}`),\n    '',\n  ];\n  if (options.sitemap) {\n    lines.push(`Sitemap: ${siteUrl}/sitemap.xml`, '');\n  }\n  return lines.join('\\n');\n}\n\nexport function createRobotsHandler(\n  options: BuildRobotsTxtOptions = {},\n): RequestHandler {\n  return (req, res) => {\n    res.setHeader('Content-Type', 'text/plain; charset=utf-8');\n    res.setHeader('Cache-Control', 'public, max-age=3600');\n    res.send(buildRobotsTxt(resolveSiteUrl(req), options));\n  };\n}\n","import type { RequestHandler } from 'express';\n\nimport { existsSync, readFileSync } from 'node:fs';\nimport { join } from 'node:path';\n\n/**\n * Dev-time candidates for `translations.json`: the editable source file first\n * (no rebuild needed), then the copy next to the browser bundle, then the Nx\n * dist path for a server started from the workspace root.\n */\nexport function defaultTranslationPaths(browserDistFolder: string): string[] {\n  return [\n    join(process.cwd(), 'apps/web/public/translations.json'),\n    join(browserDistFolder, 'translations.json'),\n    join(process.cwd(), 'dist/apps/web/browser/translations.json'),\n  ];\n}\n\nexport function createTranslationsHandler(paths: string[]): RequestHandler {\n  return (_req, res) => {\n    const found = paths.find((path) => existsSync(path));\n    if (!found) {\n      console.error('Translation file not found at:', paths.join(', '));\n      res.status(404).json({ error: 'Translation file not found' });\n      return;\n    }\n    res.json(JSON.parse(readFileSync(found, 'utf8')));\n  };\n}\n","import {\n  AngularNodeAppEngine,\n  createNodeRequestHandler,\n  isMainModule,\n  writeResponseToNodeResponse,\n} from '@angular/ssr/node';\nimport compression from 'compression';\nimport { config as loadDotenv } from 'dotenv';\nimport express, { Express } from 'express';\n\nimport { dirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { buildAllowedHosts } from './allowed-hosts';\nimport { createEnvScriptHandler } from './env-script';\nimport { createRobotsHandler } from './robots';\nimport { createSitemapHandler } from './sitemap';\nimport {\n  createTranslationsHandler,\n  defaultTranslationPaths,\n} from './translations';\nimport { MobilemsServerOptions } from './types';\n\n/**\n * Behind an nginx ingress every request carries `x-forwarded-*`. Without trusting\n * them `@angular/ssr` degrades to CSR (`deoptToCSR`) and serves an empty\n * `<app-root>`. The list is explicit because `true` covers only the standard\n * five and nginx also sends the non-standard `x-forwarded-scheme`.\n */\nexport const DEFAULT_TRUST_PROXY_HEADERS: readonly string[] = [\n  'x-forwarded-for',\n  'x-forwarded-host',\n  'x-forwarded-port',\n  'x-forwarded-proto',\n  'x-forwarded-prefix',\n  'x-forwarded-scheme',\n];\n\nexport interface MobilemsServer {\n  app: Express;\n  angularApp: AngularNodeAppEngine;\n  /** Export this as `reqHandler` from `server.ts` — the Angular CLI dev server needs it. */\n  reqHandler: ReturnType<typeof createNodeRequestHandler>;\n  browserDistFolder: string;\n}\n\n/**\n * Assembles the MobilEMS SSR Express server: dotenv, SSRF allow-list,\n * response compression, `/env.js`, `/api/translations`, `/robots.txt`, `/sitemap.xml`, custom\n * routes, static files and the Angular request handler.\n */\nexport function createMobilemsServer(\n  options: MobilemsServerOptions,\n): MobilemsServer {\n  if (options.dotenv !== false) {\n    loadDotenv(\n      typeof options.dotenv === 'object'\n        ? options.dotenv\n        : { path: resolve(process.cwd(), '.env') },\n    );\n  }\n\n  const serverDistFolder = dirname(fileURLToPath(options.moduleUrl));\n  const browserDistFolder = resolve(serverDistFolder, '../browser');\n\n  const app = express();\n  const angularApp = new AngularNodeAppEngine({\n    allowedHosts: buildAllowedHosts({\n      envVars: options.allowedHostsEnvVars,\n      extra: options.allowedHosts,\n    }),\n    trustProxyHeaders: options.trustProxyHeaders ?? DEFAULT_TRUST_PROXY_HEADERS,\n  });\n\n  // First middleware, so `/env.js`, the other built-ins, `configure` routes, static files\n  // and SSR are all compressed. An app that adds its own `compression()` later is safe:\n  // a response that already has a `Content-Encoding` is left alone.\n  if (options.compression !== false) {\n    app.use(\n      compression(\n        typeof options.compression === 'object' ? options.compression : {},\n      ),\n    );\n  }\n\n  app.get('/env.js', createEnvScriptHandler(options.env));\n\n  if (options.translations !== false) {\n    app.get(\n      '/api/translations',\n      createTranslationsHandler(\n        options.translations?.paths ??\n          defaultTranslationPaths(browserDistFolder),\n      ),\n    );\n  }\n\n  if (options.robots !== false) {\n    app.get(\n      '/robots.txt',\n      createRobotsHandler({ ...options.robots, sitemap: !!options.sitemap }),\n    );\n  }\n\n  if (options.sitemap) {\n    app.get('/sitemap.xml', createSitemapHandler(options.sitemap));\n  }\n\n  options.configure?.(app);\n\n  app.use(\n    express.static(browserDistFolder, {\n      maxAge: '1y',\n      index: false,\n      redirect: false,\n    }),\n  );\n\n  // Path-less so it works on both express 4 and 5 (`'/**'` is rejected by 5).\n  app.use((req, res, next) => {\n    angularApp\n      .handle(req)\n      .then((response) =>\n        response ? writeResponseToNodeResponse(response, res) : next(),\n      )\n      .catch(next);\n  });\n\n  if (options.autoListen !== false && isMainModule(options.moduleUrl)) {\n    const port = options.port ?? Number(process.env['PORT'] ?? 4000);\n    app.listen(port, () => {\n      console.log(`Node Express server listening on http://localhost:${port}`);\n    });\n  }\n\n  return {\n    app,\n    angularApp,\n    reqHandler: createNodeRequestHandler(app),\n    browserDistFolder,\n  };\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,aAAa,OAAa;CACxC,OAAO,MAAM,WAAW,MAAM,IAAI,QAAQ,WAAW;AACvD;AAGA,SAAgB,WAAW,OAAyB;CAClD,IAAI,CAAC,OACH;CAEF,IAAI;EACF,OAAO,IAAI,IAAI,aAAa,KAAK,CAAC,CAAC,CAAC;CACtC,QAAQ;EACN;CACF;AACF;AAMA,SAAgB,eACd,KACA,aAAiC,QAAQ,IAAI,aAAW;CAExD,IAAI,YACF,OAAO,aAAa,UAAU,CAAC,CAAC,QAAQ,OAAO,EAAE;CAEnD,OAAO,GAAG,IAAI,SAAQ,KAAM,IAAI,IAAI,MAAM;AAC5C;AChCA,MAAa,iCAAiC;CAC5C;CACA;CACA;AACD;AAeD,SAAgB,kBACd,UAAoC,CAAA,GAAE;CAEtC,MAAM,EACJ,UAAU,gCACV,QAAQ,CAAA,GACR,aAAa,QAAQ,QACnB;CACJ,MAAM,QAAkB,CAAA;CAExB,KAAK,MAAM,UAAU,SAAS;EAC5B,MAAM,OAAO,WAAW,WAAW,OAAO;EAC1C,IAAI,CAAC,MACH;EAEF,MAAM,KAAK,IAAI;EACf,IAAI,WAAW,YACb,MAAM,KAAK,KAAK,WAAW,MAAM,IAAI,KAAK,MAAM,CAAC,IAAI,OAAO,MAAM;CAEtE;CAEA,MAAM,KAAK,GAAG,KAAK;CAEnB,IAAI,MAAM,WAAW,KAAK,WAAW,gBAAgB,cACnD,MAAM,KAAK,WAAW;CAGxB,OAAO,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC;AAClC;AC5CA,MA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