{"version":3,"sources":["../../../src/components/faq/json-ld.ts"],"names":[],"mappings":";;;AAkBA,IAAM,YAAA,GAAe,4BAAA;AACrB,IAAM,mBAAA,GACJ,8BAAA;AAEK,SAAS,aAAA,CAAc,IAAA,GAAyB,EAAC,EAAG;AACzD,EAAA,OAAO;AAAA,IACL,UAAA,EAAY,oBAAA;AAAA,IACZ,OAAA,EAAS,SAAA;AAAA,IACT,IAAA,EAAM,KAAK,IAAA,IAAQ,YAAA;AAAA,IACnB,WAAA,EAAa,KAAK,WAAA,IAAe,mBAAA;AAAA,IACjC,GAAI,KAAK,GAAA,GAAM,EAAE,KAAK,IAAA,CAAK,GAAA,KAAQ;AAAC,GACtC;AACF;AAEO,SAAS,sBAAA,CAAuB,IAAA,EAAa,IAAA,GAAyB,EAAC,EAAG;AAC/E,EAAA,OAAO;AAAA,IACL,GAAG,cAAc,IAAI,CAAA;AAAA,IACrB,UAAA,EAAY,IAAA,CAAK,GAAA,CAAI,CAAC,GAAA,MAAS;AAAA,MAC7B,OAAA,EAAS,UAAA;AAAA,MACT,MAAM,GAAA,CAAI,QAAA;AAAA,MACV,cAAA,EAAgB;AAAA,QACd,OAAA,EAAS,QAAA;AAAA,QACT,MAAM,GAAA,CAAI;AAAA;AACZ,KACF,CAAE;AAAA,GACJ;AACF","file":"json-ld.cjs","sourcesContent":["/**\n * Pure FAQ JSON-LD builder. No React, no client-only deps — safe to import from\n * Server Components via the `./components/faq` subpath export. (Do NOT import\n * through the root `./components` barrel — that barrel is `\"use client\"` and\n * dragging it into a Server Component would force the client graph into the\n * server.)\n *\n * The hub used to harcode `name`/`description` here for OpenMSP; in the lib we\n * accept overrides so every embedder can supply its own platform branding.\n */\nimport type { Faq } from '../../types/faq'\n\nexport interface FaqSchemaOptions {\n  name?: string\n  description?: string\n  url?: string\n}\n\nconst DEFAULT_NAME = 'Frequently Asked Questions'\nconst DEFAULT_DESCRIPTION =\n  'Answers to common questions.'\n\nexport function baseFaqSchema(opts: FaqSchemaOptions = {}) {\n  return {\n    '@context': 'https://schema.org',\n    '@type': 'FAQPage',\n    name: opts.name ?? DEFAULT_NAME,\n    description: opts.description ?? DEFAULT_DESCRIPTION,\n    ...(opts.url ? { url: opts.url } : {}),\n  } as const\n}\n\nexport function buildFaqJsonLdFromFaqs(faqs: Faq[], opts: FaqSchemaOptions = {}) {\n  return {\n    ...baseFaqSchema(opts),\n    mainEntity: faqs.map((faq) => ({\n      '@type': 'Question',\n      name: faq.question,\n      acceptedAnswer: {\n        '@type': 'Answer',\n        text: faq.answer,\n      },\n    })),\n  } as const\n}\n"]}