@reblu/site-blocks 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -13129,11 +13129,21 @@ function slotClassName(structural, defaults, consumer) {
13129
13129
  }
13130
13130
 
13131
13131
  // src/components/markdown-renderer.tsx
13132
- import { Fragment, jsx } from "react/jsx-runtime";
13132
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13133
13133
  var HTML_TO_DOM_OPTIONS = { lowerCaseAttributeNames: false };
13134
13134
  function parse3(html5, options) {
13135
13135
  return domToReact(htmlToDOM(html5, HTML_TO_DOM_OPTIONS), options);
13136
13136
  }
13137
+ function isAllowedImage(src, prefixes) {
13138
+ if (!src) return false;
13139
+ let url;
13140
+ try {
13141
+ url = new URL(src);
13142
+ } catch {
13143
+ return false;
13144
+ }
13145
+ return prefixes.some((prefix) => url.href.startsWith(prefix));
13146
+ }
13137
13147
  var HEADING_CLASSES = {
13138
13148
  1: "text-3xl font-bold mt-8 mb-4 first:mt-0",
13139
13149
  2: "text-2xl font-bold mt-7 mb-3 first:mt-0",
@@ -13183,10 +13193,49 @@ function authorAttributes(el) {
13183
13193
  function isExternalHref(href) {
13184
13194
  return !!href && /^(https?:)?\/\//.test(href);
13185
13195
  }
13186
- function buildOptions(headingOffset) {
13196
+ function soleImage(p2) {
13197
+ let image = null;
13198
+ for (const child of p2.children) {
13199
+ if (child instanceof Element) {
13200
+ if (child.name !== "img" || image) return null;
13201
+ image = child;
13202
+ } else if (child.type !== "text" || child.data?.trim()) {
13203
+ return null;
13204
+ }
13205
+ }
13206
+ return image;
13207
+ }
13208
+ function buildOptions(headingOffset, images) {
13209
+ const renderImage = (img) => {
13210
+ if (!images || !isAllowedImage(img.attribs.src, images.allowedUrlPrefixes)) return null;
13211
+ const image = { src: img.attribs.src, alt: img.attribs.alt ?? "" };
13212
+ if (images.render) return /* @__PURE__ */ jsx(Fragment, { children: images.render(image) });
13213
+ return /* @__PURE__ */ jsx(
13214
+ "img",
13215
+ {
13216
+ src: image.src,
13217
+ alt: image.alt,
13218
+ loading: "lazy",
13219
+ decoding: "async",
13220
+ className: "rounded-lg w-full h-auto"
13221
+ }
13222
+ );
13223
+ };
13187
13224
  const options = {
13188
13225
  replace: (node) => {
13189
13226
  if (!(node instanceof Element)) return void 0;
13227
+ if (images && node.name === "p") {
13228
+ const img = soleImage(node);
13229
+ if (img) {
13230
+ const rendered = renderImage(img);
13231
+ if (rendered === null) return /* @__PURE__ */ jsx(Fragment, {});
13232
+ const caption = img.attribs.title?.trim();
13233
+ return /* @__PURE__ */ jsxs("figure", { className: "my-8", children: [
13234
+ rendered,
13235
+ caption ? /* @__PURE__ */ jsx("figcaption", { className: "mt-2 text-center text-sm text-muted-foreground", children: caption }) : null
13236
+ ] });
13237
+ }
13238
+ }
13190
13239
  const children2 = () => domToReact(node.children, options);
13191
13240
  const { name, attribs } = node;
13192
13241
  const author = authorAttributes(node);
@@ -13245,6 +13294,7 @@ function buildOptions(headingOffset) {
13245
13294
  );
13246
13295
  }
13247
13296
  case "img":
13297
+ if (images) return renderImage(node) ?? /* @__PURE__ */ jsx(Fragment, {});
13248
13298
  if (!attribs.src) return /* @__PURE__ */ jsx(Fragment, {});
13249
13299
  return (
13250
13300
  // Plain <img> keeps the block portable — a distributable can't assume a
@@ -13288,10 +13338,15 @@ function buildOptions(headingOffset) {
13288
13338
  };
13289
13339
  return options;
13290
13340
  }
13291
- function MarkdownRenderer({ content, className, headingOffset = 0 }) {
13341
+ function MarkdownRenderer({
13342
+ content,
13343
+ className,
13344
+ headingOffset = 0,
13345
+ images
13346
+ }) {
13292
13347
  const html5 = markdownToSafeHtml(content);
13293
13348
  if (!html5) return null;
13294
- return /* @__PURE__ */ jsx("div", { className: slotClassName("max-w-none", "", className), "data-slot": "markdown", children: parse3(html5, buildOptions(headingOffset)) });
13349
+ return /* @__PURE__ */ jsx("div", { className: slotClassName("max-w-none", "", className), "data-slot": "markdown", children: parse3(html5, buildOptions(headingOffset, images)) });
13295
13350
  }
13296
13351
  function SafeHtml({ html: html5, className, headingOffset = 0 }) {
13297
13352
  if (!html5) return null;
@@ -13299,7 +13354,7 @@ function SafeHtml({ html: html5, className, headingOffset = 0 }) {
13299
13354
  }
13300
13355
 
13301
13356
  // src/components/course-description.tsx
13302
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
13357
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
13303
13358
  function isVisiblyEmpty(html5) {
13304
13359
  if (/<(img|iframe|hr)\b/i.test(html5)) return false;
13305
13360
  return html5.replace(/<[^>]*>/g, "").trim() === "";
@@ -13330,7 +13385,7 @@ function CourseDescription({
13330
13385
  return /* @__PURE__ */ jsx2("div", { "data-slot": "course-description", className, children: body3 });
13331
13386
  }
13332
13387
  const Tag = `h${headingLevel}`;
13333
- return /* @__PURE__ */ jsxs(
13388
+ return /* @__PURE__ */ jsxs2(
13334
13389
  "section",
13335
13390
  {
13336
13391
  "data-slot": "course-description",
@@ -13350,7 +13405,7 @@ import { cn as cn3 } from "@reblu/site-ui/utils";
13350
13405
  // src/components/_page-parts.tsx
13351
13406
  import { cn as cn2 } from "@reblu/site-ui/utils";
13352
13407
  import { buttonVariants } from "@reblu/site-ui/button-variants";
13353
- import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
13408
+ import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
13354
13409
  var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
13355
13410
  "default",
13356
13411
  "destructive",
@@ -13363,7 +13418,7 @@ function toButtonVariant(variant) {
13363
13418
  return variant && KNOWN_BUTTON_VARIANTS.has(variant) ? variant : "default";
13364
13419
  }
13365
13420
  function PageHero({ page }) {
13366
- return /* @__PURE__ */ jsxs2("header", { className: "space-y-4", children: [
13421
+ return /* @__PURE__ */ jsxs3("header", { className: "space-y-4", children: [
13367
13422
  page.category && /* @__PURE__ */ jsx3("span", { className: "inline-flex items-center rounded-full bg-secondary px-3 py-1 text-sm font-medium text-secondary-foreground", children: page.category.name }),
13368
13423
  /* @__PURE__ */ jsx3("h1", { className: "text-4xl font-bold tracking-tight", children: page.title }),
13369
13424
  page.subtitle && /* @__PURE__ */ jsx3("p", { className: "text-lg text-muted-foreground", children: page.subtitle }),
@@ -13396,7 +13451,7 @@ function SectionCta({ section }) {
13396
13451
  }
13397
13452
  function SectionImages({ section }) {
13398
13453
  if (section.images.length === 0) return null;
13399
- return /* @__PURE__ */ jsx3("div", { className: cn2("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ jsxs2("figure", { className: "space-y-1", children: [
13454
+ return /* @__PURE__ */ jsx3("div", { className: cn2("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ jsxs3("figure", { className: "space-y-1", children: [
13400
13455
  /* @__PURE__ */ jsx3("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx3("img", { src: img.url, alt: img.alt, loading: "lazy", className: "h-full w-full object-cover" }) }),
13401
13456
  img.caption && /* @__PURE__ */ jsx3("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
13402
13457
  ] }, `${img.url}-${img.order}`)) });
@@ -13405,21 +13460,21 @@ function PageSectionBlock({ section }) {
13405
13460
  const imageFirst = section.layout === "IMAGE_TEXT";
13406
13461
  const sideBySide = section.layout === "TEXT_IMAGE" || section.layout === "IMAGE_TEXT";
13407
13462
  const hasImages = section.images.length > 0;
13408
- const body3 = /* @__PURE__ */ jsxs2("div", { className: "space-y-4", children: [
13463
+ const body3 = /* @__PURE__ */ jsxs3("div", { className: "space-y-4", children: [
13409
13464
  section.heading && /* @__PURE__ */ jsx3("h2", { className: "text-2xl font-bold", children: section.heading }),
13410
13465
  /* @__PURE__ */ jsx3(SafeHtml, { html: sanitizeHtml(section.contentHtml), headingOffset: 2 }),
13411
13466
  /* @__PURE__ */ jsx3(SectionCta, { section })
13412
13467
  ] });
13413
13468
  if (sideBySide && hasImages) {
13414
- return /* @__PURE__ */ jsx3("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ jsxs2(Fragment2, { children: [
13469
+ return /* @__PURE__ */ jsx3("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
13415
13470
  /* @__PURE__ */ jsx3(SectionImages, { section }),
13416
13471
  body3
13417
- ] }) : /* @__PURE__ */ jsxs2(Fragment2, { children: [
13472
+ ] }) : /* @__PURE__ */ jsxs3(Fragment2, { children: [
13418
13473
  body3,
13419
13474
  /* @__PURE__ */ jsx3(SectionImages, { section })
13420
13475
  ] }) });
13421
13476
  }
13422
- return /* @__PURE__ */ jsxs2("section", { className: "space-y-4", children: [
13477
+ return /* @__PURE__ */ jsxs3("section", { className: "space-y-4", children: [
13423
13478
  body3,
13424
13479
  /* @__PURE__ */ jsx3(SectionImages, { section })
13425
13480
  ] });
@@ -13431,9 +13486,9 @@ function PageSectionList({ sections }) {
13431
13486
  }
13432
13487
 
13433
13488
  // src/components/treatment.tsx
13434
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
13489
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
13435
13490
  function Treatment({ page, className }) {
13436
- return /* @__PURE__ */ jsxs3("article", { className: cn3("space-y-12", className), "data-slot": "treatment", children: [
13491
+ return /* @__PURE__ */ jsxs4("article", { className: cn3("space-y-12", className), "data-slot": "treatment", children: [
13437
13492
  /* @__PURE__ */ jsx4(PageHero, { page }),
13438
13493
  /* @__PURE__ */ jsx4(PageSectionList, { sections: page.sections })
13439
13494
  ] });
@@ -13444,7 +13499,7 @@ import { cn as cn5 } from "@reblu/site-ui/utils";
13444
13499
 
13445
13500
  // src/components/page-card-grid.tsx
13446
13501
  import { cn as cn4 } from "@reblu/site-ui/utils";
13447
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
13502
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
13448
13503
  var defaultPageHref = (page) => `/${page.slug}`;
13449
13504
  var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
13450
13505
  function PageCardGrid(props) {
@@ -13459,9 +13514,9 @@ function PageCardGridSection({
13459
13514
  }) {
13460
13515
  if (pages.length === 0) return null;
13461
13516
  const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
13462
- return /* @__PURE__ */ jsxs4("section", { className: cn4("space-y-6", className), children: [
13517
+ return /* @__PURE__ */ jsxs5("section", { className: cn4("space-y-6", className), children: [
13463
13518
  showHeading && /* @__PURE__ */ jsx5("h2", { className: "text-2xl font-bold", children: heading }),
13464
- /* @__PURE__ */ jsx5("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((page) => /* @__PURE__ */ jsx5("li", { children: /* @__PURE__ */ jsxs4(
13519
+ /* @__PURE__ */ jsx5("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((page) => /* @__PURE__ */ jsx5("li", { children: /* @__PURE__ */ jsxs5(
13465
13520
  "a",
13466
13521
  {
13467
13522
  href: pageHref(page),
@@ -13476,7 +13531,7 @@ function PageCardGridSection({
13476
13531
  className: "h-full w-full object-cover transition-transform group-hover:scale-105"
13477
13532
  }
13478
13533
  ) }),
13479
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
13534
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
13480
13535
  /* @__PURE__ */ jsx5("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
13481
13536
  page.excerpt && /* @__PURE__ */ jsx5("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
13482
13537
  ] })
@@ -13487,7 +13542,7 @@ function PageCardGridSection({
13487
13542
  }
13488
13543
 
13489
13544
  // src/components/parent-page.tsx
13490
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
13545
+ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
13491
13546
  var defaultChildPageHref = (slug) => `/${slug}`;
13492
13547
  function ParentPage({
13493
13548
  page,
@@ -13502,7 +13557,7 @@ function ParentPage({
13502
13557
  const pages = childPages ?? treatments ?? [];
13503
13558
  const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
13504
13559
  const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
13505
- return /* @__PURE__ */ jsxs5("article", { className: cn5("space-y-12", className), "data-slot": "specialty", children: [
13560
+ return /* @__PURE__ */ jsxs6("article", { className: cn5("space-y-12", className), "data-slot": "specialty", children: [
13506
13561
  /* @__PURE__ */ jsx6(PageHero, { page }),
13507
13562
  /* @__PURE__ */ jsx6(PageSectionList, { sections: page.sections }),
13508
13563
  /* @__PURE__ */ jsx6(
@@ -13522,13 +13577,13 @@ var Specialty = ParentPage;
13522
13577
 
13523
13578
  // src/components/profile-card.tsx
13524
13579
  import { cn as cn6 } from "@reblu/site-ui/utils";
13525
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
13580
+ import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
13526
13581
  function initials(name) {
13527
13582
  return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
13528
13583
  }
13529
13584
  function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, className }) {
13530
13585
  const NameTag = href ? "a" : "span";
13531
- return /* @__PURE__ */ jsxs6(
13586
+ return /* @__PURE__ */ jsxs7(
13532
13587
  "article",
13533
13588
  {
13534
13589
  className: cn6(
@@ -13538,7 +13593,7 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
13538
13593
  "data-slot": "profile-card",
13539
13594
  children: [
13540
13595
  /* @__PURE__ */ jsx7("div", { className: "relative h-24 w-24 overflow-hidden rounded-full bg-muted", children: imageUrl ? /* @__PURE__ */ jsx7("img", { src: imageUrl, alt: name, loading: "lazy", className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx7("span", { className: "flex h-full w-full items-center justify-center text-2xl font-semibold text-muted-foreground", "aria-hidden": "true", children: initials(name) }) }),
13541
- /* @__PURE__ */ jsxs6("div", { className: "space-y-1", children: [
13596
+ /* @__PURE__ */ jsxs7("div", { className: "space-y-1", children: [
13542
13597
  /* @__PURE__ */ jsx7("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ jsx7(
13543
13598
  NameTag,
13544
13599
  {
@@ -13564,11 +13619,11 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
13564
13619
 
13565
13620
  // src/components/product-card.tsx
13566
13621
  import { cn as cn7 } from "@reblu/site-ui/utils";
13567
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
13622
+ import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
13568
13623
  function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
13569
13624
  const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
13570
13625
  const hasDiscount = product.comparePrice != null && product.comparePrice > product.price;
13571
- return /* @__PURE__ */ jsxs7(
13626
+ return /* @__PURE__ */ jsxs8(
13572
13627
  "article",
13573
13628
  {
13574
13629
  className: cn7(
@@ -13586,11 +13641,11 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
13586
13641
  className: "h-full w-full object-cover transition-transform group-hover:scale-105"
13587
13642
  }
13588
13643
  ) : /* @__PURE__ */ jsx8("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
13589
- /* @__PURE__ */ jsxs7("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
13644
+ /* @__PURE__ */ jsxs8("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
13590
13645
  product.category && /* @__PURE__ */ jsx8("span", { className: "inline-flex w-fit items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground", children: product.category.name }),
13591
13646
  /* @__PURE__ */ jsx8("h3", { className: "text-base font-semibold leading-tight", children: href ? /* @__PURE__ */ jsx8("a", { href, className: "transition-colors hover:text-primary", children: product.name }) : product.name }),
13592
13647
  product.shortDescription && /* @__PURE__ */ jsx8("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
13593
- /* @__PURE__ */ jsxs7("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
13648
+ /* @__PURE__ */ jsxs8("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
13594
13649
  /* @__PURE__ */ jsx8("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
13595
13650
  hasDiscount && /* @__PURE__ */ jsx8("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
13596
13651
  ] })
@@ -13794,7 +13849,7 @@ var __iconNode8 = [
13794
13849
  var Truck = createLucideIcon("truck", __iconNode8);
13795
13850
 
13796
13851
  // src/components/product-trust-items.tsx
13797
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
13852
+ import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
13798
13853
  var DEFAULT_TRUST_ICONS = Object.freeze({
13799
13854
  shipping: Truck,
13800
13855
  returns: RotateCcw,
@@ -13828,7 +13883,7 @@ function ProductTrustItems({
13828
13883
  return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
13829
13884
  });
13830
13885
  if (rows.length === 0) return null;
13831
- return /* @__PURE__ */ jsx9(List, { "data-slot": "product-trust-items", className: slotClassName("space-y-2.5", "", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ jsxs8("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
13886
+ return /* @__PURE__ */ jsx9(List, { "data-slot": "product-trust-items", className: slotClassName("space-y-2.5", "", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ jsxs9("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
13832
13887
  /* @__PURE__ */ jsx9(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
13833
13888
  /* @__PURE__ */ jsx9("span", { children: text3 })
13834
13889
  ] }, key2)) });
@@ -13852,7 +13907,7 @@ function Heading({
13852
13907
  }
13853
13908
 
13854
13909
  // src/components/faq-accordion.tsx
13855
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
13910
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
13856
13911
  function FaqAccordion({
13857
13912
  items,
13858
13913
  heading,
@@ -13863,16 +13918,16 @@ function FaqAccordion({
13863
13918
  }) {
13864
13919
  const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
13865
13920
  if (visible.length === 0) return null;
13866
- return /* @__PURE__ */ jsxs9("div", { className: cn8("space-y-4", className), "data-slot": "faq-accordion", children: [
13921
+ return /* @__PURE__ */ jsxs10("div", { className: cn8("space-y-4", className), "data-slot": "faq-accordion", children: [
13867
13922
  heading && /* @__PURE__ */ jsx11(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
13868
- /* @__PURE__ */ jsx11("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ jsxs9(
13923
+ /* @__PURE__ */ jsx11("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ jsxs10(
13869
13924
  "details",
13870
13925
  {
13871
13926
  className: "group px-4",
13872
13927
  "data-slot": "faq-item",
13873
13928
  ...defaultOpen.includes(index) ? { open: true } : {},
13874
13929
  children: [
13875
- /* @__PURE__ */ jsxs9("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4 py-4 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden", children: [
13930
+ /* @__PURE__ */ jsxs10("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4 py-4 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden", children: [
13876
13931
  questionHeadingLevel ? /* @__PURE__ */ jsx11(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ jsx11("span", { children: item.q }),
13877
13932
  /* @__PURE__ */ jsx11(
13878
13933
  "span",
@@ -13893,7 +13948,7 @@ function FaqAccordion({
13893
13948
 
13894
13949
  // src/components/trust-badges.tsx
13895
13950
  import { cn as cn9 } from "@reblu/site-ui/utils";
13896
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
13951
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
13897
13952
  var DEFAULT_TRUST_BADGE_HEADINGS = Object.freeze(
13898
13953
  {
13899
13954
  PARTNER: "Colaboradores",
@@ -13974,7 +14029,7 @@ function TrustBadges({
13974
14029
  if (groups.length === 0) return null;
13975
14030
  const hasHeading = heading !== void 0 && heading !== null && heading !== "";
13976
14031
  const groupHeadingLevel = hasHeading ? nextHeadingLevel(headingLevel) : headingLevel;
13977
- const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ jsxs10(
14032
+ const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ jsxs11(
13978
14033
  "div",
13979
14034
  {
13980
14035
  "data-slot": "trust-badge-group",
@@ -13995,7 +14050,7 @@ function TrustBadges({
13995
14050
  ) : null,
13996
14051
  /* @__PURE__ */ jsx12("ul", { className: cn9("flex flex-wrap items-center gap-6", listClassName), children: items.map((badge) => {
13997
14052
  const href = safeHref(badge.url);
13998
- return /* @__PURE__ */ jsx12("li", { children: href ? /* @__PURE__ */ jsxs10("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
14053
+ return /* @__PURE__ */ jsx12("li", { children: href ? /* @__PURE__ */ jsxs11("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
13999
14054
  /* @__PURE__ */ jsx12(BadgeContent, { badge, logoClassName }),
14000
14055
  " ",
14001
14056
  /* @__PURE__ */ jsx12("span", { className: "sr-only", children: newWindowLabel })
@@ -14009,7 +14064,7 @@ function TrustBadges({
14009
14064
  return /* @__PURE__ */ jsx12("div", { "data-slot": "trust-badges", className: cn9("space-y-6", className), children: content });
14010
14065
  }
14011
14066
  const Tag = `h${headingLevel}`;
14012
- return /* @__PURE__ */ jsxs10(
14067
+ return /* @__PURE__ */ jsxs11(
14013
14068
  "section",
14014
14069
  {
14015
14070
  "data-slot": "trust-badges",
@@ -14033,14 +14088,14 @@ function TrustBadges({
14033
14088
  // src/components/page-blocks.tsx
14034
14089
  import { cn as cn10 } from "@reblu/site-ui/utils";
14035
14090
  import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
14036
- import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
14091
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
14037
14092
  var ALIASES = {
14038
14093
  doctor_embed: "profile_embed",
14039
14094
  specialty_embed: "page_embed"
14040
14095
  };
14041
14096
  function HeroBlock({ block, headingLevel }) {
14042
14097
  const { title, subtitle, imageUrl } = block.data;
14043
- return /* @__PURE__ */ jsxs11("div", { className: "space-y-4", children: [
14098
+ return /* @__PURE__ */ jsxs12("div", { className: "space-y-4", children: [
14044
14099
  /* @__PURE__ */ jsx13(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
14045
14100
  subtitle && /* @__PURE__ */ jsx13("p", { className: "text-lg opacity-80", children: subtitle }),
14046
14101
  imageUrl && /* @__PURE__ */ jsx13("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx13("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
@@ -14053,16 +14108,16 @@ function FaqBlock({ block }) {
14053
14108
  return /* @__PURE__ */ jsx13(FaqAccordion, { items: block.data.items });
14054
14109
  }
14055
14110
  function StatsBlock({ block }) {
14056
- return /* @__PURE__ */ jsx13("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs11("div", { className: "flex flex-col-reverse gap-1", children: [
14111
+ return /* @__PURE__ */ jsx13("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs12("div", { className: "flex flex-col-reverse gap-1", children: [
14057
14112
  /* @__PURE__ */ jsx13("dt", { className: "text-sm opacity-80", children: item.label }),
14058
14113
  /* @__PURE__ */ jsx13("dd", { className: "text-3xl font-bold", children: item.value })
14059
14114
  ] }, i)) });
14060
14115
  }
14061
14116
  function TestimonialBlock({ block }) {
14062
14117
  const { quote, author, role, avatarUrl } = block.data;
14063
- return /* @__PURE__ */ jsxs11("figure", { className: "space-y-4", children: [
14118
+ return /* @__PURE__ */ jsxs12("figure", { className: "space-y-4", children: [
14064
14119
  /* @__PURE__ */ jsx13("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx13("p", { children: quote }) }),
14065
- /* @__PURE__ */ jsxs11("figcaption", { className: "flex items-center gap-3", children: [
14120
+ /* @__PURE__ */ jsxs12("figcaption", { className: "flex items-center gap-3", children: [
14066
14121
  avatarUrl && // eslint-disable-next-line @next/next/no-img-element
14067
14122
  /* @__PURE__ */ jsx13(
14068
14123
  "img",
@@ -14073,7 +14128,7 @@ function TestimonialBlock({ block }) {
14073
14128
  className: "h-10 w-10 rounded-full object-cover"
14074
14129
  }
14075
14130
  ),
14076
- /* @__PURE__ */ jsxs11("span", { children: [
14131
+ /* @__PURE__ */ jsxs12("span", { children: [
14077
14132
  /* @__PURE__ */ jsx13("span", { className: "font-semibold", children: author }),
14078
14133
  role && /* @__PURE__ */ jsx13("span", { className: "block text-sm opacity-80", children: role })
14079
14134
  ] })
@@ -14095,7 +14150,7 @@ function GalleryBlock({ block }) {
14095
14150
  "grid gap-4",
14096
14151
  images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
14097
14152
  ),
14098
- children: images.map((img, i) => /* @__PURE__ */ jsxs11("figure", { className: "space-y-1", children: [
14153
+ children: images.map((img, i) => /* @__PURE__ */ jsxs12("figure", { className: "space-y-1", children: [
14099
14154
  /* @__PURE__ */ jsx13("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx13(
14100
14155
  "img",
14101
14156
  {
@@ -14115,7 +14170,7 @@ function EmbedCard({
14115
14170
  headingLevel,
14116
14171
  embedHref
14117
14172
  }) {
14118
- return /* @__PURE__ */ jsxs11(
14173
+ return /* @__PURE__ */ jsxs12(
14119
14174
  "a",
14120
14175
  {
14121
14176
  href: embedHref(resolved),
@@ -14130,7 +14185,7 @@ function EmbedCard({
14130
14185
  className: "h-full w-full object-cover"
14131
14186
  }
14132
14187
  ) }),
14133
- /* @__PURE__ */ jsxs11("div", { className: "space-y-1 p-4", children: [
14188
+ /* @__PURE__ */ jsxs12("div", { className: "space-y-1 p-4", children: [
14134
14189
  /* @__PURE__ */ jsx13(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
14135
14190
  resolved.role && /* @__PURE__ */ jsx13("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
14136
14191
  resolved.excerpt && /* @__PURE__ */ jsx13("p", { className: "text-muted-foreground", children: resolved.excerpt })
@@ -14237,7 +14292,7 @@ function PageBlocks({
14237
14292
  const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
14238
14293
  const background = block.backgroundColor;
14239
14294
  return [
14240
- /* @__PURE__ */ jsxs11(
14295
+ /* @__PURE__ */ jsxs12(
14241
14296
  "section",
14242
14297
  {
14243
14298
  "data-slot": "page-block",
@@ -14268,7 +14323,7 @@ function PageBlocks({
14268
14323
 
14269
14324
  // src/components/shop-filters.tsx
14270
14325
  import { cn as cn11 } from "@reblu/site-ui/utils";
14271
- import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
14326
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
14272
14327
  var DEFAULT_SHOP_PRICE_BANDS = [
14273
14328
  { max: 2500 },
14274
14329
  { min: 2500, max: 5e3 },
@@ -14330,7 +14385,7 @@ function OptionLink({ href, active, label, onActivate }) {
14330
14385
  );
14331
14386
  }
14332
14387
  function FilterFieldset({ legend, children: children2 }) {
14333
- return /* @__PURE__ */ jsxs12("fieldset", { className: "space-y-2", children: [
14388
+ return /* @__PURE__ */ jsxs13("fieldset", { className: "space-y-2", children: [
14334
14389
  /* @__PURE__ */ jsx14("legend", { className: "text-sm font-medium text-foreground", children: legend }),
14335
14390
  /* @__PURE__ */ jsx14("div", { className: "flex flex-wrap gap-2", children: children2 })
14336
14391
  ] });
@@ -14355,10 +14410,10 @@ function ShopFilters({
14355
14410
  if (!shouldRenderShopFilters(facets, active)) {
14356
14411
  return null;
14357
14412
  }
14358
- return /* @__PURE__ */ jsxs12("div", { className: cn11("space-y-6", className), "data-slot": "shop-filters", children: [
14413
+ return /* @__PURE__ */ jsxs13("div", { className: cn11("space-y-6", className), "data-slot": "shop-filters", children: [
14359
14414
  visibleTaxonomies.map((axis) => {
14360
14415
  const activeSlug = active.taxonomy?.[axis.key];
14361
- return /* @__PURE__ */ jsxs12(FilterFieldset, { legend: axis.label, children: [
14416
+ return /* @__PURE__ */ jsxs13(FilterFieldset, { legend: axis.label, children: [
14362
14417
  /* @__PURE__ */ jsx14(
14363
14418
  OptionLink,
14364
14419
  {
@@ -14455,7 +14510,7 @@ function ShopFilters({
14455
14510
 
14456
14511
  // src/components/cart-line-list.tsx
14457
14512
  import { cn as cn12 } from "@reblu/site-ui/utils";
14458
- import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
14513
+ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
14459
14514
  var DEFAULT_LABELS2 = {
14460
14515
  quantityLabel: "Cantidad",
14461
14516
  decrease: "Reducir cantidad",
@@ -14481,7 +14536,7 @@ function CartLineList({
14481
14536
  }) {
14482
14537
  const t = { ...DEFAULT_LABELS2, ...labels };
14483
14538
  const noticeContent = notice === true ? t.cancelledNotice : notice;
14484
- return /* @__PURE__ */ jsxs13("div", { className: cn12("space-y-4", className), "data-slot": "cart-line-list", children: [
14539
+ return /* @__PURE__ */ jsxs14("div", { className: cn12("space-y-4", className), "data-slot": "cart-line-list", children: [
14485
14540
  /* @__PURE__ */ jsx15("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
14486
14541
  noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx15(
14487
14542
  "div",
@@ -14497,21 +14552,21 @@ function CartLineList({
14497
14552
  const atMax = item.quantity >= maxQty;
14498
14553
  const atMin = item.quantity <= 1;
14499
14554
  const message = lineMessage?.(item);
14500
- return /* @__PURE__ */ jsxs13(
14555
+ return /* @__PURE__ */ jsxs14(
14501
14556
  "li",
14502
14557
  {
14503
14558
  className: "flex gap-4 rounded-xl border border-border bg-card p-4",
14504
14559
  children: [
14505
14560
  /* @__PURE__ */ jsx15("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ jsx15("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
14506
- /* @__PURE__ */ jsxs13("div", { className: "min-w-0 flex-1", children: [
14561
+ /* @__PURE__ */ jsxs14("div", { className: "min-w-0 flex-1", children: [
14507
14562
  /* @__PURE__ */ jsx15("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
14508
14563
  item.variantName && /* @__PURE__ */ jsx15("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
14509
- /* @__PURE__ */ jsxs13("p", { className: "mt-1 text-sm text-muted-foreground", children: [
14564
+ /* @__PURE__ */ jsxs14("p", { className: "mt-1 text-sm text-muted-foreground", children: [
14510
14565
  formatPrice(item.unitPrice, currencyCode, locale),
14511
14566
  " ",
14512
14567
  t.unitPriceSuffix
14513
14568
  ] }),
14514
- /* @__PURE__ */ jsxs13(
14569
+ /* @__PURE__ */ jsxs14(
14515
14570
  "div",
14516
14571
  {
14517
14572
  role: "group",
@@ -14574,7 +14629,7 @@ function CartLineList({
14574
14629
 
14575
14630
  // src/components/cart-summary.tsx
14576
14631
  import { cn as cn13 } from "@reblu/site-ui/utils";
14577
- import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
14632
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
14578
14633
  var DEFAULT_LABELS3 = {
14579
14634
  subtotal: "Subtotal",
14580
14635
  discountPrefix: "Descuento",
@@ -14601,31 +14656,31 @@ function CartSummary({
14601
14656
  const hasDiscount = Boolean(discount && discount > 0);
14602
14657
  const noticeContent = notice === true ? t.cancelledNotice : notice;
14603
14658
  const hasNotice = noticeContent != null && noticeContent !== false;
14604
- const breakdown = /* @__PURE__ */ jsxs14(
14659
+ const breakdown = /* @__PURE__ */ jsxs15(
14605
14660
  "dl",
14606
14661
  {
14607
14662
  className: cn13("space-y-2 text-sm", !hasNotice && className),
14608
14663
  "data-slot": "cart-summary",
14609
14664
  children: [
14610
- /* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-muted-foreground", children: [
14665
+ /* @__PURE__ */ jsxs15("div", { className: "flex justify-between text-muted-foreground", children: [
14611
14666
  /* @__PURE__ */ jsx16("dt", { children: t.subtotal }),
14612
14667
  /* @__PURE__ */ jsx16("dd", { children: formatPrice(subtotal, currencyCode, locale) })
14613
14668
  ] }),
14614
- hasDiscount && /* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
14615
- /* @__PURE__ */ jsxs14("dt", { children: [
14669
+ hasDiscount && /* @__PURE__ */ jsxs15("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
14670
+ /* @__PURE__ */ jsxs15("dt", { children: [
14616
14671
  t.discountPrefix,
14617
14672
  discountCode ? ` (${discountCode})` : ""
14618
14673
  ] }),
14619
- /* @__PURE__ */ jsxs14("dd", { children: [
14674
+ /* @__PURE__ */ jsxs15("dd", { children: [
14620
14675
  "-",
14621
14676
  formatPrice(discount, currencyCode, locale)
14622
14677
  ] })
14623
14678
  ] }),
14624
- shippingEnabled && /* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-muted-foreground", children: [
14679
+ shippingEnabled && /* @__PURE__ */ jsxs15("div", { className: "flex justify-between text-muted-foreground", children: [
14625
14680
  /* @__PURE__ */ jsx16("dt", { children: t.shipping }),
14626
14681
  /* @__PURE__ */ jsx16("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
14627
14682
  ] }),
14628
- /* @__PURE__ */ jsxs14("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
14683
+ /* @__PURE__ */ jsxs15("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
14629
14684
  /* @__PURE__ */ jsx16("dt", { children: t.total }),
14630
14685
  /* @__PURE__ */ jsx16("dd", { children: formatPrice(total, currencyCode, locale) })
14631
14686
  ] })
@@ -14633,7 +14688,7 @@ function CartSummary({
14633
14688
  }
14634
14689
  );
14635
14690
  if (!hasNotice) return breakdown;
14636
- return /* @__PURE__ */ jsxs14("div", { className: cn13("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
14691
+ return /* @__PURE__ */ jsxs15("div", { className: cn13("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
14637
14692
  /* @__PURE__ */ jsx16(
14638
14693
  "div",
14639
14694
  {
@@ -14696,7 +14751,7 @@ function CartAdjustmentsNotice({
14696
14751
 
14697
14752
  // src/components/added-to-cart-toast.tsx
14698
14753
  import { cn as cn15 } from "@reblu/site-ui/utils";
14699
- import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
14754
+ import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
14700
14755
  var DEFAULT_LABELS5 = {
14701
14756
  success: "A\xF1adido al carrito",
14702
14757
  error: "No se pudo a\xF1adir al carrito",
@@ -14716,7 +14771,7 @@ function AddedToCartToast({
14716
14771
  const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
14717
14772
  const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
14718
14773
  const variant = status === "success" ? "success" : "error";
14719
- return /* @__PURE__ */ jsxs15(
14774
+ return /* @__PURE__ */ jsxs16(
14720
14775
  "div",
14721
14776
  {
14722
14777
  "data-slot": "added-to-cart-toast",
@@ -14730,7 +14785,7 @@ function AddedToCartToast({
14730
14785
  children: [
14731
14786
  hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
14732
14787
  /* @__PURE__ */ jsx18("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
14733
- /* @__PURE__ */ jsxs15("div", { className: "min-w-0 flex-1", children: [
14788
+ /* @__PURE__ */ jsxs16("div", { className: "min-w-0 flex-1", children: [
14734
14789
  /* @__PURE__ */ jsx18("p", { className: "truncate font-semibold text-foreground", children: productName }),
14735
14790
  /* @__PURE__ */ jsx18("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
14736
14791
  ] }),
@@ -14742,7 +14797,7 @@ function AddedToCartToast({
14742
14797
 
14743
14798
  // src/components/checkout-login-prompt.tsx
14744
14799
  import { cn as cn16 } from "@reblu/site-ui/utils";
14745
- import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
14800
+ import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
14746
14801
  var DEFAULT_LABELS6 = {
14747
14802
  title: "Identificaci\xF3n",
14748
14803
  description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
@@ -14769,9 +14824,9 @@ function CheckoutLoginPrompt({
14769
14824
  if (!open) return null;
14770
14825
  const t = { ...DEFAULT_LABELS6, ...labels };
14771
14826
  const isValidEmail = EMAIL_PATTERN.test(email.trim());
14772
- return /* @__PURE__ */ jsxs16(Fragment3, { children: [
14827
+ return /* @__PURE__ */ jsxs17(Fragment3, { children: [
14773
14828
  /* @__PURE__ */ jsx19("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
14774
- /* @__PURE__ */ jsxs16(
14829
+ /* @__PURE__ */ jsxs17(
14775
14830
  "div",
14776
14831
  {
14777
14832
  role: "dialog",
@@ -14783,8 +14838,8 @@ function CheckoutLoginPrompt({
14783
14838
  className
14784
14839
  ),
14785
14840
  children: [
14786
- /* @__PURE__ */ jsxs16("div", { className: "flex items-start justify-between gap-3", children: [
14787
- /* @__PURE__ */ jsxs16("div", { children: [
14841
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-start justify-between gap-3", children: [
14842
+ /* @__PURE__ */ jsxs17("div", { children: [
14788
14843
  /* @__PURE__ */ jsx19("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
14789
14844
  /* @__PURE__ */ jsx19("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
14790
14845
  ] }),
@@ -14799,7 +14854,7 @@ function CheckoutLoginPrompt({
14799
14854
  }
14800
14855
  )
14801
14856
  ] }),
14802
- /* @__PURE__ */ jsxs16("div", { className: "space-y-2", children: [
14857
+ /* @__PURE__ */ jsxs17("div", { className: "space-y-2", children: [
14803
14858
  /* @__PURE__ */ jsx19("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
14804
14859
  /* @__PURE__ */ jsx19(
14805
14860
  "input",
@@ -14818,7 +14873,7 @@ function CheckoutLoginPrompt({
14818
14873
  ),
14819
14874
  error && /* @__PURE__ */ jsx19("p", { className: "text-xs text-destructive", children: error })
14820
14875
  ] }),
14821
- /* @__PURE__ */ jsxs16("div", { className: "space-y-2", children: [
14876
+ /* @__PURE__ */ jsxs17("div", { className: "space-y-2", children: [
14822
14877
  /* @__PURE__ */ jsx19(
14823
14878
  "button",
14824
14879
  {
@@ -14851,7 +14906,7 @@ function CheckoutLoginPrompt({
14851
14906
  // src/components/checkout-form.tsx
14852
14907
  import { cn as cn17 } from "@reblu/site-ui/utils";
14853
14908
  import { PhoneInput } from "@reblu/site-ui/phone-input";
14854
- import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
14909
+ import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
14855
14910
  var DEFAULT_LABELS7 = {
14856
14911
  contactTitle: "Datos de contacto",
14857
14912
  nameLabel: "Nombre completo",
@@ -14905,9 +14960,9 @@ function CheckoutForm({
14905
14960
  event.preventDefault();
14906
14961
  if (discountCode.trim() && !discountApplying) onApplyDiscount();
14907
14962
  }
14908
- return /* @__PURE__ */ jsxs17(Fragment4, { children: [
14963
+ return /* @__PURE__ */ jsxs18(Fragment4, { children: [
14909
14964
  loginPrompt,
14910
- /* @__PURE__ */ jsxs17(
14965
+ /* @__PURE__ */ jsxs18(
14911
14966
  "form",
14912
14967
  {
14913
14968
  "data-testid": "checkout-form",
@@ -14915,10 +14970,10 @@ function CheckoutForm({
14915
14970
  className: cn17("space-y-8", className),
14916
14971
  "data-slot": "checkout-form",
14917
14972
  children: [
14918
- /* @__PURE__ */ jsxs17("section", { className: "space-y-4", children: [
14973
+ /* @__PURE__ */ jsxs18("section", { className: "space-y-4", children: [
14919
14974
  /* @__PURE__ */ jsx20("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
14920
- /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
14921
- /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
14975
+ /* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
14976
+ /* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
14922
14977
  /* @__PURE__ */ jsx20("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
14923
14978
  /* @__PURE__ */ jsx20(
14924
14979
  "input",
@@ -14937,7 +14992,7 @@ function CheckoutForm({
14937
14992
  ),
14938
14993
  contactErrors?.name && /* @__PURE__ */ jsx20("p", { className: "text-xs text-destructive", children: contactErrors.name })
14939
14994
  ] }),
14940
- /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
14995
+ /* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
14941
14996
  /* @__PURE__ */ jsx20("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
14942
14997
  /* @__PURE__ */ jsx20(
14943
14998
  "input",
@@ -14971,10 +15026,10 @@ function CheckoutForm({
14971
15026
  ] }),
14972
15027
  children2,
14973
15028
  generalError ? /* @__PURE__ */ jsx20("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
14974
- /* @__PURE__ */ jsxs17("section", { className: "space-y-3", children: [
15029
+ /* @__PURE__ */ jsxs18("section", { className: "space-y-3", children: [
14975
15030
  /* @__PURE__ */ jsx20("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
14976
- appliedDiscount ? /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between rounded-lg border border-green-200 bg-green-50 px-4 py-3 dark:border-green-800 dark:bg-green-900/20", children: [
14977
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
15031
+ appliedDiscount ? /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between rounded-lg border border-green-200 bg-green-50 px-4 py-3 dark:border-green-800 dark:bg-green-900/20", children: [
15032
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
14978
15033
  /* @__PURE__ */ jsx20("span", { className: "font-semibold", children: appliedDiscount.code }),
14979
15034
  /* @__PURE__ */ jsx20("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
14980
15035
  ] }),
@@ -14988,7 +15043,7 @@ function CheckoutForm({
14988
15043
  children: t.removeDiscount
14989
15044
  }
14990
15045
  )
14991
- ] }) : /* @__PURE__ */ jsxs17("div", { className: "flex gap-2", children: [
15046
+ ] }) : /* @__PURE__ */ jsxs18("div", { className: "flex gap-2", children: [
14992
15047
  /* @__PURE__ */ jsx20("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
14993
15048
  /* @__PURE__ */ jsx20(
14994
15049
  "input",
@@ -15038,7 +15093,7 @@ import { cn as cn19 } from "@reblu/site-ui/utils";
15038
15093
 
15039
15094
  // src/components/order-invoice-link.tsx
15040
15095
  import { cn as cn18 } from "@reblu/site-ui/utils";
15041
- import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
15096
+ import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
15042
15097
  var DEFAULT_LABELS8 = {
15043
15098
  linkLabel: "Descargar la factura {number}",
15044
15099
  signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
@@ -15046,7 +15101,7 @@ var DEFAULT_LABELS8 = {
15046
15101
  function OrderInvoiceLink({ invoice, labels, className }) {
15047
15102
  if (!invoice) return null;
15048
15103
  const t = { ...DEFAULT_LABELS8, ...labels };
15049
- return /* @__PURE__ */ jsxs18("div", { className: cn18("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
15104
+ return /* @__PURE__ */ jsxs19("div", { className: cn18("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
15050
15105
  /* @__PURE__ */ jsx21(
15051
15106
  "a",
15052
15107
  {
@@ -15060,7 +15115,7 @@ function OrderInvoiceLink({ invoice, labels, className }) {
15060
15115
  }
15061
15116
 
15062
15117
  // src/components/order-confirmation.tsx
15063
- import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
15118
+ import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
15064
15119
  var DEFAULT_LABELS9 = {
15065
15120
  pollingTitle: "Confirmando tu pedido\u2026",
15066
15121
  pollingDescription: "Estamos procesando el pago, un momento\u2026",
@@ -15124,21 +15179,21 @@ function OrderConfirmation({
15124
15179
  const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
15125
15180
  const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
15126
15181
  const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
15127
- return /* @__PURE__ */ jsxs19("div", { className: cn19("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
15182
+ return /* @__PURE__ */ jsxs20("div", { className: cn19("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
15128
15183
  /* @__PURE__ */ jsx22("h1", { className: "text-3xl font-bold", children: title }),
15129
15184
  /* @__PURE__ */ jsx22("p", { className: "text-lg text-muted-foreground", children: description }),
15130
- showFullOrderSummary && order && /* @__PURE__ */ jsxs19("div", { className: "space-y-6", children: [
15131
- /* @__PURE__ */ jsxs19("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15185
+ showFullOrderSummary && order && /* @__PURE__ */ jsxs20("div", { className: "space-y-6", children: [
15186
+ /* @__PURE__ */ jsxs20("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15132
15187
  /* @__PURE__ */ jsx22("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
15133
15188
  /* @__PURE__ */ jsx22("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15134
15189
  ] }),
15135
- /* @__PURE__ */ jsxs19("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
15136
- order.items.map((item, idx) => /* @__PURE__ */ jsxs19(
15190
+ /* @__PURE__ */ jsxs20("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
15191
+ order.items.map((item, idx) => /* @__PURE__ */ jsxs20(
15137
15192
  "div",
15138
15193
  {
15139
15194
  className: "flex justify-between gap-4 text-sm",
15140
15195
  children: [
15141
- /* @__PURE__ */ jsxs19("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
15196
+ /* @__PURE__ */ jsxs20("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
15142
15197
  item.product.name,
15143
15198
  item.variant ? ` (${item.variant.name})` : "",
15144
15199
  " x",
@@ -15149,12 +15204,12 @@ function OrderConfirmation({
15149
15204
  },
15150
15205
  idx
15151
15206
  )),
15152
- /* @__PURE__ */ jsx22("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs19("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
15207
+ /* @__PURE__ */ jsx22("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs20("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
15153
15208
  /* @__PURE__ */ jsx22("span", { children: t.totalLabel }),
15154
15209
  /* @__PURE__ */ jsx22("span", { children: formatPrice(order.total, currencyCode, locale) })
15155
15210
  ] }) })
15156
15211
  ] }),
15157
- /* @__PURE__ */ jsxs19("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
15212
+ /* @__PURE__ */ jsxs20("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
15158
15213
  t.confirmationEmailPrefix,
15159
15214
  " ",
15160
15215
  /* @__PURE__ */ jsx22("span", { className: "font-medium text-foreground", children: order.customerEmail }),
@@ -15168,7 +15223,7 @@ function OrderConfirmation({
15168
15223
  }
15169
15224
  )
15170
15225
  ] }),
15171
- showOrderReference && order && /* @__PURE__ */ jsxs19("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15226
+ showOrderReference && order && /* @__PURE__ */ jsxs20("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15172
15227
  /* @__PURE__ */ jsx22("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
15173
15228
  /* @__PURE__ */ jsx22("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15174
15229
  ] }),
@@ -15189,7 +15244,7 @@ function OrderConfirmation({
15189
15244
  children: t.recheckLabel
15190
15245
  }
15191
15246
  ),
15192
- showSessionReference && /* @__PURE__ */ jsxs19("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15247
+ showSessionReference && /* @__PURE__ */ jsxs20("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15193
15248
  /* @__PURE__ */ jsx22("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
15194
15249
  /* @__PURE__ */ jsx22("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
15195
15250
  ] })
@@ -15198,7 +15253,7 @@ function OrderConfirmation({
15198
15253
 
15199
15254
  // src/components/full-invoice-fields.tsx
15200
15255
  import { cn as cn20 } from "@reblu/site-ui/utils";
15201
- import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
15256
+ import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
15202
15257
  var EMPTY_FULL_INVOICE_VALUE = {
15203
15258
  wantsFullInvoice: false,
15204
15259
  billingIdType: "NIF",
@@ -15317,9 +15372,9 @@ function FullInvoiceFields({
15317
15372
  const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
15318
15373
  const error = (key2) => errors[key2] ? /* @__PURE__ */ jsx23("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
15319
15374
  const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
15320
- return /* @__PURE__ */ jsxs20("section", { className: cn20("space-y-4", className), "data-slot": "full-invoice-fields", children: [
15321
- overCap ? /* @__PURE__ */ jsx23("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
15322
- /* @__PURE__ */ jsxs20("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
15375
+ return /* @__PURE__ */ jsxs21("section", { className: cn20("space-y-4", className), "data-slot": "full-invoice-fields", children: [
15376
+ overCap ? /* @__PURE__ */ jsx23("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
15377
+ /* @__PURE__ */ jsxs21("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
15323
15378
  /* @__PURE__ */ jsx23(
15324
15379
  "input",
15325
15380
  {
@@ -15332,8 +15387,8 @@ function FullInvoiceFields({
15332
15387
  ] }),
15333
15388
  /* @__PURE__ */ jsx23("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
15334
15389
  ] }),
15335
- showFields && /* @__PURE__ */ jsxs20("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15336
- /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
15390
+ showFields && /* @__PURE__ */ jsxs21("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15391
+ /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
15337
15392
  /* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
15338
15393
  /* @__PURE__ */ jsx23(
15339
15394
  "select",
@@ -15349,9 +15404,9 @@ function FullInvoiceFields({
15349
15404
  ),
15350
15405
  error("billingIdType")
15351
15406
  ] }),
15352
- !isSpanishNif && /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
15407
+ !isSpanishNif && /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
15353
15408
  /* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
15354
- /* @__PURE__ */ jsxs20(
15409
+ /* @__PURE__ */ jsxs21(
15355
15410
  "select",
15356
15411
  {
15357
15412
  id: "full-invoice-id-country",
@@ -15368,7 +15423,7 @@ function FullInvoiceFields({
15368
15423
  ),
15369
15424
  error("billingIdCountry")
15370
15425
  ] }),
15371
- /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
15426
+ /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
15372
15427
  /* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
15373
15428
  /* @__PURE__ */ jsx23(
15374
15429
  "input",
@@ -15383,7 +15438,7 @@ function FullInvoiceFields({
15383
15438
  ),
15384
15439
  error("billingNif")
15385
15440
  ] }),
15386
- /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
15441
+ /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
15387
15442
  /* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
15388
15443
  /* @__PURE__ */ jsx23(
15389
15444
  "input",
@@ -15398,7 +15453,7 @@ function FullInvoiceFields({
15398
15453
  ),
15399
15454
  error("billingName")
15400
15455
  ] }),
15401
- /* @__PURE__ */ jsxs20("div", { className: "space-y-1 sm:col-span-2", children: [
15456
+ /* @__PURE__ */ jsxs21("div", { className: "space-y-1 sm:col-span-2", children: [
15402
15457
  /* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
15403
15458
  /* @__PURE__ */ jsx23(
15404
15459
  "input",
@@ -15412,7 +15467,7 @@ function FullInvoiceFields({
15412
15467
  }
15413
15468
  )
15414
15469
  ] }),
15415
- /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
15470
+ /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
15416
15471
  /* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
15417
15472
  /* @__PURE__ */ jsx23(
15418
15473
  "input",
@@ -15425,7 +15480,7 @@ function FullInvoiceFields({
15425
15480
  }
15426
15481
  )
15427
15482
  ] }),
15428
- /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
15483
+ /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
15429
15484
  /* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
15430
15485
  /* @__PURE__ */ jsx23(
15431
15486
  "input",
@@ -15438,7 +15493,7 @@ function FullInvoiceFields({
15438
15493
  }
15439
15494
  )
15440
15495
  ] }),
15441
- /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
15496
+ /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
15442
15497
  /* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
15443
15498
  /* @__PURE__ */ jsx23(
15444
15499
  "select",