@reblu/site-blocks 0.24.0 → 0.26.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/CHANGELOG.md +32 -0
- package/README.md +127 -0
- package/dist/client.cjs +277 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +86 -2
- package/dist/client.d.ts +86 -2
- package/dist/client.js +274 -0
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +434 -332
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +80 -2
- package/dist/index.d.ts +80 -2
- package/dist/index.js +431 -332
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -30,9 +30,11 @@ __export(src_exports, {
|
|
|
30
30
|
ContactInterestField: () => ContactInterestField,
|
|
31
31
|
CourseCatalogFilters: () => CourseCatalogFilters,
|
|
32
32
|
CourseDescription: () => CourseDescription,
|
|
33
|
+
CoursePurchaseTerms: () => CoursePurchaseTerms,
|
|
33
34
|
DATA_REQUEST_TYPES: () => import_site_contracts.DATA_REQUEST_TYPES,
|
|
34
35
|
DEFAULT_COURSE_CATALOG_FILTERS_LABELS: () => DEFAULT_COURSE_CATALOG_FILTERS_LABELS,
|
|
35
36
|
DEFAULT_COURSE_PRICE_BANDS: () => DEFAULT_COURSE_PRICE_BANDS,
|
|
37
|
+
DEFAULT_COURSE_PURCHASE_TERMS_LABELS: () => DEFAULT_COURSE_PURCHASE_TERMS_LABELS,
|
|
36
38
|
DEFAULT_INVOICE_COUNTRIES: () => DEFAULT_INVOICE_COUNTRIES,
|
|
37
39
|
DEFAULT_LESSON_PREVIEW_LABELS: () => DEFAULT_LESSON_PREVIEW_LABELS,
|
|
38
40
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE: () => DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
@@ -44,6 +46,7 @@ __export(src_exports, {
|
|
|
44
46
|
EMPTY_FULL_INVOICE_VALUE: () => EMPTY_FULL_INVOICE_VALUE,
|
|
45
47
|
FaqAccordion: () => FaqAccordion,
|
|
46
48
|
FullInvoiceFields: () => FullInvoiceFields,
|
|
49
|
+
LegalDocument: () => LegalDocument,
|
|
47
50
|
LessonPreview: () => LessonPreview,
|
|
48
51
|
MarkdownRenderer: () => MarkdownRenderer,
|
|
49
52
|
OrderConfirmation: () => OrderConfirmation,
|
|
@@ -13541,8 +13544,104 @@ function CourseDescription({
|
|
|
13541
13544
|
);
|
|
13542
13545
|
}
|
|
13543
13546
|
|
|
13544
|
-
// src/components/
|
|
13547
|
+
// src/components/course-purchase-terms.tsx
|
|
13545
13548
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
13549
|
+
var DEFAULT_COURSE_PURCHASE_TERMS_LABELS = {
|
|
13550
|
+
withdrawalWaiver: "El acceso empieza al comprar: al pagar pides el acceso inmediato y renuncias al derecho de desistimiento de 14 d\xEDas.",
|
|
13551
|
+
accessDuration: (months) => `Acceso durante ${months} ${months === 1 ? "mes" : "meses"} desde la inscripci\xF3n.`,
|
|
13552
|
+
refundGuarantee: ({ basis, thresholdPercent, windowDays }) => {
|
|
13553
|
+
const period = windowDays != null ? ` durante ${windowDays} d\xEDas desde el pago` : "";
|
|
13554
|
+
const verb = basis === "LESSONS_COMPLETED" ? "completado" : "abierto";
|
|
13555
|
+
const usage = thresholdPercent != null ? ` si has ${verb} menos del ${thresholdPercent} % de las lecciones` : "";
|
|
13556
|
+
return `Garant\xEDa de reembolso${period}${usage}.`;
|
|
13557
|
+
}
|
|
13558
|
+
};
|
|
13559
|
+
function CoursePurchaseTerms({
|
|
13560
|
+
course,
|
|
13561
|
+
heading,
|
|
13562
|
+
headingLevel = 2,
|
|
13563
|
+
headingId = "course-purchase-terms-heading",
|
|
13564
|
+
labels,
|
|
13565
|
+
className,
|
|
13566
|
+
headingClassName,
|
|
13567
|
+
listClassName
|
|
13568
|
+
}) {
|
|
13569
|
+
const text3 = { ...DEFAULT_COURSE_PURCHASE_TERMS_LABELS, ...labels };
|
|
13570
|
+
const items = [];
|
|
13571
|
+
if (course.withdrawalWaiverRequired === true) {
|
|
13572
|
+
items.push({ key: "withdrawal-waiver", node: text3.withdrawalWaiver });
|
|
13573
|
+
}
|
|
13574
|
+
if (typeof course.accessDurationMonths === "number") {
|
|
13575
|
+
items.push({ key: "access-duration", node: text3.accessDuration(course.accessDurationMonths) });
|
|
13576
|
+
}
|
|
13577
|
+
if (course.refundGuarantee) {
|
|
13578
|
+
items.push({ key: "refund-guarantee", node: text3.refundGuarantee(course.refundGuarantee) });
|
|
13579
|
+
}
|
|
13580
|
+
if (items.length === 0) return null;
|
|
13581
|
+
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
13582
|
+
const list = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: slotClassName("list-disc space-y-1 pl-5", "text-sm text-muted-foreground", listClassName), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { "data-slot": `course-purchase-terms-${item.key}`, children: item.node }, item.key)) });
|
|
13583
|
+
const Tag = `h${headingLevel}`;
|
|
13584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
13585
|
+
"section",
|
|
13586
|
+
{
|
|
13587
|
+
"data-slot": "course-purchase-terms",
|
|
13588
|
+
"aria-labelledby": hasHeading ? headingId : void 0,
|
|
13589
|
+
className: slotClassName("space-y-2", "", className),
|
|
13590
|
+
children: [
|
|
13591
|
+
hasHeading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Tag, { id: headingId, className: slotClassName("", "text-lg font-semibold", headingClassName), children: heading }) : null,
|
|
13592
|
+
list
|
|
13593
|
+
]
|
|
13594
|
+
}
|
|
13595
|
+
);
|
|
13596
|
+
}
|
|
13597
|
+
|
|
13598
|
+
// src/components/legal-document.tsx
|
|
13599
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
13600
|
+
function isVisiblyEmpty2(html5) {
|
|
13601
|
+
if (/<(img|iframe|hr)\b/i.test(html5)) return false;
|
|
13602
|
+
return html5.replace(/<[^>]*>/g, "").trim() === "";
|
|
13603
|
+
}
|
|
13604
|
+
function LegalDocument({
|
|
13605
|
+
content,
|
|
13606
|
+
title,
|
|
13607
|
+
fallback,
|
|
13608
|
+
titleId = "legal-document-title",
|
|
13609
|
+
className,
|
|
13610
|
+
titleClassName,
|
|
13611
|
+
contentClassName
|
|
13612
|
+
}) {
|
|
13613
|
+
const html5 = markdownToSafeHtml(typeof content === "string" ? content : null);
|
|
13614
|
+
const isEmpty = !html5 || isVisiblyEmpty2(html5);
|
|
13615
|
+
const hasFallback = fallback !== void 0 && fallback !== null && fallback !== false;
|
|
13616
|
+
if (isEmpty && !hasFallback) return null;
|
|
13617
|
+
const hasTitle = title !== void 0 && title !== null && title !== "";
|
|
13618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
13619
|
+
"article",
|
|
13620
|
+
{
|
|
13621
|
+
"data-slot": "legal-document",
|
|
13622
|
+
"aria-labelledby": hasTitle ? titleId : void 0,
|
|
13623
|
+
className: slotClassName("space-y-6", "", className),
|
|
13624
|
+
children: [
|
|
13625
|
+
hasTitle && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h1", { id: titleId, className: slotClassName("", "text-3xl font-bold", titleClassName), children: title }),
|
|
13626
|
+
isEmpty ? fallback : (
|
|
13627
|
+
// `html` is already sanitised by `markdownToSafeHtml` — SafeHtml only maps it.
|
|
13628
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
13629
|
+
SafeHtml,
|
|
13630
|
+
{
|
|
13631
|
+
html: html5,
|
|
13632
|
+
headingOffset: hasTitle ? 1 : 0,
|
|
13633
|
+
normalizeHeadings: hasTitle,
|
|
13634
|
+
className: contentClassName
|
|
13635
|
+
}
|
|
13636
|
+
)
|
|
13637
|
+
)
|
|
13638
|
+
]
|
|
13639
|
+
}
|
|
13640
|
+
);
|
|
13641
|
+
}
|
|
13642
|
+
|
|
13643
|
+
// src/components/lesson-preview.tsx
|
|
13644
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
13546
13645
|
var DEFAULT_LESSON_PREVIEW_LABELS = {
|
|
13547
13646
|
badge: "Vista previa gratuita",
|
|
13548
13647
|
player: "V\xEDdeo",
|
|
@@ -13566,7 +13665,7 @@ function clock(seconds) {
|
|
|
13566
13665
|
iso: `PT${h2 > 0 ? `${h2}H` : ""}${m2}M${s2}S`
|
|
13567
13666
|
};
|
|
13568
13667
|
}
|
|
13569
|
-
function
|
|
13668
|
+
function isVisiblyEmpty3(html5) {
|
|
13570
13669
|
if (/<(img|iframe|hr)\b/i.test(html5)) return false;
|
|
13571
13670
|
return html5.replace(/<[^>]*>/g, "").trim() === "";
|
|
13572
13671
|
}
|
|
@@ -13583,17 +13682,17 @@ function LessonPreview({
|
|
|
13583
13682
|
const Tag = `h${headingLevel}`;
|
|
13584
13683
|
const video = lesson.video && isEmbeddable(lesson.video.embedUrl) ? lesson.video : null;
|
|
13585
13684
|
const html5 = markdownToSafeHtml(lesson.content);
|
|
13586
|
-
const hasBody = html5 !== null && html5 !== "" && !
|
|
13685
|
+
const hasBody = html5 !== null && html5 !== "" && !isVisiblyEmpty3(html5);
|
|
13587
13686
|
const duration = typeof lesson.durationSeconds === "number" && lesson.durationSeconds > 0 ? clock(lesson.durationSeconds) : null;
|
|
13588
|
-
return /* @__PURE__ */ (0,
|
|
13687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
13589
13688
|
"article",
|
|
13590
13689
|
{
|
|
13591
13690
|
"data-slot": "lesson-preview",
|
|
13592
13691
|
"aria-labelledby": headingId,
|
|
13593
13692
|
className: slotClassName("space-y-6", "", className),
|
|
13594
13693
|
children: [
|
|
13595
|
-
/* @__PURE__ */ (0,
|
|
13596
|
-
/* @__PURE__ */ (0,
|
|
13694
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("header", { className: "space-y-2", children: [
|
|
13695
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
13597
13696
|
"span",
|
|
13598
13697
|
{
|
|
13599
13698
|
"data-slot": "lesson-preview-badge",
|
|
@@ -13601,7 +13700,7 @@ function LessonPreview({
|
|
|
13601
13700
|
children: labels.badge
|
|
13602
13701
|
}
|
|
13603
13702
|
),
|
|
13604
|
-
/* @__PURE__ */ (0,
|
|
13703
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
13605
13704
|
Tag,
|
|
13606
13705
|
{
|
|
13607
13706
|
id: headingId,
|
|
@@ -13609,12 +13708,12 @@ function LessonPreview({
|
|
|
13609
13708
|
children: lesson.title
|
|
13610
13709
|
}
|
|
13611
13710
|
),
|
|
13612
|
-
duration && /* @__PURE__ */ (0,
|
|
13613
|
-
/* @__PURE__ */ (0,
|
|
13711
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "text-sm text-muted-foreground", children: [
|
|
13712
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "sr-only", children: [
|
|
13614
13713
|
labels.duration,
|
|
13615
13714
|
": "
|
|
13616
13715
|
] }),
|
|
13617
|
-
/* @__PURE__ */ (0,
|
|
13716
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
13618
13717
|
"time",
|
|
13619
13718
|
{
|
|
13620
13719
|
"data-slot": "lesson-preview-duration",
|
|
@@ -13625,12 +13724,12 @@ function LessonPreview({
|
|
|
13625
13724
|
)
|
|
13626
13725
|
] })
|
|
13627
13726
|
] }),
|
|
13628
|
-
video && /* @__PURE__ */ (0,
|
|
13727
|
+
video && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
13629
13728
|
"div",
|
|
13630
13729
|
{
|
|
13631
13730
|
"data-slot": "lesson-preview-player",
|
|
13632
13731
|
className: "aspect-video w-full overflow-hidden rounded-xl border border-border bg-black",
|
|
13633
|
-
children: /* @__PURE__ */ (0,
|
|
13732
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
13634
13733
|
"iframe",
|
|
13635
13734
|
{
|
|
13636
13735
|
src: video.embedUrl,
|
|
@@ -13644,7 +13743,7 @@ function LessonPreview({
|
|
|
13644
13743
|
)
|
|
13645
13744
|
}
|
|
13646
13745
|
),
|
|
13647
|
-
hasBody && /* @__PURE__ */ (0,
|
|
13746
|
+
hasBody && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { "data-slot": "lesson-preview-content", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
13648
13747
|
SafeHtml,
|
|
13649
13748
|
{
|
|
13650
13749
|
html: html5,
|
|
@@ -13663,7 +13762,7 @@ var import_utils3 = require("@reblu/site-ui/utils");
|
|
|
13663
13762
|
// src/components/_page-parts.tsx
|
|
13664
13763
|
var import_utils2 = require("@reblu/site-ui/utils");
|
|
13665
13764
|
var import_button_variants = require("@reblu/site-ui/button-variants");
|
|
13666
|
-
var
|
|
13765
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
13667
13766
|
var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
|
|
13668
13767
|
"default",
|
|
13669
13768
|
"destructive",
|
|
@@ -13676,11 +13775,11 @@ function toButtonVariant(variant) {
|
|
|
13676
13775
|
return variant && KNOWN_BUTTON_VARIANTS.has(variant) ? variant : "default";
|
|
13677
13776
|
}
|
|
13678
13777
|
function PageHero({ page }) {
|
|
13679
|
-
return /* @__PURE__ */ (0,
|
|
13680
|
-
page.category && /* @__PURE__ */ (0,
|
|
13681
|
-
/* @__PURE__ */ (0,
|
|
13682
|
-
page.subtitle && /* @__PURE__ */ (0,
|
|
13683
|
-
page.coverImageUrl && /* @__PURE__ */ (0,
|
|
13778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("header", { className: "space-y-4", children: [
|
|
13779
|
+
page.category && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("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 }),
|
|
13780
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h1", { className: "text-4xl font-bold tracking-tight", children: page.title }),
|
|
13781
|
+
page.subtitle && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-lg text-muted-foreground", children: page.subtitle }),
|
|
13782
|
+
page.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13684
13783
|
"img",
|
|
13685
13784
|
{
|
|
13686
13785
|
src: page.coverImageUrl,
|
|
@@ -13694,7 +13793,7 @@ function PageHero({ page }) {
|
|
|
13694
13793
|
function SectionCta({ section }) {
|
|
13695
13794
|
if (!section.ctaLabel || !section.ctaUrl) return null;
|
|
13696
13795
|
const variant = toButtonVariant(section.ctaVariant);
|
|
13697
|
-
return /* @__PURE__ */ (0,
|
|
13796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13698
13797
|
"a",
|
|
13699
13798
|
{
|
|
13700
13799
|
href: section.ctaUrl,
|
|
@@ -13709,46 +13808,46 @@ function SectionCta({ section }) {
|
|
|
13709
13808
|
}
|
|
13710
13809
|
function SectionImages({ section }) {
|
|
13711
13810
|
if (section.images.length === 0) return null;
|
|
13712
|
-
return /* @__PURE__ */ (0,
|
|
13713
|
-
/* @__PURE__ */ (0,
|
|
13714
|
-
img.caption && /* @__PURE__ */ (0,
|
|
13811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: (0, import_utils2.cn)("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("figure", { className: "space-y-1", children: [
|
|
13812
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src: img.url, alt: img.alt, loading: "lazy", className: "h-full w-full object-cover" }) }),
|
|
13813
|
+
img.caption && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
|
|
13715
13814
|
] }, `${img.url}-${img.order}`)) });
|
|
13716
13815
|
}
|
|
13717
13816
|
function PageSectionBlock({ section }) {
|
|
13718
13817
|
const imageFirst = section.layout === "IMAGE_TEXT";
|
|
13719
13818
|
const sideBySide = section.layout === "TEXT_IMAGE" || section.layout === "IMAGE_TEXT";
|
|
13720
13819
|
const hasImages = section.images.length > 0;
|
|
13721
|
-
const body3 = /* @__PURE__ */ (0,
|
|
13722
|
-
section.heading && /* @__PURE__ */ (0,
|
|
13723
|
-
/* @__PURE__ */ (0,
|
|
13724
|
-
/* @__PURE__ */ (0,
|
|
13820
|
+
const body3 = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "space-y-4", children: [
|
|
13821
|
+
section.heading && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "text-2xl font-bold", children: section.heading }),
|
|
13822
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SafeHtml, { html: sanitizeHtml(section.contentHtml), headingOffset: 2 }),
|
|
13823
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SectionCta, { section })
|
|
13725
13824
|
] });
|
|
13726
13825
|
if (sideBySide && hasImages) {
|
|
13727
|
-
return /* @__PURE__ */ (0,
|
|
13728
|
-
/* @__PURE__ */ (0,
|
|
13826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
13827
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SectionImages, { section }),
|
|
13729
13828
|
body3
|
|
13730
|
-
] }) : /* @__PURE__ */ (0,
|
|
13829
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
13731
13830
|
body3,
|
|
13732
|
-
/* @__PURE__ */ (0,
|
|
13831
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SectionImages, { section })
|
|
13733
13832
|
] }) });
|
|
13734
13833
|
}
|
|
13735
|
-
return /* @__PURE__ */ (0,
|
|
13834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "space-y-4", children: [
|
|
13736
13835
|
body3,
|
|
13737
|
-
/* @__PURE__ */ (0,
|
|
13836
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SectionImages, { section })
|
|
13738
13837
|
] });
|
|
13739
13838
|
}
|
|
13740
13839
|
function PageSectionList({ sections }) {
|
|
13741
13840
|
if (sections.length === 0) return null;
|
|
13742
13841
|
const ordered = sections.slice().sort((a, b2) => a.order - b2.order);
|
|
13743
|
-
return /* @__PURE__ */ (0,
|
|
13842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "space-y-12", children: ordered.map((section) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PageSectionBlock, { section }, section.id)) });
|
|
13744
13843
|
}
|
|
13745
13844
|
|
|
13746
13845
|
// src/components/treatment.tsx
|
|
13747
|
-
var
|
|
13846
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
13748
13847
|
function Treatment({ page, className }) {
|
|
13749
|
-
return /* @__PURE__ */ (0,
|
|
13750
|
-
/* @__PURE__ */ (0,
|
|
13751
|
-
/* @__PURE__ */ (0,
|
|
13848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("article", { className: (0, import_utils3.cn)("space-y-12", className), "data-slot": "treatment", children: [
|
|
13849
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PageHero, { page }),
|
|
13850
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PageSectionList, { sections: page.sections })
|
|
13752
13851
|
] });
|
|
13753
13852
|
}
|
|
13754
13853
|
|
|
@@ -13757,11 +13856,11 @@ var import_utils5 = require("@reblu/site-ui/utils");
|
|
|
13757
13856
|
|
|
13758
13857
|
// src/components/page-card-grid.tsx
|
|
13759
13858
|
var import_utils4 = require("@reblu/site-ui/utils");
|
|
13760
|
-
var
|
|
13859
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
13761
13860
|
var defaultPageHref = (page) => `/${page.slug}`;
|
|
13762
13861
|
var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
|
|
13763
13862
|
function PageCardGrid(props) {
|
|
13764
|
-
return /* @__PURE__ */ (0,
|
|
13863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PageCardGridSection, { ...props });
|
|
13765
13864
|
}
|
|
13766
13865
|
function PageCardGridSection({
|
|
13767
13866
|
pages,
|
|
@@ -13772,15 +13871,15 @@ function PageCardGridSection({
|
|
|
13772
13871
|
}) {
|
|
13773
13872
|
if (pages.length === 0) return null;
|
|
13774
13873
|
const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
|
|
13775
|
-
return /* @__PURE__ */ (0,
|
|
13776
|
-
showHeading && /* @__PURE__ */ (0,
|
|
13777
|
-
/* @__PURE__ */ (0,
|
|
13874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { className: (0, import_utils4.cn)("space-y-6", className), children: [
|
|
13875
|
+
showHeading && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "text-2xl font-bold", children: heading }),
|
|
13876
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("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__ */ (0, import_jsx_runtime8.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
13778
13877
|
"a",
|
|
13779
13878
|
{
|
|
13780
13879
|
href: pageHref(page),
|
|
13781
13880
|
className: "group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13782
13881
|
children: [
|
|
13783
|
-
page.coverImageUrl && /* @__PURE__ */ (0,
|
|
13882
|
+
page.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
13784
13883
|
"img",
|
|
13785
13884
|
{
|
|
13786
13885
|
src: page.coverImageUrl,
|
|
@@ -13789,9 +13888,9 @@ function PageCardGridSection({
|
|
|
13789
13888
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13790
13889
|
}
|
|
13791
13890
|
) }),
|
|
13792
|
-
/* @__PURE__ */ (0,
|
|
13793
|
-
/* @__PURE__ */ (0,
|
|
13794
|
-
page.excerpt && /* @__PURE__ */ (0,
|
|
13891
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13892
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
|
|
13893
|
+
page.excerpt && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
|
|
13795
13894
|
] })
|
|
13796
13895
|
]
|
|
13797
13896
|
}
|
|
@@ -13800,7 +13899,7 @@ function PageCardGridSection({
|
|
|
13800
13899
|
}
|
|
13801
13900
|
|
|
13802
13901
|
// src/components/parent-page.tsx
|
|
13803
|
-
var
|
|
13902
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
13804
13903
|
var defaultChildPageHref = (slug) => `/${slug}`;
|
|
13805
13904
|
function ParentPage({
|
|
13806
13905
|
page,
|
|
@@ -13815,10 +13914,10 @@ function ParentPage({
|
|
|
13815
13914
|
const pages = childPages ?? treatments ?? [];
|
|
13816
13915
|
const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
|
|
13817
13916
|
const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
|
|
13818
|
-
return /* @__PURE__ */ (0,
|
|
13819
|
-
/* @__PURE__ */ (0,
|
|
13820
|
-
/* @__PURE__ */ (0,
|
|
13821
|
-
/* @__PURE__ */ (0,
|
|
13917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("article", { className: (0, import_utils5.cn)("space-y-12", className), "data-slot": "specialty", children: [
|
|
13918
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PageHero, { page }),
|
|
13919
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PageSectionList, { sections: page.sections }),
|
|
13920
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
13822
13921
|
PageCardGridSection,
|
|
13823
13922
|
{
|
|
13824
13923
|
pages,
|
|
@@ -13838,7 +13937,7 @@ var import_utils7 = require("@reblu/site-ui/utils");
|
|
|
13838
13937
|
|
|
13839
13938
|
// src/components/professional-fields.tsx
|
|
13840
13939
|
var import_utils6 = require("@reblu/site-ui/utils");
|
|
13841
|
-
var
|
|
13940
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
13842
13941
|
function ProfessionalFields({
|
|
13843
13942
|
fields,
|
|
13844
13943
|
variant = "profile",
|
|
@@ -13846,7 +13945,7 @@ function ProfessionalFields({
|
|
|
13846
13945
|
}) {
|
|
13847
13946
|
const shown = (fields ?? []).filter((f) => variant !== "card" || f.showOnCard);
|
|
13848
13947
|
if (shown.length === 0) return null;
|
|
13849
|
-
return /* @__PURE__ */ (0,
|
|
13948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13850
13949
|
"dl",
|
|
13851
13950
|
{
|
|
13852
13951
|
className: (0, import_utils6.cn)(
|
|
@@ -13856,13 +13955,13 @@ function ProfessionalFields({
|
|
|
13856
13955
|
),
|
|
13857
13956
|
"data-slot": "professional-fields",
|
|
13858
13957
|
"data-variant": variant,
|
|
13859
|
-
children: shown.map((field, index) => /* @__PURE__ */ (0,
|
|
13958
|
+
children: shown.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
13860
13959
|
"div",
|
|
13861
13960
|
{
|
|
13862
13961
|
className: variant === "card" ? "flex justify-center gap-1" : "contents",
|
|
13863
13962
|
children: [
|
|
13864
|
-
/* @__PURE__ */ (0,
|
|
13865
|
-
/* @__PURE__ */ (0,
|
|
13963
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("dt", { className: "text-muted-foreground", children: field.label }),
|
|
13964
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("dd", { className: "m-0 font-medium", children: field.value })
|
|
13866
13965
|
]
|
|
13867
13966
|
},
|
|
13868
13967
|
`${field.label}-${index}`
|
|
@@ -13872,7 +13971,7 @@ function ProfessionalFields({
|
|
|
13872
13971
|
}
|
|
13873
13972
|
|
|
13874
13973
|
// src/components/profile-card.tsx
|
|
13875
|
-
var
|
|
13974
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
13876
13975
|
function initials(name) {
|
|
13877
13976
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
13878
13977
|
}
|
|
@@ -13887,7 +13986,7 @@ function ProfileCard({
|
|
|
13887
13986
|
className
|
|
13888
13987
|
}) {
|
|
13889
13988
|
const NameTag = href ? "a" : "span";
|
|
13890
|
-
return /* @__PURE__ */ (0,
|
|
13989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
13891
13990
|
"article",
|
|
13892
13991
|
{
|
|
13893
13992
|
className: (0, import_utils7.cn)(
|
|
@@ -13896,7 +13995,7 @@ function ProfileCard({
|
|
|
13896
13995
|
),
|
|
13897
13996
|
"data-slot": "profile-card",
|
|
13898
13997
|
children: [
|
|
13899
|
-
/* @__PURE__ */ (0,
|
|
13998
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "relative h-24 w-24 overflow-hidden rounded-full bg-muted", children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { src: imageUrl, alt: name, loading: "lazy", className: "h-full w-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
13900
13999
|
"span",
|
|
13901
14000
|
{
|
|
13902
14001
|
className: "flex h-full w-full items-center justify-center text-2xl font-semibold text-muted-foreground",
|
|
@@ -13904,12 +14003,12 @@ function ProfileCard({
|
|
|
13904
14003
|
children: initials(name)
|
|
13905
14004
|
}
|
|
13906
14005
|
) }),
|
|
13907
|
-
/* @__PURE__ */ (0,
|
|
13908
|
-
/* @__PURE__ */ (0,
|
|
13909
|
-
role && /* @__PURE__ */ (0,
|
|
14006
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "space-y-1", children: [
|
|
14007
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NameTag, { ...href ? { href, className: "transition-colors hover:text-primary" } : {}, children: name }) }),
|
|
14008
|
+
role && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-sm text-muted-foreground", children: role })
|
|
13910
14009
|
] }),
|
|
13911
|
-
/* @__PURE__ */ (0,
|
|
13912
|
-
specialties.length > 0 && /* @__PURE__ */ (0,
|
|
14010
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ProfessionalFields, { fields, variant: "card" }),
|
|
14011
|
+
specialties.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { className: "flex flex-wrap justify-center gap-1.5 p-0", children: specialties.map((s2) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
13913
14012
|
"li",
|
|
13914
14013
|
{
|
|
13915
14014
|
className: "inline-flex items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground",
|
|
@@ -13917,7 +14016,7 @@ function ProfileCard({
|
|
|
13917
14016
|
},
|
|
13918
14017
|
s2
|
|
13919
14018
|
)) }),
|
|
13920
|
-
bio && /* @__PURE__ */ (0,
|
|
14019
|
+
bio && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-sm text-muted-foreground", children: bio })
|
|
13921
14020
|
]
|
|
13922
14021
|
}
|
|
13923
14022
|
);
|
|
@@ -13925,11 +14024,11 @@ function ProfileCard({
|
|
|
13925
14024
|
|
|
13926
14025
|
// src/components/product-card.tsx
|
|
13927
14026
|
var import_utils8 = require("@reblu/site-ui/utils");
|
|
13928
|
-
var
|
|
14027
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
13929
14028
|
function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
|
|
13930
14029
|
const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
|
|
13931
14030
|
const hasDiscount = product.comparePrice != null && product.comparePrice > product.price;
|
|
13932
|
-
return /* @__PURE__ */ (0,
|
|
14031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
13933
14032
|
"article",
|
|
13934
14033
|
{
|
|
13935
14034
|
className: (0, import_utils8.cn)(
|
|
@@ -13938,7 +14037,7 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13938
14037
|
),
|
|
13939
14038
|
"data-slot": "product-card",
|
|
13940
14039
|
children: [
|
|
13941
|
-
/* @__PURE__ */ (0,
|
|
14040
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "relative aspect-square overflow-hidden bg-muted", children: image ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
13942
14041
|
"img",
|
|
13943
14042
|
{
|
|
13944
14043
|
src: image.url,
|
|
@@ -13946,14 +14045,14 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13946
14045
|
loading: "lazy",
|
|
13947
14046
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13948
14047
|
}
|
|
13949
|
-
) : /* @__PURE__ */ (0,
|
|
13950
|
-
/* @__PURE__ */ (0,
|
|
13951
|
-
product.category && /* @__PURE__ */ (0,
|
|
13952
|
-
/* @__PURE__ */ (0,
|
|
13953
|
-
product.shortDescription && /* @__PURE__ */ (0,
|
|
13954
|
-
/* @__PURE__ */ (0,
|
|
13955
|
-
/* @__PURE__ */ (0,
|
|
13956
|
-
hasDiscount && /* @__PURE__ */ (0,
|
|
14048
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
|
|
14049
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
14050
|
+
product.category && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("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 }),
|
|
14051
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: "text-base font-semibold leading-tight", children: href ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("a", { href, className: "transition-colors hover:text-primary", children: product.name }) : product.name }),
|
|
14052
|
+
product.shortDescription && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
|
|
14053
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
|
|
14054
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
|
|
14055
|
+
hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
|
|
13957
14056
|
] })
|
|
13958
14057
|
] })
|
|
13959
14058
|
]
|
|
@@ -14155,7 +14254,7 @@ var __iconNode8 = [
|
|
|
14155
14254
|
var Truck = createLucideIcon("truck", __iconNode8);
|
|
14156
14255
|
|
|
14157
14256
|
// src/components/product-trust-items.tsx
|
|
14158
|
-
var
|
|
14257
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
14159
14258
|
var DEFAULT_TRUST_ICONS = Object.freeze({
|
|
14160
14259
|
shipping: Truck,
|
|
14161
14260
|
returns: RotateCcw,
|
|
@@ -14189,9 +14288,9 @@ function ProductTrustItems({
|
|
|
14189
14288
|
return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
|
|
14190
14289
|
});
|
|
14191
14290
|
if (rows.length === 0) return null;
|
|
14192
|
-
return /* @__PURE__ */ (0,
|
|
14193
|
-
/* @__PURE__ */ (0,
|
|
14194
|
-
/* @__PURE__ */ (0,
|
|
14291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(List, { "data-slot": "product-trust-items", className: slotClassName("space-y-2.5", "", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
|
|
14292
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
|
|
14293
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: text3 })
|
|
14195
14294
|
] }, key2)) });
|
|
14196
14295
|
}
|
|
14197
14296
|
|
|
@@ -14199,7 +14298,7 @@ function ProductTrustItems({
|
|
|
14199
14298
|
var import_utils11 = require("@reblu/site-ui/utils");
|
|
14200
14299
|
|
|
14201
14300
|
// src/components/_heading.tsx
|
|
14202
|
-
var
|
|
14301
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
14203
14302
|
function nextHeadingLevel(level) {
|
|
14204
14303
|
return Math.min(level + 1, 6);
|
|
14205
14304
|
}
|
|
@@ -14209,11 +14308,11 @@ function Heading({
|
|
|
14209
14308
|
children: children2
|
|
14210
14309
|
}) {
|
|
14211
14310
|
const Tag = `h${level}`;
|
|
14212
|
-
return /* @__PURE__ */ (0,
|
|
14311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Tag, { className, children: children2 });
|
|
14213
14312
|
}
|
|
14214
14313
|
|
|
14215
14314
|
// src/components/faq-accordion.tsx
|
|
14216
|
-
var
|
|
14315
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
14217
14316
|
function FaqAccordion({
|
|
14218
14317
|
items,
|
|
14219
14318
|
heading,
|
|
@@ -14224,18 +14323,18 @@ function FaqAccordion({
|
|
|
14224
14323
|
}) {
|
|
14225
14324
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
14226
14325
|
if (visible.length === 0) return null;
|
|
14227
|
-
return /* @__PURE__ */ (0,
|
|
14228
|
-
heading && /* @__PURE__ */ (0,
|
|
14229
|
-
/* @__PURE__ */ (0,
|
|
14326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: (0, import_utils11.cn)("space-y-4", className), "data-slot": "faq-accordion", children: [
|
|
14327
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
|
|
14328
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
14230
14329
|
"details",
|
|
14231
14330
|
{
|
|
14232
14331
|
className: "group px-4",
|
|
14233
14332
|
"data-slot": "faq-item",
|
|
14234
14333
|
...defaultOpen.includes(index) ? { open: true } : {},
|
|
14235
14334
|
children: [
|
|
14236
|
-
/* @__PURE__ */ (0,
|
|
14237
|
-
questionHeadingLevel ? /* @__PURE__ */ (0,
|
|
14238
|
-
/* @__PURE__ */ (0,
|
|
14335
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("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: [
|
|
14336
|
+
questionHeadingLevel ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: item.q }),
|
|
14337
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
14239
14338
|
"span",
|
|
14240
14339
|
{
|
|
14241
14340
|
"aria-hidden": "true",
|
|
@@ -14244,7 +14343,7 @@ function FaqAccordion({
|
|
|
14244
14343
|
}
|
|
14245
14344
|
)
|
|
14246
14345
|
] }),
|
|
14247
|
-
/* @__PURE__ */ (0,
|
|
14346
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
|
|
14248
14347
|
]
|
|
14249
14348
|
},
|
|
14250
14349
|
index
|
|
@@ -14254,7 +14353,7 @@ function FaqAccordion({
|
|
|
14254
14353
|
|
|
14255
14354
|
// src/components/trust-badges.tsx
|
|
14256
14355
|
var import_utils12 = require("@reblu/site-ui/utils");
|
|
14257
|
-
var
|
|
14356
|
+
var import_jsx_runtime16 = (
|
|
14258
14357
|
// eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
|
|
14259
14358
|
require("react/jsx-runtime")
|
|
14260
14359
|
);
|
|
@@ -14297,7 +14396,7 @@ function safeLogoSrc(url) {
|
|
|
14297
14396
|
function BadgeContent({ badge, logoClassName }) {
|
|
14298
14397
|
const src = safeLogoSrc(badge.logoUrl);
|
|
14299
14398
|
if (src) {
|
|
14300
|
-
return /* @__PURE__ */ (0,
|
|
14399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
14301
14400
|
"img",
|
|
14302
14401
|
{
|
|
14303
14402
|
src,
|
|
@@ -14307,7 +14406,7 @@ function BadgeContent({ badge, logoClassName }) {
|
|
|
14307
14406
|
}
|
|
14308
14407
|
);
|
|
14309
14408
|
}
|
|
14310
|
-
return /* @__PURE__ */ (0,
|
|
14409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-sm font-medium", children: badge.name });
|
|
14311
14410
|
}
|
|
14312
14411
|
function TrustBadges({
|
|
14313
14412
|
badges,
|
|
@@ -14335,14 +14434,14 @@ function TrustBadges({
|
|
|
14335
14434
|
if (groups.length === 0) return null;
|
|
14336
14435
|
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
14337
14436
|
const groupHeadingLevel = hasHeading ? nextHeadingLevel(headingLevel) : headingLevel;
|
|
14338
|
-
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ (0,
|
|
14437
|
+
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
14339
14438
|
"div",
|
|
14340
14439
|
{
|
|
14341
14440
|
"data-slot": "trust-badge-group",
|
|
14342
14441
|
"data-type": type,
|
|
14343
14442
|
className: (0, import_utils12.cn)("space-y-3", groupClassName),
|
|
14344
14443
|
children: [
|
|
14345
|
-
groupHeading ? /* @__PURE__ */ (0,
|
|
14444
|
+
groupHeading ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
14346
14445
|
Heading,
|
|
14347
14446
|
{
|
|
14348
14447
|
level: groupHeadingLevel,
|
|
@@ -14354,30 +14453,30 @@ function TrustBadges({
|
|
|
14354
14453
|
children: groupHeading
|
|
14355
14454
|
}
|
|
14356
14455
|
) : null,
|
|
14357
|
-
/* @__PURE__ */ (0,
|
|
14456
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: (0, import_utils12.cn)("flex flex-wrap items-center gap-6", listClassName), children: items.map((badge) => {
|
|
14358
14457
|
const href = safeHref(badge.url);
|
|
14359
|
-
return /* @__PURE__ */ (0,
|
|
14360
|
-
/* @__PURE__ */ (0,
|
|
14458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
|
|
14459
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(BadgeContent, { badge, logoClassName }),
|
|
14361
14460
|
" ",
|
|
14362
|
-
/* @__PURE__ */ (0,
|
|
14363
|
-
] }) : /* @__PURE__ */ (0,
|
|
14461
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "sr-only", children: newWindowLabel })
|
|
14462
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(BadgeContent, { badge, logoClassName }) }, badge.id);
|
|
14364
14463
|
}) })
|
|
14365
14464
|
]
|
|
14366
14465
|
},
|
|
14367
14466
|
type
|
|
14368
14467
|
));
|
|
14369
14468
|
if (!hasHeading) {
|
|
14370
|
-
return /* @__PURE__ */ (0,
|
|
14469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { "data-slot": "trust-badges", className: (0, import_utils12.cn)("space-y-6", className), children: content });
|
|
14371
14470
|
}
|
|
14372
14471
|
const Tag = `h${headingLevel}`;
|
|
14373
|
-
return /* @__PURE__ */ (0,
|
|
14472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
14374
14473
|
"section",
|
|
14375
14474
|
{
|
|
14376
14475
|
"data-slot": "trust-badges",
|
|
14377
14476
|
"aria-labelledby": headingId,
|
|
14378
14477
|
className: (0, import_utils12.cn)("space-y-6", className),
|
|
14379
14478
|
children: [
|
|
14380
|
-
/* @__PURE__ */ (0,
|
|
14479
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
14381
14480
|
Tag,
|
|
14382
14481
|
{
|
|
14383
14482
|
id: headingId,
|
|
@@ -14394,38 +14493,38 @@ function TrustBadges({
|
|
|
14394
14493
|
// src/components/page-blocks.tsx
|
|
14395
14494
|
var import_utils13 = require("@reblu/site-ui/utils");
|
|
14396
14495
|
var import_button_variants2 = require("@reblu/site-ui/button-variants");
|
|
14397
|
-
var
|
|
14496
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
14398
14497
|
var ALIASES = {
|
|
14399
14498
|
doctor_embed: "profile_embed",
|
|
14400
14499
|
specialty_embed: "page_embed"
|
|
14401
14500
|
};
|
|
14402
14501
|
function HeroBlock({ block, headingLevel }) {
|
|
14403
14502
|
const { title, subtitle, imageUrl } = block.data;
|
|
14404
|
-
return /* @__PURE__ */ (0,
|
|
14405
|
-
/* @__PURE__ */ (0,
|
|
14406
|
-
subtitle && /* @__PURE__ */ (0,
|
|
14407
|
-
imageUrl && /* @__PURE__ */ (0,
|
|
14503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "space-y-4", children: [
|
|
14504
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
14505
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
14506
|
+
imageUrl && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
14408
14507
|
] });
|
|
14409
14508
|
}
|
|
14410
14509
|
function RichtextBlock({ block, headingLevel }) {
|
|
14411
|
-
return /* @__PURE__ */ (0,
|
|
14510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
14412
14511
|
}
|
|
14413
14512
|
function FaqBlock({ block }) {
|
|
14414
|
-
return /* @__PURE__ */ (0,
|
|
14513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FaqAccordion, { items: block.data.items });
|
|
14415
14514
|
}
|
|
14416
14515
|
function StatsBlock({ block }) {
|
|
14417
|
-
return /* @__PURE__ */ (0,
|
|
14418
|
-
/* @__PURE__ */ (0,
|
|
14419
|
-
/* @__PURE__ */ (0,
|
|
14516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
14517
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
14518
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dd", { className: "text-3xl font-bold", children: item.value })
|
|
14420
14519
|
] }, i)) });
|
|
14421
14520
|
}
|
|
14422
14521
|
function TestimonialBlock({ block }) {
|
|
14423
14522
|
const { quote, author, role, avatarUrl } = block.data;
|
|
14424
|
-
return /* @__PURE__ */ (0,
|
|
14425
|
-
/* @__PURE__ */ (0,
|
|
14426
|
-
/* @__PURE__ */ (0,
|
|
14523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("figure", { className: "space-y-4", children: [
|
|
14524
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: quote }) }),
|
|
14525
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
|
|
14427
14526
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
14428
|
-
/* @__PURE__ */ (0,
|
|
14527
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14429
14528
|
"img",
|
|
14430
14529
|
{
|
|
14431
14530
|
src: avatarUrl,
|
|
@@ -14434,9 +14533,9 @@ function TestimonialBlock({ block }) {
|
|
|
14434
14533
|
className: "h-10 w-10 rounded-full object-cover"
|
|
14435
14534
|
}
|
|
14436
14535
|
),
|
|
14437
|
-
/* @__PURE__ */ (0,
|
|
14438
|
-
/* @__PURE__ */ (0,
|
|
14439
|
-
role && /* @__PURE__ */ (0,
|
|
14536
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
|
|
14537
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "font-semibold", children: author }),
|
|
14538
|
+
role && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "block text-sm opacity-80", children: role })
|
|
14440
14539
|
] })
|
|
14441
14540
|
] })
|
|
14442
14541
|
] });
|
|
@@ -14445,19 +14544,19 @@ function CtaSlotBlock(_props) {
|
|
|
14445
14544
|
return null;
|
|
14446
14545
|
}
|
|
14447
14546
|
function FeatureListBlock({ block }) {
|
|
14448
|
-
return /* @__PURE__ */ (0,
|
|
14547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: item.text }, i)) });
|
|
14449
14548
|
}
|
|
14450
14549
|
function GalleryBlock({ block }) {
|
|
14451
14550
|
const { images } = block.data;
|
|
14452
|
-
return /* @__PURE__ */ (0,
|
|
14551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14453
14552
|
"div",
|
|
14454
14553
|
{
|
|
14455
14554
|
className: (0, import_utils13.cn)(
|
|
14456
14555
|
"grid gap-4",
|
|
14457
14556
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
14458
14557
|
),
|
|
14459
|
-
children: images.map((img, i) => /* @__PURE__ */ (0,
|
|
14460
|
-
/* @__PURE__ */ (0,
|
|
14558
|
+
children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("figure", { className: "space-y-1", children: [
|
|
14559
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14461
14560
|
"img",
|
|
14462
14561
|
{
|
|
14463
14562
|
src: img.url,
|
|
@@ -14466,7 +14565,7 @@ function GalleryBlock({ block }) {
|
|
|
14466
14565
|
className: "h-full w-full object-cover"
|
|
14467
14566
|
}
|
|
14468
14567
|
) }),
|
|
14469
|
-
img.caption && /* @__PURE__ */ (0,
|
|
14568
|
+
img.caption && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
14470
14569
|
] }, `${img.url}-${i}`))
|
|
14471
14570
|
}
|
|
14472
14571
|
);
|
|
@@ -14476,13 +14575,13 @@ function EmbedCard({
|
|
|
14476
14575
|
headingLevel,
|
|
14477
14576
|
embedHref
|
|
14478
14577
|
}) {
|
|
14479
|
-
return /* @__PURE__ */ (0,
|
|
14578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
14480
14579
|
"a",
|
|
14481
14580
|
{
|
|
14482
14581
|
href: embedHref(resolved),
|
|
14483
14582
|
className: "group block overflow-hidden rounded-xl border border-border bg-card text-card-foreground transition-shadow hover:shadow-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
|
|
14484
14583
|
children: [
|
|
14485
|
-
resolved.coverImageUrl && /* @__PURE__ */ (0,
|
|
14584
|
+
resolved.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14486
14585
|
"img",
|
|
14487
14586
|
{
|
|
14488
14587
|
src: resolved.coverImageUrl,
|
|
@@ -14491,24 +14590,24 @@ function EmbedCard({
|
|
|
14491
14590
|
className: "h-full w-full object-cover"
|
|
14492
14591
|
}
|
|
14493
14592
|
) }),
|
|
14494
|
-
/* @__PURE__ */ (0,
|
|
14495
|
-
/* @__PURE__ */ (0,
|
|
14496
|
-
resolved.role && /* @__PURE__ */ (0,
|
|
14497
|
-
resolved.excerpt && /* @__PURE__ */ (0,
|
|
14593
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "space-y-1 p-4", children: [
|
|
14594
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
14595
|
+
resolved.role && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
14596
|
+
resolved.excerpt && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
14498
14597
|
] })
|
|
14499
14598
|
]
|
|
14500
14599
|
}
|
|
14501
14600
|
);
|
|
14502
14601
|
}
|
|
14503
14602
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
14504
|
-
return /* @__PURE__ */ (0,
|
|
14603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14505
14604
|
}
|
|
14506
14605
|
function ProfileEmbedBlock({
|
|
14507
14606
|
block,
|
|
14508
14607
|
headingLevel,
|
|
14509
14608
|
embedHref
|
|
14510
14609
|
}) {
|
|
14511
|
-
return /* @__PURE__ */ (0,
|
|
14610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14512
14611
|
}
|
|
14513
14612
|
var DEFAULT_RENDERERS = {
|
|
14514
14613
|
hero: HeroBlock,
|
|
@@ -14565,7 +14664,7 @@ function toIdFragment(value) {
|
|
|
14565
14664
|
function SectionCta2({ cta }) {
|
|
14566
14665
|
if (!hasUsableCta(cta)) return null;
|
|
14567
14666
|
const variant = toButtonVariant(cta.variant);
|
|
14568
|
-
return /* @__PURE__ */ (0,
|
|
14667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14569
14668
|
"a",
|
|
14570
14669
|
{
|
|
14571
14670
|
href: cta.url,
|
|
@@ -14598,7 +14697,7 @@ function PageBlocks({
|
|
|
14598
14697
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
14599
14698
|
const background = block.backgroundColor;
|
|
14600
14699
|
return [
|
|
14601
|
-
/* @__PURE__ */ (0,
|
|
14700
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
14602
14701
|
"section",
|
|
14603
14702
|
{
|
|
14604
14703
|
"data-slot": "page-block",
|
|
@@ -14607,8 +14706,8 @@ function PageBlocks({
|
|
|
14607
14706
|
style: surfaceStyle(background),
|
|
14608
14707
|
className: (0, import_utils13.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
14609
14708
|
children: [
|
|
14610
|
-
block.heading && /* @__PURE__ */ (0,
|
|
14611
|
-
/* @__PURE__ */ (0,
|
|
14709
|
+
block.heading && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { id: headingId, children: block.heading }) }),
|
|
14710
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14612
14711
|
Renderer,
|
|
14613
14712
|
{
|
|
14614
14713
|
block,
|
|
@@ -14616,7 +14715,7 @@ function PageBlocks({
|
|
|
14616
14715
|
embedHref
|
|
14617
14716
|
}
|
|
14618
14717
|
),
|
|
14619
|
-
/* @__PURE__ */ (0,
|
|
14718
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SectionCta2, { cta: block.cta })
|
|
14620
14719
|
]
|
|
14621
14720
|
},
|
|
14622
14721
|
block.id
|
|
@@ -14624,12 +14723,12 @@ function PageBlocks({
|
|
|
14624
14723
|
];
|
|
14625
14724
|
});
|
|
14626
14725
|
if (sections.length === 0) return null;
|
|
14627
|
-
return /* @__PURE__ */ (0,
|
|
14726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: (0, import_utils13.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
14628
14727
|
}
|
|
14629
14728
|
|
|
14630
14729
|
// src/components/shop-filters.tsx
|
|
14631
14730
|
var import_utils14 = require("@reblu/site-ui/utils");
|
|
14632
|
-
var
|
|
14731
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
14633
14732
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
14634
14733
|
{ max: 2500 },
|
|
14635
14734
|
{ min: 2500, max: 5e3 },
|
|
@@ -14673,7 +14772,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
14673
14772
|
return "";
|
|
14674
14773
|
}
|
|
14675
14774
|
function OptionLink({ href, active, label, onActivate }) {
|
|
14676
|
-
return /* @__PURE__ */ (0,
|
|
14775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14677
14776
|
"a",
|
|
14678
14777
|
{
|
|
14679
14778
|
href,
|
|
@@ -14691,9 +14790,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14691
14790
|
);
|
|
14692
14791
|
}
|
|
14693
14792
|
function FilterFieldset({ legend, children: children2 }) {
|
|
14694
|
-
return /* @__PURE__ */ (0,
|
|
14695
|
-
/* @__PURE__ */ (0,
|
|
14696
|
-
/* @__PURE__ */ (0,
|
|
14793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("fieldset", { className: "space-y-2", children: [
|
|
14794
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
14795
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
14697
14796
|
] });
|
|
14698
14797
|
}
|
|
14699
14798
|
function ShopFilters({
|
|
@@ -14716,11 +14815,11 @@ function ShopFilters({
|
|
|
14716
14815
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
14717
14816
|
return null;
|
|
14718
14817
|
}
|
|
14719
|
-
return /* @__PURE__ */ (0,
|
|
14818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: (0, import_utils14.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
14720
14819
|
visibleTaxonomies.map((axis) => {
|
|
14721
14820
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
14722
|
-
return /* @__PURE__ */ (0,
|
|
14723
|
-
/* @__PURE__ */ (0,
|
|
14821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(FilterFieldset, { legend: axis.label, children: [
|
|
14822
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14724
14823
|
OptionLink,
|
|
14725
14824
|
{
|
|
14726
14825
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -14735,7 +14834,7 @@ function ShopFilters({
|
|
|
14735
14834
|
),
|
|
14736
14835
|
axis.terms.map((term) => {
|
|
14737
14836
|
const isActive = activeSlug === term.slug;
|
|
14738
|
-
return /* @__PURE__ */ (0,
|
|
14837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14739
14838
|
OptionLink,
|
|
14740
14839
|
{
|
|
14741
14840
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -14755,9 +14854,9 @@ function ShopFilters({
|
|
|
14755
14854
|
}),
|
|
14756
14855
|
visibleAttributes.map((attr) => {
|
|
14757
14856
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
14758
|
-
return /* @__PURE__ */ (0,
|
|
14857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
14759
14858
|
const isActive = activeValues.includes(opt.value);
|
|
14760
|
-
return /* @__PURE__ */ (0,
|
|
14859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14761
14860
|
OptionLink,
|
|
14762
14861
|
{
|
|
14763
14862
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -14775,11 +14874,11 @@ function ShopFilters({
|
|
|
14775
14874
|
);
|
|
14776
14875
|
}) }, attr.key);
|
|
14777
14876
|
}),
|
|
14778
|
-
showPriceGroup && /* @__PURE__ */ (0,
|
|
14877
|
+
showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
14779
14878
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
14780
14879
|
const nextMin = isActive ? void 0 : band.min;
|
|
14781
14880
|
const nextMax = isActive ? void 0 : band.max;
|
|
14782
|
-
return /* @__PURE__ */ (0,
|
|
14881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14783
14882
|
OptionLink,
|
|
14784
14883
|
{
|
|
14785
14884
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14790,7 +14889,7 @@ function ShopFilters({
|
|
|
14790
14889
|
i
|
|
14791
14890
|
);
|
|
14792
14891
|
}) }),
|
|
14793
|
-
hasOnSale && /* @__PURE__ */ (0,
|
|
14892
|
+
hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14794
14893
|
OptionLink,
|
|
14795
14894
|
{
|
|
14796
14895
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -14799,7 +14898,7 @@ function ShopFilters({
|
|
|
14799
14898
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
14800
14899
|
}
|
|
14801
14900
|
),
|
|
14802
|
-
/* @__PURE__ */ (0,
|
|
14901
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14803
14902
|
"a",
|
|
14804
14903
|
{
|
|
14805
14904
|
href: hrefs.clearAll(),
|
|
@@ -14816,7 +14915,7 @@ function ShopFilters({
|
|
|
14816
14915
|
|
|
14817
14916
|
// src/components/course-catalog-filters.tsx
|
|
14818
14917
|
var import_utils15 = require("@reblu/site-ui/utils");
|
|
14819
|
-
var
|
|
14918
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
14820
14919
|
var DEFAULT_COURSE_PRICE_BANDS = [
|
|
14821
14920
|
{ max: 5e3 },
|
|
14822
14921
|
{ min: 5e3, max: 15e3 },
|
|
@@ -14869,9 +14968,9 @@ function CourseCatalogFilters({
|
|
|
14869
14968
|
const showPrice = enabled.price !== false;
|
|
14870
14969
|
const isFree = Boolean(active.free);
|
|
14871
14970
|
if (!showCategories && !showInstructors && !showPrice) return null;
|
|
14872
|
-
return /* @__PURE__ */ (0,
|
|
14873
|
-
showCategories && /* @__PURE__ */ (0,
|
|
14874
|
-
/* @__PURE__ */ (0,
|
|
14971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: (0, import_utils15.cn)("space-y-6", className), "data-slot": "course-catalog-filters", children: [
|
|
14972
|
+
showCategories && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FilterFieldset, { legend: t.category, children: [
|
|
14973
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
14875
14974
|
OptionLink,
|
|
14876
14975
|
{
|
|
14877
14976
|
href: categoryHref(void 0),
|
|
@@ -14883,7 +14982,7 @@ function CourseCatalogFilters({
|
|
|
14883
14982
|
sortedCategories.map((category) => {
|
|
14884
14983
|
const isActive = active.category === category.slug;
|
|
14885
14984
|
const next2 = isActive ? void 0 : category.slug;
|
|
14886
|
-
return /* @__PURE__ */ (0,
|
|
14985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
14887
14986
|
OptionLink,
|
|
14888
14987
|
{
|
|
14889
14988
|
href: categoryHref(next2),
|
|
@@ -14895,8 +14994,8 @@ function CourseCatalogFilters({
|
|
|
14895
14994
|
);
|
|
14896
14995
|
})
|
|
14897
14996
|
] }),
|
|
14898
|
-
showInstructors && /* @__PURE__ */ (0,
|
|
14899
|
-
/* @__PURE__ */ (0,
|
|
14997
|
+
showInstructors && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FilterFieldset, { legend: t.instructor, children: [
|
|
14998
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
14900
14999
|
OptionLink,
|
|
14901
15000
|
{
|
|
14902
15001
|
href: hrefs.instructor(void 0),
|
|
@@ -14908,7 +15007,7 @@ function CourseCatalogFilters({
|
|
|
14908
15007
|
named.map((instructor) => {
|
|
14909
15008
|
const isActive = active.instructor === instructor.id;
|
|
14910
15009
|
const next2 = isActive ? void 0 : instructor.id;
|
|
14911
|
-
return /* @__PURE__ */ (0,
|
|
15010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
14912
15011
|
OptionLink,
|
|
14913
15012
|
{
|
|
14914
15013
|
href: hrefs.instructor(next2),
|
|
@@ -14920,8 +15019,8 @@ function CourseCatalogFilters({
|
|
|
14920
15019
|
);
|
|
14921
15020
|
})
|
|
14922
15021
|
] }),
|
|
14923
|
-
showPrice && /* @__PURE__ */ (0,
|
|
14924
|
-
/* @__PURE__ */ (0,
|
|
15022
|
+
showPrice && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FilterFieldset, { legend: t.price, children: [
|
|
15023
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
14925
15024
|
OptionLink,
|
|
14926
15025
|
{
|
|
14927
15026
|
href: hrefs.free(!isFree),
|
|
@@ -14936,7 +15035,7 @@ function CourseCatalogFilters({
|
|
|
14936
15035
|
const isActive = !isFree && active.priceMin === band.min && active.priceMax === band.max;
|
|
14937
15036
|
const nextMin = isActive ? void 0 : band.min;
|
|
14938
15037
|
const nextMax = isActive ? void 0 : band.max;
|
|
14939
|
-
return /* @__PURE__ */ (0,
|
|
15038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
14940
15039
|
OptionLink,
|
|
14941
15040
|
{
|
|
14942
15041
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14948,7 +15047,7 @@ function CourseCatalogFilters({
|
|
|
14948
15047
|
);
|
|
14949
15048
|
})
|
|
14950
15049
|
] }),
|
|
14951
|
-
/* @__PURE__ */ (0,
|
|
15050
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
14952
15051
|
"a",
|
|
14953
15052
|
{
|
|
14954
15053
|
href: hrefs.clearAll(),
|
|
@@ -14971,7 +15070,7 @@ function CourseCatalogFilters({
|
|
|
14971
15070
|
|
|
14972
15071
|
// src/components/cart-line-list.tsx
|
|
14973
15072
|
var import_utils16 = require("@reblu/site-ui/utils");
|
|
14974
|
-
var
|
|
15073
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
14975
15074
|
var DEFAULT_LABELS2 = {
|
|
14976
15075
|
quantityLabel: "Cantidad",
|
|
14977
15076
|
decrease: "Reducir cantidad",
|
|
@@ -14997,9 +15096,9 @@ function CartLineList({
|
|
|
14997
15096
|
}) {
|
|
14998
15097
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
14999
15098
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
15000
|
-
return /* @__PURE__ */ (0,
|
|
15001
|
-
/* @__PURE__ */ (0,
|
|
15002
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0,
|
|
15099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_utils16.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
15100
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
15101
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
15003
15102
|
"div",
|
|
15004
15103
|
{
|
|
15005
15104
|
role: "status",
|
|
@@ -15008,33 +15107,33 @@ function CartLineList({
|
|
|
15008
15107
|
children: noticeContent
|
|
15009
15108
|
}
|
|
15010
15109
|
),
|
|
15011
|
-
/* @__PURE__ */ (0,
|
|
15110
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
|
|
15012
15111
|
const maxQty = item.maxStock ?? Infinity;
|
|
15013
15112
|
const atMax = item.quantity >= maxQty;
|
|
15014
15113
|
const atMin = item.quantity <= 1;
|
|
15015
15114
|
const message = lineMessage?.(item);
|
|
15016
|
-
return /* @__PURE__ */ (0,
|
|
15115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
15017
15116
|
"li",
|
|
15018
15117
|
{
|
|
15019
15118
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
15020
15119
|
children: [
|
|
15021
|
-
/* @__PURE__ */ (0,
|
|
15022
|
-
/* @__PURE__ */ (0,
|
|
15023
|
-
/* @__PURE__ */ (0,
|
|
15024
|
-
item.variantName && /* @__PURE__ */ (0,
|
|
15025
|
-
/* @__PURE__ */ (0,
|
|
15120
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
15121
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
15122
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
15123
|
+
item.variantName && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
15124
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
15026
15125
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
15027
15126
|
" ",
|
|
15028
15127
|
t.unitPriceSuffix
|
|
15029
15128
|
] }),
|
|
15030
|
-
/* @__PURE__ */ (0,
|
|
15129
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
15031
15130
|
"div",
|
|
15032
15131
|
{
|
|
15033
15132
|
role: "group",
|
|
15034
15133
|
"aria-label": t.quantityLabel,
|
|
15035
15134
|
className: "mt-3 flex items-center gap-3",
|
|
15036
15135
|
children: [
|
|
15037
|
-
/* @__PURE__ */ (0,
|
|
15136
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
15038
15137
|
"button",
|
|
15039
15138
|
{
|
|
15040
15139
|
type: "button",
|
|
@@ -15045,8 +15144,8 @@ function CartLineList({
|
|
|
15045
15144
|
children: "\u2212"
|
|
15046
15145
|
}
|
|
15047
15146
|
),
|
|
15048
|
-
/* @__PURE__ */ (0,
|
|
15049
|
-
/* @__PURE__ */ (0,
|
|
15147
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
15148
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
15050
15149
|
"button",
|
|
15051
15150
|
{
|
|
15052
15151
|
type: "button",
|
|
@@ -15057,7 +15156,7 @@ function CartLineList({
|
|
|
15057
15156
|
children: "+"
|
|
15058
15157
|
}
|
|
15059
15158
|
),
|
|
15060
|
-
onRemove && /* @__PURE__ */ (0,
|
|
15159
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
15061
15160
|
"button",
|
|
15062
15161
|
{
|
|
15063
15162
|
type: "button",
|
|
@@ -15070,7 +15169,7 @@ function CartLineList({
|
|
|
15070
15169
|
]
|
|
15071
15170
|
}
|
|
15072
15171
|
),
|
|
15073
|
-
message != null && message !== false && /* @__PURE__ */ (0,
|
|
15172
|
+
message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
15074
15173
|
"p",
|
|
15075
15174
|
{
|
|
15076
15175
|
className: "mt-2 text-sm text-destructive",
|
|
@@ -15079,7 +15178,7 @@ function CartLineList({
|
|
|
15079
15178
|
}
|
|
15080
15179
|
)
|
|
15081
15180
|
] }),
|
|
15082
|
-
/* @__PURE__ */ (0,
|
|
15181
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
15083
15182
|
]
|
|
15084
15183
|
},
|
|
15085
15184
|
lineKey(item.productId, item.variantId)
|
|
@@ -15090,7 +15189,7 @@ function CartLineList({
|
|
|
15090
15189
|
|
|
15091
15190
|
// src/components/cart-summary.tsx
|
|
15092
15191
|
var import_utils17 = require("@reblu/site-ui/utils");
|
|
15093
|
-
var
|
|
15192
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
15094
15193
|
var DEFAULT_LABELS3 = {
|
|
15095
15194
|
subtotal: "Subtotal",
|
|
15096
15195
|
discountPrefix: "Descuento",
|
|
@@ -15120,37 +15219,37 @@ function CartSummary({
|
|
|
15120
15219
|
const hasDiscount = Boolean(discountAmount && discountAmount > 0);
|
|
15121
15220
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
15122
15221
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
15123
|
-
const breakdown = /* @__PURE__ */ (0,
|
|
15222
|
+
const breakdown = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
15124
15223
|
"dl",
|
|
15125
15224
|
{
|
|
15126
15225
|
className: (0, import_utils17.cn)("space-y-2 text-sm", !hasNotice && className),
|
|
15127
15226
|
"data-slot": "cart-summary",
|
|
15128
15227
|
children: [
|
|
15129
|
-
/* @__PURE__ */ (0,
|
|
15130
|
-
/* @__PURE__ */ (0,
|
|
15131
|
-
/* @__PURE__ */ (0,
|
|
15228
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
15229
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dt", { children: t.subtotal }),
|
|
15230
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
15132
15231
|
] }),
|
|
15133
|
-
hasDiscount && /* @__PURE__ */ (0,
|
|
15134
|
-
/* @__PURE__ */ (0,
|
|
15135
|
-
/* @__PURE__ */ (0,
|
|
15232
|
+
hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
15233
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
|
|
15234
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("dd", { children: [
|
|
15136
15235
|
"-",
|
|
15137
15236
|
formatPrice(discountAmount, currencyCode, locale)
|
|
15138
15237
|
] })
|
|
15139
15238
|
] }),
|
|
15140
|
-
shippingEnabled && /* @__PURE__ */ (0,
|
|
15141
|
-
/* @__PURE__ */ (0,
|
|
15142
|
-
/* @__PURE__ */ (0,
|
|
15239
|
+
shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
15240
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dt", { children: t.shipping }),
|
|
15241
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
15143
15242
|
] }),
|
|
15144
|
-
/* @__PURE__ */ (0,
|
|
15145
|
-
/* @__PURE__ */ (0,
|
|
15146
|
-
/* @__PURE__ */ (0,
|
|
15243
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
15244
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dt", { children: t.total }),
|
|
15245
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
15147
15246
|
] })
|
|
15148
15247
|
]
|
|
15149
15248
|
}
|
|
15150
15249
|
);
|
|
15151
15250
|
if (!hasNotice) return breakdown;
|
|
15152
|
-
return /* @__PURE__ */ (0,
|
|
15153
|
-
/* @__PURE__ */ (0,
|
|
15251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: (0, import_utils17.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
15252
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
15154
15253
|
"div",
|
|
15155
15254
|
{
|
|
15156
15255
|
role: "status",
|
|
@@ -15165,7 +15264,7 @@ function CartSummary({
|
|
|
15165
15264
|
|
|
15166
15265
|
// src/components/cart-adjustments-notice.tsx
|
|
15167
15266
|
var import_utils18 = require("@reblu/site-ui/utils");
|
|
15168
|
-
var
|
|
15267
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
15169
15268
|
var DEFAULT_LABELS4 = {
|
|
15170
15269
|
removed: (names) => names.length === 1 ? `Hemos quitado del carrito: ${names[0]}, ya no est\xE1 disponible.` : `Hemos quitado del carrito: ${names.join(", ")}, ya no est\xE1n disponibles.`,
|
|
15171
15270
|
quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
|
|
@@ -15199,20 +15298,20 @@ function CartAdjustmentsNotice({
|
|
|
15199
15298
|
);
|
|
15200
15299
|
}
|
|
15201
15300
|
if (messages.length === 0) return null;
|
|
15202
|
-
return /* @__PURE__ */ (0,
|
|
15301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
15203
15302
|
"div",
|
|
15204
15303
|
{
|
|
15205
15304
|
role: "status",
|
|
15206
15305
|
className: (0, import_utils18.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
|
|
15207
15306
|
"data-slot": "cart-adjustments-notice",
|
|
15208
|
-
children: messages.length === 1 ? /* @__PURE__ */ (0,
|
|
15307
|
+
children: messages.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { children: messages[0] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("li", { children: message }, index)) })
|
|
15209
15308
|
}
|
|
15210
15309
|
);
|
|
15211
15310
|
}
|
|
15212
15311
|
|
|
15213
15312
|
// src/components/added-to-cart-toast.tsx
|
|
15214
15313
|
var import_utils19 = require("@reblu/site-ui/utils");
|
|
15215
|
-
var
|
|
15314
|
+
var import_jsx_runtime23 = (
|
|
15216
15315
|
// eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
15217
15316
|
require("react/jsx-runtime")
|
|
15218
15317
|
);
|
|
@@ -15235,7 +15334,7 @@ function AddedToCartToast({
|
|
|
15235
15334
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
15236
15335
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
15237
15336
|
const variant = status === "success" ? "success" : "error";
|
|
15238
|
-
return /* @__PURE__ */ (0,
|
|
15337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
15239
15338
|
"div",
|
|
15240
15339
|
{
|
|
15241
15340
|
"data-slot": "added-to-cart-toast",
|
|
@@ -15247,12 +15346,12 @@ function AddedToCartToast({
|
|
|
15247
15346
|
className
|
|
15248
15347
|
),
|
|
15249
15348
|
children: [
|
|
15250
|
-
hasThumbnail && /* @__PURE__ */ (0,
|
|
15251
|
-
/* @__PURE__ */ (0,
|
|
15252
|
-
/* @__PURE__ */ (0,
|
|
15253
|
-
/* @__PURE__ */ (0,
|
|
15349
|
+
hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
15350
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
15351
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
15352
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
15254
15353
|
] }),
|
|
15255
|
-
/* @__PURE__ */ (0,
|
|
15354
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
15256
15355
|
]
|
|
15257
15356
|
}
|
|
15258
15357
|
);
|
|
@@ -15260,7 +15359,7 @@ function AddedToCartToast({
|
|
|
15260
15359
|
|
|
15261
15360
|
// src/components/checkout-login-prompt.tsx
|
|
15262
15361
|
var import_utils20 = require("@reblu/site-ui/utils");
|
|
15263
|
-
var
|
|
15362
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
15264
15363
|
var DEFAULT_LABELS6 = {
|
|
15265
15364
|
title: "Identificaci\xF3n",
|
|
15266
15365
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -15287,9 +15386,9 @@ function CheckoutLoginPrompt({
|
|
|
15287
15386
|
if (!open) return null;
|
|
15288
15387
|
const t = { ...DEFAULT_LABELS6, ...labels };
|
|
15289
15388
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
15290
|
-
return /* @__PURE__ */ (0,
|
|
15291
|
-
/* @__PURE__ */ (0,
|
|
15292
|
-
/* @__PURE__ */ (0,
|
|
15389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
15390
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
15391
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
15293
15392
|
"div",
|
|
15294
15393
|
{
|
|
15295
15394
|
role: "dialog",
|
|
@@ -15301,12 +15400,12 @@ function CheckoutLoginPrompt({
|
|
|
15301
15400
|
className
|
|
15302
15401
|
),
|
|
15303
15402
|
children: [
|
|
15304
|
-
/* @__PURE__ */ (0,
|
|
15305
|
-
/* @__PURE__ */ (0,
|
|
15306
|
-
/* @__PURE__ */ (0,
|
|
15307
|
-
/* @__PURE__ */ (0,
|
|
15403
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
15404
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
|
|
15405
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
15406
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
15308
15407
|
] }),
|
|
15309
|
-
/* @__PURE__ */ (0,
|
|
15408
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15310
15409
|
"button",
|
|
15311
15410
|
{
|
|
15312
15411
|
type: "button",
|
|
@@ -15317,9 +15416,9 @@ function CheckoutLoginPrompt({
|
|
|
15317
15416
|
}
|
|
15318
15417
|
)
|
|
15319
15418
|
] }),
|
|
15320
|
-
/* @__PURE__ */ (0,
|
|
15321
|
-
/* @__PURE__ */ (0,
|
|
15322
|
-
/* @__PURE__ */ (0,
|
|
15419
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "space-y-2", children: [
|
|
15420
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15421
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15323
15422
|
"input",
|
|
15324
15423
|
{
|
|
15325
15424
|
id: "checkout-login-prompt-email",
|
|
@@ -15334,10 +15433,10 @@ function CheckoutLoginPrompt({
|
|
|
15334
15433
|
)
|
|
15335
15434
|
}
|
|
15336
15435
|
),
|
|
15337
|
-
error && /* @__PURE__ */ (0,
|
|
15436
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-xs text-destructive", children: error })
|
|
15338
15437
|
] }),
|
|
15339
|
-
/* @__PURE__ */ (0,
|
|
15340
|
-
/* @__PURE__ */ (0,
|
|
15438
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "space-y-2", children: [
|
|
15439
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15341
15440
|
"button",
|
|
15342
15441
|
{
|
|
15343
15442
|
type: "button",
|
|
@@ -15350,7 +15449,7 @@ function CheckoutLoginPrompt({
|
|
|
15350
15449
|
children: checking ? t.checking : t.continueWithEmail
|
|
15351
15450
|
}
|
|
15352
15451
|
),
|
|
15353
|
-
/* @__PURE__ */ (0,
|
|
15452
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15354
15453
|
"button",
|
|
15355
15454
|
{
|
|
15356
15455
|
type: "button",
|
|
@@ -15369,7 +15468,7 @@ function CheckoutLoginPrompt({
|
|
|
15369
15468
|
// src/components/checkout-form.tsx
|
|
15370
15469
|
var import_utils21 = require("@reblu/site-ui/utils");
|
|
15371
15470
|
var import_phone_input = require("@reblu/site-ui/phone-input");
|
|
15372
|
-
var
|
|
15471
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
15373
15472
|
var DEFAULT_LABELS7 = {
|
|
15374
15473
|
contactTitle: "Datos de contacto",
|
|
15375
15474
|
nameLabel: "Nombre completo",
|
|
@@ -15425,9 +15524,9 @@ function CheckoutForm({
|
|
|
15425
15524
|
event.preventDefault();
|
|
15426
15525
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
15427
15526
|
}
|
|
15428
|
-
return /* @__PURE__ */ (0,
|
|
15527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
15429
15528
|
loginPrompt,
|
|
15430
|
-
/* @__PURE__ */ (0,
|
|
15529
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
15431
15530
|
"form",
|
|
15432
15531
|
{
|
|
15433
15532
|
"data-testid": "checkout-form",
|
|
@@ -15435,12 +15534,12 @@ function CheckoutForm({
|
|
|
15435
15534
|
className: (0, import_utils21.cn)("space-y-8", className),
|
|
15436
15535
|
"data-slot": "checkout-form",
|
|
15437
15536
|
children: [
|
|
15438
|
-
/* @__PURE__ */ (0,
|
|
15439
|
-
/* @__PURE__ */ (0,
|
|
15440
|
-
/* @__PURE__ */ (0,
|
|
15441
|
-
/* @__PURE__ */ (0,
|
|
15442
|
-
/* @__PURE__ */ (0,
|
|
15443
|
-
/* @__PURE__ */ (0,
|
|
15537
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("section", { className: "space-y-4", children: [
|
|
15538
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
15539
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15540
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-1", children: [
|
|
15541
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
15542
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15444
15543
|
"input",
|
|
15445
15544
|
{
|
|
15446
15545
|
id: "checkout-form-name",
|
|
@@ -15455,11 +15554,11 @@ function CheckoutForm({
|
|
|
15455
15554
|
)
|
|
15456
15555
|
}
|
|
15457
15556
|
),
|
|
15458
|
-
contactErrors?.name && /* @__PURE__ */ (0,
|
|
15557
|
+
contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
15459
15558
|
] }),
|
|
15460
|
-
/* @__PURE__ */ (0,
|
|
15461
|
-
/* @__PURE__ */ (0,
|
|
15462
|
-
/* @__PURE__ */ (0,
|
|
15559
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-1", children: [
|
|
15560
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15561
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15463
15562
|
"input",
|
|
15464
15563
|
{
|
|
15465
15564
|
id: "checkout-form-email",
|
|
@@ -15474,9 +15573,9 @@ function CheckoutForm({
|
|
|
15474
15573
|
)
|
|
15475
15574
|
}
|
|
15476
15575
|
),
|
|
15477
|
-
contactErrors?.email && /* @__PURE__ */ (0,
|
|
15576
|
+
contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
15478
15577
|
] }),
|
|
15479
|
-
/* @__PURE__ */ (0,
|
|
15578
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15480
15579
|
import_phone_input.PhoneInput,
|
|
15481
15580
|
{
|
|
15482
15581
|
id: "checkout-form-phone",
|
|
@@ -15490,26 +15589,26 @@ function CheckoutForm({
|
|
|
15490
15589
|
] })
|
|
15491
15590
|
] }),
|
|
15492
15591
|
children2,
|
|
15493
|
-
generalError ? /* @__PURE__ */ (0,
|
|
15494
|
-
/* @__PURE__ */ (0,
|
|
15495
|
-
/* @__PURE__ */ (0,
|
|
15496
|
-
autoDiscount ? /* @__PURE__ */ (0,
|
|
15592
|
+
generalError ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
15593
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("section", { className: "space-y-3", children: [
|
|
15594
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
15595
|
+
autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
15497
15596
|
"div",
|
|
15498
15597
|
{
|
|
15499
15598
|
className: "flex items-center gap-2 rounded-lg border border-green-200 bg-green-50 px-4 py-3 text-sm text-green-700 dark:border-green-800 dark:bg-green-900/20 dark:text-green-400",
|
|
15500
15599
|
"data-slot": "checkout-staff-discount",
|
|
15501
15600
|
children: [
|
|
15502
|
-
/* @__PURE__ */ (0,
|
|
15503
|
-
/* @__PURE__ */ (0,
|
|
15601
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "font-semibold", children: t.staffDiscountApplied }),
|
|
15602
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
|
|
15504
15603
|
]
|
|
15505
15604
|
}
|
|
15506
15605
|
) : null,
|
|
15507
|
-
appliedDiscount && !autoDiscount ? /* @__PURE__ */ (0,
|
|
15508
|
-
/* @__PURE__ */ (0,
|
|
15509
|
-
/* @__PURE__ */ (0,
|
|
15510
|
-
/* @__PURE__ */ (0,
|
|
15606
|
+
appliedDiscount && !autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("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: [
|
|
15607
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
15608
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
15609
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
15511
15610
|
] }),
|
|
15512
|
-
/* @__PURE__ */ (0,
|
|
15611
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15513
15612
|
"button",
|
|
15514
15613
|
{
|
|
15515
15614
|
type: "button",
|
|
@@ -15519,9 +15618,9 @@ function CheckoutForm({
|
|
|
15519
15618
|
children: t.removeDiscount
|
|
15520
15619
|
}
|
|
15521
15620
|
)
|
|
15522
|
-
] }) : /* @__PURE__ */ (0,
|
|
15523
|
-
/* @__PURE__ */ (0,
|
|
15524
|
-
/* @__PURE__ */ (0,
|
|
15621
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex gap-2", children: [
|
|
15622
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
15623
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15525
15624
|
"input",
|
|
15526
15625
|
{
|
|
15527
15626
|
id: "checkout-form-discount-code",
|
|
@@ -15533,7 +15632,7 @@ function CheckoutForm({
|
|
|
15533
15632
|
className: "flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm uppercase transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20"
|
|
15534
15633
|
}
|
|
15535
15634
|
),
|
|
15536
|
-
/* @__PURE__ */ (0,
|
|
15635
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15537
15636
|
"button",
|
|
15538
15637
|
{
|
|
15539
15638
|
type: "button",
|
|
@@ -15544,9 +15643,9 @@ function CheckoutForm({
|
|
|
15544
15643
|
}
|
|
15545
15644
|
)
|
|
15546
15645
|
] }),
|
|
15547
|
-
discountError && /* @__PURE__ */ (0,
|
|
15646
|
+
discountError && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-xs text-destructive", children: discountError })
|
|
15548
15647
|
] }),
|
|
15549
|
-
/* @__PURE__ */ (0,
|
|
15648
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15550
15649
|
"button",
|
|
15551
15650
|
{
|
|
15552
15651
|
type: "submit",
|
|
@@ -15569,7 +15668,7 @@ var import_utils23 = require("@reblu/site-ui/utils");
|
|
|
15569
15668
|
|
|
15570
15669
|
// src/components/order-invoice-link.tsx
|
|
15571
15670
|
var import_utils22 = require("@reblu/site-ui/utils");
|
|
15572
|
-
var
|
|
15671
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
15573
15672
|
var DEFAULT_LABELS8 = {
|
|
15574
15673
|
linkLabel: "Descargar la factura {number}",
|
|
15575
15674
|
signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
@@ -15577,8 +15676,8 @@ var DEFAULT_LABELS8 = {
|
|
|
15577
15676
|
function OrderInvoiceLink({ invoice, labels, className }) {
|
|
15578
15677
|
if (!invoice) return null;
|
|
15579
15678
|
const t = { ...DEFAULT_LABELS8, ...labels };
|
|
15580
|
-
return /* @__PURE__ */ (0,
|
|
15581
|
-
/* @__PURE__ */ (0,
|
|
15679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: (0, import_utils22.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
|
|
15680
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
15582
15681
|
"a",
|
|
15583
15682
|
{
|
|
15584
15683
|
href: invoice.url,
|
|
@@ -15586,12 +15685,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
|
|
|
15586
15685
|
children: t.linkLabel.replace("{number}", invoice.number)
|
|
15587
15686
|
}
|
|
15588
15687
|
),
|
|
15589
|
-
/* @__PURE__ */ (0,
|
|
15688
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
|
|
15590
15689
|
] });
|
|
15591
15690
|
}
|
|
15592
15691
|
|
|
15593
15692
|
// src/components/order-confirmation.tsx
|
|
15594
|
-
var
|
|
15693
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
15595
15694
|
var DEFAULT_LABELS9 = {
|
|
15596
15695
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
15597
15696
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
@@ -15657,43 +15756,43 @@ function OrderConfirmation({
|
|
|
15657
15756
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
15658
15757
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
15659
15758
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
15660
|
-
return /* @__PURE__ */ (0,
|
|
15661
|
-
/* @__PURE__ */ (0,
|
|
15662
|
-
/* @__PURE__ */ (0,
|
|
15663
|
-
showFullOrderSummary && order && /* @__PURE__ */ (0,
|
|
15664
|
-
/* @__PURE__ */ (0,
|
|
15665
|
-
/* @__PURE__ */ (0,
|
|
15666
|
-
/* @__PURE__ */ (0,
|
|
15759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: (0, import_utils23.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
15760
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h1", { className: "text-3xl font-bold", children: title }),
|
|
15761
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
15762
|
+
showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-6", children: [
|
|
15763
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15764
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
15765
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15667
15766
|
] }),
|
|
15668
|
-
/* @__PURE__ */ (0,
|
|
15669
|
-
order.items.map((item, idx) => /* @__PURE__ */ (0,
|
|
15767
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
15768
|
+
order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
15670
15769
|
"div",
|
|
15671
15770
|
{
|
|
15672
15771
|
className: "flex justify-between gap-4 text-sm",
|
|
15673
15772
|
children: [
|
|
15674
|
-
/* @__PURE__ */ (0,
|
|
15773
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
15675
15774
|
item.product.name,
|
|
15676
15775
|
item.variant ? ` (${item.variant.name})` : "",
|
|
15677
15776
|
" x",
|
|
15678
15777
|
item.quantity
|
|
15679
15778
|
] }),
|
|
15680
|
-
/* @__PURE__ */ (0,
|
|
15779
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
15681
15780
|
]
|
|
15682
15781
|
},
|
|
15683
15782
|
idx
|
|
15684
15783
|
)),
|
|
15685
|
-
/* @__PURE__ */ (0,
|
|
15686
|
-
/* @__PURE__ */ (0,
|
|
15687
|
-
/* @__PURE__ */ (0,
|
|
15784
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
15785
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: t.totalLabel }),
|
|
15786
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
15688
15787
|
] }) })
|
|
15689
15788
|
] }),
|
|
15690
|
-
/* @__PURE__ */ (0,
|
|
15789
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
15691
15790
|
t.confirmationEmailPrefix,
|
|
15692
15791
|
" ",
|
|
15693
|
-
/* @__PURE__ */ (0,
|
|
15792
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
15694
15793
|
"."
|
|
15695
15794
|
] }),
|
|
15696
|
-
/* @__PURE__ */ (0,
|
|
15795
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
15697
15796
|
OrderInvoiceLink,
|
|
15698
15797
|
{
|
|
15699
15798
|
invoice: order.invoice,
|
|
@@ -15701,11 +15800,11 @@ function OrderConfirmation({
|
|
|
15701
15800
|
}
|
|
15702
15801
|
)
|
|
15703
15802
|
] }),
|
|
15704
|
-
showOrderReference && order && /* @__PURE__ */ (0,
|
|
15705
|
-
/* @__PURE__ */ (0,
|
|
15706
|
-
/* @__PURE__ */ (0,
|
|
15803
|
+
showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15804
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
15805
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15707
15806
|
] }),
|
|
15708
|
-
status === "failed" && cartHref && /* @__PURE__ */ (0,
|
|
15807
|
+
status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
15709
15808
|
"a",
|
|
15710
15809
|
{
|
|
15711
15810
|
href: cartHref,
|
|
@@ -15713,7 +15812,7 @@ function OrderConfirmation({
|
|
|
15713
15812
|
children: t.backToCartLabel
|
|
15714
15813
|
}
|
|
15715
15814
|
),
|
|
15716
|
-
showRecheck && /* @__PURE__ */ (0,
|
|
15815
|
+
showRecheck && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
15717
15816
|
"button",
|
|
15718
15817
|
{
|
|
15719
15818
|
type: "button",
|
|
@@ -15722,16 +15821,16 @@ function OrderConfirmation({
|
|
|
15722
15821
|
children: t.recheckLabel
|
|
15723
15822
|
}
|
|
15724
15823
|
),
|
|
15725
|
-
showSessionReference && /* @__PURE__ */ (0,
|
|
15726
|
-
/* @__PURE__ */ (0,
|
|
15727
|
-
/* @__PURE__ */ (0,
|
|
15824
|
+
showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15825
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
15826
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
15728
15827
|
] })
|
|
15729
15828
|
] });
|
|
15730
15829
|
}
|
|
15731
15830
|
|
|
15732
15831
|
// src/components/full-invoice-fields.tsx
|
|
15733
15832
|
var import_utils24 = require("@reblu/site-ui/utils");
|
|
15734
|
-
var
|
|
15833
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
15735
15834
|
var EMPTY_FULL_INVOICE_VALUE = {
|
|
15736
15835
|
wantsFullInvoice: false,
|
|
15737
15836
|
billingIdType: "NIF",
|
|
@@ -15848,12 +15947,12 @@ function FullInvoiceFields({
|
|
|
15848
15947
|
const showFields = value.wantsFullInvoice || overCap;
|
|
15849
15948
|
const isSpanishNif = value.billingIdType === "NIF";
|
|
15850
15949
|
const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
|
|
15851
|
-
const error = (key2) => errors[key2] ? /* @__PURE__ */ (0,
|
|
15950
|
+
const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
|
|
15852
15951
|
const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
|
|
15853
|
-
return /* @__PURE__ */ (0,
|
|
15854
|
-
overCap ? /* @__PURE__ */ (0,
|
|
15855
|
-
/* @__PURE__ */ (0,
|
|
15856
|
-
/* @__PURE__ */ (0,
|
|
15952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("section", { className: (0, import_utils24.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
|
|
15953
|
+
overCap ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
|
|
15954
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
15955
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
15857
15956
|
"input",
|
|
15858
15957
|
{
|
|
15859
15958
|
type: "checkbox",
|
|
@@ -15863,12 +15962,12 @@ function FullInvoiceFields({
|
|
|
15863
15962
|
),
|
|
15864
15963
|
t.toggle
|
|
15865
15964
|
] }),
|
|
15866
|
-
/* @__PURE__ */ (0,
|
|
15965
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
|
|
15867
15966
|
] }),
|
|
15868
|
-
showFields && /* @__PURE__ */ (0,
|
|
15869
|
-
/* @__PURE__ */ (0,
|
|
15870
|
-
/* @__PURE__ */ (0,
|
|
15871
|
-
/* @__PURE__ */ (0,
|
|
15967
|
+
showFields && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15968
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
|
|
15969
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
|
|
15970
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
15872
15971
|
"select",
|
|
15873
15972
|
{
|
|
15874
15973
|
id: "full-invoice-id-type",
|
|
@@ -15877,14 +15976,14 @@ function FullInvoiceFields({
|
|
|
15877
15976
|
value: value.billingIdType,
|
|
15878
15977
|
onChange: (e) => set("billingIdType", e.target.value),
|
|
15879
15978
|
...invalid2("billingIdType"),
|
|
15880
|
-
children: ID_TYPES.map((type) => /* @__PURE__ */ (0,
|
|
15979
|
+
children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
|
|
15881
15980
|
}
|
|
15882
15981
|
),
|
|
15883
15982
|
error("billingIdType")
|
|
15884
15983
|
] }),
|
|
15885
|
-
!isSpanishNif && /* @__PURE__ */ (0,
|
|
15886
|
-
/* @__PURE__ */ (0,
|
|
15887
|
-
/* @__PURE__ */ (0,
|
|
15984
|
+
!isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
|
|
15985
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
|
|
15986
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
15888
15987
|
"select",
|
|
15889
15988
|
{
|
|
15890
15989
|
id: "full-invoice-id-country",
|
|
@@ -15894,16 +15993,16 @@ function FullInvoiceFields({
|
|
|
15894
15993
|
onChange: (e) => set("billingIdCountry", e.target.value),
|
|
15895
15994
|
...invalid2("billingIdCountry"),
|
|
15896
15995
|
children: [
|
|
15897
|
-
/* @__PURE__ */ (0,
|
|
15898
|
-
countries.map((c) => /* @__PURE__ */ (0,
|
|
15996
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
|
|
15997
|
+
countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: c.code, children: c.name }, c.code))
|
|
15899
15998
|
]
|
|
15900
15999
|
}
|
|
15901
16000
|
),
|
|
15902
16001
|
error("billingIdCountry")
|
|
15903
16002
|
] }),
|
|
15904
|
-
/* @__PURE__ */ (0,
|
|
15905
|
-
/* @__PURE__ */ (0,
|
|
15906
|
-
/* @__PURE__ */ (0,
|
|
16003
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
|
|
16004
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
|
|
16005
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
15907
16006
|
"input",
|
|
15908
16007
|
{
|
|
15909
16008
|
id: "full-invoice-nif",
|
|
@@ -15916,9 +16015,9 @@ function FullInvoiceFields({
|
|
|
15916
16015
|
),
|
|
15917
16016
|
error("billingNif")
|
|
15918
16017
|
] }),
|
|
15919
|
-
/* @__PURE__ */ (0,
|
|
15920
|
-
/* @__PURE__ */ (0,
|
|
15921
|
-
/* @__PURE__ */ (0,
|
|
16018
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
|
|
16019
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
|
|
16020
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
15922
16021
|
"input",
|
|
15923
16022
|
{
|
|
15924
16023
|
id: "full-invoice-name",
|
|
@@ -15931,9 +16030,9 @@ function FullInvoiceFields({
|
|
|
15931
16030
|
),
|
|
15932
16031
|
error("billingName")
|
|
15933
16032
|
] }),
|
|
15934
|
-
/* @__PURE__ */ (0,
|
|
15935
|
-
/* @__PURE__ */ (0,
|
|
15936
|
-
/* @__PURE__ */ (0,
|
|
16033
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
|
|
16034
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
|
|
16035
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
15937
16036
|
"input",
|
|
15938
16037
|
{
|
|
15939
16038
|
id: "full-invoice-street",
|
|
@@ -15945,9 +16044,9 @@ function FullInvoiceFields({
|
|
|
15945
16044
|
}
|
|
15946
16045
|
)
|
|
15947
16046
|
] }),
|
|
15948
|
-
/* @__PURE__ */ (0,
|
|
15949
|
-
/* @__PURE__ */ (0,
|
|
15950
|
-
/* @__PURE__ */ (0,
|
|
16047
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
|
|
16048
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
|
|
16049
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
15951
16050
|
"input",
|
|
15952
16051
|
{
|
|
15953
16052
|
id: "full-invoice-postal-code",
|
|
@@ -15958,9 +16057,9 @@ function FullInvoiceFields({
|
|
|
15958
16057
|
}
|
|
15959
16058
|
)
|
|
15960
16059
|
] }),
|
|
15961
|
-
/* @__PURE__ */ (0,
|
|
15962
|
-
/* @__PURE__ */ (0,
|
|
15963
|
-
/* @__PURE__ */ (0,
|
|
16060
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
|
|
16061
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
|
|
16062
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
15964
16063
|
"input",
|
|
15965
16064
|
{
|
|
15966
16065
|
id: "full-invoice-city",
|
|
@@ -15971,9 +16070,9 @@ function FullInvoiceFields({
|
|
|
15971
16070
|
}
|
|
15972
16071
|
)
|
|
15973
16072
|
] }),
|
|
15974
|
-
/* @__PURE__ */ (0,
|
|
15975
|
-
/* @__PURE__ */ (0,
|
|
15976
|
-
/* @__PURE__ */ (0,
|
|
16073
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
|
|
16074
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
|
|
16075
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
15977
16076
|
"select",
|
|
15978
16077
|
{
|
|
15979
16078
|
id: "full-invoice-country",
|
|
@@ -15981,18 +16080,18 @@ function FullInvoiceFields({
|
|
|
15981
16080
|
required: true,
|
|
15982
16081
|
value: value.country,
|
|
15983
16082
|
onChange: (e) => set("country", e.target.value),
|
|
15984
|
-
children: countries.map((c) => /* @__PURE__ */ (0,
|
|
16083
|
+
children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: c.code, children: c.name }, c.code))
|
|
15985
16084
|
}
|
|
15986
16085
|
)
|
|
15987
16086
|
] }),
|
|
15988
|
-
/* @__PURE__ */ (0,
|
|
16087
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "sm:col-span-2", children: error("address") })
|
|
15989
16088
|
] })
|
|
15990
16089
|
] });
|
|
15991
16090
|
}
|
|
15992
16091
|
|
|
15993
16092
|
// src/components/contact-interest-field.tsx
|
|
15994
16093
|
var import_utils25 = require("@reblu/site-ui/utils");
|
|
15995
|
-
var
|
|
16094
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
15996
16095
|
function ContactInterestField({
|
|
15997
16096
|
interest,
|
|
15998
16097
|
value,
|
|
@@ -16009,18 +16108,18 @@ function ContactInterestField({
|
|
|
16009
16108
|
else next2.delete(option2);
|
|
16010
16109
|
onChange(interest.options.filter((candidate) => next2.has(candidate)));
|
|
16011
16110
|
};
|
|
16012
|
-
return /* @__PURE__ */ (0,
|
|
16013
|
-
/* @__PURE__ */ (0,
|
|
16014
|
-
/* @__PURE__ */ (0,
|
|
16111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("fieldset", { "data-slot": "contact-interest", className: (0, import_utils25.cn)("space-y-2", className), children: [
|
|
16112
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("legend", { className: "text-sm font-medium", children: interest.label }),
|
|
16113
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
|
|
16015
16114
|
const id = `${idPrefix}-${index}`;
|
|
16016
|
-
return /* @__PURE__ */ (0,
|
|
16115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
16017
16116
|
"label",
|
|
16018
16117
|
{
|
|
16019
16118
|
htmlFor: id,
|
|
16020
16119
|
"data-slot": "contact-interest-option",
|
|
16021
16120
|
className: "flex items-center gap-2 text-sm",
|
|
16022
16121
|
children: [
|
|
16023
|
-
/* @__PURE__ */ (0,
|
|
16122
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
16024
16123
|
"input",
|
|
16025
16124
|
{
|
|
16026
16125
|
id,
|
|
@@ -16053,9 +16152,11 @@ var import_site_contracts = require("@reblu/site-contracts");
|
|
|
16053
16152
|
ContactInterestField,
|
|
16054
16153
|
CourseCatalogFilters,
|
|
16055
16154
|
CourseDescription,
|
|
16155
|
+
CoursePurchaseTerms,
|
|
16056
16156
|
DATA_REQUEST_TYPES,
|
|
16057
16157
|
DEFAULT_COURSE_CATALOG_FILTERS_LABELS,
|
|
16058
16158
|
DEFAULT_COURSE_PRICE_BANDS,
|
|
16159
|
+
DEFAULT_COURSE_PURCHASE_TERMS_LABELS,
|
|
16059
16160
|
DEFAULT_INVOICE_COUNTRIES,
|
|
16060
16161
|
DEFAULT_LESSON_PREVIEW_LABELS,
|
|
16061
16162
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
@@ -16067,6 +16168,7 @@ var import_site_contracts = require("@reblu/site-contracts");
|
|
|
16067
16168
|
EMPTY_FULL_INVOICE_VALUE,
|
|
16068
16169
|
FaqAccordion,
|
|
16069
16170
|
FullInvoiceFields,
|
|
16171
|
+
LegalDocument,
|
|
16070
16172
|
LessonPreview,
|
|
16071
16173
|
MarkdownRenderer,
|
|
16072
16174
|
OrderConfirmation,
|