{"version":3,"sources":["../src/utils/stringify.ts","../src/core/JsonLdScript.tsx","../src/utils/processors.export.ts","../src/utils/processors.ts","../src/components/ArticleJsonLd.tsx","../src/components/ClaimReviewJsonLd.tsx","../src/components/CreativeWorkJsonLd.tsx","../src/components/RecipeJsonLd.tsx","../src/components/HowToJsonLd.tsx","../src/components/OrganizationJsonLd.tsx","../src/components/LocalBusinessJsonLd.tsx","../src/components/MerchantReturnPolicyJsonLd.tsx","../src/components/MovieCarouselJsonLd.tsx","../src/components/BreadcrumbJsonLd.tsx","../src/components/CarouselJsonLd.tsx","../src/components/CourseJsonLd.tsx","../src/components/EventJsonLd.tsx","../src/components/FAQJsonLd.tsx","../src/components/ImageJsonLd.tsx","../src/components/QuizJsonLd.tsx","../src/components/DatasetJsonLd.tsx","../src/components/JobPostingJsonLd.tsx","../src/components/DiscussionForumPostingJsonLd.tsx","../src/components/EmployerAggregateRatingJsonLd.tsx","../src/components/VacationRentalJsonLd.tsx","../src/components/VideoJsonLd.tsx","../src/components/ProfilePageJsonLd.tsx","../src/components/SoftwareApplicationJsonLd.tsx","../src/components/ProductJsonLd.tsx","../src/components/ReviewJsonLd.tsx","../src/components/AggregateRatingJsonLd.tsx"],"sourcesContent":["/* eslint-disable */\n// Some of the code below is borrowed from react-schemaorg after the author of the package\n// kindly reached out to let me know this was a better way of doing things. ❤️\n// https://github.com/google/react-schemaorg/blob/main/src/json-ld.tsx#L173\n\ntype JsonValueScalar = string | boolean | number;\ntype JsonValue =\n  | JsonValueScalar\n  | Array<JsonValue>\n  | { [key: string]: JsonValue };\ntype JsonReplacer = (_: string, value: JsonValue) => JsonValue | undefined;\n\n/**\n * A replacer for JSON.stringify to omit null values from JSON-LD.\n * The actual script tag safety escaping is done in post-processing.\n */\nconst safeJsonLdReplacer: JsonReplacer = (() => {\n  return (_: string, value: JsonValue): JsonValue | undefined => {\n    switch (typeof value) {\n      case \"object\":\n        // Omit null values.\n        if (value === null) {\n          return undefined;\n        }\n        return value; // JSON.stringify will recursively call replacer.\n      case \"number\":\n      case \"boolean\":\n      case \"bigint\":\n      case \"string\":\n        return value; // Return all primitive values as-is\n      default: {\n        // We shouldn't expect other types.\n        isNever(value);\n        // JSON.stringify will remove this element.\n        return undefined;\n      }\n    }\n  };\n})();\n\n/**\n * Type guard to ensure exhaustive type checking.\n * @internal\n */\nfunction isNever(_: never): void {}\n\n/**\n * Stringify data for safe embedding in HTML script elements.\n *\n * Per W3C specifications and security best practices, we need to escape sequences\n * that could break out of the script tag:\n * - </script> sequences (case-insensitive)\n * - <!-- and --> sequences (HTML comments)\n *\n * We do NOT escape standard HTML entities like &, <, >, \", ' as they are valid\n * within script tag content and escaping them breaks URLs with query parameters.\n *\n * The escaping is done on the final JSON string to ensure the JSON remains valid\n * and parseable while being safe for HTML embedding.\n *\n * References:\n * - https://www.w3.org/TR/json-ld11/#restrictions-for-contents-of-json-ld-script-elements\n * - https://github.com/w3c/json-ld-syntax/issues/100\n */\nexport const stringify = (data: unknown) => {\n  const jsonString = JSON.stringify(data, safeJsonLdReplacer);\n\n  // Post-process the JSON string to escape dangerous sequences\n  // This ensures the JSON remains valid while being safe for script tags\n  // Use Unicode escape sequences to break up dangerous patterns\n  // This prevents the HTML parser from recognizing them while keeping valid JSON\n  return jsonString\n    .replace(/<\\/script>/gi, \"\\\\u003C/script>\") // Unicode escape for <\n    .replace(/<!--/g, \"\\\\u003C!--\") // Unicode escape for <\n    .replace(/-->/g, \"--\\\\u003E\"); // Unicode escape for >\n};\n","import { stringify } from \"~/utils/stringify\";\n\ninterface JsonLdScriptProps<T = Record<string, unknown>> {\n  data: T;\n  id?: string;\n  scriptKey: string; // For React key\n}\n\nexport function JsonLdScript<T = Record<string, unknown>>({\n  data,\n  id,\n  scriptKey,\n}: JsonLdScriptProps<T>): React.JSX.Element | null {\n  if (data === null || data === undefined) {\n    // Explicitly check for null/undefined\n    return null;\n  }\n\n  const jsonString = stringify(data);\n\n  return (\n    <script\n      type=\"application/ld+json\"\n      id={id || scriptKey}\n      data-testid={id}\n      dangerouslySetInnerHTML={{ __html: jsonString }}\n      key={scriptKey}\n    />\n  );\n}\n","/**\n * Public API for custom component creation\n * These processors help maintain the @type optional pattern\n * and provide flexible input handling for structured data\n */\n\n// Core utility for generic schema type processing\nexport { processSchemaType } from \"./processors\";\n\n// People & Organizations\nexport {\n  processAuthor,\n  processPublisher,\n  processOrganization,\n  processOrganizer,\n  processPerformer,\n  processDirector,\n  processCreator,\n  processFunder,\n  processProvider,\n  processHiringOrganization,\n} from \"./processors\";\n\n// Media & Content\nexport {\n  processImage,\n  processVideo,\n  processLogo,\n  processScreenshot,\n  processClip,\n  processBroadcastEvent,\n  processSeekToAction,\n  processThreeDModel,\n} from \"./processors\";\n\n// Locations & Places\nexport {\n  processAddress,\n  processPlace,\n  processGeo,\n  processJobLocation,\n  processSpatialCoverage,\n  processApplicantLocationRequirements,\n  processDefinedRegion,\n} from \"./processors\";\n\n// Commerce & Offers\nexport {\n  processOffer,\n  processProductOffer,\n  processAggregateOffer,\n  processMerchantReturnPolicy,\n  processReturnPolicySeasonalOverride,\n  processPriceSpecification,\n  processUnitPriceSpecification,\n  processSimpleMonetaryAmount,\n  processMonetaryAmount,\n  processOfferShippingDetails,\n  processShippingDeliveryTime,\n} from \"./processors\";\n\n// Reviews & Ratings\nexport {\n  processReview,\n  processProductReview,\n  processAggregateRating,\n  processRating,\n  processClaimReviewRating,\n  processItemReviewed,\n} from \"./processors\";\n\n// Structured Content\nexport {\n  processInstruction,\n  processNutrition,\n  processBreadcrumbItem,\n  processComment,\n  processWebPageElement,\n  processCertification,\n} from \"./processors\";\n\n// HowTo Content\nexport {\n  processStep,\n  processHowToStep,\n  processHowToSection,\n  processHowToSupply,\n  processHowToTool,\n  processHowToDirection,\n  processHowToTip,\n  processEstimatedCost,\n  processHowToYield,\n} from \"./processors\";\n\n// Membership & Loyalty\nexport {\n  processMemberProgram,\n  processMemberProgramTier,\n  processTierRequirement,\n  processTierBenefit,\n  processMembershipPointsEarned,\n} from \"./processors\";\n\n// Specifications & Values\nexport {\n  processQuantitativeValue,\n  processNumberOfEmployees,\n  processContactPoint,\n  processOpeningHours,\n  processJobPropertyValue,\n  processIdentifier,\n  processPeopleAudience,\n  processSizeSpecification,\n} from \"./processors\";\n\n// Products\nexport {\n  processProductVariant,\n  processVariesBy,\n  processBrand,\n  processProductItemList,\n} from \"./processors\";\n\n// Education & Requirements\nexport {\n  processEducationRequirements,\n  processExperienceRequirements,\n} from \"./processors\";\n\n// Data & Creative Works\nexport {\n  processLicense,\n  processDataDownload,\n  processDataCatalog,\n  processIsPartOf,\n  processMainEntityOfPage,\n  processAppearance,\n  processSharedContent,\n  processClaim,\n} from \"./processors\";\n\n// Accommodation & Rental\nexport {\n  processAccommodation,\n  processBedDetails,\n  processLocationFeatureSpecification,\n} from \"./processors\";\n\n// Interaction & Statistics\nexport { processInteractionStatistic, processFeatureList } from \"./processors\";\n\n// Re-export types that users might need\nexport type { ItemReviewedType } from \"./processors\";\n","import type {\n  Author,\n  Person,\n  Organization,\n  ImageObject,\n  PostalAddress,\n  ContactPoint,\n  QuantitativeValue,\n  GeoCoordinates,\n  OpeningHoursSpecification,\n  Review,\n  AggregateRating,\n  MerchantReturnPolicy,\n  MerchantReturnPolicySeasonalOverride,\n  SimpleMonetaryAmount,\n  Rating,\n  VideoObject,\n  InteractionCounter,\n  Brand,\n  BedDetails,\n  LocationFeatureSpecification,\n  Accommodation,\n  MemberProgram,\n  MemberProgramTier,\n  CreditCard,\n  UnitPriceSpecification,\n  TierRequirement,\n  TierBenefit,\n  Certification,\n  PeopleAudience,\n  SizeSpecification,\n  ThreeDModel,\n  DefinedRegion,\n  ShippingDeliveryTime,\n  OfferShippingDetails,\n} from \"~/types/common.types\";\nimport type { Director } from \"~/types/movie-carousel.types\";\nimport type { Provider } from \"~/types/course.types\";\nimport type { BreadcrumbListItem, ListItem } from \"~/types/breadcrumb.types\";\nimport type {\n  Place,\n  Performer,\n  Organizer,\n  Offer,\n  PerformingGroup,\n} from \"~/types/event.types\";\nimport type {\n  NutritionInformation,\n  HowToStep,\n  HowToSection,\n} from \"~/types/recipe.types\";\nimport type {\n  GeoShape,\n  PropertyValue,\n  CreativeWork,\n  DatasetPlace,\n  DataDownload,\n  DataCatalog,\n} from \"~/types/dataset.types\";\nimport type {\n  Place as JobPlace,\n  PropertyValue as JobPropertyValue,\n  MonetaryAmount,\n  Country,\n  State,\n  AdministrativeArea,\n  EducationalOccupationalCredential,\n  OccupationalExperienceRequirements,\n} from \"~/types/jobposting.types\";\nimport type {\n  Comment,\n  SharedContent,\n  WebPage as ForumWebPage,\n  CreativeWork as ForumCreativeWork,\n} from \"~/types/discussionforum.types\";\nimport type {\n  Claim,\n  ClaimReviewRating,\n  ClaimCreativeWork,\n} from \"~/types/claimreview.types\";\nimport type {\n  BroadcastEvent,\n  Clip,\n  PotentialAction,\n} from \"~/types/video.types\";\nimport type { WebPageElement } from \"~/types/creativework.types\";\nimport type {\n  ProductOffer,\n  AggregateOffer,\n  PriceSpecification,\n  ProductItemList,\n  ProductListItem,\n  ProductReview,\n  Product,\n  VariesBy,\n} from \"~/types/product.types\";\nimport type {\n  HowToSupply,\n  HowToTool,\n  HowToDirection,\n  HowToTip,\n  HowToStep as HowToStepType,\n  HowToSection as HowToSectionType,\n  Step,\n  Supply,\n  Tool,\n  EstimatedCost,\n  HowToYield,\n} from \"~/types/howto.types\";\n\n// Schema.org type constants\nconst SCHEMA_TYPES = {\n  PERSON: \"Person\",\n  ORGANIZATION: \"Organization\",\n  IMAGE_OBJECT: \"ImageObject\",\n  POSTAL_ADDRESS: \"PostalAddress\",\n  CONTACT_POINT: \"ContactPoint\",\n  QUANTITATIVE_VALUE: \"QuantitativeValue\",\n  GEO_COORDINATES: \"GeoCoordinates\",\n  GEO_SHAPE: \"GeoShape\",\n  OPENING_HOURS: \"OpeningHoursSpecification\",\n  REVIEW: \"Review\",\n  RATING: \"Rating\",\n  AGGREGATE_RATING: \"AggregateRating\",\n  MERCHANT_RETURN_POLICY: \"MerchantReturnPolicy\",\n  MERCHANT_RETURN_POLICY_SEASONAL_OVERRIDE:\n    \"MerchantReturnPolicySeasonalOverride\",\n  MONETARY_AMOUNT: \"MonetaryAmount\",\n  VIDEO_OBJECT: \"VideoObject\",\n  INTERACTION_COUNTER: \"InteractionCounter\",\n  BRAND: \"Brand\",\n  CREDIT_CARD: \"CreditCard\",\n  UNIT_PRICE_SPECIFICATION: \"UnitPriceSpecification\",\n  MEMBER_PROGRAM: \"MemberProgram\",\n  MEMBER_PROGRAM_TIER: \"MemberProgramTier\",\n  BED_DETAILS: \"BedDetails\",\n  LOCATION_FEATURE: \"LocationFeatureSpecification\",\n  ACCOMMODATION: \"Accommodation\",\n  PLACE: \"Place\",\n  PERFORMING_GROUP: \"PerformingGroup\",\n  OFFER: \"Offer\",\n  AGGREGATE_OFFER: \"AggregateOffer\",\n  PRICE_SPECIFICATION: \"PriceSpecification\",\n  ITEM_LIST: \"ItemList\",\n  LIST_ITEM: \"ListItem\",\n  PRODUCT: \"Product\",\n  PRODUCT_GROUP: \"ProductGroup\",\n  NUTRITION_INFORMATION: \"NutritionInformation\",\n  HOW_TO_STEP: \"HowToStep\",\n  HOW_TO_SECTION: \"HowToSection\",\n  HOW_TO_SUPPLY: \"HowToSupply\",\n  HOW_TO_TOOL: \"HowToTool\",\n  HOW_TO_DIRECTION: \"HowToDirection\",\n  HOW_TO_TIP: \"HowToTip\",\n  PROPERTY_VALUE: \"PropertyValue\",\n  CREATIVE_WORK: \"CreativeWork\",\n  DATA_DOWNLOAD: \"DataDownload\",\n  DATA_CATALOG: \"DataCatalog\",\n  COUNTRY: \"Country\",\n  STATE: \"State\",\n  EDUCATIONAL_CREDENTIAL: \"EducationalOccupationalCredential\",\n  OCCUPATIONAL_EXPERIENCE: \"OccupationalExperienceRequirements\",\n  COMMENT: \"Comment\",\n  WEB_PAGE: \"WebPage\",\n  WEB_PAGE_ELEMENT: \"WebPageElement\",\n  CLAIM: \"Claim\",\n  CERTIFICATION: \"Certification\",\n  PEOPLE_AUDIENCE: \"PeopleAudience\",\n  SIZE_SPECIFICATION: \"SizeSpecification\",\n  THREE_D_MODEL: \"3DModel\",\n  DEFINED_REGION: \"DefinedRegion\",\n  SHIPPING_DELIVERY_TIME: \"ShippingDeliveryTime\",\n  OFFER_SHIPPING_DETAILS: \"OfferShippingDetails\",\n} as const;\n\n// Type guard utilities\nfunction hasType<T extends { \"@type\": string }>(obj: unknown): obj is T {\n  return obj !== null && typeof obj === \"object\" && \"@type\" in obj;\n}\n\nfunction isString(value: unknown): value is string {\n  return typeof value === \"string\";\n}\n\n// Generic processor for simple schema types\nexport function processSchemaType<T extends { \"@type\": string }>(\n  value: unknown,\n  schemaType: string,\n  stringHandler?: (str: string) => Omit<T, \"@type\">,\n  numberHandler?: (num: number) => Omit<T, \"@type\">,\n): T {\n  if (isString(value) && stringHandler) {\n    return { \"@type\": schemaType, ...stringHandler(value) } as T;\n  }\n\n  if (typeof value === \"number\" && numberHandler) {\n    return { \"@type\": schemaType, ...numberHandler(value) } as T;\n  }\n\n  if (hasType<T>(value)) {\n    return value;\n  }\n\n  // Ensure value is an object before spreading\n  if (typeof value === \"object\" && value !== null) {\n    return { \"@type\": schemaType, ...value } as T;\n  }\n\n  // Fallback for non-object values\n  return { \"@type\": schemaType } as T;\n}\n\n// Helper to process nested organization fields\nfunction processOrganizationFields(org: Organization): void {\n  if (org.logo && !isString(org.logo)) {\n    org.logo = processLogo(org.logo);\n  }\n\n  if (org.address && !isString(org.address)) {\n    if (Array.isArray(org.address)) {\n      org.address = org.address.map((addr) =>\n        isString(addr) ? addr : processAddress(addr),\n      );\n    } else {\n      org.address = processAddress(org.address);\n    }\n  }\n\n  if (org.contactPoint) {\n    if (Array.isArray(org.contactPoint)) {\n      org.contactPoint = org.contactPoint.map(processContactPoint);\n    } else {\n      org.contactPoint = processContactPoint(org.contactPoint);\n    }\n  }\n}\n\n/**\n * Processes author input into a Person or Organization schema type\n * @param author - String name, Person object, or Organization object\n * @returns Processed Person or Organization with @type\n * @example\n * processAuthor(\"John Doe\") // { \"@type\": \"Person\", name: \"John Doe\" }\n * processAuthor({ name: \"ACME Corp\", logo: \"logo.jpg\" }) // { \"@type\": \"Organization\", ... }\n */\nexport function processAuthor(author: Author): Person | Organization {\n  if (isString(author)) {\n    // Check if the string appears to be an organization name\n    const orgIndicators = [\n      \"magazine\",\n      \"publication\",\n      \"company\",\n      \"corporation\",\n      \"corp\",\n      \"inc\",\n      \"llc\",\n      \"ltd\",\n      \"limited\",\n      \"group\",\n      \"foundation\",\n      \"institute\",\n      \"association\",\n      \"society\",\n      \"union\",\n      \"times\",\n      \"news\",\n      \"press\",\n      \"media\",\n      \"network\",\n      \"agency\",\n      \"studio\",\n    ];\n\n    const lowerName = author.toLowerCase();\n    const isLikelyOrg = orgIndicators.some((indicator) =>\n      lowerName.includes(indicator),\n    );\n\n    if (isLikelyOrg) {\n      return {\n        \"@type\": SCHEMA_TYPES.ORGANIZATION,\n        name: author,\n      };\n    }\n\n    return {\n      \"@type\": SCHEMA_TYPES.PERSON,\n      name: author,\n    };\n  }\n\n  if (hasType<Person | Organization>(author)) {\n    return author;\n  }\n\n  // Determine if it's Person or Organization based on properties\n  const hasOrgProperties =\n    \"logo\" in author || \"address\" in author || \"contactPoint\" in author;\n\n  if (hasOrgProperties) {\n    const org: Organization = {\n      \"@type\": SCHEMA_TYPES.ORGANIZATION,\n      ...author,\n    };\n    processOrganizationFields(org);\n    return org;\n  }\n\n  // Default to Person\n  return {\n    \"@type\": SCHEMA_TYPES.PERSON,\n    ...author,\n  } as Person;\n}\n\n/**\n * Processes image input into ImageObject schema type\n * @param image - URL string or ImageObject\n * @returns URL string or ImageObject with @type\n * @example\n * processImage(\"https://example.com/image.jpg\") // \"https://example.com/image.jpg\"\n * processImage({ url: \"image.jpg\", width: 800 }) // { \"@type\": \"ImageObject\", ... }\n */\nexport function processImage(\n  image: string | ImageObject | Omit<ImageObject, \"@type\">,\n): string | ImageObject {\n  if (isString(image)) {\n    return image;\n  }\n\n  return processSchemaType<ImageObject>(image, SCHEMA_TYPES.IMAGE_OBJECT);\n}\n\n/**\n * Processes address input into PostalAddress schema type\n * @param address - String address or PostalAddress object\n * @returns PostalAddress with @type\n * @example\n * processAddress(\"123 Main St\") // { \"@type\": \"PostalAddress\", streetAddress: \"123 Main St\" }\n */\nexport function processAddress(\n  address: string | PostalAddress | Omit<PostalAddress, \"@type\">,\n): PostalAddress {\n  return processSchemaType<PostalAddress>(\n    address,\n    SCHEMA_TYPES.POSTAL_ADDRESS,\n    (str) => ({ streetAddress: str }),\n    undefined,\n  );\n}\n\n/**\n * Processes contact point into ContactPoint schema type\n * @param contactPoint - ContactPoint object with or without @type\n * @returns ContactPoint with @type\n */\nexport function processContactPoint(\n  contactPoint: ContactPoint | Omit<ContactPoint, \"@type\">,\n): ContactPoint {\n  return processSchemaType<ContactPoint>(\n    contactPoint,\n    SCHEMA_TYPES.CONTACT_POINT,\n  );\n}\n\n/**\n * Processes logo the same way as images\n * @param logo - URL string or ImageObject\n * @returns URL string or ImageObject with @type\n */\nexport function processLogo(\n  logo: string | ImageObject | Omit<ImageObject, \"@type\">,\n): string | ImageObject {\n  return processImage(logo);\n}\n\n/**\n * Processes number of employees into QuantitativeValue schema type\n * @param numberOfEmployees - Number or QuantitativeValue object\n * @returns QuantitativeValue with @type\n */\nexport function processNumberOfEmployees(\n  numberOfEmployees:\n    | number\n    | QuantitativeValue\n    | Omit<QuantitativeValue, \"@type\">,\n): QuantitativeValue {\n  return processSchemaType<QuantitativeValue>(\n    numberOfEmployees,\n    SCHEMA_TYPES.QUANTITATIVE_VALUE,\n    undefined,\n    (num) => ({ value: num }),\n  );\n}\n\n/**\n * Processes geographic coordinates into GeoCoordinates schema type\n * @param geo - GeoCoordinates object with or without @type\n * @returns GeoCoordinates with @type\n */\nexport function processGeo(\n  geo: GeoCoordinates | Omit<GeoCoordinates, \"@type\">,\n): GeoCoordinates {\n  return processSchemaType<GeoCoordinates>(geo, SCHEMA_TYPES.GEO_COORDINATES);\n}\n\n/**\n * Processes opening hours into OpeningHoursSpecification schema type\n * @param hours - OpeningHoursSpecification object with or without @type\n * @returns OpeningHoursSpecification with @type\n */\nexport function processOpeningHours(\n  hours: OpeningHoursSpecification | Omit<OpeningHoursSpecification, \"@type\">,\n): OpeningHoursSpecification {\n  return processSchemaType<OpeningHoursSpecification>(\n    hours,\n    SCHEMA_TYPES.OPENING_HOURS,\n  );\n}\n\n/**\n * Processes review into Review schema type with nested rating processing\n * @param review - Review object with or without @type\n * @returns Review with @type and processed nested fields\n */\nexport function processReview(review: Review | Omit<Review, \"@type\">): Review {\n  const processed: Review = processSchemaType<Review>(\n    review,\n    SCHEMA_TYPES.REVIEW,\n  );\n\n  // Process nested rating\n  if (review.reviewRating) {\n    processed.reviewRating = processSchemaType<Rating>(\n      review.reviewRating,\n      SCHEMA_TYPES.RATING,\n    );\n  }\n\n  // Process nested author\n  if (review.author) {\n    processed.author = processAuthor(review.author);\n  }\n\n  return processed;\n}\n\n/**\n * Processes breadcrumb item into ListItem schema type\n * @param item - BreadcrumbListItem object\n * @param position - Position in the breadcrumb trail\n * @returns ListItem with @type and position\n */\nexport function processBreadcrumbItem(\n  item: BreadcrumbListItem,\n  position: number,\n): ListItem {\n  return {\n    \"@type\": SCHEMA_TYPES.LIST_ITEM,\n    position,\n    ...(item.name && { name: item.name }),\n    ...(item.item && { item: item.item }),\n  };\n}\n\n/**\n * Processes location/place into Place schema type\n * @param location - String location or Place object\n * @returns Place with @type\n */\nexport function processPlace(\n  location: string | Place | Omit<Place, \"@type\">,\n): Place {\n  return processSchemaType<Place>(\n    location,\n    SCHEMA_TYPES.PLACE,\n    (str) => ({\n      name: str,\n      address: {\n        \"@type\": SCHEMA_TYPES.POSTAL_ADDRESS,\n        streetAddress: str,\n      },\n    }),\n    undefined,\n  );\n}\n\n/**\n * Processes performer into Person or PerformingGroup schema type\n * @param performer - String name or Performer object\n * @returns Person or PerformingGroup with @type\n */\nexport function processPerformer(\n  performer: Performer,\n): Person | PerformingGroup {\n  if (isString(performer)) {\n    return {\n      \"@type\": SCHEMA_TYPES.PERFORMING_GROUP,\n      name: performer,\n    };\n  }\n\n  if (hasType<Person | PerformingGroup>(performer)) {\n    return performer;\n  }\n\n  // Check for Person-specific properties\n  const hasPersonProperties =\n    \"familyName\" in performer ||\n    \"givenName\" in performer ||\n    \"additionalName\" in performer;\n\n  return hasPersonProperties\n    ? ({ \"@type\": SCHEMA_TYPES.PERSON, ...performer } as Person)\n    : ({\n        \"@type\": SCHEMA_TYPES.PERFORMING_GROUP,\n        ...performer,\n      } as PerformingGroup);\n}\n\n/**\n * Processes organizer into Person or Organization schema type\n * @param organizer - String name or Organizer object\n * @returns Person or Organization with @type\n */\nexport function processOrganizer(organizer: Organizer): Person | Organization {\n  if (isString(organizer)) {\n    return {\n      \"@type\": SCHEMA_TYPES.ORGANIZATION,\n      name: organizer,\n    };\n  }\n\n  if (hasType<Person | Organization>(organizer)) {\n    return organizer;\n  }\n\n  // Check for Person-specific properties\n  const hasPersonProperties =\n    \"familyName\" in organizer ||\n    \"givenName\" in organizer ||\n    \"additionalName\" in organizer;\n\n  return hasPersonProperties\n    ? ({ \"@type\": SCHEMA_TYPES.PERSON, ...organizer } as Person)\n    : ({ \"@type\": SCHEMA_TYPES.ORGANIZATION, ...organizer } as Organization);\n}\n\n/**\n * Processes generic organization input into Organization schema type\n * @param org - String name or Organization object\n * @returns Organization with @type and processed nested fields\n */\nexport function processOrganization(\n  org: string | Organization | Omit<Organization, \"@type\">,\n): Organization {\n  if (isString(org)) {\n    return {\n      \"@type\": SCHEMA_TYPES.ORGANIZATION,\n      name: org,\n    };\n  }\n\n  const processed = processSchemaType<Organization>(\n    org,\n    SCHEMA_TYPES.ORGANIZATION,\n  );\n\n  // Process nested fields if present\n  processOrganizationFields(processed);\n\n  return processed;\n}\n\n/**\n * Processes offer into Offer schema type\n * @param offer - Offer object with or without @type\n * @returns Offer with @type\n */\nexport function processOffer(offer: Offer | Omit<Offer, \"@type\">): Offer {\n  return processSchemaType<Offer>(offer, SCHEMA_TYPES.OFFER);\n}\n\n/**\n * Processes publisher into Person or Organization schema type\n * @param publisher - String name, Person, or Organization object\n * @returns Person or Organization with @type and processed nested fields\n */\nexport function processPublisher(\n  publisher:\n    | string\n    | Organization\n    | Person\n    | Omit<Organization, \"@type\">\n    | Omit<Person, \"@type\">,\n): Person | Organization {\n  if (isString(publisher)) {\n    return {\n      \"@type\": SCHEMA_TYPES.ORGANIZATION,\n      name: publisher,\n    };\n  }\n\n  if (\n    hasType<Organization>(publisher) &&\n    publisher[\"@type\"] === SCHEMA_TYPES.ORGANIZATION\n  ) {\n    const org = { ...publisher };\n    processOrganizationFields(org);\n    return org;\n  }\n\n  if (hasType<Person | Organization>(publisher)) {\n    return publisher;\n  }\n\n  // Default to Organization for publishers\n  const org: Organization = {\n    \"@type\": SCHEMA_TYPES.ORGANIZATION,\n    ...publisher,\n  };\n  processOrganizationFields(org);\n  return org;\n}\n\n/**\n * Processes nutrition information into NutritionInformation schema type\n * @param nutrition - NutritionInformation object without @type\n * @returns NutritionInformation with @type\n */\nexport function processNutrition(\n  nutrition: Omit<NutritionInformation, \"@type\">,\n): NutritionInformation {\n  return {\n    \"@type\": SCHEMA_TYPES.NUTRITION_INFORMATION,\n    ...nutrition,\n  };\n}\n\n/**\n * Processes aggregate rating into AggregateRating schema type\n * @param rating - AggregateRating object with or without @type\n * @returns AggregateRating with @type\n */\nexport function processAggregateRating(\n  rating: AggregateRating | Omit<AggregateRating, \"@type\">,\n): AggregateRating {\n  return processSchemaType<AggregateRating>(\n    rating,\n    SCHEMA_TYPES.AGGREGATE_RATING,\n  );\n}\n\ntype WebPage = {\n  \"@type\": \"WebPage\";\n  \"@id\": string;\n};\n\n/**\n * Processes main entity of page into string URL or WebPage schema type\n * @param mainEntityOfPage - String URL or WebPage object\n * @returns String URL or WebPage with @type\n */\nexport function processMainEntityOfPage(\n  mainEntityOfPage: string | WebPage | Omit<WebPage, \"@type\">,\n): string | WebPage {\n  if (isString(mainEntityOfPage)) {\n    return mainEntityOfPage;\n  }\n\n  return processSchemaType<WebPage>(mainEntityOfPage, SCHEMA_TYPES.WEB_PAGE);\n}\n\n/**\n * Processes simple monetary amount into MonetaryAmount schema type for return policies\n * @param amount - SimpleMonetaryAmount object with or without @type, or a number\n * @returns SimpleMonetaryAmount with @type or undefined\n */\nexport function processSimpleMonetaryAmount(\n  amount:\n    | number\n    | SimpleMonetaryAmount\n    | Omit<SimpleMonetaryAmount, \"@type\">\n    | undefined,\n): SimpleMonetaryAmount | undefined {\n  if (!amount) return undefined;\n\n  // Handle number input\n  if (typeof amount === \"number\") {\n    return {\n      \"@type\": SCHEMA_TYPES.MONETARY_AMOUNT,\n      value: amount,\n      currency: \"USD\", // Default currency, should be overridden in component\n    };\n  }\n\n  return processSchemaType<SimpleMonetaryAmount>(\n    amount,\n    SCHEMA_TYPES.MONETARY_AMOUNT,\n  );\n}\n\n/**\n * Processes seasonal override into MerchantReturnPolicySeasonalOverride schema type\n * @param override - MerchantReturnPolicySeasonalOverride object with or without @type\n * @returns MerchantReturnPolicySeasonalOverride with @type\n */\nexport function processReturnPolicySeasonalOverride(\n  override:\n    | MerchantReturnPolicySeasonalOverride\n    | Omit<MerchantReturnPolicySeasonalOverride, \"@type\">,\n): MerchantReturnPolicySeasonalOverride {\n  return processSchemaType<MerchantReturnPolicySeasonalOverride>(\n    override,\n    SCHEMA_TYPES.MERCHANT_RETURN_POLICY_SEASONAL_OVERRIDE,\n  );\n}\n\n/**\n * Processes merchant return policy into MerchantReturnPolicy schema type\n * Enhanced to handle nested properties like MonetaryAmount and seasonal overrides\n * @param policy - MerchantReturnPolicy object with or without @type\n * @returns MerchantReturnPolicy with @type and processed nested properties\n */\nexport function processMerchantReturnPolicy(\n  policy: MerchantReturnPolicy | Omit<MerchantReturnPolicy, \"@type\">,\n): MerchantReturnPolicy {\n  if (!policy) return policy as MerchantReturnPolicy;\n\n  const processed = processSchemaType<MerchantReturnPolicy>(\n    policy,\n    SCHEMA_TYPES.MERCHANT_RETURN_POLICY,\n  );\n\n  // Normalize string values to arrays for consistency\n  if (\n    processed.applicableCountry &&\n    !Array.isArray(processed.applicableCountry)\n  ) {\n    processed.applicableCountry = [processed.applicableCountry];\n  }\n\n  if (\n    processed.returnPolicyCountry &&\n    !Array.isArray(processed.returnPolicyCountry)\n  ) {\n    processed.returnPolicyCountry = [processed.returnPolicyCountry];\n  }\n\n  if (processed.returnMethod && !Array.isArray(processed.returnMethod)) {\n    processed.returnMethod = [processed.returnMethod];\n  }\n\n  if (processed.refundType && !Array.isArray(processed.refundType)) {\n    processed.refundType = [processed.refundType];\n  }\n\n  if (processed.itemCondition && !Array.isArray(processed.itemCondition)) {\n    processed.itemCondition = [processed.itemCondition];\n  }\n\n  // Process nested MonetaryAmount fields\n  if (processed.returnShippingFeesAmount) {\n    processed.returnShippingFeesAmount = processSimpleMonetaryAmount(\n      processed.returnShippingFeesAmount,\n    );\n  }\n\n  if (processed.customerRemorseReturnShippingFeesAmount) {\n    processed.customerRemorseReturnShippingFeesAmount =\n      processSimpleMonetaryAmount(\n        processed.customerRemorseReturnShippingFeesAmount,\n      );\n  }\n\n  if (processed.itemDefectReturnShippingFeesAmount) {\n    processed.itemDefectReturnShippingFeesAmount = processSimpleMonetaryAmount(\n      processed.itemDefectReturnShippingFeesAmount,\n    );\n  }\n\n  // Process restocking fee (can be number or SimpleMonetaryAmount)\n  if (processed.restockingFee && typeof processed.restockingFee === \"object\") {\n    processed.restockingFee = processSimpleMonetaryAmount(\n      processed.restockingFee,\n    );\n  }\n\n  // Process seasonal overrides\n  if (processed.returnPolicySeasonalOverride) {\n    if (Array.isArray(processed.returnPolicySeasonalOverride)) {\n      processed.returnPolicySeasonalOverride =\n        processed.returnPolicySeasonalOverride.map(\n          processReturnPolicySeasonalOverride,\n        );\n    } else {\n      processed.returnPolicySeasonalOverride =\n        processReturnPolicySeasonalOverride(\n          processed.returnPolicySeasonalOverride,\n        );\n    }\n  }\n\n  return processed;\n}\n\n/**\n * Processes tier requirement into appropriate schema type\n * @param requirement - Tier requirement that can be CreditCard, MonetaryAmount, UnitPriceSpecification, or string\n * @returns Processed tier requirement with @type\n */\nexport function processTierRequirement(\n  requirement: TierRequirement,\n): TierRequirement {\n  if (!requirement) return requirement;\n\n  // If it's a string, return as-is (text description)\n  if (isString(requirement)) {\n    return requirement;\n  }\n\n  // If it already has @type, return as-is\n  if (hasType(requirement)) {\n    return requirement;\n  }\n\n  // Determine type based on properties\n  if (\"priceCurrency\" in requirement && \"price\" in requirement) {\n    // UnitPriceSpecification has both price and priceCurrency\n    if (\n      \"billingDuration\" in requirement ||\n      \"billingIncrement\" in requirement ||\n      \"unitCode\" in requirement\n    ) {\n      return {\n        \"@type\": SCHEMA_TYPES.UNIT_PRICE_SPECIFICATION,\n        ...requirement,\n      } as UnitPriceSpecification;\n    }\n  }\n\n  if (\"value\" in requirement && \"currency\" in requirement) {\n    // MonetaryAmount\n    return {\n      \"@type\": SCHEMA_TYPES.MONETARY_AMOUNT,\n      ...requirement,\n    } as SimpleMonetaryAmount;\n  }\n\n  if (\"name\" in requirement) {\n    // CreditCard\n    return {\n      \"@type\": SCHEMA_TYPES.CREDIT_CARD,\n      ...requirement,\n    } as CreditCard;\n  }\n\n  // Default to returning as-is if we can't determine the type\n  return requirement;\n}\n\n/**\n * Processes tier benefit, normalizing short names to full URLs\n * @param benefit - Tier benefit string or array\n * @returns Normalized tier benefit\n */\nexport function processTierBenefit(\n  benefit: TierBenefit | TierBenefit[],\n): TierBenefit | TierBenefit[] {\n  const normalizeBenefit = (b: TierBenefit): TierBenefit => {\n    // If it's already a full URL, return as-is\n    if (b.startsWith(\"https://schema.org/\")) {\n      return b;\n    }\n    // Convert short name to full URL\n    if (b === \"TierBenefitLoyaltyPoints\") {\n      return \"https://schema.org/TierBenefitLoyaltyPoints\";\n    }\n    if (b === \"TierBenefitLoyaltyPrice\") {\n      return \"https://schema.org/TierBenefitLoyaltyPrice\";\n    }\n    // Return as-is if unrecognized\n    return b;\n  };\n\n  if (Array.isArray(benefit)) {\n    return benefit.map(normalizeBenefit);\n  }\n  return normalizeBenefit(benefit);\n}\n\n/**\n * Processes membership points earned into QuantitativeValue\n * @param points - Number or QuantitativeValue\n * @returns QuantitativeValue with @type\n */\nexport function processMembershipPointsEarned(\n  points: number | QuantitativeValue | Omit<QuantitativeValue, \"@type\">,\n): QuantitativeValue {\n  if (typeof points === \"number\") {\n    return {\n      \"@type\": SCHEMA_TYPES.QUANTITATIVE_VALUE,\n      value: points,\n    };\n  }\n  return processSchemaType<QuantitativeValue>(\n    points,\n    SCHEMA_TYPES.QUANTITATIVE_VALUE,\n  );\n}\n\n/**\n * Processes member program tier into MemberProgramTier schema type\n * @param tier - MemberProgramTier with or without @type\n * @returns MemberProgramTier with @type\n */\nexport function processMemberProgramTier(\n  tier: MemberProgramTier | Omit<MemberProgramTier, \"@type\">,\n): MemberProgramTier {\n  const processed = processSchemaType<MemberProgramTier>(\n    tier,\n    SCHEMA_TYPES.MEMBER_PROGRAM_TIER,\n  );\n\n  // Process hasTierBenefit\n  if (processed.hasTierBenefit) {\n    processed.hasTierBenefit = processTierBenefit(processed.hasTierBenefit);\n  }\n\n  // Process hasTierRequirement\n  if (processed.hasTierRequirement) {\n    processed.hasTierRequirement = processTierRequirement(\n      processed.hasTierRequirement,\n    );\n  }\n\n  // Process membershipPointsEarned\n  if (processed.membershipPointsEarned !== undefined) {\n    processed.membershipPointsEarned = processMembershipPointsEarned(\n      processed.membershipPointsEarned,\n    );\n  }\n\n  return processed;\n}\n\n/**\n * Processes member program into MemberProgram schema type\n * @param program - MemberProgram with or without @type\n * @returns MemberProgram with @type\n */\nexport function processMemberProgram(\n  program: MemberProgram | Omit<MemberProgram, \"@type\">,\n): MemberProgram {\n  const processed = processSchemaType<MemberProgram>(\n    program,\n    SCHEMA_TYPES.MEMBER_PROGRAM,\n  );\n\n  // Process hasTiers\n  if (processed.hasTiers) {\n    if (Array.isArray(processed.hasTiers)) {\n      processed.hasTiers = processed.hasTiers.map(processMemberProgramTier);\n    } else {\n      processed.hasTiers = processMemberProgramTier(processed.hasTiers);\n    }\n  }\n\n  return processed;\n}\n\n/**\n * Processes video into VideoObject schema type\n * @param video - VideoObject with or without @type\n * @returns VideoObject with @type\n */\nexport function processVideo(\n  video: VideoObject | Omit<VideoObject, \"@type\">,\n): VideoObject {\n  return processSchemaType<VideoObject>(video, SCHEMA_TYPES.VIDEO_OBJECT);\n}\n\n/**\n * Processes broadcast event into BroadcastEvent schema type\n * @param broadcast - BroadcastEvent with or without @type\n * @returns BroadcastEvent with @type\n */\nexport function processBroadcastEvent(\n  broadcast: BroadcastEvent | Omit<BroadcastEvent, \"@type\">,\n): BroadcastEvent {\n  if (!broadcast) return broadcast as BroadcastEvent;\n\n  if (typeof broadcast === \"object\" && !(\"@type\" in broadcast)) {\n    return {\n      \"@type\": \"BroadcastEvent\",\n      ...broadcast,\n    };\n  }\n\n  return broadcast as BroadcastEvent;\n}\n\n/**\n * Processes clip into Clip schema type\n * @param clip - Clip with or without @type\n * @returns Clip with @type\n */\nexport function processClip(clip: Clip | Omit<Clip, \"@type\">): Clip {\n  if (!clip) return clip as Clip;\n\n  if (typeof clip === \"object\" && !(\"@type\" in clip)) {\n    return {\n      \"@type\": \"Clip\",\n      ...clip,\n    };\n  }\n\n  return clip as Clip;\n}\n\n/**\n * Processes seek action into SeekToAction schema type\n * @param action - SeekToAction with or without @type\n * @returns SeekToAction with @type\n */\nexport function processSeekToAction(\n  action: PotentialAction | Omit<PotentialAction, \"@type\">,\n): PotentialAction {\n  if (!action) return action as PotentialAction;\n\n  if (typeof action === \"object\" && !(\"@type\" in action)) {\n    return {\n      \"@type\": \"SeekToAction\",\n      ...action,\n    };\n  }\n\n  return action as PotentialAction;\n}\n\n/**\n * Processes instruction into string, HowToStep, or HowToSection schema type\n * @param instruction - String instruction or HowTo object\n * @returns String, HowToStep, or HowToSection with @type\n */\nexport function processInstruction(\n  instruction:\n    | string\n    | HowToStep\n    | HowToSection\n    | Omit<HowToStep, \"@type\">\n    | Omit<HowToSection, \"@type\">,\n): string | HowToStep | HowToSection {\n  if (isString(instruction)) {\n    return instruction;\n  }\n\n  if (hasType<HowToStep | HowToSection>(instruction)) {\n    // Process nested items if it's a section\n    if (\n      instruction[\"@type\"] === SCHEMA_TYPES.HOW_TO_SECTION &&\n      \"itemListElement\" in instruction\n    ) {\n      return {\n        ...instruction,\n        itemListElement: instruction.itemListElement.map((item) =>\n          processInstruction(item),\n        ),\n      } as HowToSection;\n    }\n    return instruction;\n  }\n\n  // Determine type based on properties\n  if (\"itemListElement\" in instruction) {\n    return {\n      \"@type\": SCHEMA_TYPES.HOW_TO_SECTION,\n      ...instruction,\n      itemListElement: instruction.itemListElement.map((item) =>\n        processInstruction(item),\n      ),\n    } as HowToSection;\n  }\n\n  return {\n    \"@type\": SCHEMA_TYPES.HOW_TO_STEP,\n    ...instruction,\n  } as HowToStep;\n}\n\n/**\n * Processes director into Person schema type\n * @param director - String name or Director object\n * @returns Person with @type\n */\nexport function processDirector(director: Director): Person {\n  return processSchemaType<Person>(\n    director,\n    SCHEMA_TYPES.PERSON,\n    (str) => ({ name: str }),\n    undefined,\n  );\n}\n\n// Dataset-specific processors\n\n/**\n * Processes creator(s) into Person or Organization schema type(s)\n * @param creator - Author or array of Authors\n * @returns Person/Organization or array of them with @type\n */\nexport function processCreator(\n  creator: Author | Author[],\n): Person | Organization | (Person | Organization)[] {\n  return Array.isArray(creator)\n    ? creator.map(processAuthor)\n    : processAuthor(creator);\n}\n\n/**\n * Processes identifier into string or PropertyValue schema type\n * @param identifier - String identifier or PropertyValue object\n * @returns String or PropertyValue with @type\n */\nexport function processIdentifier(\n  identifier: string | PropertyValue | Omit<PropertyValue, \"@type\">,\n): string | PropertyValue {\n  if (isString(identifier)) {\n    return identifier;\n  }\n\n  return processSchemaType<PropertyValue>(\n    identifier,\n    SCHEMA_TYPES.PROPERTY_VALUE,\n  );\n}\n\n/**\n * Processes spatial coverage into string or Place schema type\n * @param spatial - String location or DatasetPlace object\n * @returns String or DatasetPlace with @type and processed geo\n */\nexport function processSpatialCoverage(\n  spatial: string | DatasetPlace | Omit<DatasetPlace, \"@type\">,\n): string | DatasetPlace {\n  if (isString(spatial)) {\n    return spatial;\n  }\n\n  const processed: DatasetPlace = processSchemaType<DatasetPlace>(\n    spatial,\n    SCHEMA_TYPES.PLACE,\n  );\n\n  // Process nested geo if present\n  if (spatial.geo && typeof spatial.geo === \"object\" && !hasType(spatial.geo)) {\n    if (\"latitude\" in spatial.geo && \"longitude\" in spatial.geo) {\n      processed.geo = processSchemaType<GeoCoordinates>(\n        spatial.geo,\n        SCHEMA_TYPES.GEO_COORDINATES,\n      );\n    } else if (\n      \"box\" in spatial.geo ||\n      \"circle\" in spatial.geo ||\n      \"line\" in spatial.geo ||\n      \"polygon\" in spatial.geo\n    ) {\n      processed.geo = processSchemaType<GeoShape>(\n        spatial.geo,\n        SCHEMA_TYPES.GEO_SHAPE,\n      );\n    }\n  }\n\n  return processed;\n}\n\n/**\n * Processes data download into DataDownload schema type\n * @param download - DataDownload object with or without @type\n * @returns DataDownload with @type\n */\nexport function processDataDownload(\n  download: DataDownload | Omit<DataDownload, \"@type\">,\n): DataDownload {\n  return processSchemaType<DataDownload>(download, SCHEMA_TYPES.DATA_DOWNLOAD);\n}\n\n/**\n * Processes license into string URL or CreativeWork schema type\n * @param license - String URL or CreativeWork object\n * @returns String URL or CreativeWork with @type\n */\nexport function processLicense(\n  license: string | CreativeWork | Omit<CreativeWork, \"@type\">,\n): string | CreativeWork {\n  if (isString(license)) {\n    return license;\n  }\n\n  return processSchemaType<CreativeWork>(license, SCHEMA_TYPES.CREATIVE_WORK);\n}\n\n/**\n * Processes data catalog into DataCatalog schema type\n * @param catalog - DataCatalog object with or without @type\n * @returns DataCatalog with @type\n */\nexport function processDataCatalog(\n  catalog: DataCatalog | Omit<DataCatalog, \"@type\">,\n): DataCatalog {\n  return processSchemaType<DataCatalog>(catalog, SCHEMA_TYPES.DATA_CATALOG);\n}\n\n// JobPosting-specific processors\n\n/**\n * Processes hiring organization into Organization schema type\n * @param org - String name or Organization object\n * @returns Organization with @type and processed logo\n */\nexport function processHiringOrganization(\n  org: string | Organization | Omit<Organization, \"@type\">,\n): Organization {\n  if (isString(org)) {\n    return {\n      \"@type\": SCHEMA_TYPES.ORGANIZATION,\n      name: org,\n    };\n  }\n\n  const processed = processSchemaType<Organization>(\n    org,\n    SCHEMA_TYPES.ORGANIZATION,\n  );\n\n  // Process nested logo if present\n  if (processed.logo && !isString(processed.logo)) {\n    processed.logo = processImage(processed.logo);\n  }\n\n  return processed;\n}\n\n/**\n * Processes job location into Place schema type\n * @param location - String location or JobPlace object\n * @returns JobPlace with @type and processed address\n */\nexport function processJobLocation(\n  location: string | JobPlace | Omit<JobPlace, \"@type\">,\n): JobPlace {\n  if (isString(location)) {\n    return {\n      \"@type\": SCHEMA_TYPES.PLACE,\n      address: {\n        \"@type\": SCHEMA_TYPES.POSTAL_ADDRESS,\n        streetAddress: location,\n      },\n    };\n  }\n\n  const processed = processSchemaType<JobPlace>(location, SCHEMA_TYPES.PLACE);\n\n  // Process nested address\n  if (processed.address && !isString(processed.address)) {\n    processed.address = processAddress(processed.address);\n  }\n\n  return processed;\n}\n\n/**\n * Processes monetary amount into MonetaryAmount schema type\n * @param amount - MonetaryAmount object with or without @type\n * @returns MonetaryAmount with @type and processed value\n */\nexport function processMonetaryAmount(\n  amount: MonetaryAmount | Omit<MonetaryAmount, \"@type\">,\n): MonetaryAmount {\n  const processed = processSchemaType<MonetaryAmount>(amount, \"MonetaryAmount\");\n\n  // Process nested value as QuantitativeValue\n  processed.value = processSchemaType<QuantitativeValue>(\n    amount.value,\n    SCHEMA_TYPES.QUANTITATIVE_VALUE,\n  );\n\n  return processed;\n}\n\n/**\n * Processes rating into Rating schema type\n * @param rating - Rating object with or without @type\n * @returns Rating with @type\n */\nexport function processRating(rating: Rating | Omit<Rating, \"@type\">): Rating {\n  return processSchemaType<Rating>(rating, SCHEMA_TYPES.RATING);\n}\n\n/**\n * Processes job property value into PropertyValue schema type\n * @param identifier - String identifier or JobPropertyValue object\n * @returns JobPropertyValue with @type\n */\nexport function processJobPropertyValue(\n  identifier: string | JobPropertyValue | Omit<JobPropertyValue, \"@type\">,\n): JobPropertyValue {\n  return processSchemaType<JobPropertyValue>(\n    identifier,\n    SCHEMA_TYPES.PROPERTY_VALUE,\n    (str) => ({ value: str }),\n    undefined,\n  );\n}\n\n/**\n * Processes applicant location requirements into Country or State schema type\n * @param location - Location requirement object\n * @returns AdministrativeArea (Country or State) with @type\n */\nexport function processApplicantLocationRequirements(\n  location: Omit<Country, \"@type\"> | Omit<State, \"@type\"> | Country | State,\n): AdministrativeArea {\n  if (hasType<Country | State>(location)) {\n    return location;\n  }\n\n  // Improved detection logic\n  const name = location.name;\n  const statePatterns = [\n    /\\b[A-Z]{2}\\b/, // Two-letter state codes\n    /\\bstate\\b/i, // Contains \"state\"\n    /,/, // Contains comma (often \"City, State\")\n    /\\b(AL|AK|AZ|AR|CA|CO|CT|DE|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY)\\b/, // US state codes\n  ];\n\n  const isState = statePatterns.some((pattern) => pattern.test(name));\n\n  return {\n    \"@type\": isState ? SCHEMA_TYPES.STATE : SCHEMA_TYPES.COUNTRY,\n    ...location,\n  } as AdministrativeArea;\n}\n\n/**\n * Processes education requirements into string or EducationalOccupationalCredential\n * @param education - String description or credential object\n * @returns String or EducationalOccupationalCredential with @type\n */\nexport function processEducationRequirements(\n  education:\n    | string\n    | EducationalOccupationalCredential\n    | Omit<EducationalOccupationalCredential, \"@type\">,\n): string | EducationalOccupationalCredential {\n  if (isString(education)) {\n    return education;\n  }\n\n  return processSchemaType<EducationalOccupationalCredential>(\n    education,\n    SCHEMA_TYPES.EDUCATIONAL_CREDENTIAL,\n  );\n}\n\n/**\n * Processes experience requirements into string or OccupationalExperienceRequirements\n * @param experience - String description or experience object\n * @returns String or OccupationalExperienceRequirements with @type\n */\nexport function processExperienceRequirements(\n  experience:\n    | string\n    | OccupationalExperienceRequirements\n    | Omit<OccupationalExperienceRequirements, \"@type\">,\n): string | OccupationalExperienceRequirements {\n  if (isString(experience)) {\n    return experience;\n  }\n\n  return processSchemaType<OccupationalExperienceRequirements>(\n    experience,\n    SCHEMA_TYPES.OCCUPATIONAL_EXPERIENCE,\n  );\n}\n\n// DiscussionForumPosting-specific processors\n\n/**\n * Processes interaction statistic into InteractionCounter schema type\n * @param statistic - InteractionCounter object with or without @type\n * @returns InteractionCounter with @type\n */\nexport function processInteractionStatistic(\n  statistic: InteractionCounter | Omit<InteractionCounter, \"@type\">,\n): InteractionCounter {\n  return processSchemaType<InteractionCounter>(\n    statistic,\n    SCHEMA_TYPES.INTERACTION_COUNTER,\n  );\n}\n\n/**\n * Processes shared content into WebPage, ImageObject, or VideoObject schema type\n * @param content - SharedContent (string URL or object)\n * @returns ForumWebPage, ImageObject, or VideoObject with @type\n */\nexport function processSharedContent(\n  content: SharedContent,\n): ForumWebPage | ImageObject | VideoObject {\n  if (isString(content)) {\n    return {\n      \"@type\": SCHEMA_TYPES.WEB_PAGE,\n      url: content,\n    };\n  }\n\n  if (hasType<ForumWebPage | ImageObject | VideoObject>(content)) {\n    return content;\n  }\n\n  // Improved type detection\n  const hasVideoProperties =\n    \"uploadDate\" in content && \"thumbnailUrl\" in content;\n  const hasImageProperties =\n    \"url\" in content && (\"width\" in content || \"height\" in content);\n\n  if (hasVideoProperties) {\n    return processSchemaType<VideoObject>(content, SCHEMA_TYPES.VIDEO_OBJECT);\n  }\n\n  if (hasImageProperties) {\n    return processSchemaType<ImageObject>(content, SCHEMA_TYPES.IMAGE_OBJECT);\n  }\n\n  // Default to WebPage\n  return processSchemaType<ForumWebPage>(content, SCHEMA_TYPES.WEB_PAGE);\n}\n\n/**\n * Processes comment into Comment schema type with nested fields\n * @param comment - Comment object with or without @type\n * @returns Comment with @type and processed nested fields\n */\nexport function processComment(\n  comment: Comment | Omit<Comment, \"@type\">,\n): Comment {\n  const processed: Comment = processSchemaType<Comment>(\n    comment,\n    SCHEMA_TYPES.COMMENT,\n  );\n\n  // Process nested fields\n  if (comment.author) {\n    processed.author = processAuthor(comment.author);\n  }\n\n  if (comment.image && !isString(comment.image)) {\n    processed.image = processImage(comment.image);\n  }\n\n  if (comment.video) {\n    processed.video = processVideo(comment.video);\n  }\n\n  if (comment.interactionStatistic) {\n    processed.interactionStatistic = Array.isArray(comment.interactionStatistic)\n      ? comment.interactionStatistic.map(processInteractionStatistic)\n      : processInteractionStatistic(comment.interactionStatistic);\n  }\n\n  if (comment.sharedContent) {\n    processed.sharedContent = processSharedContent(comment.sharedContent);\n  }\n\n  // Process nested comments recursively\n  if (comment.comment) {\n    processed.comment = comment.comment.map(processComment);\n  }\n\n  return processed;\n}\n\n/**\n * Processes isPartOf into string URL or CreativeWork schema type\n * @param isPartOf - String URL or ForumCreativeWork object\n * @returns String URL or ForumCreativeWork with @type\n */\nexport function processIsPartOf(\n  isPartOf: string | ForumCreativeWork | Omit<ForumCreativeWork, \"@type\">,\n): string | ForumCreativeWork {\n  if (isString(isPartOf)) {\n    return isPartOf;\n  }\n\n  return processSchemaType<ForumCreativeWork>(\n    isPartOf,\n    SCHEMA_TYPES.CREATIVE_WORK,\n  );\n}\n\n// VacationRental-specific processors\n\n/**\n * Processes brand into Brand or Organization schema type\n * @param brand - Brand or Organization object with or without @type\n * @returns Brand or Organization with @type\n */\nexport function processBrand(\n  brand:\n    | Brand\n    | Organization\n    | Omit<Brand, \"@type\">\n    | Omit<Organization, \"@type\">,\n): Brand | Organization {\n  // If it already has a type, return as-is\n  if (\"@type\" in brand) {\n    return brand as Brand | Organization;\n  }\n\n  // Check if it has Organization-specific properties\n  if (\"logo\" in brand || \"address\" in brand || \"contactPoint\" in brand) {\n    const org: Organization = {\n      \"@type\": SCHEMA_TYPES.ORGANIZATION,\n      ...brand,\n    };\n    processOrganizationFields(org);\n    return org;\n  }\n\n  // Default to Brand\n  return processSchemaType<Brand>(brand, SCHEMA_TYPES.BRAND);\n}\n\n/**\n * Processes bed details into BedDetails schema type\n * @param bed - BedDetails object with or without @type\n * @returns BedDetails with @type\n */\nexport function processBedDetails(\n  bed: BedDetails | Omit<BedDetails, \"@type\">,\n): BedDetails {\n  return processSchemaType<BedDetails>(bed, SCHEMA_TYPES.BED_DETAILS);\n}\n\n/**\n * Processes location feature into LocationFeatureSpecification schema type\n * @param feature - LocationFeatureSpecification object with or without @type\n * @returns LocationFeatureSpecification with @type\n */\nexport function processLocationFeatureSpecification(\n  feature:\n    | LocationFeatureSpecification\n    | Omit<LocationFeatureSpecification, \"@type\">,\n): LocationFeatureSpecification {\n  return processSchemaType<LocationFeatureSpecification>(\n    feature,\n    SCHEMA_TYPES.LOCATION_FEATURE,\n  );\n}\n\n/**\n * Processes accommodation into Accommodation schema type with nested fields\n * @param accommodation - Accommodation object with or without @type\n * @returns Accommodation with @type and processed nested fields\n */\nexport function processAccommodation(\n  accommodation: Accommodation | Omit<Accommodation, \"@type\">,\n): Accommodation {\n  const processed: Accommodation = processSchemaType<Accommodation>(\n    accommodation,\n    SCHEMA_TYPES.ACCOMMODATION,\n  );\n\n  // Process nested bed details\n  if (accommodation.bed) {\n    processed.bed = Array.isArray(accommodation.bed)\n      ? accommodation.bed.map(processBedDetails)\n      : processBedDetails(accommodation.bed);\n  }\n\n  // Process occupancy\n  if (accommodation.occupancy) {\n    processed.occupancy = processNumberOfEmployees(\n      accommodation.occupancy,\n    ) as QuantitativeValue;\n  }\n\n  // Process amenity features\n  if (accommodation.amenityFeature) {\n    processed.amenityFeature = Array.isArray(accommodation.amenityFeature)\n      ? accommodation.amenityFeature.map(processLocationFeatureSpecification)\n      : processLocationFeatureSpecification(accommodation.amenityFeature);\n  }\n\n  // Process floor size\n  if (accommodation.floorSize) {\n    processed.floorSize = processNumberOfEmployees(\n      accommodation.floorSize,\n    ) as QuantitativeValue;\n  }\n\n  return processed;\n}\n\n// Course-specific processors\n\n/**\n * Processes provider into Organization schema type\n * @param provider - String name or Provider object\n * @returns Organization with @type\n */\nexport function processProvider(provider: Provider): Organization {\n  return processSchemaType<Organization>(\n    provider,\n    SCHEMA_TYPES.ORGANIZATION,\n    (str) => ({ name: str }),\n    undefined,\n  );\n}\n\n/**\n * Processes funder(s) into Person or Organization schema type(s)\n * @param funder - Author or array of Authors representing funders\n * @returns Person/Organization or array of them with @type\n */\nexport function processFunder(\n  funder: Author | Author[],\n): Person | Organization | (Person | Organization)[] {\n  if (Array.isArray(funder)) {\n    return funder.map(processFunderSingle);\n  }\n  return processFunderSingle(funder);\n}\n\n/**\n * Helper to process a single funder\n * @param funder - Author representing a funder\n * @returns Person or Organization with @type (defaults to Organization)\n */\nfunction processFunderSingle(funder: Author): Person | Organization {\n  if (isString(funder)) {\n    return {\n      \"@type\": SCHEMA_TYPES.ORGANIZATION,\n      name: funder,\n    };\n  }\n\n  if (hasType<Person | Organization>(funder)) {\n    return funder;\n  }\n\n  // For funders without @type, default to Organization\n  // (funding bodies are typically organizations)\n  return {\n    \"@type\": SCHEMA_TYPES.ORGANIZATION,\n    ...funder,\n  } as Organization;\n}\n\n// SoftwareApplication-specific processors\n\n/**\n * Processes screenshot the same way as images\n * @param screenshot - URL string or ImageObject\n * @returns URL string or ImageObject with @type\n */\nexport function processScreenshot(\n  screenshot: string | ImageObject | Omit<ImageObject, \"@type\">,\n): string | ImageObject {\n  return processImage(screenshot);\n}\n\n/**\n * Processes feature list - no transformation needed\n * @param features - String or array of strings\n * @returns String or array of strings as-is\n */\nexport function processFeatureList(\n  features: string | string[],\n): string | string[] {\n  return features;\n}\n\n// ClaimReview-specific processors\n\n/**\n * Processes claim review rating into ClaimReviewRating schema type\n * @param rating - Rating object with or without @type\n * @returns ClaimReviewRating with @type\n */\nexport function processClaimReviewRating(\n  rating: ClaimReviewRating | Omit<ClaimReviewRating, \"@type\">,\n): ClaimReviewRating {\n  return processSchemaType<ClaimReviewRating>(rating, SCHEMA_TYPES.RATING);\n}\n\n/**\n * Processes claim into Claim schema type with nested fields\n * @param claim - Claim object with or without @type\n * @returns Claim with @type and processed nested fields\n */\nexport function processClaim(claim: Claim | Omit<Claim, \"@type\">): Claim {\n  const processed: Claim = processSchemaType<Claim>(claim, SCHEMA_TYPES.CLAIM);\n\n  // Process nested author\n  if (claim.author) {\n    processed.author = processAuthor(claim.author);\n  }\n\n  // Process appearance(s)\n  if (claim.appearance) {\n    if (Array.isArray(claim.appearance)) {\n      processed.appearance = claim.appearance.map(processAppearance);\n    } else {\n      processed.appearance = processAppearance(claim.appearance);\n    }\n  }\n\n  // Process firstAppearance\n  if (claim.firstAppearance) {\n    processed.firstAppearance = processAppearance(claim.firstAppearance);\n  }\n\n  return processed;\n}\n\n/**\n * Processes appearance into string URL or ClaimCreativeWork schema type\n * @param appearance - String URL or CreativeWork object\n * @returns String URL or ClaimCreativeWork with @type\n */\nexport function processAppearance(\n  appearance: string | ClaimCreativeWork | Omit<ClaimCreativeWork, \"@type\">,\n): string | ClaimCreativeWork {\n  if (isString(appearance)) {\n    return appearance;\n  }\n\n  const processed = processSchemaType<ClaimCreativeWork>(\n    appearance,\n    SCHEMA_TYPES.CREATIVE_WORK,\n  );\n\n  // Process nested fields\n  if (appearance.author) {\n    processed.author = processAuthor(appearance.author);\n  }\n\n  if (appearance.publisher && !isString(appearance.publisher)) {\n    processed.publisher = processPublisher(appearance.publisher);\n  }\n\n  return processed;\n}\n\n/**\n * Processes WebPageElement for marking paywalled sections\n * @param element - WebPageElement object with or without @type\n * @returns WebPageElement with @type\n * @example\n * processWebPageElement({ isAccessibleForFree: false, cssSelector: \".paywall\" })\n * // { \"@type\": \"WebPageElement\", isAccessibleForFree: false, cssSelector: \".paywall\" }\n */\nexport function processWebPageElement(\n  element: WebPageElement | Omit<WebPageElement, \"@type\">,\n): WebPageElement {\n  return processSchemaType<WebPageElement>(\n    element,\n    SCHEMA_TYPES.WEB_PAGE_ELEMENT,\n  );\n}\n\n// Product-specific processors\n\n/**\n * Processes product offer into ProductOffer schema type\n * @param offer - ProductOffer object with or without @type\n * @returns ProductOffer with @type and processed nested fields\n */\nexport function processProductOffer(\n  offer: ProductOffer | Omit<ProductOffer, \"@type\">,\n): ProductOffer {\n  const processed: ProductOffer = processSchemaType<ProductOffer>(\n    offer,\n    SCHEMA_TYPES.OFFER,\n  );\n\n  // Process nested seller if present\n  if (offer.seller) {\n    processed.seller = processAuthor(offer.seller);\n  }\n\n  // Process nested priceSpecification if present\n  if (offer.priceSpecification) {\n    if (Array.isArray(offer.priceSpecification)) {\n      processed.priceSpecification = offer.priceSpecification.map(\n        processPriceSpecification,\n      );\n    } else {\n      processed.priceSpecification = processPriceSpecification(\n        offer.priceSpecification,\n      );\n    }\n  }\n\n  // Process nested hasMerchantReturnPolicy if present\n  if (offer.hasMerchantReturnPolicy) {\n    if (Array.isArray(offer.hasMerchantReturnPolicy)) {\n      processed.hasMerchantReturnPolicy = offer.hasMerchantReturnPolicy.map(\n        processMerchantReturnPolicy,\n      );\n    } else {\n      processed.hasMerchantReturnPolicy = processMerchantReturnPolicy(\n        offer.hasMerchantReturnPolicy,\n      );\n    }\n  }\n\n  // Process nested shippingDetails if present\n  if (offer.shippingDetails) {\n    if (Array.isArray(offer.shippingDetails)) {\n      processed.shippingDetails = offer.shippingDetails.map(\n        processOfferShippingDetails,\n      );\n    } else {\n      processed.shippingDetails = processOfferShippingDetails(\n        offer.shippingDetails,\n      );\n    }\n  }\n\n  return processed;\n}\n\n/**\n * Processes aggregate offer into AggregateOffer schema type\n * @param offer - AggregateOffer object with or without @type\n * @returns AggregateOffer with @type and processed nested offers\n */\nexport function processAggregateOffer(\n  offer: AggregateOffer | Omit<AggregateOffer, \"@type\">,\n): AggregateOffer {\n  const processed: AggregateOffer = processSchemaType<AggregateOffer>(\n    offer,\n    SCHEMA_TYPES.AGGREGATE_OFFER,\n  );\n\n  // Process nested offers if present\n  if (offer.offers) {\n    processed.offers = offer.offers.map(processProductOffer);\n  }\n\n  return processed;\n}\n\n/**\n * Processes price specification into PriceSpecification or UnitPriceSpecification schema type\n * @param spec - PriceSpecification or UnitPriceSpecification object with or without @type\n * @returns PriceSpecification or UnitPriceSpecification with @type\n */\nexport function processPriceSpecification(\n  spec:\n    | PriceSpecification\n    | UnitPriceSpecification\n    | Omit<PriceSpecification, \"@type\">\n    | Omit<UnitPriceSpecification, \"@type\">,\n): PriceSpecification | UnitPriceSpecification {\n  // Check if it's a UnitPriceSpecification\n  if (\n    \"priceType\" in spec ||\n    \"validForMemberTier\" in spec ||\n    \"membershipPointsEarned\" in spec ||\n    \"referenceQuantity\" in spec\n  ) {\n    return processUnitPriceSpecification(\n      spec as UnitPriceSpecification | Omit<UnitPriceSpecification, \"@type\">,\n    );\n  }\n  return processSchemaType<PriceSpecification>(\n    spec as PriceSpecification | Omit<PriceSpecification, \"@type\">,\n    SCHEMA_TYPES.PRICE_SPECIFICATION,\n  );\n}\n\n/**\n * Processes unit price specification into UnitPriceSpecification schema type\n * @param spec - UnitPriceSpecification object with or without @type\n * @returns UnitPriceSpecification with @type\n */\nexport function processUnitPriceSpecification(\n  spec: UnitPriceSpecification | Omit<UnitPriceSpecification, \"@type\">,\n): UnitPriceSpecification {\n  const processed = processSchemaType<UnitPriceSpecification>(\n    spec,\n    SCHEMA_TYPES.UNIT_PRICE_SPECIFICATION,\n  );\n\n  // Process nested validForMemberTier if present\n  if (spec.validForMemberTier) {\n    if (Array.isArray(spec.validForMemberTier)) {\n      processed.validForMemberTier = spec.validForMemberTier.map(\n        processMemberProgramTier,\n      );\n    } else {\n      processed.validForMemberTier = processMemberProgramTier(\n        spec.validForMemberTier,\n      );\n    }\n  }\n\n  // Process nested referenceQuantity if present\n  if (spec.referenceQuantity) {\n    processed.referenceQuantity = processQuantitativeValue(\n      spec.referenceQuantity,\n    );\n  }\n\n  return processed;\n}\n\n/**\n * Processes QuantitativeValue into schema type\n * @param value - QuantitativeValue object with or without @type\n * @returns QuantitativeValue with @type\n */\nexport function processQuantitativeValue(\n  value: QuantitativeValue | Omit<QuantitativeValue, \"@type\">,\n): QuantitativeValue {\n  const processed = processSchemaType<QuantitativeValue>(\n    value,\n    SCHEMA_TYPES.QUANTITATIVE_VALUE,\n  );\n\n  // Process nested valueReference if present\n  if (value.valueReference) {\n    processed.valueReference = processQuantitativeValue(value.valueReference);\n  }\n\n  return processed;\n}\n\n/**\n * Processes product item list into ProductItemList schema type\n * @param list - ProductItemList object with or without @type\n * @returns ProductItemList with @type and processed items\n */\nexport function processProductItemList(\n  list: ProductItemList | Omit<ProductItemList, \"@type\">,\n): ProductItemList {\n  const processed: ProductItemList = processSchemaType<ProductItemList>(\n    list,\n    SCHEMA_TYPES.ITEM_LIST,\n  );\n\n  // Process nested list items\n  if (list.itemListElement) {\n    processed.itemListElement = list.itemListElement.map((item, index) => {\n      const processedItem = processSchemaType<ProductListItem>(\n        item,\n        SCHEMA_TYPES.LIST_ITEM,\n      );\n      // Ensure position is set if not provided\n      if (!processedItem.position) {\n        processedItem.position = index + 1;\n      }\n      return processedItem;\n    });\n  }\n\n  return processed;\n}\n\n/**\n * Processes product review into ProductReview schema type with pros/cons\n * @param review - ProductReview object with or without @type\n * @returns ProductReview with @type and processed nested fields\n */\nexport function processProductReview(\n  review: ProductReview | Omit<ProductReview, \"@type\">,\n): ProductReview {\n  const processed: ProductReview = processSchemaType<ProductReview>(\n    review,\n    SCHEMA_TYPES.REVIEW,\n  );\n\n  // Process nested rating\n  if (review.reviewRating) {\n    processed.reviewRating = processSchemaType<Rating>(\n      review.reviewRating,\n      SCHEMA_TYPES.RATING,\n    );\n  }\n\n  // Process nested author\n  if (review.author) {\n    processed.author = processAuthor(review.author);\n  }\n\n  // Process positive notes (pros)\n  if (review.positiveNotes) {\n    processed.positiveNotes = processProductItemList(review.positiveNotes);\n  }\n\n  // Process negative notes (cons)\n  if (review.negativeNotes) {\n    processed.negativeNotes = processProductItemList(review.negativeNotes);\n  }\n\n  return processed;\n}\n\n/**\n * Processes variesBy property to ensure full schema.org URLs\n * @param variesBy - Simple string or full URL, single or array\n * @returns Processed variesBy with full schema.org URLs\n */\nexport function processVariesBy(\n  variesBy: VariesBy | VariesBy[],\n): string | string[] {\n  const processOne = (value: VariesBy): string => {\n    // If it's already a full URL, return as-is\n    if (value.startsWith(\"https://schema.org/\")) {\n      return value;\n    }\n    // Otherwise, prepend the schema.org URL\n    return `https://schema.org/${value}`;\n  };\n\n  if (Array.isArray(variesBy)) {\n    return variesBy.map(processOne);\n  }\n  return processOne(variesBy);\n}\n\n/**\n * Processes a product variant for use in ProductGroup\n * @param variant - Product object, simplified variant with just URL, or processed Product\n * @returns Product with @type or simplified variant object\n */\nexport function processProductVariant(\n  variant:\n    | Product\n    | Omit<Product, \"@type\">\n    | { url: string }\n    | { \"@type\": \"Product\"; url: string },\n): Product | { \"@type\": \"Product\"; url: string } | { url: string } {\n  // If it's just a URL reference, return as-is\n  if (\"url\" in variant && Object.keys(variant).length <= 2) {\n    // It's a simple URL reference (with or without @type)\n    return variant as { url: string } | { \"@type\": \"Product\"; url: string };\n  }\n\n  // It's a full Product variant\n  const product = variant as Product | Omit<Product, \"@type\">;\n\n  if (\"@type\" in product) {\n    return product as Product;\n  }\n\n  const processed: Product = {\n    \"@type\": SCHEMA_TYPES.PRODUCT,\n    ...product,\n  };\n\n  // Process nested fields\n  if (product.image) {\n    processed.image = Array.isArray(product.image)\n      ? product.image.map(processImage)\n      : processImage(product.image);\n  }\n\n  if (product.brand) {\n    if (typeof product.brand === \"string\") {\n      processed.brand = {\n        \"@type\": SCHEMA_TYPES.BRAND,\n        name: product.brand,\n      };\n    } else {\n      processed.brand = processBrand(product.brand);\n    }\n  }\n\n  if (product.offers) {\n    if (Array.isArray(product.offers)) {\n      processed.offers = product.offers.map((offer) => {\n        if (\"lowPrice\" in offer && \"priceCurrency\" in offer) {\n          return processAggregateOffer(\n            offer as Parameters<typeof processAggregateOffer>[0],\n          );\n        }\n        return processProductOffer(\n          offer as Parameters<typeof processProductOffer>[0],\n        );\n      });\n    } else if (\n      \"lowPrice\" in product.offers &&\n      \"priceCurrency\" in product.offers\n    ) {\n      processed.offers = processAggregateOffer(\n        product.offers as Parameters<typeof processAggregateOffer>[0],\n      );\n    } else {\n      processed.offers = processProductOffer(\n        product.offers as Parameters<typeof processProductOffer>[0],\n      );\n    }\n  }\n\n  if (product.review) {\n    processed.review = Array.isArray(product.review)\n      ? product.review.map(processProductReview)\n      : processProductReview(product.review);\n  }\n\n  if (product.aggregateRating) {\n    processed.aggregateRating = processAggregateRating(product.aggregateRating);\n  }\n\n  if (product.manufacturer) {\n    processed.manufacturer = processAuthor(product.manufacturer);\n  }\n\n  // Process weight/dimensions - add @type if missing\n  if (\n    product.weight &&\n    typeof product.weight === \"object\" &&\n    !(\"@type\" in product.weight)\n  ) {\n    processed.weight = { \"@type\": \"QuantitativeValue\", ...product.weight };\n  }\n\n  if (\n    product.width &&\n    typeof product.width === \"object\" &&\n    !(\"@type\" in product.width)\n  ) {\n    processed.width = { \"@type\": \"QuantitativeValue\", ...product.width };\n  }\n\n  if (\n    product.height &&\n    typeof product.height === \"object\" &&\n    !(\"@type\" in product.height)\n  ) {\n    processed.height = { \"@type\": \"QuantitativeValue\", ...product.height };\n  }\n\n  if (\n    product.depth &&\n    typeof product.depth === \"object\" &&\n    !(\"@type\" in product.depth)\n  ) {\n    processed.depth = { \"@type\": \"QuantitativeValue\", ...product.depth };\n  }\n\n  return processed;\n}\n\n/**\n * Processes certification into Certification schema type\n * @param cert - Certification object with or without @type\n * @returns Certification with @type\n */\nexport function processCertification(\n  cert: Certification | Omit<Certification, \"@type\">,\n): Certification {\n  const processed = processSchemaType<Certification>(\n    cert,\n    SCHEMA_TYPES.CERTIFICATION,\n  );\n\n  // Process nested issuedBy as Organization\n  if (cert.issuedBy) {\n    if (typeof cert.issuedBy === \"object\" && !(\"@type\" in cert.issuedBy)) {\n      processed.issuedBy = {\n        \"@type\": SCHEMA_TYPES.ORGANIZATION,\n        ...cert.issuedBy,\n      };\n    } else {\n      processed.issuedBy = cert.issuedBy;\n    }\n  }\n\n  // Process nested certificationRating if present\n  if (cert.certificationRating) {\n    processed.certificationRating = processRating(cert.certificationRating);\n  }\n\n  return processed;\n}\n\n/**\n * Processes people audience into PeopleAudience schema type\n * @param audience - PeopleAudience object with or without @type\n * @returns PeopleAudience with @type\n */\nexport function processPeopleAudience(\n  audience: PeopleAudience | Omit<PeopleAudience, \"@type\">,\n): PeopleAudience {\n  const processed = processSchemaType<PeopleAudience>(\n    audience,\n    SCHEMA_TYPES.PEOPLE_AUDIENCE,\n  );\n\n  // Process nested suggestedAge if present\n  if (audience.suggestedAge) {\n    processed.suggestedAge = processQuantitativeValue(audience.suggestedAge);\n  }\n\n  return processed;\n}\n\n/**\n * Processes size specification into SizeSpecification schema type\n * @param size - String or SizeSpecification object with or without @type\n * @returns SizeSpecification with @type or string\n */\nexport function processSizeSpecification(\n  size: string | SizeSpecification | Omit<SizeSpecification, \"@type\">,\n): string | SizeSpecification {\n  if (typeof size === \"string\") {\n    return size;\n  }\n  return processSchemaType<SizeSpecification>(\n    size,\n    SCHEMA_TYPES.SIZE_SPECIFICATION,\n  );\n}\n\n/**\n * Processes 3D model into ThreeDModel schema type\n * @param model - ThreeDModel object with or without @type\n * @returns ThreeDModel with @type\n */\nexport function processThreeDModel(\n  model: ThreeDModel | Omit<ThreeDModel, \"@type\">,\n): ThreeDModel {\n  const processed = processSchemaType<ThreeDModel>(\n    model,\n    SCHEMA_TYPES.THREE_D_MODEL,\n  );\n\n  // Process nested encoding if present\n  if (model.encoding && !(\"@type\" in model.encoding)) {\n    processed.encoding = {\n      \"@type\": \"MediaObject\",\n      ...model.encoding,\n    };\n  }\n\n  return processed;\n}\n\n/**\n * Processes defined region into DefinedRegion schema type\n * @param region - DefinedRegion object with or without @type\n * @returns DefinedRegion with @type\n */\nexport function processDefinedRegion(\n  region: DefinedRegion | Omit<DefinedRegion, \"@type\">,\n): DefinedRegion {\n  return processSchemaType<DefinedRegion>(region, SCHEMA_TYPES.DEFINED_REGION);\n}\n\n/**\n * Processes shipping delivery time into ShippingDeliveryTime schema type\n * @param time - ShippingDeliveryTime object with or without @type\n * @returns ShippingDeliveryTime with @type\n */\nexport function processShippingDeliveryTime(\n  time: ShippingDeliveryTime | Omit<ShippingDeliveryTime, \"@type\">,\n): ShippingDeliveryTime {\n  const processed = processSchemaType<ShippingDeliveryTime>(\n    time,\n    SCHEMA_TYPES.SHIPPING_DELIVERY_TIME,\n  );\n\n  // Process nested handlingTime if present\n  if (time.handlingTime) {\n    processed.handlingTime = processQuantitativeValue(time.handlingTime);\n  }\n\n  // Process nested transitTime if present\n  if (time.transitTime) {\n    processed.transitTime = processQuantitativeValue(time.transitTime);\n  }\n\n  return processed;\n}\n\n/**\n * Processes offer shipping details into OfferShippingDetails schema type\n * @param details - OfferShippingDetails object with or without @type\n * @returns OfferShippingDetails with @type\n */\nexport function processOfferShippingDetails(\n  details: OfferShippingDetails | Omit<OfferShippingDetails, \"@type\">,\n): OfferShippingDetails {\n  const processed = processSchemaType<OfferShippingDetails>(\n    details,\n    SCHEMA_TYPES.OFFER_SHIPPING_DETAILS,\n  );\n\n  // Process nested shippingRate if present\n  if (details.shippingRate) {\n    processed.shippingRate = processSimpleMonetaryAmount(details.shippingRate);\n  }\n\n  // Process nested shippingDestination if present\n  if (details.shippingDestination) {\n    if (Array.isArray(details.shippingDestination)) {\n      processed.shippingDestination =\n        details.shippingDestination.map(processDefinedRegion);\n    } else {\n      processed.shippingDestination = processDefinedRegion(\n        details.shippingDestination,\n      );\n    }\n  }\n\n  // Process nested deliveryTime if present\n  if (details.deliveryTime) {\n    processed.deliveryTime = processShippingDeliveryTime(details.deliveryTime);\n  }\n\n  return processed;\n}\n\n// Review/AggregateRating-specific processors\n\nexport type ItemReviewedType =\n  | \"Book\"\n  | \"Course\"\n  | \"CreativeWorkSeason\"\n  | \"CreativeWorkSeries\"\n  | \"Episode\"\n  | \"Event\"\n  | \"Game\"\n  | \"HowTo\"\n  | \"LocalBusiness\"\n  | \"MediaObject\"\n  | \"Movie\"\n  | \"MusicPlaylist\"\n  | \"MusicRecording\"\n  | \"Organization\"\n  | \"Product\"\n  | \"Recipe\"\n  | \"SoftwareApplication\";\n\ntype ItemReviewedInput =\n  | string\n  | ({ name: string; \"@type\"?: ItemReviewedType } & Record<string, unknown>);\n\n/**\n * Processes itemReviewed into a specific schema type if possible, otherwise Thing\n * @param itemReviewed - String name or object with optional @type\n * @param defaultType - Optional default @type to apply when missing\n */\nexport function processItemReviewed(\n  itemReviewed: ItemReviewedInput,\n  defaultType?: ItemReviewedType | \"Thing\",\n): Record<string, unknown> {\n  if (isString(itemReviewed)) {\n    return { \"@type\": defaultType || \"Thing\", name: itemReviewed };\n  }\n\n  if (\n    typeof itemReviewed === \"object\" &&\n    itemReviewed !== null &&\n    \"@type\" in itemReviewed\n  ) {\n    return itemReviewed as Record<string, unknown>;\n  }\n\n  // Try light heuristics if no @type present\n  const candidate: Record<string, unknown> = {\n    ...(itemReviewed as Record<string, unknown>),\n  };\n  const inferType = (): ItemReviewedType | \"Thing\" => {\n    if (defaultType) return defaultType;\n    if (\"brand\" in candidate || \"sku\" in candidate) return \"Product\";\n    if (\"recipeIngredient\" in candidate || \"recipeInstructions\" in candidate)\n      return \"Recipe\";\n    if (\"servesCuisine\" in candidate || \"address\" in candidate)\n      return \"LocalBusiness\";\n    if (\"applicationCategory\" in candidate || \"operatingSystem\" in candidate)\n      return \"SoftwareApplication\";\n    if (\"director\" in candidate || \"actor\" in candidate) return \"Movie\";\n    if (\"provider\" in candidate) return \"Course\";\n    return \"Thing\";\n  };\n\n  return { \"@type\": inferType(), ...candidate };\n}\n\n// HowTo-specific processors\n\n/**\n * Processes HowTo direction into HowToDirection schema type\n * @param direction - HowToDirection object with or without @type\n * @returns HowToDirection with @type\n */\nexport function processHowToDirection(\n  direction: HowToDirection | Omit<HowToDirection, \"@type\">,\n): HowToDirection {\n  const processed = processSchemaType<HowToDirection>(\n    direction,\n    SCHEMA_TYPES.HOW_TO_DIRECTION,\n  );\n\n  // Process nested media if present\n  if (direction.beforeMedia && !isString(direction.beforeMedia)) {\n    processed.beforeMedia = processImage(direction.beforeMedia);\n  }\n  if (direction.afterMedia && !isString(direction.afterMedia)) {\n    processed.afterMedia = processImage(direction.afterMedia);\n  }\n  if (direction.duringMedia && !isString(direction.duringMedia)) {\n    processed.duringMedia = processImage(direction.duringMedia);\n  }\n\n  return processed;\n}\n\n/**\n * Processes HowTo tip into HowToTip schema type\n * @param tip - HowToTip object with or without @type\n * @returns HowToTip with @type\n */\nexport function processHowToTip(\n  tip: HowToTip | Omit<HowToTip, \"@type\">,\n): HowToTip {\n  return processSchemaType<HowToTip>(tip, SCHEMA_TYPES.HOW_TO_TIP);\n}\n\n/**\n * Processes HowTo step item (direction or tip) into appropriate schema type\n * @param item - HowToDirection or HowToTip with or without @type\n * @returns Processed item with @type\n */\nfunction processHowToStepItem(\n  item:\n    | HowToDirection\n    | HowToTip\n    | Omit<HowToDirection, \"@type\">\n    | Omit<HowToTip, \"@type\">,\n): HowToDirection | HowToTip {\n  if (hasType<HowToDirection | HowToTip>(item)) {\n    if (item[\"@type\"] === SCHEMA_TYPES.HOW_TO_DIRECTION) {\n      return processHowToDirection(item as HowToDirection);\n    }\n    return processHowToTip(item as HowToTip);\n  }\n\n  // Infer type based on properties - tips typically only have text\n  // Directions may have beforeMedia, afterMedia, duringMedia\n  if (\"beforeMedia\" in item || \"afterMedia\" in item || \"duringMedia\" in item) {\n    return processHowToDirection(item as Omit<HowToDirection, \"@type\">);\n  }\n\n  // Default to direction for items with just text (more common)\n  return processHowToDirection(item as Omit<HowToDirection, \"@type\">);\n}\n\n/**\n * Processes HowTo step into HowToStep schema type\n * @param step - String, HowToStep object with or without @type\n * @returns HowToStep with @type\n */\nexport function processHowToStep(\n  step: string | HowToStepType | Omit<HowToStepType, \"@type\">,\n): string | HowToStepType {\n  if (isString(step)) {\n    return step;\n  }\n\n  const processed = processSchemaType<HowToStepType>(\n    step,\n    SCHEMA_TYPES.HOW_TO_STEP,\n  );\n\n  // Process nested image if present\n  if (step.image && !isString(step.image)) {\n    processed.image = processImage(step.image);\n  }\n\n  // Process nested itemListElement (directions/tips) if present\n  if (step.itemListElement) {\n    processed.itemListElement = step.itemListElement.map(processHowToStepItem);\n  }\n\n  return processed;\n}\n\n/**\n * Processes HowTo section into HowToSection schema type\n * @param section - HowToSection object with or without @type\n * @returns HowToSection with @type\n */\nexport function processHowToSection(\n  section: HowToSectionType | Omit<HowToSectionType, \"@type\">,\n): HowToSectionType {\n  const processed = processSchemaType<HowToSectionType>(\n    section,\n    SCHEMA_TYPES.HOW_TO_SECTION,\n  );\n\n  // Process nested steps\n  if (section.itemListElement) {\n    processed.itemListElement = section.itemListElement.map((item) => {\n      const result = processHowToStep(item);\n      return typeof result === \"string\"\n        ? ({ \"@type\": \"HowToStep\", text: result } as HowToStepType)\n        : result;\n    });\n  }\n\n  return processed;\n}\n\n/**\n * Processes HowTo step (can be string, HowToStep, or HowToSection)\n * @param step - String, HowToStep, or HowToSection with or without @type\n * @returns Processed step with @type\n */\nexport function processStep(\n  step: Step,\n): string | HowToStepType | HowToSectionType {\n  if (isString(step)) {\n    return step;\n  }\n\n  if (hasType<HowToStepType | HowToSectionType>(step)) {\n    if (step[\"@type\"] === SCHEMA_TYPES.HOW_TO_SECTION) {\n      return processHowToSection(step as HowToSectionType);\n    }\n    const result = processHowToStep(step as HowToStepType);\n    return typeof result === \"string\"\n      ? ({ \"@type\": \"HowToStep\", text: result } as HowToStepType)\n      : result;\n  }\n\n  // Infer type based on properties\n  if (\"itemListElement\" in step && \"name\" in step) {\n    // Sections have itemListElement and a name\n    return processHowToSection(step as Omit<HowToSectionType, \"@type\">);\n  }\n\n  // Default to step\n  const result = processHowToStep(step as Omit<HowToStepType, \"@type\">);\n  return typeof result === \"string\"\n    ? ({ \"@type\": \"HowToStep\", text: result } as HowToStepType)\n    : result;\n}\n\n/**\n * Processes HowTo supply into HowToSupply schema type\n * @param supply - String or HowToSupply object with or without @type\n * @returns HowToSupply with @type\n */\nexport function processHowToSupply(supply: Supply): HowToSupply {\n  if (isString(supply)) {\n    return {\n      \"@type\": SCHEMA_TYPES.HOW_TO_SUPPLY,\n      name: supply,\n    };\n  }\n\n  const processed = processSchemaType<HowToSupply>(\n    supply,\n    SCHEMA_TYPES.HOW_TO_SUPPLY,\n  );\n\n  // Process nested image if present\n  if (supply.image && !isString(supply.image)) {\n    processed.image = processImage(supply.image);\n  }\n\n  // Process nested estimatedCost if present\n  if (supply.estimatedCost && !isString(supply.estimatedCost)) {\n    processed.estimatedCost = processSimpleMonetaryAmount(supply.estimatedCost);\n  }\n\n  // Process nested requiredQuantity if present\n  if (supply.requiredQuantity && typeof supply.requiredQuantity === \"object\") {\n    processed.requiredQuantity = processQuantitativeValue(\n      supply.requiredQuantity,\n    );\n  }\n\n  return processed;\n}\n\n/**\n * Processes HowTo tool into HowToTool schema type\n * @param tool - String or HowToTool object with or without @type\n * @returns HowToTool with @type\n */\nexport function processHowToTool(tool: Tool): HowToTool {\n  if (isString(tool)) {\n    return {\n      \"@type\": SCHEMA_TYPES.HOW_TO_TOOL,\n      name: tool,\n    };\n  }\n\n  const processed = processSchemaType<HowToTool>(\n    tool,\n    SCHEMA_TYPES.HOW_TO_TOOL,\n  );\n\n  // Process nested image if present\n  if (tool.image && !isString(tool.image)) {\n    processed.image = processImage(tool.image);\n  }\n\n  // Process nested requiredQuantity if present\n  if (tool.requiredQuantity && typeof tool.requiredQuantity === \"object\") {\n    processed.requiredQuantity = processQuantitativeValue(\n      tool.requiredQuantity,\n    );\n  }\n\n  return processed;\n}\n\n/**\n * Processes estimated cost into MonetaryAmount schema type\n * @param cost - String or MonetaryAmount object with or without @type\n * @returns String or MonetaryAmount with @type\n */\nexport function processEstimatedCost(\n  cost: EstimatedCost,\n): string | SimpleMonetaryAmount {\n  if (isString(cost)) {\n    return cost;\n  }\n\n  return processSimpleMonetaryAmount(cost) as SimpleMonetaryAmount;\n}\n\n/**\n * Processes HowTo yield into string or QuantitativeValue schema type\n * @param yieldValue - String or QuantitativeValue object with or without @type\n * @returns String or QuantitativeValue with @type\n */\nexport function processHowToYield(\n  yieldValue: HowToYield,\n): string | QuantitativeValue {\n  if (isString(yieldValue)) {\n    return yieldValue;\n  }\n\n  return processQuantitativeValue(yieldValue);\n}\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { ArticleJsonLdProps } from \"~/types/article.types\";\nimport {\n  processAuthor,\n  processImage,\n  processPublisher,\n  processMainEntityOfPage,\n} from \"~/utils/processors\";\n\nexport default function ArticleJsonLd({\n  type = \"Article\",\n  scriptId,\n  scriptKey,\n  headline,\n  url,\n  author,\n  datePublished,\n  dateModified,\n  image,\n  publisher,\n  description,\n  isAccessibleForFree,\n  mainEntityOfPage,\n}: ArticleJsonLdProps) {\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": type,\n    headline,\n    ...(url && { url }),\n    ...(author && {\n      author: Array.isArray(author)\n        ? author.map(processAuthor)\n        : processAuthor(author),\n    }),\n    ...(datePublished && { datePublished }),\n    ...(dateModified && { dateModified }),\n    // If dateModified is not provided but datePublished is, use datePublished\n    ...(!dateModified && datePublished && { dateModified: datePublished }),\n    ...(image && {\n      image: Array.isArray(image)\n        ? image.map(processImage)\n        : processImage(image),\n    }),\n    ...(publisher && { publisher: processPublisher(publisher) }),\n    ...(description && { description }),\n    ...(isAccessibleForFree !== undefined && { isAccessibleForFree }),\n    ...(mainEntityOfPage && {\n      mainEntityOfPage: processMainEntityOfPage(mainEntityOfPage),\n    }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || `article-jsonld-${type}`}\n    />\n  );\n}\n\nexport type { ArticleJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { ClaimReviewJsonLdProps } from \"~/types/claimreview.types\";\nimport {\n  processAuthor,\n  processClaim,\n  processClaimReviewRating,\n} from \"~/utils/processors\";\n\nexport default function ClaimReviewJsonLd({\n  scriptId,\n  scriptKey,\n  claimReviewed,\n  reviewRating,\n  url,\n  author,\n  itemReviewed,\n}: ClaimReviewJsonLdProps) {\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"ClaimReview\",\n    claimReviewed,\n    reviewRating: processClaimReviewRating(reviewRating),\n    url,\n    ...(author && { author: processAuthor(author) }),\n    ...(itemReviewed && { itemReviewed: processClaim(itemReviewed) }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"claimreview-jsonld\"}\n    />\n  );\n}\n\nexport type { ClaimReviewJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { CreativeWorkJsonLdProps } from \"~/types/creativework.types\";\nimport {\n  processAuthor,\n  processImage,\n  processPublisher,\n  processMainEntityOfPage,\n  processWebPageElement,\n} from \"~/utils/processors\";\n\nexport default function CreativeWorkJsonLd({\n  type = \"CreativeWork\",\n  scriptId,\n  scriptKey,\n  headline,\n  name,\n  url,\n  author,\n  datePublished,\n  dateModified,\n  image,\n  publisher,\n  description,\n  isAccessibleForFree,\n  hasPart,\n  mainEntityOfPage,\n  // Additional properties for specific types\n  text, // For Comment\n  provider, // For Course\n  itemReviewed, // For Review\n  reviewRating, // For Review\n}: CreativeWorkJsonLdProps) {\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": type,\n    // Use headline if provided, otherwise use name\n    ...(headline && { headline }),\n    ...(name && !headline && { name }),\n    ...(url && { url }),\n    ...(author && {\n      author: Array.isArray(author)\n        ? author.map(processAuthor)\n        : processAuthor(author),\n    }),\n    ...(datePublished && { datePublished }),\n    ...(dateModified && { dateModified }),\n    // If dateModified is not provided but datePublished is, use datePublished for certain types\n    ...(!dateModified &&\n      datePublished &&\n      [\"Article\", \"NewsArticle\", \"BlogPosting\"].includes(type) && {\n        dateModified: datePublished,\n      }),\n    ...(image && {\n      image: Array.isArray(image)\n        ? image.map(processImage)\n        : processImage(image),\n    }),\n    ...(publisher && { publisher: processPublisher(publisher) }),\n    ...(description && { description }),\n    ...(isAccessibleForFree !== undefined && { isAccessibleForFree }),\n    ...(hasPart && {\n      hasPart: Array.isArray(hasPart)\n        ? hasPart.map(processWebPageElement)\n        : processWebPageElement(hasPart),\n    }),\n    ...(mainEntityOfPage && {\n      mainEntityOfPage: processMainEntityOfPage(mainEntityOfPage),\n    }),\n    // Type-specific properties\n    ...(text && type === \"Comment\" && { text }),\n    ...(provider &&\n      type === \"Course\" && { provider: processPublisher(provider) }),\n    ...(itemReviewed && type === \"Review\" && { itemReviewed }),\n    ...(reviewRating && type === \"Review\" && { reviewRating }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || `creativework-jsonld-${type.toLowerCase()}`}\n    />\n  );\n}\n\nexport type { CreativeWorkJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { RecipeJsonLdProps } from \"~/types/recipe.types\";\nimport {\n  processAuthor,\n  processImage,\n  processNutrition,\n  processAggregateRating,\n  processInstruction,\n  processVideo,\n} from \"~/utils/processors\";\n\nexport default function RecipeJsonLd({\n  scriptId,\n  scriptKey,\n  name,\n  image,\n  description,\n  author,\n  datePublished,\n  prepTime,\n  cookTime,\n  totalTime,\n  recipeYield,\n  recipeCategory,\n  recipeCuisine,\n  nutrition,\n  recipeIngredient,\n  recipeInstructions,\n  aggregateRating,\n  video,\n  keywords,\n  url,\n}: RecipeJsonLdProps) {\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"Recipe\",\n    name,\n    image: Array.isArray(image) ? image.map(processImage) : processImage(image),\n    ...(description && { description }),\n    ...(author && { author: processAuthor(author) }),\n    ...(datePublished && { datePublished }),\n    ...(prepTime && { prepTime }),\n    ...(cookTime && { cookTime }),\n    ...(totalTime && { totalTime }),\n    ...(recipeYield !== undefined && { recipeYield }),\n    ...(recipeCategory && { recipeCategory }),\n    ...(recipeCuisine && { recipeCuisine }),\n    ...(nutrition && { nutrition: processNutrition(nutrition) }),\n    ...(recipeIngredient && { recipeIngredient }),\n    ...(recipeInstructions && {\n      recipeInstructions: Array.isArray(recipeInstructions)\n        ? recipeInstructions.map(processInstruction)\n        : processInstruction(recipeInstructions),\n    }),\n    ...(aggregateRating && {\n      aggregateRating: processAggregateRating(aggregateRating),\n    }),\n    ...(video && { video: processVideo(video) }),\n    ...(keywords && { keywords }),\n    ...(url && { url }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"recipe-jsonld\"}\n    />\n  );\n}\n\nexport type { RecipeJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { HowToJsonLdProps } from \"~/types/howto.types\";\nimport {\n  processImage,\n  processVideo,\n  processStep,\n  processHowToSupply,\n  processHowToTool,\n  processEstimatedCost,\n  processHowToYield,\n} from \"~/utils/processors\";\n\nexport default function HowToJsonLd({\n  scriptId,\n  scriptKey,\n  name,\n  description,\n  image,\n  estimatedCost,\n  performTime,\n  prepTime,\n  totalTime,\n  step,\n  supply,\n  tool,\n  yield: yieldValue,\n  video,\n}: HowToJsonLdProps) {\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"HowTo\",\n    name,\n    ...(description && { description }),\n    ...(image && {\n      image: Array.isArray(image)\n        ? image.map(processImage)\n        : processImage(image),\n    }),\n    ...(estimatedCost && {\n      estimatedCost: processEstimatedCost(estimatedCost),\n    }),\n    ...(performTime && { performTime }),\n    ...(prepTime && { prepTime }),\n    ...(totalTime && { totalTime }),\n    ...(step && {\n      step: Array.isArray(step) ? step.map(processStep) : processStep(step),\n    }),\n    ...(supply && {\n      supply: Array.isArray(supply)\n        ? supply.map(processHowToSupply)\n        : processHowToSupply(supply),\n    }),\n    ...(tool && {\n      tool: Array.isArray(tool)\n        ? tool.map(processHowToTool)\n        : processHowToTool(tool),\n    }),\n    ...(yieldValue && { yield: processHowToYield(yieldValue) }),\n    ...(video && { video: processVideo(video) }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"howto-jsonld\"}\n    />\n  );\n}\n\nexport type { HowToJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { OrganizationJsonLdProps } from \"~/types/organization.types\";\nimport {\n  processAddress,\n  processContactPoint,\n  processLogo,\n  processNumberOfEmployees,\n  processReview,\n  processAggregateRating,\n  processMerchantReturnPolicy,\n  processMemberProgram,\n} from \"~/utils/processors\";\n\nexport default function OrganizationJsonLd(props: OrganizationJsonLdProps) {\n  const {\n    type = \"Organization\",\n    scriptId,\n    scriptKey,\n    name,\n    url,\n    logo,\n    description,\n    sameAs,\n    address,\n    contactPoint,\n    telephone,\n    email,\n    alternateName,\n    foundingDate,\n    legalName,\n    taxID,\n    vatID,\n    duns,\n    leiCode,\n    naics,\n    globalLocationNumber,\n    iso6523Code,\n    numberOfEmployees,\n    review,\n    aggregateRating,\n  } = props;\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": type,\n    ...(name && { name }),\n    ...(url && { url }),\n    ...(logo && { logo: processLogo(logo) }),\n    ...(description && { description }),\n    ...(sameAs && {\n      sameAs: Array.isArray(sameAs) ? sameAs : [sameAs],\n    }),\n    ...(address && {\n      address: Array.isArray(address)\n        ? address.map(processAddress)\n        : processAddress(address),\n    }),\n    ...(contactPoint && {\n      contactPoint: Array.isArray(contactPoint)\n        ? contactPoint.map(processContactPoint)\n        : processContactPoint(contactPoint),\n    }),\n    ...(telephone && { telephone }),\n    ...(email && { email }),\n    ...(alternateName && { alternateName }),\n    ...(foundingDate && { foundingDate }),\n    ...(legalName && { legalName }),\n    ...(taxID && { taxID }),\n    ...(vatID && { vatID }),\n    ...(duns && { duns }),\n    ...(leiCode && { leiCode }),\n    ...(naics && { naics }),\n    ...(globalLocationNumber && { globalLocationNumber }),\n    ...(iso6523Code && { iso6523Code }),\n    ...(numberOfEmployees && {\n      numberOfEmployees: processNumberOfEmployees(numberOfEmployees),\n    }),\n    ...(review && {\n      review: Array.isArray(review)\n        ? review.map(processReview)\n        : processReview(review),\n    }),\n    ...(aggregateRating && {\n      aggregateRating: processAggregateRating(aggregateRating),\n    }),\n    ...(type === \"OnlineStore\" &&\n      \"hasMerchantReturnPolicy\" in props &&\n      props.hasMerchantReturnPolicy && {\n        hasMerchantReturnPolicy: Array.isArray(props.hasMerchantReturnPolicy)\n          ? props.hasMerchantReturnPolicy.map(processMerchantReturnPolicy)\n          : processMerchantReturnPolicy(props.hasMerchantReturnPolicy),\n      }),\n    ...(type === \"OnlineStore\" &&\n      \"hasMemberProgram\" in props &&\n      props.hasMemberProgram && {\n        hasMemberProgram: Array.isArray(props.hasMemberProgram)\n          ? props.hasMemberProgram.map(processMemberProgram)\n          : processMemberProgram(props.hasMemberProgram),\n      }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || `organization-jsonld-${type}`}\n    />\n  );\n}\n\nexport type { OrganizationJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { LocalBusinessJsonLdProps } from \"~/types/localbusiness.types\";\nimport {\n  processAddress,\n  processImage,\n  processGeo,\n  processOpeningHours,\n  processReview,\n  processAggregateRating,\n} from \"~/utils/processors\";\n\nfunction processDepartment(\n  department: LocalBusinessJsonLdProps,\n): Record<string, unknown> {\n  return {\n    \"@type\": department.type || \"LocalBusiness\",\n    ...(department.name && { name: department.name }),\n    ...(department.address && {\n      address: Array.isArray(department.address)\n        ? department.address.map(processAddress)\n        : processAddress(department.address),\n    }),\n    ...(department.url && { url: department.url }),\n    ...(department.telephone && { telephone: department.telephone }),\n    ...(department.image && {\n      image: Array.isArray(department.image)\n        ? department.image.map(processImage)\n        : processImage(department.image),\n    }),\n    ...(department.priceRange && { priceRange: department.priceRange }),\n    ...(department.geo && { geo: processGeo(department.geo) }),\n    ...(department.openingHoursSpecification && {\n      openingHoursSpecification: Array.isArray(\n        department.openingHoursSpecification,\n      )\n        ? department.openingHoursSpecification.map(processOpeningHours)\n        : processOpeningHours(department.openingHoursSpecification),\n    }),\n    ...(department.review && {\n      review: Array.isArray(department.review)\n        ? department.review.map(processReview)\n        : processReview(department.review),\n    }),\n    ...(department.aggregateRating && {\n      aggregateRating: processAggregateRating(department.aggregateRating),\n    }),\n    ...(department.menu && { menu: department.menu }),\n    ...(department.servesCuisine && {\n      servesCuisine: Array.isArray(department.servesCuisine)\n        ? department.servesCuisine\n        : [department.servesCuisine],\n    }),\n    ...(department.sameAs && {\n      sameAs: Array.isArray(department.sameAs)\n        ? department.sameAs\n        : [department.sameAs],\n    }),\n    ...(department.branchOf && { branchOf: department.branchOf }),\n    ...(department.currenciesAccepted && {\n      currenciesAccepted: department.currenciesAccepted,\n    }),\n    ...(department.paymentAccepted && {\n      paymentAccepted: department.paymentAccepted,\n    }),\n    ...(department.areaServed && {\n      areaServed: Array.isArray(department.areaServed)\n        ? department.areaServed\n        : [department.areaServed],\n    }),\n    ...(department.email && { email: department.email }),\n    ...(department.faxNumber && { faxNumber: department.faxNumber }),\n    ...(department.slogan && { slogan: department.slogan }),\n    ...(department.description && { description: department.description }),\n    ...(department.publicAccess !== undefined && {\n      publicAccess: department.publicAccess,\n    }),\n    ...(department.smokingAllowed !== undefined && {\n      smokingAllowed: department.smokingAllowed,\n    }),\n    ...(department.isAccessibleForFree !== undefined && {\n      isAccessibleForFree: department.isAccessibleForFree,\n    }),\n  };\n}\n\nexport default function LocalBusinessJsonLd({\n  type = \"LocalBusiness\",\n  scriptId,\n  scriptKey,\n  name,\n  address,\n  url,\n  telephone,\n  image,\n  priceRange,\n  geo,\n  openingHoursSpecification,\n  review,\n  aggregateRating,\n  department,\n  menu,\n  servesCuisine,\n  sameAs,\n  branchOf,\n  currenciesAccepted,\n  paymentAccepted,\n  areaServed,\n  email,\n  faxNumber,\n  slogan,\n  description,\n  publicAccess,\n  smokingAllowed,\n  isAccessibleForFree,\n}: LocalBusinessJsonLdProps) {\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": type,\n    name,\n    address: Array.isArray(address)\n      ? address.map(processAddress)\n      : processAddress(address),\n    ...(url && { url }),\n    ...(telephone && { telephone }),\n    ...(image && {\n      image: Array.isArray(image)\n        ? image.map(processImage)\n        : processImage(image),\n    }),\n    ...(priceRange && { priceRange }),\n    ...(geo && { geo: processGeo(geo) }),\n    ...(openingHoursSpecification && {\n      openingHoursSpecification: Array.isArray(openingHoursSpecification)\n        ? openingHoursSpecification.map(processOpeningHours)\n        : processOpeningHours(openingHoursSpecification),\n    }),\n    ...(review && {\n      review: Array.isArray(review)\n        ? review.map(processReview)\n        : processReview(review),\n    }),\n    ...(aggregateRating && {\n      aggregateRating: processAggregateRating(aggregateRating),\n    }),\n    ...(department && {\n      department: Array.isArray(department)\n        ? department.map(processDepartment)\n        : processDepartment(department),\n    }),\n    ...(menu && { menu }),\n    ...(servesCuisine && {\n      servesCuisine: Array.isArray(servesCuisine)\n        ? servesCuisine\n        : [servesCuisine],\n    }),\n    ...(sameAs && {\n      sameAs: Array.isArray(sameAs) ? sameAs : [sameAs],\n    }),\n    ...(branchOf && { branchOf }),\n    ...(currenciesAccepted && { currenciesAccepted }),\n    ...(paymentAccepted && { paymentAccepted }),\n    ...(areaServed && {\n      areaServed: Array.isArray(areaServed) ? areaServed : [areaServed],\n    }),\n    ...(email && { email }),\n    ...(faxNumber && { faxNumber }),\n    ...(slogan && { slogan }),\n    ...(description && { description }),\n    ...(publicAccess !== undefined && { publicAccess }),\n    ...(smokingAllowed !== undefined && { smokingAllowed }),\n    ...(isAccessibleForFree !== undefined && { isAccessibleForFree }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={\n        scriptKey ||\n        `localbusiness-jsonld-${Array.isArray(type) ? type.join(\"-\") : type}`\n      }\n    />\n  );\n}\n\nexport type { LocalBusinessJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { MerchantReturnPolicyJsonLdProps } from \"~/types/merchantreturnpolicy.types\";\nimport {\n  processMerchantReturnPolicy,\n  processSimpleMonetaryAmount,\n  processReturnPolicySeasonalOverride,\n} from \"~/utils/processors\";\n\nexport default function MerchantReturnPolicyJsonLd({\n  scriptId,\n  scriptKey,\n  applicableCountry,\n  returnPolicyCountry,\n  returnPolicyCategory,\n  merchantReturnDays,\n  returnMethod,\n  returnFees,\n  returnShippingFeesAmount,\n  refundType,\n  restockingFee,\n  returnLabelSource,\n  itemCondition,\n  customerRemorseReturnFees,\n  customerRemorseReturnShippingFeesAmount,\n  customerRemorseReturnLabelSource,\n  itemDefectReturnFees,\n  itemDefectReturnShippingFeesAmount,\n  itemDefectReturnLabelSource,\n  returnPolicySeasonalOverride,\n  merchantReturnLink,\n}: MerchantReturnPolicyJsonLdProps) {\n  // Build the return policy object\n  const returnPolicy = {\n    \"@type\": \"MerchantReturnPolicy\" as const,\n    // Option B: Simple link to policy\n    ...(merchantReturnLink && { merchantReturnLink }),\n    // Option A: Detailed properties\n    ...(applicableCountry && {\n      applicableCountry: Array.isArray(applicableCountry)\n        ? applicableCountry\n        : [applicableCountry],\n    }),\n    ...(returnPolicyCountry && {\n      returnPolicyCountry: Array.isArray(returnPolicyCountry)\n        ? returnPolicyCountry\n        : [returnPolicyCountry],\n    }),\n    ...(returnPolicyCategory && { returnPolicyCategory }),\n    ...(merchantReturnDays !== undefined && { merchantReturnDays }),\n    ...(returnMethod && {\n      returnMethod: Array.isArray(returnMethod) ? returnMethod : [returnMethod],\n    }),\n    ...(returnFees && { returnFees }),\n    ...(returnShippingFeesAmount && {\n      returnShippingFeesAmount: processSimpleMonetaryAmount(\n        returnShippingFeesAmount,\n      ),\n    }),\n    ...(refundType && {\n      refundType: Array.isArray(refundType) ? refundType : [refundType],\n    }),\n    ...(restockingFee !== undefined && {\n      restockingFee:\n        typeof restockingFee === \"number\"\n          ? restockingFee\n          : processSimpleMonetaryAmount(restockingFee),\n    }),\n    ...(returnLabelSource && { returnLabelSource }),\n    ...(itemCondition && {\n      itemCondition: Array.isArray(itemCondition)\n        ? itemCondition\n        : [itemCondition],\n    }),\n    // Customer remorse specific properties\n    ...(customerRemorseReturnFees && { customerRemorseReturnFees }),\n    ...(customerRemorseReturnShippingFeesAmount && {\n      customerRemorseReturnShippingFeesAmount: processSimpleMonetaryAmount(\n        customerRemorseReturnShippingFeesAmount,\n      ),\n    }),\n    ...(customerRemorseReturnLabelSource && {\n      customerRemorseReturnLabelSource,\n    }),\n    // Item defect specific properties\n    ...(itemDefectReturnFees && { itemDefectReturnFees }),\n    ...(itemDefectReturnShippingFeesAmount && {\n      itemDefectReturnShippingFeesAmount: processSimpleMonetaryAmount(\n        itemDefectReturnShippingFeesAmount,\n      ),\n    }),\n    ...(itemDefectReturnLabelSource && { itemDefectReturnLabelSource }),\n    // Seasonal override\n    ...(returnPolicySeasonalOverride && {\n      returnPolicySeasonalOverride: Array.isArray(returnPolicySeasonalOverride)\n        ? returnPolicySeasonalOverride.map(processReturnPolicySeasonalOverride)\n        : processReturnPolicySeasonalOverride(returnPolicySeasonalOverride),\n    }),\n  };\n\n  // Process the entire policy to ensure all nested types are correct\n  const processedPolicy = processMerchantReturnPolicy(returnPolicy);\n\n  const data = {\n    \"@context\": \"https://schema.org\",\n    ...processedPolicy,\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"merchant-return-policy-jsonld\"}\n    />\n  );\n}\n\nexport type { MerchantReturnPolicyJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type {\n  MovieCarouselJsonLdProps,\n  MovieListItem,\n  SummaryPageItem,\n  MovieCarouselListItem,\n  Movie,\n} from \"~/types/movie-carousel.types\";\nimport {\n  processImage,\n  processDirector,\n  processReview,\n  processAggregateRating,\n} from \"~/utils/processors\";\n\nfunction processSummaryItem(\n  item: SummaryPageItem,\n  index: number,\n): MovieCarouselListItem {\n  if (typeof item === \"string\") {\n    return {\n      \"@type\": \"ListItem\",\n      position: index + 1,\n      url: item,\n    };\n  }\n  return {\n    \"@type\": \"ListItem\",\n    position: item.position ?? index + 1,\n    url: item.url,\n  };\n}\n\nfunction processMovieItem(\n  movie: MovieListItem,\n  index: number,\n): MovieCarouselListItem {\n  const processedMovie: Movie = {\n    \"@type\": \"Movie\",\n    name: movie.name,\n    image: Array.isArray(movie.image)\n      ? movie.image.map(processImage)\n      : processImage(movie.image),\n    ...(movie.url && { url: movie.url }),\n    ...(movie.dateCreated && { dateCreated: movie.dateCreated }),\n    ...(movie.director && { director: processDirector(movie.director) }),\n    ...(movie.review && { review: processReview(movie.review) }),\n    ...(movie.aggregateRating && {\n      aggregateRating: processAggregateRating(movie.aggregateRating),\n    }),\n  };\n\n  return {\n    \"@type\": \"ListItem\",\n    position: index + 1,\n    item: processedMovie,\n  };\n}\n\nexport default function MovieCarouselJsonLd(props: MovieCarouselJsonLdProps) {\n  const { scriptId, scriptKey } = props;\n\n  // Determine if this is summary page or all-in-one page pattern\n  const isSummaryPage = \"urls\" in props;\n\n  let itemListElement: MovieCarouselListItem[];\n\n  if (isSummaryPage) {\n    // Summary page pattern - just URLs\n    itemListElement = props.urls.map((url, index) =>\n      processSummaryItem(url, index),\n    );\n  } else {\n    // All-in-one page pattern - full movie data\n    itemListElement = props.movies.map((movie, index) =>\n      processMovieItem(movie, index),\n    );\n  }\n\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"ItemList\",\n    itemListElement,\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"movie-carousel-jsonld\"}\n    />\n  );\n}\n\nexport type { MovieCarouselJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { BreadcrumbJsonLdProps } from \"~/types/breadcrumb.types\";\nimport { processBreadcrumbItem } from \"~/utils/processors\";\n\nexport default function BreadcrumbJsonLd(props: BreadcrumbJsonLdProps) {\n  const { scriptId, scriptKey } = props;\n\n  // Handle single trail vs multiple trails\n  const hasMultipleTrails = \"multipleTrails\" in props;\n\n  if (hasMultipleTrails) {\n    // Multiple breadcrumb trails\n    const data = props.multipleTrails.map((trail) => ({\n      \"@context\": \"https://schema.org\",\n      \"@type\": \"BreadcrumbList\",\n      itemListElement: trail.map((item, index) =>\n        processBreadcrumbItem(item, index + 1),\n      ),\n    }));\n\n    return (\n      <JsonLdScript\n        data={data}\n        id={scriptId}\n        scriptKey={scriptKey || \"breadcrumb-jsonld-multiple\"}\n      />\n    );\n  } else {\n    // Single breadcrumb trail\n    const data = {\n      \"@context\": \"https://schema.org\",\n      \"@type\": \"BreadcrumbList\",\n      itemListElement: props.items.map((item, index) =>\n        processBreadcrumbItem(item, index + 1),\n      ),\n    };\n\n    return (\n      <JsonLdScript\n        data={data}\n        id={scriptId}\n        scriptKey={scriptKey || \"breadcrumb-jsonld\"}\n      />\n    );\n  }\n}\n\nexport type { BreadcrumbJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type {\n  CarouselJsonLdProps,\n  CarouselListItem,\n  SummaryPageItem,\n  CourseItem,\n  MovieItem,\n  RecipeItem,\n  RestaurantItem,\n} from \"~/types/carousel.types\";\nimport type { Course } from \"~/types/course.types\";\nimport type { Movie } from \"~/types/movie-carousel.types\";\nimport type { Recipe } from \"~/types/recipe.types\";\nimport type { Restaurant } from \"~/types/localbusiness.types\";\nimport {\n  processProvider,\n  processImage,\n  processDirector,\n  processReview,\n  processAggregateRating,\n  processVideo,\n  processNutrition,\n  processInstruction,\n  processAddress,\n  processGeo,\n  processOpeningHours,\n} from \"~/utils/processors\";\n\nfunction processSummaryItem(\n  item: SummaryPageItem,\n  index: number,\n): CarouselListItem {\n  if (typeof item === \"string\") {\n    return {\n      \"@type\": \"ListItem\",\n      position: index + 1,\n      url: item,\n    };\n  }\n  return {\n    \"@type\": \"ListItem\",\n    position: item.position ?? index + 1,\n    url: item.url,\n  };\n}\n\nfunction processCourseItem(\n  course: CourseItem,\n  index: number,\n): CarouselListItem {\n  const processedCourse: Course = {\n    \"@type\": \"Course\",\n    name: course.name,\n    description: course.description,\n    ...(course.url && { url: course.url }),\n    ...(course.provider && { provider: processProvider(course.provider) }),\n  };\n\n  return {\n    \"@type\": \"ListItem\",\n    position: index + 1,\n    item: processedCourse,\n  };\n}\n\nfunction processMovieItem(movie: MovieItem, index: number): CarouselListItem {\n  const processedMovie: Movie = {\n    \"@type\": \"Movie\",\n    name: movie.name,\n    image: Array.isArray(movie.image)\n      ? movie.image.map(processImage)\n      : processImage(movie.image),\n    ...(movie.url && { url: movie.url }),\n    ...(movie.dateCreated && { dateCreated: movie.dateCreated }),\n    ...(movie.director && { director: processDirector(movie.director) }),\n    ...(movie.review && { review: processReview(movie.review) }),\n    ...(movie.aggregateRating && {\n      aggregateRating: processAggregateRating(movie.aggregateRating),\n    }),\n  };\n\n  return {\n    \"@type\": \"ListItem\",\n    position: index + 1,\n    item: processedMovie,\n  };\n}\n\nfunction processRecipeItem(\n  recipe: RecipeItem,\n  index: number,\n): CarouselListItem {\n  const processedRecipe: Recipe = {\n    \"@type\": \"Recipe\",\n    name: recipe.name,\n    image: Array.isArray(recipe.image)\n      ? recipe.image.map(processImage)\n      : processImage(recipe.image),\n    ...(recipe.description && { description: recipe.description }),\n    ...(recipe.author && {\n      author:\n        typeof recipe.author === \"string\"\n          ? { \"@type\": \"Person\", name: recipe.author }\n          : recipe.author,\n    }),\n    ...(recipe.datePublished && { datePublished: recipe.datePublished }),\n    ...(recipe.prepTime && { prepTime: recipe.prepTime }),\n    ...(recipe.cookTime && { cookTime: recipe.cookTime }),\n    ...(recipe.totalTime && { totalTime: recipe.totalTime }),\n    ...(recipe.recipeYield && { recipeYield: recipe.recipeYield }),\n    ...(recipe.recipeCategory && { recipeCategory: recipe.recipeCategory }),\n    ...(recipe.recipeCuisine && { recipeCuisine: recipe.recipeCuisine }),\n    ...(recipe.nutrition && { nutrition: processNutrition(recipe.nutrition) }),\n    ...(recipe.recipeIngredient && {\n      recipeIngredient: recipe.recipeIngredient,\n    }),\n    ...(recipe.recipeInstructions && {\n      recipeInstructions: Array.isArray(recipe.recipeInstructions)\n        ? recipe.recipeInstructions.map(processInstruction)\n        : processInstruction(recipe.recipeInstructions),\n    }),\n    ...(recipe.aggregateRating && {\n      aggregateRating: processAggregateRating(recipe.aggregateRating),\n    }),\n    ...(recipe.video && { video: processVideo(recipe.video) }),\n    ...(recipe.keywords && { keywords: recipe.keywords }),\n    ...(recipe.url && { url: recipe.url }),\n  };\n\n  return {\n    \"@type\": \"ListItem\",\n    position: index + 1,\n    item: processedRecipe,\n  };\n}\n\nfunction processRestaurantItem(\n  restaurant: RestaurantItem,\n  index: number,\n): CarouselListItem {\n  const address = restaurant.address\n    ? Array.isArray(restaurant.address)\n      ? restaurant.address.map((addr) =>\n          typeof addr === \"string\" ? addr : processAddress(addr),\n        )\n      : typeof restaurant.address === \"string\"\n        ? restaurant.address\n        : processAddress(restaurant.address)\n    : \"\";\n\n  const processedRestaurant: Restaurant = {\n    \"@type\": \"Restaurant\",\n    name: restaurant.name,\n    address,\n    ...(restaurant.url && { url: restaurant.url }),\n    ...(restaurant.telephone && { telephone: restaurant.telephone }),\n    ...(restaurant.image && {\n      image: Array.isArray(restaurant.image)\n        ? restaurant.image.map(processImage)\n        : processImage(restaurant.image),\n    }),\n    ...(restaurant.priceRange && { priceRange: restaurant.priceRange }),\n    ...(restaurant.geo && { geo: processGeo(restaurant.geo) }),\n    ...(restaurant.openingHoursSpecification && {\n      openingHoursSpecification: Array.isArray(\n        restaurant.openingHoursSpecification,\n      )\n        ? restaurant.openingHoursSpecification.map(processOpeningHours)\n        : processOpeningHours(restaurant.openingHoursSpecification),\n    }),\n    ...(restaurant.review && {\n      review: Array.isArray(restaurant.review)\n        ? restaurant.review.map(processReview)\n        : processReview(restaurant.review),\n    }),\n    ...(restaurant.aggregateRating && {\n      aggregateRating: processAggregateRating(restaurant.aggregateRating),\n    }),\n    ...(restaurant.menu && { menu: restaurant.menu }),\n    ...(restaurant.servesCuisine && {\n      servesCuisine: restaurant.servesCuisine,\n    }),\n    ...(restaurant.sameAs && { sameAs: restaurant.sameAs }),\n  };\n\n  return {\n    \"@type\": \"ListItem\",\n    position: index + 1,\n    item: processedRestaurant,\n  };\n}\n\nexport default function CarouselJsonLd(props: CarouselJsonLdProps) {\n  const { scriptId, scriptKey } = props;\n\n  let itemListElement: CarouselListItem[];\n\n  if (\"urls\" in props) {\n    // Summary page pattern - just URLs\n    itemListElement = props.urls.map((url, index) =>\n      processSummaryItem(url, index),\n    );\n  } else {\n    // All-in-one page pattern - full item data\n    switch (props.contentType) {\n      case \"Course\":\n        itemListElement = props.items.map((item, index) =>\n          processCourseItem(item as CourseItem, index),\n        );\n        break;\n      case \"Movie\":\n        itemListElement = props.items.map((item, index) =>\n          processMovieItem(item as MovieItem, index),\n        );\n        break;\n      case \"Recipe\":\n        itemListElement = props.items.map((item, index) =>\n          processRecipeItem(item as RecipeItem, index),\n        );\n        break;\n      case \"Restaurant\":\n        itemListElement = props.items.map((item, index) =>\n          processRestaurantItem(item as RestaurantItem, index),\n        );\n        break;\n      default:\n        itemListElement = [];\n    }\n  }\n\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"ItemList\",\n    itemListElement,\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"carousel-jsonld\"}\n    />\n  );\n}\n\nexport type { CarouselJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type {\n  CourseJsonLdProps,\n  CourseListItem,\n  SummaryPageItem,\n  CourseListItemSchema,\n  Course,\n} from \"~/types/course.types\";\nimport { processProvider } from \"~/utils/processors\";\n\nfunction processSummaryItem(\n  item: SummaryPageItem,\n  index: number,\n): CourseListItemSchema {\n  if (typeof item === \"string\") {\n    return {\n      \"@type\": \"ListItem\",\n      position: index + 1,\n      url: item,\n    };\n  }\n  return {\n    \"@type\": \"ListItem\",\n    position: item.position ?? index + 1,\n    url: item.url,\n  };\n}\n\nfunction processCourseItem(\n  course: CourseListItem,\n  index: number,\n): CourseListItemSchema {\n  const processedCourse: Course = {\n    \"@type\": \"Course\",\n    name: course.name,\n    description: course.description,\n    ...(course.url && { url: course.url }),\n    ...(course.provider && { provider: processProvider(course.provider) }),\n  };\n\n  return {\n    \"@type\": \"ListItem\",\n    position: index + 1,\n    item: processedCourse,\n  };\n}\n\nexport default function CourseJsonLd(props: CourseJsonLdProps) {\n  const { scriptId, scriptKey } = props;\n\n  // Single course pattern\n  if (!(\"type\" in props) || props.type === \"single\") {\n    const data = {\n      \"@context\": \"https://schema.org\",\n      \"@type\": \"Course\",\n      name: props.name,\n      description: props.description,\n      ...(props.url && { url: props.url }),\n      ...(props.provider && { provider: processProvider(props.provider) }),\n    };\n\n    return (\n      <JsonLdScript\n        data={data}\n        id={scriptId}\n        scriptKey={scriptKey || \"course-jsonld\"}\n      />\n    );\n  }\n\n  // List pattern\n  let itemListElement: CourseListItemSchema[];\n\n  if (\"urls\" in props && props.type === \"list\") {\n    // Summary page pattern - just URLs\n    itemListElement = props.urls.map((url, index) =>\n      processSummaryItem(url, index),\n    );\n  } else if (\"courses\" in props && props.type === \"list\") {\n    // All-in-one page pattern - full course data\n    itemListElement = props.courses.map((course, index) =>\n      processCourseItem(course, index),\n    );\n  } else {\n    // This should never happen due to type constraints\n    itemListElement = [];\n  }\n\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"ItemList\",\n    itemListElement,\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"course-list-jsonld\"}\n    />\n  );\n}\n\nexport type { CourseJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { EventJsonLdProps } from \"~/types/event.types\";\nimport {\n  processImage,\n  processPlace,\n  processPerformer,\n  processOrganizer,\n  processOffer,\n} from \"~/utils/processors\";\n\nexport default function EventJsonLd({\n  scriptId,\n  scriptKey,\n  name,\n  startDate,\n  location,\n  endDate,\n  description,\n  eventStatus,\n  image,\n  offers,\n  performer,\n  organizer,\n  previousStartDate,\n  url,\n}: EventJsonLdProps) {\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"Event\",\n    name,\n    startDate,\n    location: processPlace(location),\n    ...(endDate && { endDate }),\n    ...(description && { description }),\n    ...(eventStatus && { eventStatus }),\n    ...(image && {\n      image: Array.isArray(image)\n        ? image.map(processImage)\n        : processImage(image),\n    }),\n    ...(offers && {\n      offers: Array.isArray(offers)\n        ? offers.map(processOffer)\n        : processOffer(offers),\n    }),\n    ...(performer && {\n      performer: Array.isArray(performer)\n        ? performer.map(processPerformer)\n        : processPerformer(performer),\n    }),\n    ...(organizer && {\n      organizer: processOrganizer(organizer),\n    }),\n    ...(previousStartDate && { previousStartDate }),\n    ...(url && { url }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"event-jsonld\"}\n    />\n  );\n}\n\nexport type { EventJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type {\n  FAQJsonLdProps,\n  QuestionInput,\n  Question,\n  Answer,\n} from \"~/types/faq.types\";\n\n// Process flexible question input into proper Question format\nfunction processQuestion(input: QuestionInput): Question {\n  // Handle string input - just the question with empty answer\n  if (typeof input === \"string\") {\n    return {\n      \"@type\": \"Question\",\n      name: input,\n      acceptedAnswer: {\n        \"@type\": \"Answer\",\n        text: \"\",\n      },\n    };\n  }\n\n  // Handle simple question/answer format\n  if (\"question\" in input && \"answer\" in input) {\n    return {\n      \"@type\": \"Question\",\n      name: input.question,\n      acceptedAnswer: {\n        \"@type\": \"Answer\",\n        text: input.answer,\n      },\n    };\n  }\n\n  // Handle Schema.org format with name/acceptedAnswer\n  if (\"name\" in input) {\n    const acceptedAnswer: Answer =\n      typeof input.acceptedAnswer === \"string\"\n        ? {\n            \"@type\": \"Answer\",\n            text: input.acceptedAnswer,\n          }\n        : input.acceptedAnswer;\n\n    return {\n      \"@type\": \"Question\",\n      name: input.name,\n      acceptedAnswer,\n    };\n  }\n\n  // Should never reach here due to TypeScript, but handle gracefully\n  return {\n    \"@type\": \"Question\",\n    name: \"\",\n    acceptedAnswer: {\n      \"@type\": \"Answer\",\n      text: \"\",\n    },\n  };\n}\n\nexport default function FAQJsonLd({\n  questions,\n  scriptId,\n  scriptKey,\n}: FAQJsonLdProps) {\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"FAQPage\",\n    mainEntity: questions.map(processQuestion),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"faq-jsonld\"}\n    />\n  );\n}\n\nexport type { FAQJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { ImageJsonLdProps, ImageMetadata } from \"~/types/image.types\";\nimport { processAuthor } from \"~/utils/processors\";\n\nexport default function ImageJsonLd({\n  scriptId,\n  scriptKey,\n  ...props\n}: ImageJsonLdProps) {\n  // Helper function to process a single image\n  const processImage = (image: Omit<ImageMetadata, \"@type\">) => {\n    // Validate required fields\n    const hasRequiredMetadata =\n      image.creator ||\n      image.creditText ||\n      image.copyrightNotice ||\n      image.license;\n\n    if (!image.contentUrl || !hasRequiredMetadata) {\n      console.warn(\n        \"ImageJsonLd: contentUrl and at least one of creator, creditText, copyrightNotice, or license is required\",\n      );\n    }\n\n    return {\n      \"@type\": \"ImageObject\",\n      contentUrl: image.contentUrl,\n      ...(image.creator && {\n        creator: Array.isArray(image.creator)\n          ? image.creator.map(processAuthor)\n          : processAuthor(image.creator),\n      }),\n      ...(image.creditText && { creditText: image.creditText }),\n      ...(image.copyrightNotice && { copyrightNotice: image.copyrightNotice }),\n      ...(image.license && { license: image.license }),\n      ...(image.acquireLicensePage && {\n        acquireLicensePage: image.acquireLicensePage,\n      }),\n    };\n  };\n\n  // Determine if we have multiple images\n  const hasMultipleImages = \"images\" in props && Array.isArray(props.images);\n\n  const data = hasMultipleImages\n    ? props.images.map(processImage)\n    : processImage(props as Omit<ImageMetadata, \"@type\">);\n\n  return (\n    <JsonLdScript\n      data={{\n        \"@context\": \"https://schema.org\",\n        ...(Array.isArray(data) ? {} : data),\n        ...(Array.isArray(data) && { \"@graph\": data }),\n      }}\n      id={scriptId}\n      scriptKey={scriptKey || \"image-jsonld\"}\n    />\n  );\n}\n\nexport type { ImageJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type {\n  QuizJsonLdProps,\n  QuestionInput,\n  Question,\n  Answer,\n  AlignmentObject,\n} from \"~/types/quiz.types\";\nimport type { Thing } from \"~/types/common.types\";\n\n// Process flexible question input into proper Question format\nfunction processQuestion(input: QuestionInput): Question {\n  // Handle string input - create question with the string as both question and answer\n  if (typeof input === \"string\") {\n    return {\n      \"@type\": \"Question\",\n      eduQuestionType: \"Flashcard\",\n      text: input,\n      acceptedAnswer: {\n        \"@type\": \"Answer\",\n        text: input,\n      },\n    };\n  }\n\n  // Handle simple question/answer format\n  if (\"question\" in input && \"answer\" in input) {\n    return {\n      \"@type\": \"Question\",\n      eduQuestionType: \"Flashcard\",\n      text: input.question,\n      acceptedAnswer: {\n        \"@type\": \"Answer\",\n        text: input.answer,\n      },\n    };\n  }\n\n  // Handle format with text/acceptedAnswer\n  if (\"text\" in input) {\n    const acceptedAnswer: Answer =\n      typeof input.acceptedAnswer === \"string\"\n        ? {\n            \"@type\": \"Answer\",\n            text: input.acceptedAnswer,\n          }\n        : input.acceptedAnswer;\n\n    return {\n      \"@type\": \"Question\",\n      eduQuestionType: \"Flashcard\",\n      text: input.text,\n      acceptedAnswer,\n    };\n  }\n\n  // Should never reach here due to TypeScript, but handle gracefully\n  return {\n    \"@type\": \"Question\",\n    eduQuestionType: \"Flashcard\",\n    text: \"\",\n    acceptedAnswer: {\n      \"@type\": \"Answer\",\n      text: \"\",\n    },\n  };\n}\n\n// Process about property\nfunction processAbout(about: string | Thing): Record<string, unknown> {\n  if (typeof about === \"string\") {\n    return {\n      \"@type\": \"Thing\",\n      name: about,\n    };\n  }\n  return {\n    \"@type\": \"Thing\",\n    ...about,\n  };\n}\n\n// Process educational alignment\nfunction processEducationalAlignment(alignment: {\n  type: \"educationalSubject\" | \"educationalLevel\";\n  name: string;\n}): AlignmentObject {\n  return {\n    \"@type\": \"AlignmentObject\",\n    alignmentType: alignment.type,\n    targetName: alignment.name,\n  };\n}\n\nexport default function QuizJsonLd({\n  questions,\n  about,\n  educationalAlignment,\n  scriptId,\n  scriptKey,\n}: QuizJsonLdProps) {\n  const data = {\n    \"@context\": \"https://schema.org/\",\n    \"@type\": \"Quiz\",\n    ...(about && {\n      about: processAbout(about),\n    }),\n    ...(educationalAlignment && {\n      educationalAlignment: educationalAlignment.map(\n        processEducationalAlignment,\n      ),\n    }),\n    hasPart: questions.map(processQuestion),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"quiz-jsonld\"}\n    />\n  );\n}\n\nexport type { QuizJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { DatasetJsonLdProps } from \"~/types/dataset.types\";\nimport {\n  processCreator,\n  processFunder,\n  processIdentifier,\n  processSpatialCoverage,\n  processDataDownload,\n  processLicense,\n  processDataCatalog,\n} from \"~/utils/processors\";\n\nexport default function DatasetJsonLd({\n  scriptId,\n  scriptKey,\n  name,\n  description,\n  url,\n  sameAs,\n  identifier,\n  keywords,\n  license,\n  isAccessibleForFree,\n  hasPart,\n  isPartOf,\n  creator,\n  funder,\n  includedInDataCatalog,\n  distribution,\n  temporalCoverage,\n  spatialCoverage,\n  alternateName,\n  citation,\n  measurementTechnique,\n  variableMeasured,\n  version,\n}: DatasetJsonLdProps) {\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"Dataset\",\n    name,\n    description,\n    ...(url && { url }),\n    ...(sameAs && { sameAs }),\n    ...(identifier && {\n      identifier: Array.isArray(identifier)\n        ? identifier.map(processIdentifier)\n        : processIdentifier(identifier),\n    }),\n    ...(keywords && { keywords }),\n    ...(license && { license: processLicense(license) }),\n    ...(isAccessibleForFree !== undefined && { isAccessibleForFree }),\n    ...(hasPart && { hasPart }),\n    ...(isPartOf && { isPartOf }),\n    ...(creator && { creator: processCreator(creator) }),\n    ...(funder && { funder: processFunder(funder) }),\n    ...(includedInDataCatalog && {\n      includedInDataCatalog: processDataCatalog(includedInDataCatalog),\n    }),\n    ...(distribution && {\n      distribution: Array.isArray(distribution)\n        ? distribution.map(processDataDownload)\n        : processDataDownload(distribution),\n    }),\n    ...(temporalCoverage && { temporalCoverage }),\n    ...(spatialCoverage && {\n      spatialCoverage: processSpatialCoverage(spatialCoverage),\n    }),\n    ...(alternateName && { alternateName }),\n    ...(citation && { citation }),\n    ...(measurementTechnique && { measurementTechnique }),\n    ...(variableMeasured && {\n      variableMeasured: Array.isArray(variableMeasured)\n        ? variableMeasured.map((v) =>\n            typeof v === \"string\" ? v : processIdentifier(v),\n          )\n        : typeof variableMeasured === \"string\"\n          ? variableMeasured\n          : processIdentifier(variableMeasured),\n    }),\n    ...(version && { version }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"dataset-jsonld\"}\n    />\n  );\n}\n\nexport type { DatasetJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { JobPostingJsonLdProps } from \"~/types/jobposting.types\";\nimport {\n  processHiringOrganization,\n  processJobLocation,\n  processMonetaryAmount,\n  processJobPropertyValue,\n  processApplicantLocationRequirements,\n  processEducationRequirements,\n  processExperienceRequirements,\n} from \"~/utils/processors\";\n\nexport default function JobPostingJsonLd({\n  scriptId,\n  scriptKey,\n  title,\n  description,\n  datePosted,\n  hiringOrganization,\n  jobLocation,\n  url,\n  validThrough,\n  employmentType,\n  identifier,\n  baseSalary,\n  applicantLocationRequirements,\n  jobLocationType,\n  directApply,\n  educationRequirements,\n  experienceRequirements,\n  experienceInPlaceOfEducation,\n}: JobPostingJsonLdProps) {\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"JobPosting\",\n    title,\n    description,\n    datePosted,\n    hiringOrganization: processHiringOrganization(hiringOrganization),\n    ...(jobLocation && {\n      jobLocation: Array.isArray(jobLocation)\n        ? jobLocation.map(processJobLocation)\n        : processJobLocation(jobLocation),\n    }),\n    ...(url && { url }),\n    ...(validThrough && { validThrough }),\n    ...(employmentType && {\n      employmentType: Array.isArray(employmentType)\n        ? employmentType\n        : employmentType,\n    }),\n    ...(identifier && {\n      identifier: processJobPropertyValue(identifier),\n    }),\n    ...(baseSalary && {\n      baseSalary: processMonetaryAmount(baseSalary),\n    }),\n    ...(applicantLocationRequirements && {\n      applicantLocationRequirements: Array.isArray(\n        applicantLocationRequirements,\n      )\n        ? applicantLocationRequirements.map(\n            processApplicantLocationRequirements,\n          )\n        : processApplicantLocationRequirements(applicantLocationRequirements),\n    }),\n    ...(jobLocationType && { jobLocationType }),\n    ...(directApply !== undefined && { directApply }),\n    ...(educationRequirements && {\n      educationRequirements: Array.isArray(educationRequirements)\n        ? educationRequirements.map(processEducationRequirements)\n        : processEducationRequirements(educationRequirements),\n    }),\n    ...(experienceRequirements && {\n      experienceRequirements: processExperienceRequirements(\n        experienceRequirements,\n      ),\n    }),\n    ...(experienceInPlaceOfEducation !== undefined && {\n      experienceInPlaceOfEducation,\n    }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"jobposting-jsonld\"}\n    />\n  );\n}\n\nexport type { JobPostingJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { DiscussionForumPostingJsonLdProps } from \"~/types/discussionforum.types\";\nimport {\n  processAuthor,\n  processImage,\n  processVideo,\n  processComment,\n  processInteractionStatistic,\n  processSharedContent,\n  processIsPartOf,\n} from \"~/utils/processors\";\n\nexport default function DiscussionForumPostingJsonLd({\n  type = \"DiscussionForumPosting\",\n  scriptId,\n  scriptKey,\n  headline,\n  text,\n  image,\n  video,\n  author,\n  datePublished,\n  dateModified,\n  url,\n  comment,\n  creativeWorkStatus,\n  interactionStatistic,\n  isPartOf,\n  sharedContent,\n}: DiscussionForumPostingJsonLdProps) {\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": type,\n    ...(headline && { headline }),\n    ...(text && { text }),\n    ...(image && {\n      image: Array.isArray(image)\n        ? image.map(processImage)\n        : processImage(image),\n    }),\n    ...(video && { video: processVideo(video) }),\n    author: Array.isArray(author)\n      ? author.map(processAuthor)\n      : processAuthor(author),\n    datePublished,\n    ...(dateModified && { dateModified }),\n    ...(url && { url }),\n    ...(comment && {\n      comment: comment.map(processComment),\n    }),\n    ...(creativeWorkStatus && { creativeWorkStatus }),\n    ...(interactionStatistic && {\n      interactionStatistic: Array.isArray(interactionStatistic)\n        ? interactionStatistic.map(processInteractionStatistic)\n        : processInteractionStatistic(interactionStatistic),\n    }),\n    ...(isPartOf && { isPartOf: processIsPartOf(isPartOf) }),\n    ...(sharedContent && {\n      sharedContent: processSharedContent(sharedContent),\n    }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || `${type.toLowerCase()}-jsonld`}\n    />\n  );\n}\n\nexport type { DiscussionForumPostingJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { EmployerAggregateRatingJsonLdProps } from \"~/types/employer-aggregate-rating.types\";\nimport type { Organization } from \"~/types/common.types\";\nimport {\n  processAddress,\n  processContactPoint,\n  processLogo,\n  processNumberOfEmployees,\n} from \"~/utils/processors\";\n\nfunction processEmployerItemReviewed(\n  itemReviewed: string | Organization | Omit<Organization, \"@type\">,\n): Organization {\n  if (typeof itemReviewed === \"string\") {\n    return {\n      \"@type\": \"Organization\",\n      name: itemReviewed,\n    };\n  }\n\n  // Start with base organization\n  const org: Organization = {\n    \"@type\": \"Organization\",\n    ...itemReviewed,\n  };\n\n  // Process nested properties if present\n  if (\n    \"logo\" in itemReviewed &&\n    itemReviewed.logo &&\n    typeof itemReviewed.logo !== \"string\"\n  ) {\n    org.logo = processLogo(itemReviewed.logo);\n  }\n\n  if (\"address\" in itemReviewed && itemReviewed.address) {\n    if (Array.isArray(itemReviewed.address)) {\n      org.address = itemReviewed.address.map((addr) =>\n        typeof addr === \"string\" ? addr : processAddress(addr),\n      );\n    } else if (typeof itemReviewed.address !== \"string\") {\n      org.address = processAddress(itemReviewed.address);\n    }\n  }\n\n  if (\"contactPoint\" in itemReviewed && itemReviewed.contactPoint) {\n    if (Array.isArray(itemReviewed.contactPoint)) {\n      org.contactPoint = itemReviewed.contactPoint.map(processContactPoint);\n    } else {\n      org.contactPoint = processContactPoint(itemReviewed.contactPoint);\n    }\n  }\n\n  if (\"numberOfEmployees\" in itemReviewed && itemReviewed.numberOfEmployees) {\n    org.numberOfEmployees = processNumberOfEmployees(\n      itemReviewed.numberOfEmployees,\n    );\n  }\n\n  return org;\n}\n\nexport default function EmployerAggregateRatingJsonLd({\n  scriptId,\n  scriptKey,\n  itemReviewed,\n  ratingValue,\n  ratingCount,\n  reviewCount,\n  bestRating,\n  worstRating,\n}: EmployerAggregateRatingJsonLdProps) {\n  // Validate that at least one of ratingCount or reviewCount is provided\n  if (!ratingCount && !reviewCount) {\n    throw new Error(\n      \"EmployerAggregateRating requires at least one of ratingCount or reviewCount\",\n    );\n  }\n\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"EmployerAggregateRating\",\n    itemReviewed: processEmployerItemReviewed(itemReviewed),\n    ratingValue,\n    ...(ratingCount && { ratingCount }),\n    ...(reviewCount && { reviewCount }),\n    ...(bestRating !== undefined && { bestRating }),\n    ...(worstRating !== undefined && { worstRating }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"employer-aggregate-rating-jsonld\"}\n    />\n  );\n}\n\nexport type { EmployerAggregateRatingJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { VacationRentalJsonLdProps } from \"~/types/vacationrental.types\";\nimport {\n  processImage,\n  processAddress,\n  processAggregateRating,\n  processBrand,\n  processAccommodation,\n  processReview,\n} from \"~/utils/processors\";\n\nexport default function VacationRentalJsonLd({\n  scriptId,\n  scriptKey,\n  containsPlace,\n  identifier,\n  image,\n  latitude,\n  longitude,\n  name,\n  additionalType,\n  address,\n  aggregateRating,\n  brand,\n  checkinTime,\n  checkoutTime,\n  description,\n  knowsLanguage,\n  review,\n  geo,\n}: VacationRentalJsonLdProps) {\n  // Process images - minimum 8 required\n  const processedImages = Array.isArray(image)\n    ? image.map(processImage)\n    : [processImage(image)];\n\n  // Use geo coordinates if provided, otherwise use latitude/longitude\n  const finalLatitude = geo?.latitude ?? latitude;\n  const finalLongitude = geo?.longitude ?? longitude;\n\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"VacationRental\",\n    containsPlace: processAccommodation(containsPlace),\n    identifier,\n    image: processedImages,\n    latitude: finalLatitude,\n    longitude: finalLongitude,\n    name,\n    ...(additionalType && { additionalType }),\n    ...(address && { address: processAddress(address) }),\n    ...(aggregateRating && {\n      aggregateRating: processAggregateRating(aggregateRating),\n    }),\n    ...(brand && { brand: processBrand(brand) }),\n    ...(checkinTime && { checkinTime }),\n    ...(checkoutTime && { checkoutTime }),\n    ...(description && { description }),\n    ...(knowsLanguage && {\n      knowsLanguage: Array.isArray(knowsLanguage)\n        ? knowsLanguage\n        : [knowsLanguage],\n    }),\n    ...(review && {\n      review: Array.isArray(review)\n        ? review.map(processReview)\n        : processReview(review),\n    }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"vacationrental-jsonld\"}\n    />\n  );\n}\n\nexport type { VacationRentalJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { VideoJsonLdProps } from \"~/types/video.types\";\nimport {\n  processAuthor,\n  processImage,\n  processInteractionStatistic,\n  processPublisher,\n  processBroadcastEvent,\n  processClip,\n  processSeekToAction,\n} from \"~/utils/processors\";\n\nexport default function VideoJsonLd({\n  type = \"VideoObject\",\n  scriptId,\n  scriptKey,\n  name,\n  description,\n  thumbnailUrl,\n  uploadDate,\n  contentUrl,\n  embedUrl,\n  duration,\n  expires,\n  interactionStatistic,\n  regionsAllowed,\n  ineligibleRegion,\n  publication,\n  hasPart,\n  potentialAction,\n  author,\n  publisher,\n}: VideoJsonLdProps) {\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": type,\n    name,\n    description,\n    thumbnailUrl: Array.isArray(thumbnailUrl)\n      ? thumbnailUrl.map(processImage)\n      : processImage(thumbnailUrl),\n    uploadDate,\n    ...(contentUrl && { contentUrl }),\n    ...(embedUrl && { embedUrl }),\n    ...(duration && { duration }),\n    ...(expires && { expires }),\n    ...(interactionStatistic && {\n      interactionStatistic: Array.isArray(interactionStatistic)\n        ? interactionStatistic.map(processInteractionStatistic)\n        : processInteractionStatistic(interactionStatistic),\n    }),\n    ...(regionsAllowed && {\n      regionsAllowed: Array.isArray(regionsAllowed)\n        ? regionsAllowed\n        : [regionsAllowed],\n    }),\n    ...(ineligibleRegion && {\n      ineligibleRegion: Array.isArray(ineligibleRegion)\n        ? ineligibleRegion\n        : [ineligibleRegion],\n    }),\n    ...(publication && {\n      publication: Array.isArray(publication)\n        ? publication.map(processBroadcastEvent)\n        : processBroadcastEvent(publication),\n    }),\n    ...(hasPart && {\n      hasPart: Array.isArray(hasPart)\n        ? hasPart.map(processClip)\n        : processClip(hasPart),\n    }),\n    ...(potentialAction && {\n      potentialAction: processSeekToAction(potentialAction),\n    }),\n    ...(author && {\n      author: Array.isArray(author)\n        ? author.map(processAuthor)\n        : processAuthor(author),\n    }),\n    ...(publisher && { publisher: processPublisher(publisher) }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || `video-jsonld-${type}`}\n    />\n  );\n}\n\nexport type { VideoJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { ProfilePageJsonLdProps } from \"~/types/profile.types\";\nimport { processAuthor, processInteractionStatistic } from \"~/utils/processors\";\n\nexport default function ProfilePageJsonLd({\n  mainEntity,\n  dateCreated,\n  dateModified,\n  scriptId,\n  scriptKey,\n}: ProfilePageJsonLdProps) {\n  // Process mainEntity - it can be a string, Person, Organization, or objects without @type\n  const processedMainEntity = processAuthor(mainEntity);\n\n  // Further process the mainEntity to handle interactionStatistic arrays\n  if (processedMainEntity.interactionStatistic) {\n    if (Array.isArray(processedMainEntity.interactionStatistic)) {\n      processedMainEntity.interactionStatistic =\n        processedMainEntity.interactionStatistic.map(\n          processInteractionStatistic,\n        );\n    } else {\n      processedMainEntity.interactionStatistic = processInteractionStatistic(\n        processedMainEntity.interactionStatistic,\n      );\n    }\n  }\n\n  // Process agentInteractionStatistic if present\n  if (processedMainEntity.agentInteractionStatistic) {\n    processedMainEntity.agentInteractionStatistic = processInteractionStatistic(\n      processedMainEntity.agentInteractionStatistic,\n    );\n  }\n\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"ProfilePage\",\n    mainEntity: processedMainEntity,\n    ...(dateCreated && { dateCreated }),\n    ...(dateModified && { dateModified }),\n  };\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"profile-page-jsonld\"}\n    />\n  );\n}\n\nexport type { ProfilePageJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type {\n  SoftwareApplicationJsonLdProps,\n  ApplicationType,\n  VideoGameCoTyped,\n} from \"~/types/softwareApplication.types\";\nimport {\n  processAuthor,\n  processImage,\n  processPublisher,\n  processAggregateRating,\n  processReview,\n  processOffer,\n  processScreenshot,\n  processFeatureList,\n} from \"~/utils/processors\";\n\nexport default function SoftwareApplicationJsonLd({\n  type = \"SoftwareApplication\",\n  scriptId,\n  scriptKey,\n  name,\n  description,\n  url,\n  image,\n  applicationCategory,\n  applicationSubCategory,\n  applicationSuite,\n  operatingSystem,\n  memoryRequirements,\n  processorRequirements,\n  storageRequirements,\n  availableOnDevice,\n  downloadUrl,\n  installUrl,\n  countriesSupported,\n  countriesNotSupported,\n  permissions,\n  softwareVersion,\n  releaseNotes,\n  screenshot,\n  featureList,\n  offers,\n  aggregateRating,\n  review,\n  author,\n  publisher,\n  datePublished,\n  dateModified,\n  contentRating,\n}: SoftwareApplicationJsonLdProps) {\n  // Determine the actual @type to use\n  let schemaType: ApplicationType | VideoGameCoTyped;\n  if (Array.isArray(type)) {\n    // VideoGame co-typed with another application type\n    schemaType = type;\n  } else {\n    schemaType = type;\n  }\n\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": schemaType,\n    // Required properties\n    ...(name && { name }),\n    // Conditionally include properties\n    ...(description && { description }),\n    ...(url && { url }),\n    ...(image && {\n      image: Array.isArray(image)\n        ? image.map(processImage)\n        : processImage(image),\n    }),\n    ...(applicationCategory && { applicationCategory }),\n    ...(applicationSubCategory && { applicationSubCategory }),\n    ...(applicationSuite && { applicationSuite }),\n    ...(operatingSystem && { operatingSystem }),\n    ...(memoryRequirements && { memoryRequirements }),\n    ...(processorRequirements && { processorRequirements }),\n    ...(storageRequirements && { storageRequirements }),\n    ...(availableOnDevice && { availableOnDevice }),\n    ...(downloadUrl && { downloadUrl }),\n    ...(installUrl && { installUrl }),\n    ...(countriesSupported && {\n      countriesSupported: Array.isArray(countriesSupported)\n        ? countriesSupported\n        : countriesSupported,\n    }),\n    ...(countriesNotSupported && {\n      countriesNotSupported: Array.isArray(countriesNotSupported)\n        ? countriesNotSupported\n        : countriesNotSupported,\n    }),\n    ...(permissions && {\n      permissions: processFeatureList(permissions),\n    }),\n    ...(softwareVersion && { softwareVersion }),\n    ...(releaseNotes && { releaseNotes }),\n    ...(screenshot && {\n      screenshot: Array.isArray(screenshot)\n        ? screenshot.map(processScreenshot)\n        : processScreenshot(screenshot),\n    }),\n    ...(featureList && {\n      featureList: processFeatureList(featureList),\n    }),\n    ...(offers && {\n      offers: Array.isArray(offers)\n        ? offers.map(processOffer)\n        : processOffer(offers),\n    }),\n    ...(aggregateRating && {\n      aggregateRating: processAggregateRating(aggregateRating),\n    }),\n    ...(review && {\n      review: Array.isArray(review)\n        ? review.map(processReview)\n        : processReview(review),\n    }),\n    ...(author && {\n      author: processAuthor(author),\n    }),\n    ...(publisher && {\n      publisher: processPublisher(publisher),\n    }),\n    ...(datePublished && { datePublished }),\n    ...(dateModified && { dateModified }),\n    // Apply defaults where appropriate\n    ...(!dateModified && datePublished && { dateModified: datePublished }),\n    ...(contentRating && { contentRating }),\n  };\n\n  // Generate a unique key based on the type\n  const typeKey = Array.isArray(schemaType)\n    ? schemaType.join(\"-\").toLowerCase()\n    : schemaType.toLowerCase();\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || `software-application-jsonld-${typeKey}`}\n    />\n  );\n}\n\nexport type { SoftwareApplicationJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { ProductJsonLdProps } from \"~/types/product.types\";\nimport {\n  processImage,\n  processBrand,\n  processProductReview,\n  processAggregateRating,\n  processProductOffer,\n  processAggregateOffer,\n  processAuthor,\n  processVariesBy,\n  processProductVariant,\n  processCertification,\n  processPeopleAudience,\n  processSizeSpecification,\n  processThreeDModel,\n} from \"~/utils/processors\";\n\nexport default function ProductJsonLd(props: ProductJsonLdProps) {\n  const { scriptId, scriptKey, ...rest } = props;\n\n  // Determine if this is a ProductGroup or Product\n  const isProductGroup =\n    (\"type\" in rest && rest.type === \"ProductGroup\") ||\n    \"hasVariant\" in rest ||\n    \"variesBy\" in rest ||\n    \"productGroupID\" in rest;\n\n  let data: Record<string, unknown>;\n\n  if (isProductGroup) {\n    // Handle ProductGroup - safe to cast since we checked above\n    const groupProps = rest as Extract<\n      ProductJsonLdProps,\n      { type?: \"ProductGroup\" }\n    >;\n\n    data = {\n      \"@context\": \"https://schema.org\",\n      \"@type\": \"ProductGroup\",\n      name: groupProps.name,\n      ...(groupProps.description && { description: groupProps.description }),\n      ...(groupProps.url && { url: groupProps.url }),\n      ...(groupProps.image && {\n        image: Array.isArray(groupProps.image)\n          ? groupProps.image.map(processImage)\n          : processImage(groupProps.image),\n      }),\n      ...(groupProps.brand && {\n        brand:\n          typeof groupProps.brand === \"string\"\n            ? { \"@type\": \"Brand\", name: groupProps.brand }\n            : processBrand(groupProps.brand),\n      }),\n      ...(groupProps.review && {\n        review: Array.isArray(groupProps.review)\n          ? groupProps.review.map(processProductReview)\n          : processProductReview(groupProps.review),\n      }),\n      ...(groupProps.aggregateRating && {\n        aggregateRating: processAggregateRating(groupProps.aggregateRating),\n      }),\n      ...(groupProps.audience && { audience: groupProps.audience }),\n      productGroupID: groupProps.productGroupID,\n      ...(groupProps.variesBy && {\n        variesBy: processVariesBy(groupProps.variesBy),\n      }),\n      ...(groupProps.hasVariant && {\n        hasVariant: groupProps.hasVariant.map(processProductVariant),\n      }),\n      ...(groupProps.pattern && { pattern: groupProps.pattern }),\n      ...(groupProps.material && { material: groupProps.material }),\n      ...(groupProps.category && { category: groupProps.category }),\n    };\n  } else {\n    // Handle regular Product - safe to cast since we checked above\n    const productProps = rest as Extract<\n      ProductJsonLdProps,\n      { type?: \"Product\" }\n    >;\n\n    // Product requires at least one of: review, aggregateRating, or offers\n    if (\n      !productProps.review &&\n      !productProps.aggregateRating &&\n      !productProps.offers &&\n      !productProps.isVariantOf\n    ) {\n      console.warn(\n        \"ProductJsonLd: Product structured data requires at least one of: review, aggregateRating, offers, or isVariantOf\",\n      );\n    }\n\n    // Process offers - can be single offer, aggregate offer, or array\n    let processedOffers;\n    if (productProps.offers) {\n      if (Array.isArray(productProps.offers)) {\n        processedOffers = productProps.offers.map((offer) => {\n          // Check if it's an AggregateOffer\n          if (\"lowPrice\" in offer && \"priceCurrency\" in offer) {\n            return processAggregateOffer(\n              offer as Parameters<typeof processAggregateOffer>[0],\n            );\n          }\n          return processProductOffer(offer);\n        });\n      } else if (\n        \"lowPrice\" in productProps.offers &&\n        \"priceCurrency\" in productProps.offers\n      ) {\n        // It's an AggregateOffer\n        processedOffers = processAggregateOffer(\n          productProps.offers as Parameters<typeof processAggregateOffer>[0],\n        );\n      } else {\n        // It's a regular Offer\n        processedOffers = processProductOffer(productProps.offers);\n      }\n    }\n\n    // Process reviews - can be single or array\n    let processedReview;\n    if (productProps.review) {\n      processedReview = Array.isArray(productProps.review)\n        ? productProps.review.map(processProductReview)\n        : processProductReview(productProps.review);\n    }\n\n    // Process brand - can be string or Brand object\n    let processedBrand;\n    if (productProps.brand) {\n      if (typeof productProps.brand === \"string\") {\n        processedBrand = {\n          \"@type\": \"Brand\",\n          name: productProps.brand,\n        };\n      } else {\n        processedBrand = processBrand(productProps.brand);\n      }\n    }\n\n    // Process weight/dimensions - can be string or QuantitativeValue\n    const processQuantitativeValue = (\n      value:\n        | string\n        | {\n            \"@type\"?: \"QuantitativeValue\";\n            value?: number;\n            unitCode?: string;\n            unitText?: string;\n          }\n        | undefined,\n    ) => {\n      if (typeof value === \"string\") {\n        return value;\n      }\n      if (value && typeof value === \"object\" && !(\"@type\" in value)) {\n        return {\n          \"@type\": \"QuantitativeValue\",\n          ...value,\n        };\n      }\n      return value;\n    };\n\n    data = {\n      \"@context\": \"https://schema.org\",\n      \"@type\": productProps.isCar ? [\"Product\", \"Car\"] : \"Product\",\n      name: productProps.name,\n      ...(productProps.description && {\n        description: productProps.description,\n      }),\n      ...(productProps.image && {\n        image: Array.isArray(productProps.image)\n          ? productProps.image.map(processImage)\n          : processImage(productProps.image),\n      }),\n      ...(productProps.sku && { sku: productProps.sku }),\n      ...(productProps.mpn && { mpn: productProps.mpn }),\n      ...(productProps.gtin && { gtin: productProps.gtin }),\n      ...(productProps.gtin8 && { gtin8: productProps.gtin8 }),\n      ...(productProps.gtin12 && { gtin12: productProps.gtin12 }),\n      ...(productProps.gtin13 && { gtin13: productProps.gtin13 }),\n      ...(productProps.gtin14 && { gtin14: productProps.gtin14 }),\n      ...(processedBrand && { brand: processedBrand }),\n      ...(processedReview && { review: processedReview }),\n      ...(productProps.aggregateRating && {\n        aggregateRating: processAggregateRating(productProps.aggregateRating),\n      }),\n      ...(processedOffers && { offers: processedOffers }),\n      ...(productProps.category && { category: productProps.category }),\n      ...(productProps.color && { color: productProps.color }),\n      ...(productProps.material && { material: productProps.material }),\n      ...(productProps.model && { model: productProps.model }),\n      ...(productProps.productID && { productID: productProps.productID }),\n      ...(productProps.url && { url: productProps.url }),\n      ...(productProps.weight && {\n        weight: processQuantitativeValue(productProps.weight),\n      }),\n      ...(productProps.width && {\n        width: processQuantitativeValue(productProps.width),\n      }),\n      ...(productProps.height && {\n        height: processQuantitativeValue(productProps.height),\n      }),\n      ...(productProps.depth && {\n        depth: processQuantitativeValue(productProps.depth),\n      }),\n      ...(productProps.additionalProperty && {\n        additionalProperty: productProps.additionalProperty,\n      }),\n      ...(productProps.manufacturer && {\n        manufacturer: processAuthor(productProps.manufacturer),\n      }),\n      ...(productProps.releaseDate && {\n        releaseDate: productProps.releaseDate,\n      }),\n      ...(productProps.productionDate && {\n        productionDate: productProps.productionDate,\n      }),\n      ...(productProps.purchaseDate && {\n        purchaseDate: productProps.purchaseDate,\n      }),\n      ...(productProps.expirationDate && {\n        expirationDate: productProps.expirationDate,\n      }),\n      ...(productProps.award && { award: productProps.award }),\n      ...(productProps.size && {\n        size: processSizeSpecification(productProps.size),\n      }),\n      ...(productProps.pattern && { pattern: productProps.pattern }),\n      ...(productProps.isbn && { isbn: productProps.isbn }),\n      ...(productProps.hasCertification && {\n        hasCertification: Array.isArray(productProps.hasCertification)\n          ? productProps.hasCertification.map(processCertification)\n          : processCertification(productProps.hasCertification),\n      }),\n      ...(productProps.audience && {\n        audience: processPeopleAudience(productProps.audience),\n      }),\n      ...(productProps.subjectOf && {\n        subjectOf: processThreeDModel(productProps.subjectOf),\n      }),\n      ...(productProps.isVariantOf && {\n        isVariantOf: productProps.isVariantOf,\n      }),\n      ...(productProps.inProductGroupWithID && {\n        inProductGroupWithID: productProps.inProductGroupWithID,\n      }),\n    };\n  }\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={\n        scriptKey || (isProductGroup ? \"productgroup-jsonld\" : \"product-jsonld\")\n      }\n    />\n  );\n}\n\nexport type { ProductJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { ReviewJsonLdProps } from \"~/types/review.types\";\nimport {\n  processAuthor,\n  processItemReviewed,\n  processMainEntityOfPage,\n  processPublisher,\n} from \"~/utils/processors\";\n\nexport default function ReviewJsonLd({\n  scriptId,\n  scriptKey,\n  author,\n  reviewRating,\n  itemReviewed,\n  datePublished,\n  reviewBody,\n  publisher,\n  url,\n  mainEntityOfPage,\n}: ReviewJsonLdProps) {\n  if (!author) {\n    throw new Error(\"Review requires an author\");\n  }\n  const ratingValue =\n    typeof reviewRating === \"object\" && reviewRating\n      ? (reviewRating as { ratingValue?: unknown }).ratingValue\n      : undefined;\n  if (ratingValue === undefined) {\n    throw new Error(\"Review requires reviewRating.ratingValue\");\n  }\n  if (!itemReviewed) {\n    throw new Error(\"Review requires itemReviewed when used standalone\");\n  }\n\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"Review\",\n    author: processAuthor(author),\n    reviewRating: {\n      \"@type\": \"Rating\",\n      ...reviewRating,\n    },\n    itemReviewed: processItemReviewed(itemReviewed),\n    ...(datePublished && { datePublished }),\n    ...(reviewBody && { reviewBody }),\n    ...(publisher && { publisher: processPublisher(publisher) }),\n    ...(url && { url }),\n    ...(mainEntityOfPage && {\n      mainEntityOfPage: processMainEntityOfPage(mainEntityOfPage),\n    }),\n  } as const;\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"review-jsonld\"}\n    />\n  );\n}\n\nexport type { ReviewJsonLdProps };\n","import { JsonLdScript } from \"~/core/JsonLdScript\";\nimport type { AggregateRatingJsonLdProps } from \"~/types/review.types\";\nimport { processItemReviewed } from \"~/utils/processors\";\n\nexport default function AggregateRatingJsonLd({\n  scriptId,\n  scriptKey,\n  itemReviewed,\n  ratingValue,\n  ratingCount,\n  reviewCount,\n  bestRating,\n  worstRating,\n}: AggregateRatingJsonLdProps) {\n  if (!itemReviewed) {\n    throw new Error(\n      \"AggregateRating requires itemReviewed when used standalone\",\n    );\n  }\n  if (!ratingCount && !reviewCount) {\n    throw new Error(\n      \"AggregateRating requires at least one of ratingCount or reviewCount\",\n    );\n  }\n\n  const data = {\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"AggregateRating\",\n    itemReviewed: processItemReviewed(itemReviewed),\n    ratingValue,\n    ...(ratingCount !== undefined && { ratingCount }),\n    ...(reviewCount !== undefined && { reviewCount }),\n    ...(bestRating !== undefined && { bestRating }),\n    ...(worstRating !== undefined && { worstRating }),\n  } as const;\n\n  return (\n    <JsonLdScript\n      data={data}\n      id={scriptId}\n      scriptKey={scriptKey || \"aggregaterating-jsonld\"}\n    />\n  );\n}\n\nexport type { AggregateRatingJsonLdProps };\n"],"mappings":";;;;;;;AAgBA,IAAM,qBAAoC,uBAAM;AAC9C,SAAO,CAAC,GAAW,UAA4C;AAC7D,YAAQ,OAAO,OAAO;AAAA,MACpB,KAAK;AAEH,YAAI,UAAU,MAAM;AAClB,iBAAO;AAAA,QACT;AACA,eAAO;AAAA;AAAA,MACT,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,eAAO;AAAA;AAAA,MACT,SAAS;AAEP,gBAAQ,KAAK;AAEb,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF,GAAG;AAMH,SAAS,QAAQ,GAAgB;AAAC;AAoB3B,IAAM,YAAY,CAAC,SAAkB;AAC1C,QAAM,aAAa,KAAK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,aAAa;AAChC,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,QAAM,OAAO;AAAA,IACX,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,cAAc,oBAAoB,YAAY;AAAA,IAC9C;AAAA,IACA,GAAI,gBAAgB,UAAa,EAAE,YAAY;AAAA,IAC/C,GAAI,gBAAgB,UAAa,EAAE,YAAY;AAAA,IAC/C,GAAI,eAAe,UAAa,EAAE,WAAW;AAAA,IAC7C,GAAI,gBAAgB,UAAa,EAAE,YAAY;AAAA,EACjD;AAEA,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,IAAI;AAAA,MACJ,WAAW,aAAa;AAAA;AAAA,EAC1B;AAEJ;","names":["org","result","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","processSummaryItem","processMovieItem","jsx","processSummaryItem","processCourseItem","data","jsx","jsx","jsx","processImage","jsx","processQuestion","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","processQuantitativeValue","jsx","jsx"]}