@opensite/ui 2.8.8 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/about-culture-tabs.cjs +174 -174
- package/dist/about-culture-tabs.js +174 -174
- package/dist/about-developer-profile.cjs +200 -200
- package/dist/about-developer-profile.js +198 -198
- package/dist/about-developer-story.cjs +142 -142
- package/dist/about-developer-story.js +142 -142
- package/dist/about-mission-dual-image.cjs +142 -142
- package/dist/about-mission-dual-image.js +142 -142
- package/dist/about-mission-features.cjs +142 -142
- package/dist/about-mission-features.js +142 -142
- package/dist/about-network-spotlight.cjs +142 -142
- package/dist/about-network-spotlight.js +142 -142
- package/dist/about-story-expertise.cjs +142 -142
- package/dist/about-story-expertise.js +142 -142
- package/dist/about-streamline-team.cjs +142 -142
- package/dist/about-streamline-team.js +142 -142
- package/dist/carousel-feature-badge.cjs +162 -42
- package/dist/carousel-feature-badge.d.cts +14 -1
- package/dist/carousel-feature-badge.d.ts +14 -1
- package/dist/carousel-feature-badge.js +163 -43
- package/dist/community-initiatives.cjs +142 -142
- package/dist/community-initiatives.js +142 -142
- package/dist/components.cjs +723 -1378
- package/dist/components.d.cts +0 -2
- package/dist/components.d.ts +0 -2
- package/dist/components.js +633 -1287
- package/dist/contact-map.cjs +14 -1083
- package/dist/contact-map.d.cts +13 -3
- package/dist/contact-map.d.ts +13 -3
- package/dist/contact-map.js +14 -1083
- package/dist/cta-feature-checklist.cjs +142 -142
- package/dist/cta-feature-checklist.js +142 -142
- package/dist/faq-numbered-grid.cjs +142 -142
- package/dist/faq-numbered-grid.js +142 -142
- package/dist/feature-animated-carousel.cjs +142 -142
- package/dist/feature-animated-carousel.js +142 -142
- package/dist/feature-bento-utilities.cjs +142 -142
- package/dist/feature-bento-utilities.js +142 -142
- package/dist/feature-capabilities-grid.cjs +142 -142
- package/dist/feature-capabilities-grid.js +142 -142
- package/dist/feature-category-image-cards.cjs +142 -142
- package/dist/feature-category-image-cards.js +142 -142
- package/dist/feature-icon-grid-bordered.cjs +142 -142
- package/dist/feature-icon-grid-bordered.js +142 -142
- package/dist/feature-icon-grid-muted.cjs +142 -142
- package/dist/feature-icon-grid-muted.js +142 -142
- package/dist/feature-numbered-cards.cjs +142 -142
- package/dist/feature-numbered-cards.js +142 -142
- package/dist/feature-three-column-values.cjs +142 -142
- package/dist/feature-three-column-values.js +142 -142
- package/dist/hero-ad-campaign-expert.cjs +142 -142
- package/dist/hero-ad-campaign-expert.js +142 -142
- package/dist/hero-adaptable-product-grid.cjs +142 -142
- package/dist/hero-adaptable-product-grid.js +142 -142
- package/dist/hero-agency-animated-images.cjs +142 -142
- package/dist/hero-agency-animated-images.js +142 -142
- package/dist/hero-announcement-badge.cjs +142 -142
- package/dist/hero-announcement-badge.js +142 -142
- package/dist/hero-badge-image-split.cjs +142 -142
- package/dist/hero-badge-image-split.js +142 -142
- package/dist/hero-business-carousel-dots.cjs +142 -142
- package/dist/hero-business-carousel-dots.js +142 -142
- package/dist/hero-business-operations-mosaic.cjs +142 -142
- package/dist/hero-business-operations-mosaic.js +142 -142
- package/dist/hero-conversation-intelligence.cjs +142 -142
- package/dist/hero-conversation-intelligence.js +142 -142
- package/dist/hero-creative-studio-stacked.cjs +142 -142
- package/dist/hero-creative-studio-stacked.js +142 -142
- package/dist/hero-crm-streamlined.cjs +142 -142
- package/dist/hero-crm-streamlined.js +142 -142
- package/dist/hero-customer-support-layered.cjs +142 -142
- package/dist/hero-customer-support-layered.js +142 -142
- package/dist/hero-design-showcase-logos.cjs +142 -142
- package/dist/hero-design-showcase-logos.js +142 -142
- package/dist/hero-design-system-3d.cjs +142 -142
- package/dist/hero-design-system-3d.js +142 -142
- package/dist/hero-developer-tools-code.cjs +142 -142
- package/dist/hero-developer-tools-code.js +142 -142
- package/dist/hero-digital-agency-fullscreen.cjs +142 -142
- package/dist/hero-digital-agency-fullscreen.js +142 -142
- package/dist/hero-ecommerce-product-showcase.cjs +174 -174
- package/dist/hero-ecommerce-product-showcase.js +174 -174
- package/dist/hero-event-registration.cjs +142 -142
- package/dist/hero-event-registration.js +142 -142
- package/dist/hero-fullscreen-background-image.cjs +142 -142
- package/dist/hero-fullscreen-background-image.js +142 -142
- package/dist/hero-gradient-avatars-rating.cjs +142 -142
- package/dist/hero-gradient-avatars-rating.js +142 -142
- package/dist/hero-gradient-client-focused.cjs +142 -142
- package/dist/hero-gradient-client-focused.js +142 -142
- package/dist/hero-hiring-animated-text.cjs +142 -142
- package/dist/hero-hiring-animated-text.js +142 -142
- package/dist/hero-image-left-content.cjs +142 -142
- package/dist/hero-image-left-content.js +142 -142
- package/dist/hero-innovation-image-grid.cjs +142 -142
- package/dist/hero-innovation-image-grid.js +142 -142
- package/dist/hero-mental-health-team.cjs +142 -142
- package/dist/hero-mental-health-team.js +142 -142
- package/dist/hero-minimal-centered-dark.cjs +174 -174
- package/dist/hero-minimal-centered-dark.js +174 -174
- package/dist/hero-presentation-platform-video.cjs +142 -142
- package/dist/hero-presentation-platform-video.js +142 -142
- package/dist/hero-product-showcase-floating.cjs +174 -174
- package/dist/hero-product-showcase-floating.js +174 -174
- package/dist/hero-shared-inbox-layered.cjs +142 -142
- package/dist/hero-shared-inbox-layered.js +142 -142
- package/dist/hero-software-growth-video-dialog.cjs +142 -142
- package/dist/hero-software-growth-video-dialog.js +142 -142
- package/dist/hero-spiral-pattern-cards.cjs +174 -174
- package/dist/hero-spiral-pattern-cards.js +174 -174
- package/dist/hero-split-geometric-shapes.cjs +142 -142
- package/dist/hero-split-geometric-shapes.js +142 -142
- package/dist/hero-startup-launch-cta.cjs +174 -174
- package/dist/hero-startup-launch-cta.js +174 -174
- package/dist/hero-stats-social-proof.cjs +174 -174
- package/dist/hero-stats-social-proof.js +174 -174
- package/dist/hero-task-timer-animated.cjs +142 -142
- package/dist/hero-task-timer-animated.js +142 -142
- package/dist/hero-testimonial-image-grid.cjs +142 -142
- package/dist/hero-testimonial-image-grid.js +142 -142
- package/dist/hero-therapy-testimonial-grid.cjs +142 -142
- package/dist/hero-therapy-testimonial-grid.js +142 -142
- package/dist/hero-ui-library-showcase.cjs +142 -142
- package/dist/hero-ui-library-showcase.js +142 -142
- package/dist/hero-video-background-dark.cjs +174 -174
- package/dist/hero-video-background-dark.js +174 -174
- package/dist/hero-video-dialog-gradient.cjs +142 -142
- package/dist/hero-video-dialog-gradient.js +142 -142
- package/dist/hero-video-overlay-stars.cjs +142 -142
- package/dist/hero-video-overlay-stars.js +142 -142
- package/dist/hero-welcome-asymmetric-images.cjs +142 -142
- package/dist/hero-welcome-asymmetric-images.js +142 -142
- package/dist/index.cjs +725 -1380
- package/dist/index.d.cts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +634 -1288
- package/dist/registry.cjs +2201 -2827
- package/dist/registry.js +948 -1574
- package/dist/testimonials-masonry-grid.cjs +142 -142
- package/dist/testimonials-masonry-grid.js +142 -142
- package/dist/testimonials-stats-header.cjs +159 -159
- package/dist/testimonials-stats-header.js +159 -159
- package/package.json +4 -7
- package/dist/geo-map.cjs +0 -1117
- package/dist/geo-map.d.cts +0 -92
- package/dist/geo-map.d.ts +0 -92
- package/dist/geo-map.js +0 -1095
package/dist/index.cjs
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var React4 = require('react');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
-
var maps = require('@page-speed/maps');
|
|
9
|
-
var classVarianceAuthority = require('class-variance-authority');
|
|
10
|
-
var icon = require('@page-speed/icon');
|
|
11
|
-
var img = require('@page-speed/img');
|
|
12
8
|
var framerMotion = require('framer-motion');
|
|
13
9
|
var useOnClickOutside = require('@opensite/hooks/useOnClickOutside');
|
|
14
10
|
var react = require('motion/react');
|
|
11
|
+
var img = require('@page-speed/img');
|
|
15
12
|
var reactSlot = require('@radix-ui/react-slot');
|
|
13
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
16
14
|
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
15
|
+
var icon = require('@page-speed/icon');
|
|
17
16
|
var usePlatformFromUrl = require('@opensite/hooks/usePlatformFromUrl');
|
|
18
17
|
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
19
18
|
var integration = require('@page-speed/forms/integration');
|
|
@@ -36,7 +35,7 @@ function _interopNamespace(e) {
|
|
|
36
35
|
return Object.freeze(n);
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
var
|
|
38
|
+
var React4__namespace = /*#__PURE__*/_interopNamespace(React4);
|
|
40
39
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
41
40
|
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
42
41
|
|
|
@@ -143,7 +142,7 @@ var maxWidthStyles = {
|
|
|
143
142
|
"4xl": "max-w-[1536px]",
|
|
144
143
|
full: "max-w-full"
|
|
145
144
|
};
|
|
146
|
-
var Container =
|
|
145
|
+
var Container = React4__namespace.default.forwardRef(
|
|
147
146
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
148
147
|
const Component = as;
|
|
149
148
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -449,7 +448,7 @@ var spacingStyles = {
|
|
|
449
448
|
};
|
|
450
449
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl", "hero"];
|
|
451
450
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
452
|
-
var Section =
|
|
451
|
+
var Section = React4__namespace.default.forwardRef(
|
|
453
452
|
({
|
|
454
453
|
id,
|
|
455
454
|
title,
|
|
@@ -510,1145 +509,65 @@ var Section = React6__namespace.default.forwardRef(
|
|
|
510
509
|
}
|
|
511
510
|
);
|
|
512
511
|
Section.displayName = "Section";
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
const
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
|
|
546
|
-
return phoneRegex.test(trimmed);
|
|
547
|
-
}
|
|
548
|
-
function isInternalUrl(href) {
|
|
549
|
-
if (typeof window === "undefined") {
|
|
550
|
-
return href.startsWith("/") && !href.startsWith("//");
|
|
551
|
-
}
|
|
552
|
-
const trimmed = href.trim();
|
|
553
|
-
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
554
|
-
return true;
|
|
555
|
-
}
|
|
556
|
-
try {
|
|
557
|
-
const url = new URL(trimmed, window.location.href);
|
|
558
|
-
const currentOrigin = window.location.origin;
|
|
559
|
-
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
560
|
-
return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
|
|
561
|
-
} catch {
|
|
562
|
-
return false;
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
function toRelativePath(href) {
|
|
566
|
-
if (typeof window === "undefined") {
|
|
567
|
-
return href;
|
|
568
|
-
}
|
|
569
|
-
const trimmed = href.trim();
|
|
570
|
-
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
571
|
-
return trimmed;
|
|
572
|
-
}
|
|
573
|
-
try {
|
|
574
|
-
const url = new URL(trimmed, window.location.href);
|
|
575
|
-
const currentOrigin = window.location.origin;
|
|
576
|
-
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
577
|
-
if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
|
|
578
|
-
return url.pathname + url.search + url.hash;
|
|
579
|
-
}
|
|
580
|
-
} catch {
|
|
581
|
-
}
|
|
582
|
-
return trimmed;
|
|
583
|
-
}
|
|
584
|
-
function useNavigation({
|
|
585
|
-
href,
|
|
586
|
-
onClick
|
|
587
|
-
} = {}) {
|
|
588
|
-
const linkType = React6__namespace.useMemo(() => {
|
|
589
|
-
if (!href || href.trim() === "") {
|
|
590
|
-
return onClick ? "none" : "none";
|
|
591
|
-
}
|
|
592
|
-
const trimmed = href.trim();
|
|
593
|
-
if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
|
|
594
|
-
return "mailto";
|
|
595
|
-
}
|
|
596
|
-
if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
|
|
597
|
-
return "tel";
|
|
598
|
-
}
|
|
599
|
-
if (isInternalUrl(trimmed)) {
|
|
600
|
-
return "internal";
|
|
601
|
-
}
|
|
602
|
-
try {
|
|
603
|
-
new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
|
|
604
|
-
return "external";
|
|
605
|
-
} catch {
|
|
606
|
-
return "internal";
|
|
607
|
-
}
|
|
608
|
-
}, [href, onClick]);
|
|
609
|
-
const normalizedHref = React6__namespace.useMemo(() => {
|
|
610
|
-
if (!href || href.trim() === "") {
|
|
611
|
-
return void 0;
|
|
612
|
-
}
|
|
613
|
-
const trimmed = href.trim();
|
|
614
|
-
switch (linkType) {
|
|
615
|
-
case "tel":
|
|
616
|
-
return normalizePhoneNumber(trimmed);
|
|
617
|
-
case "mailto":
|
|
618
|
-
return normalizeEmail(trimmed);
|
|
619
|
-
case "internal":
|
|
620
|
-
return toRelativePath(trimmed);
|
|
621
|
-
case "external":
|
|
622
|
-
return trimmed;
|
|
623
|
-
default:
|
|
624
|
-
return trimmed;
|
|
625
|
-
}
|
|
626
|
-
}, [href, linkType]);
|
|
627
|
-
const target = React6__namespace.useMemo(() => {
|
|
628
|
-
switch (linkType) {
|
|
629
|
-
case "external":
|
|
630
|
-
return "_blank";
|
|
631
|
-
case "internal":
|
|
632
|
-
return "_self";
|
|
633
|
-
case "mailto":
|
|
634
|
-
case "tel":
|
|
635
|
-
return void 0;
|
|
636
|
-
default:
|
|
637
|
-
return void 0;
|
|
512
|
+
var sizeStyles = {
|
|
513
|
+
sm: "max-w-md",
|
|
514
|
+
md: "max-w-2xl",
|
|
515
|
+
lg: "max-w-4xl",
|
|
516
|
+
xl: "max-w-5xl",
|
|
517
|
+
full: "max-w-7xl",
|
|
518
|
+
compact: "max-w-[700px]"
|
|
519
|
+
};
|
|
520
|
+
var dialogTransition = {
|
|
521
|
+
duration: 0.35,
|
|
522
|
+
ease: [0.16, 1, 0.3, 1]
|
|
523
|
+
};
|
|
524
|
+
function AnimatedDialog({
|
|
525
|
+
open,
|
|
526
|
+
onOpenChange,
|
|
527
|
+
title,
|
|
528
|
+
eyebrow,
|
|
529
|
+
description,
|
|
530
|
+
children,
|
|
531
|
+
header,
|
|
532
|
+
footer,
|
|
533
|
+
size = "lg",
|
|
534
|
+
className,
|
|
535
|
+
contentClassName,
|
|
536
|
+
featuredMediaHeader
|
|
537
|
+
}) {
|
|
538
|
+
const titleId = React4.useId();
|
|
539
|
+
const descriptionId = React4.useId();
|
|
540
|
+
const containerRef = React4.useRef(null);
|
|
541
|
+
useOnClickOutside.useOnClickOutside(containerRef, () => {
|
|
542
|
+
if (open) {
|
|
543
|
+
onOpenChange(false);
|
|
638
544
|
}
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
if (
|
|
642
|
-
return
|
|
545
|
+
});
|
|
546
|
+
React4.useEffect(() => {
|
|
547
|
+
if (!open) {
|
|
548
|
+
return;
|
|
643
549
|
}
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
const isInternal = linkType === "internal";
|
|
648
|
-
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
649
|
-
const handleClick = React6__namespace.useCallback(
|
|
650
|
-
(event) => {
|
|
651
|
-
if (onClick) {
|
|
652
|
-
try {
|
|
653
|
-
onClick(event);
|
|
654
|
-
} catch (error) {
|
|
655
|
-
console.error("Error in user onClick handler:", error);
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
if (event.defaultPrevented) {
|
|
659
|
-
return;
|
|
550
|
+
const onKeyDown = (event) => {
|
|
551
|
+
if (event.key === "Escape") {
|
|
552
|
+
onOpenChange(false);
|
|
660
553
|
}
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
[onClick, shouldUseRouter, normalizedHref]
|
|
679
|
-
);
|
|
680
|
-
return {
|
|
681
|
-
linkType,
|
|
682
|
-
normalizedHref,
|
|
683
|
-
target,
|
|
684
|
-
rel,
|
|
685
|
-
isExternal,
|
|
686
|
-
isInternal,
|
|
687
|
-
shouldUseRouter,
|
|
688
|
-
handleClick
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
|
-
var baseStyles = [
|
|
692
|
-
// Layout
|
|
693
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
|
|
694
|
-
// Typography - using CSS variables with sensible defaults
|
|
695
|
-
"font-[var(--button-font-family,inherit)]",
|
|
696
|
-
"font-[var(--button-font-weight,500)]",
|
|
697
|
-
"tracking-[var(--button-letter-spacing,0)]",
|
|
698
|
-
"leading-[var(--button-line-height,1.25)]",
|
|
699
|
-
"[text-transform:var(--button-text-transform,none)]",
|
|
700
|
-
"text-sm",
|
|
701
|
-
// Border radius
|
|
702
|
-
"rounded-[var(--button-radius,var(--radius,0.375rem))]",
|
|
703
|
-
// Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
|
|
704
|
-
"[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
|
|
705
|
-
// Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
|
|
706
|
-
"[box-shadow:var(--button-shadow,none)]",
|
|
707
|
-
"hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
|
|
708
|
-
// Disabled state
|
|
709
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
710
|
-
// SVG handling
|
|
711
|
-
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
712
|
-
// Focus styles
|
|
713
|
-
"outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
714
|
-
// Invalid state
|
|
715
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
716
|
-
].join(" ");
|
|
717
|
-
var buttonVariants = classVarianceAuthority.cva(baseStyles, {
|
|
718
|
-
variants: {
|
|
719
|
-
variant: {
|
|
720
|
-
// Default (Primary) variant - full customization
|
|
721
|
-
default: [
|
|
722
|
-
"bg-[var(--button-default-bg,hsl(var(--primary)))]",
|
|
723
|
-
"text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
|
|
724
|
-
"border-[length:var(--button-default-border-width,0px)]",
|
|
725
|
-
"border-[color:var(--button-default-border,transparent)]",
|
|
726
|
-
"[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
|
|
727
|
-
"hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
|
|
728
|
-
"hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
|
|
729
|
-
"hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
|
|
730
|
-
"hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
|
|
731
|
-
].join(" "),
|
|
732
|
-
// Destructive variant - full customization
|
|
733
|
-
destructive: [
|
|
734
|
-
"bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
|
|
735
|
-
"text-[var(--button-destructive-fg,white)]",
|
|
736
|
-
"border-[length:var(--button-destructive-border-width,0px)]",
|
|
737
|
-
"border-[color:var(--button-destructive-border,transparent)]",
|
|
738
|
-
"[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
|
|
739
|
-
"hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
|
|
740
|
-
"hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
|
|
741
|
-
"hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
|
|
742
|
-
"hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
|
|
743
|
-
"focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
744
|
-
"dark:bg-destructive/60"
|
|
745
|
-
].join(" "),
|
|
746
|
-
// Outline variant - full customization with proper border handling
|
|
747
|
-
outline: [
|
|
748
|
-
"bg-[var(--button-outline-bg,hsl(var(--background)))]",
|
|
749
|
-
"text-[var(--button-outline-fg,inherit)]",
|
|
750
|
-
"border-[length:var(--button-outline-border-width,1px)]",
|
|
751
|
-
"border-[color:var(--button-outline-border,hsl(var(--border)))]",
|
|
752
|
-
"[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
|
|
753
|
-
"hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
|
|
754
|
-
"hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
|
|
755
|
-
"hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
|
|
756
|
-
"hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
|
|
757
|
-
"dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
|
|
758
|
-
].join(" "),
|
|
759
|
-
// Secondary variant - full customization
|
|
760
|
-
secondary: [
|
|
761
|
-
"bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
|
|
762
|
-
"text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
|
|
763
|
-
"border-[length:var(--button-secondary-border-width,0px)]",
|
|
764
|
-
"border-[color:var(--button-secondary-border,transparent)]",
|
|
765
|
-
"[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
|
|
766
|
-
"hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
|
|
767
|
-
"hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
|
|
768
|
-
"hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
|
|
769
|
-
"hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
|
|
770
|
-
].join(" "),
|
|
771
|
-
// Ghost variant - full customization
|
|
772
|
-
ghost: [
|
|
773
|
-
"bg-[var(--button-ghost-bg,transparent)]",
|
|
774
|
-
"text-[var(--button-ghost-fg,inherit)]",
|
|
775
|
-
"border-[length:var(--button-ghost-border-width,0px)]",
|
|
776
|
-
"border-[color:var(--button-ghost-border,transparent)]",
|
|
777
|
-
"[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
|
|
778
|
-
"hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
|
|
779
|
-
"hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
|
|
780
|
-
"hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
|
|
781
|
-
"hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
|
|
782
|
-
"dark:hover:bg-accent/50"
|
|
783
|
-
].join(" "),
|
|
784
|
-
// Link variant - full customization
|
|
785
|
-
link: [
|
|
786
|
-
"bg-[var(--button-link-bg,transparent)]",
|
|
787
|
-
"text-[var(--button-link-fg,hsl(var(--primary)))]",
|
|
788
|
-
"border-[length:var(--button-link-border-width,0px)]",
|
|
789
|
-
"border-[color:var(--button-link-border,transparent)]",
|
|
790
|
-
"[box-shadow:var(--button-link-shadow,none)]",
|
|
791
|
-
"hover:bg-[var(--button-link-hover-bg,transparent)]",
|
|
792
|
-
"hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
|
|
793
|
-
"hover:[box-shadow:var(--button-link-shadow-hover,none)]",
|
|
794
|
-
"underline-offset-4 hover:underline"
|
|
795
|
-
].join(" ")
|
|
796
|
-
},
|
|
797
|
-
size: {
|
|
798
|
-
default: [
|
|
799
|
-
"h-[var(--button-height-md,2.25rem)]",
|
|
800
|
-
"px-[var(--button-padding-x-md,1rem)]",
|
|
801
|
-
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
802
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
803
|
-
].join(" "),
|
|
804
|
-
sm: [
|
|
805
|
-
"h-[var(--button-height-sm,2rem)]",
|
|
806
|
-
"px-[var(--button-padding-x-sm,0.75rem)]",
|
|
807
|
-
"py-[var(--button-padding-y-sm,0.25rem)]",
|
|
808
|
-
"gap-1.5",
|
|
809
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
|
|
810
|
-
].join(" "),
|
|
811
|
-
md: [
|
|
812
|
-
"h-[var(--button-height-md,2.25rem)]",
|
|
813
|
-
"px-[var(--button-padding-x-md,1rem)]",
|
|
814
|
-
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
815
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
816
|
-
].join(" "),
|
|
817
|
-
lg: [
|
|
818
|
-
"h-[var(--button-height-lg,2.5rem)]",
|
|
819
|
-
"px-[var(--button-padding-x-lg,1.5rem)]",
|
|
820
|
-
"py-[var(--button-padding-y-lg,0.5rem)]",
|
|
821
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
|
|
822
|
-
].join(" "),
|
|
823
|
-
icon: "size-[var(--button-height-md,2.25rem)]",
|
|
824
|
-
"icon-sm": "size-[var(--button-height-sm,2rem)]",
|
|
825
|
-
"icon-lg": "size-[var(--button-height-lg,2.5rem)]"
|
|
826
|
-
}
|
|
827
|
-
},
|
|
828
|
-
defaultVariants: {
|
|
829
|
-
variant: "default",
|
|
830
|
-
size: "default"
|
|
831
|
-
}
|
|
832
|
-
});
|
|
833
|
-
var Pressable = React6__namespace.forwardRef(
|
|
834
|
-
({
|
|
835
|
-
children,
|
|
836
|
-
className,
|
|
837
|
-
href,
|
|
838
|
-
onClick,
|
|
839
|
-
variant,
|
|
840
|
-
size,
|
|
841
|
-
asButton = false,
|
|
842
|
-
fallbackComponentType = "span",
|
|
843
|
-
componentType,
|
|
844
|
-
"aria-label": ariaLabel,
|
|
845
|
-
"aria-describedby": ariaDescribedby,
|
|
846
|
-
id,
|
|
847
|
-
...props
|
|
848
|
-
}, ref) => {
|
|
849
|
-
const navigation = useNavigation({ href, onClick });
|
|
850
|
-
const {
|
|
851
|
-
normalizedHref,
|
|
852
|
-
target,
|
|
853
|
-
rel,
|
|
854
|
-
linkType,
|
|
855
|
-
isInternal,
|
|
856
|
-
isExternal,
|
|
857
|
-
handleClick
|
|
858
|
-
} = navigation;
|
|
859
|
-
const shouldRenderLink = normalizedHref && linkType !== "none";
|
|
860
|
-
const shouldRenderButton = !shouldRenderLink && onClick;
|
|
861
|
-
const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
|
|
862
|
-
const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
|
|
863
|
-
const shouldApplyButtonStyles = asButton || variant || size;
|
|
864
|
-
const combinedClassName = cn(
|
|
865
|
-
shouldApplyButtonStyles && buttonVariants({ variant, size }),
|
|
866
|
-
className
|
|
867
|
-
);
|
|
868
|
-
const dataProps = Object.fromEntries(
|
|
869
|
-
Object.entries(props).filter(([key]) => key.startsWith("data-"))
|
|
870
|
-
);
|
|
871
|
-
const buttonDataAttributes = shouldApplyButtonStyles ? {
|
|
872
|
-
"data-slot": "button",
|
|
873
|
-
"data-variant": variant ?? "default",
|
|
874
|
-
"data-size": size ?? "default"
|
|
875
|
-
} : {};
|
|
876
|
-
const commonProps = {
|
|
877
|
-
className: combinedClassName,
|
|
878
|
-
onClick: handleClick,
|
|
879
|
-
"aria-label": ariaLabel,
|
|
880
|
-
"aria-describedby": ariaDescribedby,
|
|
881
|
-
id,
|
|
882
|
-
...dataProps,
|
|
883
|
-
...buttonDataAttributes
|
|
884
|
-
};
|
|
885
|
-
if (finalComponentType === "a" && shouldRenderLink) {
|
|
886
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
887
|
-
"a",
|
|
888
|
-
{
|
|
889
|
-
ref,
|
|
890
|
-
href: normalizedHref,
|
|
891
|
-
target,
|
|
892
|
-
rel,
|
|
893
|
-
...commonProps,
|
|
894
|
-
...props,
|
|
895
|
-
children
|
|
896
|
-
}
|
|
897
|
-
);
|
|
898
|
-
}
|
|
899
|
-
if (finalComponentType === "button") {
|
|
900
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
901
|
-
"button",
|
|
902
|
-
{
|
|
903
|
-
ref,
|
|
904
|
-
type: props.type || "button",
|
|
905
|
-
...commonProps,
|
|
906
|
-
...props,
|
|
907
|
-
children
|
|
908
|
-
}
|
|
909
|
-
);
|
|
910
|
-
}
|
|
911
|
-
if (finalComponentType === "div") {
|
|
912
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
913
|
-
"div",
|
|
914
|
-
{
|
|
915
|
-
ref,
|
|
916
|
-
...commonProps,
|
|
917
|
-
children
|
|
918
|
-
}
|
|
919
|
-
);
|
|
920
|
-
}
|
|
921
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
922
|
-
"span",
|
|
923
|
-
{
|
|
924
|
-
ref,
|
|
925
|
-
...commonProps,
|
|
926
|
-
children
|
|
927
|
-
}
|
|
928
|
-
);
|
|
929
|
-
}
|
|
930
|
-
);
|
|
931
|
-
Pressable.displayName = "Pressable";
|
|
932
|
-
var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
|
|
933
|
-
var DynamicIcon = React6__namespace.memo(function DynamicIcon2({
|
|
934
|
-
apiKey,
|
|
935
|
-
...props
|
|
936
|
-
}) {
|
|
937
|
-
return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
|
|
938
|
-
});
|
|
939
|
-
DynamicIcon.displayName = "DynamicIcon";
|
|
940
|
-
var PANEL_POSITION_CLASS = {
|
|
941
|
-
"top-left": "left-4 top-4",
|
|
942
|
-
"top-right": "right-4 top-4",
|
|
943
|
-
"bottom-left": "bottom-4 left-4",
|
|
944
|
-
"bottom-right": "bottom-4 right-4"
|
|
945
|
-
};
|
|
946
|
-
var DEFAULT_VIEW_STATE = {
|
|
947
|
-
latitude: 39.5,
|
|
948
|
-
longitude: -98.35,
|
|
949
|
-
zoom: 3
|
|
950
|
-
};
|
|
951
|
-
var VIDEO_FILE_EXTENSION_REGEX = /\.(mp4|webm|ogg|mov|m4v|m3u8)(\?.*)?$/i;
|
|
952
|
-
function resolveMediaType(item) {
|
|
953
|
-
if (item.type) {
|
|
954
|
-
return item.type;
|
|
955
|
-
}
|
|
956
|
-
return VIDEO_FILE_EXTENSION_REGEX.test(item.src) ? "video" : "image";
|
|
957
|
-
}
|
|
958
|
-
function normalizeId(value, fallback) {
|
|
959
|
-
if (value === null || value === void 0 || value === "") {
|
|
960
|
-
return fallback;
|
|
961
|
-
}
|
|
962
|
-
return String(value);
|
|
963
|
-
}
|
|
964
|
-
function buildClusterCenter(markers) {
|
|
965
|
-
if (!markers.length) {
|
|
966
|
-
return null;
|
|
967
|
-
}
|
|
968
|
-
const total = markers.reduce(
|
|
969
|
-
(accumulator, marker) => ({
|
|
970
|
-
latitude: accumulator.latitude + marker.latitude,
|
|
971
|
-
longitude: accumulator.longitude + marker.longitude
|
|
972
|
-
}),
|
|
973
|
-
{ latitude: 0, longitude: 0 }
|
|
974
|
-
);
|
|
975
|
-
return {
|
|
976
|
-
latitude: total.latitude / markers.length,
|
|
977
|
-
longitude: total.longitude / markers.length
|
|
978
|
-
};
|
|
979
|
-
}
|
|
980
|
-
function resolveActionKey(action, index) {
|
|
981
|
-
if (typeof action.label === "string" && action.label.trim().length > 0) {
|
|
982
|
-
return `label:${action.label}:${index}`;
|
|
983
|
-
}
|
|
984
|
-
if (action.href) {
|
|
985
|
-
return `href:${action.href}:${index}`;
|
|
986
|
-
}
|
|
987
|
-
return `action:${index}`;
|
|
988
|
-
}
|
|
989
|
-
function MarkerActions({ actions }) {
|
|
990
|
-
if (!actions || actions.length === 0) {
|
|
991
|
-
return null;
|
|
992
|
-
}
|
|
993
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 flex flex-wrap gap-2", children: actions.map((action, index) => {
|
|
994
|
-
const {
|
|
995
|
-
label,
|
|
996
|
-
icon,
|
|
997
|
-
iconAfter,
|
|
998
|
-
children,
|
|
999
|
-
href,
|
|
1000
|
-
onClick,
|
|
1001
|
-
className: actionClassName,
|
|
1002
|
-
variant,
|
|
1003
|
-
size,
|
|
1004
|
-
asButton,
|
|
1005
|
-
...rest
|
|
1006
|
-
} = action;
|
|
1007
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1008
|
-
Pressable,
|
|
1009
|
-
{
|
|
1010
|
-
href,
|
|
1011
|
-
onClick,
|
|
1012
|
-
variant: variant ?? (index === 0 ? "default" : "outline"),
|
|
1013
|
-
size: size ?? "sm",
|
|
1014
|
-
asButton: asButton ?? true,
|
|
1015
|
-
className: cn("inline-flex items-center gap-2", actionClassName),
|
|
1016
|
-
...rest,
|
|
1017
|
-
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1018
|
-
icon,
|
|
1019
|
-
label,
|
|
1020
|
-
iconAfter
|
|
1021
|
-
] })
|
|
1022
|
-
},
|
|
1023
|
-
resolveActionKey(action, index)
|
|
1024
|
-
);
|
|
1025
|
-
}) });
|
|
1026
|
-
}
|
|
1027
|
-
function MarkerMediaCarousel({
|
|
1028
|
-
mediaItems,
|
|
1029
|
-
optixFlowConfig
|
|
1030
|
-
}) {
|
|
1031
|
-
const [activeIndex, setActiveIndex] = React6__namespace.useState(0);
|
|
1032
|
-
const totalItems = mediaItems.length;
|
|
1033
|
-
const mediaResetKey = React6__namespace.useMemo(
|
|
1034
|
-
() => mediaItems.map((item, index) => {
|
|
1035
|
-
const itemId = normalizeId(item.id, `media-${index}`);
|
|
1036
|
-
return `${itemId}:${item.src}:${item.type ?? ""}:${item.poster ?? ""}`;
|
|
1037
|
-
}).join("|"),
|
|
1038
|
-
[mediaItems]
|
|
1039
|
-
);
|
|
1040
|
-
const activeItemIndex = Math.min(activeIndex, Math.max(0, totalItems - 1));
|
|
1041
|
-
React6__namespace.useEffect(() => {
|
|
1042
|
-
setActiveIndex(0);
|
|
1043
|
-
}, [mediaResetKey]);
|
|
1044
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative border-b border-border/60 bg-muted/40", children: [
|
|
1045
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative aspect-video w-full overflow-hidden", children: mediaItems.map((item, index) => {
|
|
1046
|
-
const isActive = index === activeItemIndex;
|
|
1047
|
-
const mediaType = resolveMediaType(item);
|
|
1048
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1049
|
-
"div",
|
|
1050
|
-
{
|
|
1051
|
-
"aria-hidden": !isActive,
|
|
1052
|
-
className: cn(
|
|
1053
|
-
"absolute inset-0 transition-opacity duration-500 ease-in-out",
|
|
1054
|
-
isActive ? "opacity-100 z-[1]" : "opacity-0 z-0 pointer-events-none"
|
|
1055
|
-
),
|
|
1056
|
-
children: mediaType === "video" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1057
|
-
"video",
|
|
1058
|
-
{
|
|
1059
|
-
className: "h-full w-full object-cover",
|
|
1060
|
-
controls: isActive,
|
|
1061
|
-
preload: "metadata",
|
|
1062
|
-
poster: item.poster,
|
|
1063
|
-
tabIndex: isActive ? 0 : -1,
|
|
1064
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("source", { src: item.src })
|
|
1065
|
-
}
|
|
1066
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1067
|
-
img.Img,
|
|
1068
|
-
{
|
|
1069
|
-
src: item.src,
|
|
1070
|
-
alt: item.alt ?? "Map marker media",
|
|
1071
|
-
className: "h-full w-full object-cover",
|
|
1072
|
-
loading: "eager",
|
|
1073
|
-
optixFlowConfig
|
|
1074
|
-
}
|
|
1075
|
-
)
|
|
1076
|
-
},
|
|
1077
|
-
normalizeId(item.id, `media-slide-${index}`)
|
|
1078
|
-
);
|
|
1079
|
-
}) }),
|
|
1080
|
-
totalItems > 1 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1081
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1082
|
-
"button",
|
|
1083
|
-
{
|
|
1084
|
-
type: "button",
|
|
1085
|
-
"aria-label": "Show previous media",
|
|
1086
|
-
className: "absolute left-4 top-1/2 inline-flex size-10 -translate-y-1/2 items-center justify-center rounded-2xl bg-card text-card-foreground shadow-lg border-4 border-black hover:border-white hover:bg-black hover:text-white transition-all duration-500 z-[2]",
|
|
1087
|
-
onClick: () => {
|
|
1088
|
-
setActiveIndex(
|
|
1089
|
-
(current) => (current - 1 + totalItems) % totalItems
|
|
1090
|
-
);
|
|
1091
|
-
},
|
|
1092
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/arrow-left", size: 18 })
|
|
1093
|
-
}
|
|
1094
|
-
),
|
|
1095
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1096
|
-
"button",
|
|
1097
|
-
{
|
|
1098
|
-
type: "button",
|
|
1099
|
-
"aria-label": "Show next media",
|
|
1100
|
-
className: "absolute right-4 top-1/2 inline-flex size-10 -translate-y-1/2 items-center justify-center rounded-2xl bg-card text-card-foreground shadow-lg border-4 border-black hover:border-white hover:bg-black hover:text-white transition-all duration-500 z-[2]",
|
|
1101
|
-
onClick: () => {
|
|
1102
|
-
setActiveIndex((current) => (current + 1) % totalItems);
|
|
1103
|
-
},
|
|
1104
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/arrow-right", size: 18 })
|
|
1105
|
-
}
|
|
1106
|
-
),
|
|
1107
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-2 left-1/2 flex -translate-x-1/2 items-center gap-1.5 z-[2]", children: mediaItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1108
|
-
"button",
|
|
1109
|
-
{
|
|
1110
|
-
type: "button",
|
|
1111
|
-
"aria-label": `Show media item ${index + 1}`,
|
|
1112
|
-
className: cn(
|
|
1113
|
-
"h-2 rounded-full transition-all duration-300",
|
|
1114
|
-
index === activeItemIndex ? "w-6 bg-card" : "w-2 bg-card opacity-50 hover:opacity-100"
|
|
1115
|
-
),
|
|
1116
|
-
onClick: () => setActiveIndex(index)
|
|
1117
|
-
},
|
|
1118
|
-
normalizeId(item.id, `media-dot-${index}`)
|
|
1119
|
-
)) })
|
|
1120
|
-
] }) : null
|
|
1121
|
-
] });
|
|
1122
|
-
}
|
|
1123
|
-
function getMarkerTitle(marker, markerIndex) {
|
|
1124
|
-
if (marker.title !== void 0 && marker.title !== null) {
|
|
1125
|
-
return marker.title;
|
|
1126
|
-
}
|
|
1127
|
-
if (marker.label !== void 0 && marker.label !== null) {
|
|
1128
|
-
return marker.label;
|
|
1129
|
-
}
|
|
1130
|
-
return `Location ${markerIndex + 1}`;
|
|
1131
|
-
}
|
|
1132
|
-
function GeoMap({
|
|
1133
|
-
className,
|
|
1134
|
-
mapWrapperClassName,
|
|
1135
|
-
mapClassName,
|
|
1136
|
-
panelClassName,
|
|
1137
|
-
panelPosition = "top-left",
|
|
1138
|
-
stadiaApiKey = "",
|
|
1139
|
-
mapStyle = "osm-bright",
|
|
1140
|
-
styleUrl,
|
|
1141
|
-
mapLibreCssHref,
|
|
1142
|
-
markers = [],
|
|
1143
|
-
clusters = [],
|
|
1144
|
-
viewState,
|
|
1145
|
-
defaultViewState,
|
|
1146
|
-
onViewStateChange,
|
|
1147
|
-
onMapClick,
|
|
1148
|
-
onMarkerDrag,
|
|
1149
|
-
showNavigationControl = true,
|
|
1150
|
-
showGeolocateControl = false,
|
|
1151
|
-
navigationControlPosition = "top-right",
|
|
1152
|
-
geolocateControlPosition = "top-left",
|
|
1153
|
-
flyToOptions,
|
|
1154
|
-
markerFocusZoom = 14,
|
|
1155
|
-
clusterFocusZoom = 5,
|
|
1156
|
-
selectedMarkerId,
|
|
1157
|
-
initialSelectedMarkerId,
|
|
1158
|
-
onSelectionChange,
|
|
1159
|
-
clearSelectionOnMapClick = true,
|
|
1160
|
-
mapChildren,
|
|
1161
|
-
optixFlowConfig
|
|
1162
|
-
}) {
|
|
1163
|
-
const normalizedStandaloneMarkers = React6__namespace.useMemo(
|
|
1164
|
-
() => markers.map((marker, index) => ({
|
|
1165
|
-
...marker,
|
|
1166
|
-
id: normalizeId(marker.id, `marker-${index}`)
|
|
1167
|
-
})),
|
|
1168
|
-
[markers]
|
|
1169
|
-
);
|
|
1170
|
-
const normalizedClusters = React6__namespace.useMemo(() => {
|
|
1171
|
-
const results = [];
|
|
1172
|
-
clusters.forEach((cluster, clusterIndex) => {
|
|
1173
|
-
const clusterId = normalizeId(cluster.id, `cluster-${clusterIndex}`);
|
|
1174
|
-
const normalizedClusterMarkers = cluster.markers.map(
|
|
1175
|
-
(marker, markerIndex) => ({
|
|
1176
|
-
...marker,
|
|
1177
|
-
id: normalizeId(marker.id, `${clusterId}-marker-${markerIndex}`),
|
|
1178
|
-
clusterId
|
|
1179
|
-
})
|
|
1180
|
-
);
|
|
1181
|
-
const clusterCenter = cluster.latitude !== void 0 && cluster.longitude !== void 0 ? { latitude: cluster.latitude, longitude: cluster.longitude } : buildClusterCenter(normalizedClusterMarkers);
|
|
1182
|
-
if (!clusterCenter) {
|
|
1183
|
-
return;
|
|
1184
|
-
}
|
|
1185
|
-
results.push({
|
|
1186
|
-
...cluster,
|
|
1187
|
-
id: clusterId,
|
|
1188
|
-
latitude: clusterCenter.latitude,
|
|
1189
|
-
longitude: clusterCenter.longitude,
|
|
1190
|
-
markers: normalizedClusterMarkers
|
|
1191
|
-
});
|
|
1192
|
-
});
|
|
1193
|
-
return results;
|
|
1194
|
-
}, [clusters]);
|
|
1195
|
-
const markerLookup = React6__namespace.useMemo(() => {
|
|
1196
|
-
const lookup = /* @__PURE__ */ new Map();
|
|
1197
|
-
normalizedStandaloneMarkers.forEach((marker) => {
|
|
1198
|
-
lookup.set(marker.id, marker);
|
|
1199
|
-
});
|
|
1200
|
-
normalizedClusters.forEach((cluster) => {
|
|
1201
|
-
cluster.markers.forEach((marker) => {
|
|
1202
|
-
lookup.set(marker.id, marker);
|
|
1203
|
-
});
|
|
1204
|
-
});
|
|
1205
|
-
return lookup;
|
|
1206
|
-
}, [normalizedClusters, normalizedStandaloneMarkers]);
|
|
1207
|
-
const clusterLookup = React6__namespace.useMemo(() => {
|
|
1208
|
-
const lookup = /* @__PURE__ */ new Map();
|
|
1209
|
-
normalizedClusters.forEach((cluster) => {
|
|
1210
|
-
lookup.set(cluster.id, cluster);
|
|
1211
|
-
});
|
|
1212
|
-
return lookup;
|
|
1213
|
-
}, [normalizedClusters]);
|
|
1214
|
-
const firstCoordinate = React6__namespace.useMemo(() => {
|
|
1215
|
-
if (normalizedStandaloneMarkers.length > 0) {
|
|
1216
|
-
const firstStandaloneMarker = normalizedStandaloneMarkers[0];
|
|
1217
|
-
return {
|
|
1218
|
-
latitude: firstStandaloneMarker.latitude,
|
|
1219
|
-
longitude: firstStandaloneMarker.longitude
|
|
1220
|
-
};
|
|
1221
|
-
}
|
|
1222
|
-
if (normalizedClusters.length > 0) {
|
|
1223
|
-
const firstCluster = normalizedClusters[0];
|
|
1224
|
-
return {
|
|
1225
|
-
latitude: firstCluster.latitude,
|
|
1226
|
-
longitude: firstCluster.longitude
|
|
1227
|
-
};
|
|
1228
|
-
}
|
|
1229
|
-
return {
|
|
1230
|
-
latitude: DEFAULT_VIEW_STATE.latitude,
|
|
1231
|
-
longitude: DEFAULT_VIEW_STATE.longitude
|
|
1232
|
-
};
|
|
1233
|
-
}, [normalizedClusters, normalizedStandaloneMarkers]);
|
|
1234
|
-
const [uncontrolledViewState, setUncontrolledViewState] = React6__namespace.useState({
|
|
1235
|
-
latitude: defaultViewState?.latitude ?? firstCoordinate.latitude,
|
|
1236
|
-
longitude: defaultViewState?.longitude ?? firstCoordinate.longitude,
|
|
1237
|
-
zoom: defaultViewState?.zoom ?? DEFAULT_VIEW_STATE.zoom
|
|
1238
|
-
});
|
|
1239
|
-
const isControlledViewState = viewState !== void 0;
|
|
1240
|
-
const resolvedViewState = isControlledViewState ? viewState : uncontrolledViewState;
|
|
1241
|
-
const applyViewState = React6__namespace.useCallback(
|
|
1242
|
-
(nextState) => {
|
|
1243
|
-
if (!isControlledViewState) {
|
|
1244
|
-
setUncontrolledViewState((current) => {
|
|
1245
|
-
const next = { ...current, ...nextState };
|
|
1246
|
-
const hasChanged = current.latitude !== next.latitude || current.longitude !== next.longitude || current.zoom !== next.zoom;
|
|
1247
|
-
return hasChanged ? next : current;
|
|
1248
|
-
});
|
|
1249
|
-
}
|
|
1250
|
-
onViewStateChange?.(nextState);
|
|
1251
|
-
},
|
|
1252
|
-
[isControlledViewState, onViewStateChange]
|
|
1253
|
-
);
|
|
1254
|
-
const [selection, setSelection] = React6__namespace.useState(() => {
|
|
1255
|
-
if (initialSelectedMarkerId !== void 0 && initialSelectedMarkerId !== null) {
|
|
1256
|
-
return {
|
|
1257
|
-
type: "marker",
|
|
1258
|
-
markerId: String(initialSelectedMarkerId)
|
|
1259
|
-
};
|
|
1260
|
-
}
|
|
1261
|
-
return { type: "none" };
|
|
1262
|
-
});
|
|
1263
|
-
React6__namespace.useEffect(() => {
|
|
1264
|
-
if (selectedMarkerId === void 0 || selectedMarkerId === null) {
|
|
1265
|
-
return;
|
|
1266
|
-
}
|
|
1267
|
-
setSelection({
|
|
1268
|
-
type: "marker",
|
|
1269
|
-
markerId: String(selectedMarkerId)
|
|
1270
|
-
});
|
|
1271
|
-
}, [selectedMarkerId]);
|
|
1272
|
-
const selectedMarker = selection.markerId ? markerLookup.get(selection.markerId) : void 0;
|
|
1273
|
-
const selectedCluster = selection.clusterId ? clusterLookup.get(selection.clusterId) : void 0;
|
|
1274
|
-
React6__namespace.useEffect(() => {
|
|
1275
|
-
if (selection.type === "marker" && selection.markerId && !selectedMarker) {
|
|
1276
|
-
setSelection({ type: "none" });
|
|
1277
|
-
onSelectionChange?.({ type: "none" });
|
|
1278
|
-
}
|
|
1279
|
-
}, [onSelectionChange, selectedMarker, selection]);
|
|
1280
|
-
const emitSelectionChange = React6__namespace.useCallback(
|
|
1281
|
-
(nextSelection) => {
|
|
1282
|
-
if (nextSelection.type === "none") {
|
|
1283
|
-
onSelectionChange?.({ type: "none" });
|
|
1284
|
-
return;
|
|
1285
|
-
}
|
|
1286
|
-
if (nextSelection.type === "marker") {
|
|
1287
|
-
const parentCluster = nextSelection.marker.clusterId ? clusterLookup.get(nextSelection.marker.clusterId) : void 0;
|
|
1288
|
-
onSelectionChange?.({
|
|
1289
|
-
type: "marker",
|
|
1290
|
-
marker: nextSelection.marker,
|
|
1291
|
-
cluster: parentCluster
|
|
1292
|
-
});
|
|
1293
|
-
return;
|
|
1294
|
-
}
|
|
1295
|
-
onSelectionChange?.({
|
|
1296
|
-
type: "cluster",
|
|
1297
|
-
cluster: nextSelection.cluster
|
|
1298
|
-
});
|
|
1299
|
-
},
|
|
1300
|
-
[clusterLookup, onSelectionChange]
|
|
1301
|
-
);
|
|
1302
|
-
const selectMarker = React6__namespace.useCallback(
|
|
1303
|
-
(marker) => {
|
|
1304
|
-
setSelection({
|
|
1305
|
-
type: "marker",
|
|
1306
|
-
markerId: marker.id,
|
|
1307
|
-
clusterId: marker.clusterId
|
|
1308
|
-
});
|
|
1309
|
-
applyViewState({
|
|
1310
|
-
latitude: marker.latitude,
|
|
1311
|
-
longitude: marker.longitude,
|
|
1312
|
-
zoom: markerFocusZoom
|
|
1313
|
-
});
|
|
1314
|
-
emitSelectionChange({ type: "marker", marker });
|
|
1315
|
-
},
|
|
1316
|
-
[applyViewState, emitSelectionChange, markerFocusZoom]
|
|
1317
|
-
);
|
|
1318
|
-
const selectCluster = React6__namespace.useCallback(
|
|
1319
|
-
(cluster) => {
|
|
1320
|
-
setSelection({
|
|
1321
|
-
type: "cluster",
|
|
1322
|
-
clusterId: cluster.id
|
|
1323
|
-
});
|
|
1324
|
-
applyViewState({
|
|
1325
|
-
latitude: cluster.latitude,
|
|
1326
|
-
longitude: cluster.longitude,
|
|
1327
|
-
zoom: clusterFocusZoom
|
|
1328
|
-
});
|
|
1329
|
-
emitSelectionChange({ type: "cluster", cluster });
|
|
1330
|
-
},
|
|
1331
|
-
[applyViewState, clusterFocusZoom, emitSelectionChange]
|
|
1332
|
-
);
|
|
1333
|
-
const clearSelection = React6__namespace.useCallback(() => {
|
|
1334
|
-
setSelection({ type: "none" });
|
|
1335
|
-
emitSelectionChange({ type: "none" });
|
|
1336
|
-
}, [emitSelectionChange]);
|
|
1337
|
-
const mapMarkers = React6__namespace.useMemo(() => {
|
|
1338
|
-
const resolvedMarkers = [];
|
|
1339
|
-
normalizedClusters.forEach((cluster) => {
|
|
1340
|
-
const isSelected = selection.type === "cluster" && selection.clusterId === cluster.id;
|
|
1341
|
-
resolvedMarkers.push({
|
|
1342
|
-
id: `cluster-pin:${cluster.id}`,
|
|
1343
|
-
latitude: cluster.latitude,
|
|
1344
|
-
longitude: cluster.longitude,
|
|
1345
|
-
element: () => {
|
|
1346
|
-
const customMarkerElement = cluster.markerElement;
|
|
1347
|
-
const markerBody = typeof customMarkerElement === "function" ? customMarkerElement({
|
|
1348
|
-
isSelected,
|
|
1349
|
-
count: cluster.markers.length
|
|
1350
|
-
}) : customMarkerElement;
|
|
1351
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1352
|
-
"button",
|
|
1353
|
-
{
|
|
1354
|
-
type: "button",
|
|
1355
|
-
className: "group cursor-pointer",
|
|
1356
|
-
onClick: (event) => {
|
|
1357
|
-
event.preventDefault();
|
|
1358
|
-
event.stopPropagation();
|
|
1359
|
-
selectCluster(cluster);
|
|
1360
|
-
},
|
|
1361
|
-
"aria-label": `View ${cluster.markers.length} clustered locations`,
|
|
1362
|
-
children: markerBody ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1363
|
-
"span",
|
|
1364
|
-
{
|
|
1365
|
-
className: cn(
|
|
1366
|
-
"inline-flex min-h-10 min-w-10 items-center justify-center rounded-full border-2 border-white px-2 text-xs font-semibold text-white shadow-lg transition-transform duration-200 group-hover:scale-105",
|
|
1367
|
-
isSelected && "ring-4 ring-primary/30",
|
|
1368
|
-
cluster.pinClassName
|
|
1369
|
-
),
|
|
1370
|
-
style: {
|
|
1371
|
-
backgroundColor: cluster.pinColor ?? "var(--foreground)"
|
|
1372
|
-
},
|
|
1373
|
-
children: cluster.markers.length
|
|
1374
|
-
}
|
|
1375
|
-
)
|
|
1376
|
-
}
|
|
1377
|
-
);
|
|
1378
|
-
}
|
|
1379
|
-
});
|
|
1380
|
-
});
|
|
1381
|
-
normalizedStandaloneMarkers.forEach((marker) => {
|
|
1382
|
-
const isSelected = selection.type === "marker" && selection.markerId === marker.id;
|
|
1383
|
-
const customMarkerElement = marker.markerElement;
|
|
1384
|
-
resolvedMarkers.push({
|
|
1385
|
-
id: marker.id,
|
|
1386
|
-
latitude: marker.latitude,
|
|
1387
|
-
longitude: marker.longitude,
|
|
1388
|
-
draggable: marker.draggable,
|
|
1389
|
-
element: () => {
|
|
1390
|
-
const markerBody = typeof customMarkerElement === "function" ? customMarkerElement({ isSelected }) : customMarkerElement;
|
|
1391
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1392
|
-
"button",
|
|
1393
|
-
{
|
|
1394
|
-
type: "button",
|
|
1395
|
-
className: "group cursor-pointer",
|
|
1396
|
-
onClick: (event) => {
|
|
1397
|
-
event.preventDefault();
|
|
1398
|
-
event.stopPropagation();
|
|
1399
|
-
selectMarker(marker);
|
|
1400
|
-
},
|
|
1401
|
-
"aria-label": typeof marker.title === "string" ? `View ${marker.title}` : "View location details",
|
|
1402
|
-
children: markerBody ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1403
|
-
"span",
|
|
1404
|
-
{
|
|
1405
|
-
className: cn(
|
|
1406
|
-
"inline-flex h-4 w-4 rounded-full border-2 border-white shadow-md transition-transform duration-200 group-hover:scale-110",
|
|
1407
|
-
isSelected && "h-5 w-5 ring-4 ring-primary/30",
|
|
1408
|
-
marker.pinClassName
|
|
1409
|
-
),
|
|
1410
|
-
style: {
|
|
1411
|
-
backgroundColor: marker.pinColor ?? "#f43f5e"
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
|
-
)
|
|
1415
|
-
}
|
|
1416
|
-
);
|
|
1417
|
-
}
|
|
1418
|
-
});
|
|
1419
|
-
});
|
|
1420
|
-
return resolvedMarkers;
|
|
1421
|
-
}, [
|
|
1422
|
-
normalizedClusters,
|
|
1423
|
-
normalizedStandaloneMarkers,
|
|
1424
|
-
selectCluster,
|
|
1425
|
-
selectMarker,
|
|
1426
|
-
selection
|
|
1427
|
-
]);
|
|
1428
|
-
const renderMarkerPanel = () => {
|
|
1429
|
-
if (selectedMarker) {
|
|
1430
|
-
const markerMediaItems = selectedMarker.mediaItems ?? [];
|
|
1431
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1432
|
-
"div",
|
|
1433
|
-
{
|
|
1434
|
-
className: cn(
|
|
1435
|
-
"relative w-[min(24rem,calc(100vw-2rem))] overflow-hidden rounded-xl border border-border bg-card text-card-foreground shadow-2xl",
|
|
1436
|
-
panelClassName
|
|
1437
|
-
),
|
|
1438
|
-
children: [
|
|
1439
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1440
|
-
"button",
|
|
1441
|
-
{
|
|
1442
|
-
type: "button",
|
|
1443
|
-
"aria-label": "Close marker details",
|
|
1444
|
-
className: "\n flex size-12 items-center justify-center rounded-bl-lg rounded-br-0 rounded-t-0 bg-black text-white transition-all duration-500 absolute top-0 right-0 z-10 cursor-pointer ring-4 ring-white\n",
|
|
1445
|
-
onClick: clearSelection,
|
|
1446
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", size: 20 })
|
|
1447
|
-
}
|
|
1448
|
-
),
|
|
1449
|
-
markerMediaItems.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1450
|
-
MarkerMediaCarousel,
|
|
1451
|
-
{
|
|
1452
|
-
mediaItems: markerMediaItems,
|
|
1453
|
-
optixFlowConfig
|
|
1454
|
-
}
|
|
1455
|
-
) : null,
|
|
1456
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 p-4", children: [
|
|
1457
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start justify-between gap-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 space-y-1", children: [
|
|
1458
|
-
selectedMarker.eyebrow ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wide", children: selectedMarker.eyebrow }) : null,
|
|
1459
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base font-semibold leading-tight", children: selectedMarker.title ?? selectedMarker.label ?? "Location" })
|
|
1460
|
-
] }) }),
|
|
1461
|
-
selectedMarker.summary ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm leading-relaxed", children: selectedMarker.summary }) : null,
|
|
1462
|
-
selectedMarker.locationLine ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-start text-sm gap-2", children: [
|
|
1463
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1464
|
-
DynamicIcon,
|
|
1465
|
-
{
|
|
1466
|
-
name: "lucide:map-pin",
|
|
1467
|
-
className: "opacity-50",
|
|
1468
|
-
size: 18
|
|
1469
|
-
}
|
|
1470
|
-
),
|
|
1471
|
-
typeof selectedMarker.locationLine === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1472
|
-
Pressable,
|
|
1473
|
-
{
|
|
1474
|
-
href: selectedMarker.locationUrl,
|
|
1475
|
-
className: cn(
|
|
1476
|
-
"transition-all duration-500",
|
|
1477
|
-
"font-medium opacity-75 hover:opacity-100",
|
|
1478
|
-
selectedMarker.locationUrl ? "underline underline-offset-4" : ""
|
|
1479
|
-
),
|
|
1480
|
-
children: selectedMarker.locationLine
|
|
1481
|
-
}
|
|
1482
|
-
) : selectedMarker.locationLine
|
|
1483
|
-
] }) : null,
|
|
1484
|
-
selectedMarker.hoursLine ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-start text-sm gap-2", children: [
|
|
1485
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1486
|
-
DynamicIcon,
|
|
1487
|
-
{
|
|
1488
|
-
name: "lucide:clock",
|
|
1489
|
-
className: "opacity-50",
|
|
1490
|
-
size: 18
|
|
1491
|
-
}
|
|
1492
|
-
),
|
|
1493
|
-
typeof selectedMarker.hoursLine === "string" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: selectedMarker.hoursLine }) : selectedMarker.hoursLine
|
|
1494
|
-
] }) : null,
|
|
1495
|
-
selectedMarker.markerContentComponent ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: selectedMarker.markerContentComponent }) : null,
|
|
1496
|
-
/* @__PURE__ */ jsxRuntime.jsx(MarkerActions, { actions: selectedMarker.actions })
|
|
1497
|
-
] })
|
|
1498
|
-
]
|
|
1499
|
-
}
|
|
1500
|
-
);
|
|
1501
|
-
}
|
|
1502
|
-
if (selectedCluster) {
|
|
1503
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1504
|
-
"div",
|
|
1505
|
-
{
|
|
1506
|
-
className: cn(
|
|
1507
|
-
"relative w-[min(24rem,calc(100vw-2rem))] overflow-hidden rounded-xl border border-border bg-card text-card-foreground p-4 shadow-2xl",
|
|
1508
|
-
panelClassName
|
|
1509
|
-
),
|
|
1510
|
-
children: [
|
|
1511
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1512
|
-
"button",
|
|
1513
|
-
{
|
|
1514
|
-
type: "button",
|
|
1515
|
-
"aria-label": "Close cluster details",
|
|
1516
|
-
className: "flex size-8 items-center justify-center rounded-full border border-border bg-card text-card-foreground transition hover:bg-muted hover:text-foreground absolute top-2 right-2 z-10",
|
|
1517
|
-
onClick: clearSelection,
|
|
1518
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", size: 20 })
|
|
1519
|
-
}
|
|
1520
|
-
),
|
|
1521
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-start justify-between gap-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
1522
|
-
selectedCluster.label ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: selectedCluster.label }) : null,
|
|
1523
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base font-semibold leading-tight text-foreground", children: selectedCluster.title ?? "Clustered Locations" }),
|
|
1524
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: selectedCluster.summary ?? `${selectedCluster.markers.length} location${selectedCluster.markers.length === 1 ? "" : "s"} in this cluster.` })
|
|
1525
|
-
] }) }),
|
|
1526
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-56 space-y-2 overflow-y-auto pr-1", children: selectedCluster.markers.map((marker, markerIndex) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1527
|
-
"button",
|
|
1528
|
-
{
|
|
1529
|
-
type: "button",
|
|
1530
|
-
className: "w-full rounded-lg border border-border/60 p-3 text-left transition hover:border-border hover:bg-muted/50",
|
|
1531
|
-
onClick: () => selectMarker(marker),
|
|
1532
|
-
children: [
|
|
1533
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "line-clamp-1 text-sm font-semibold text-foreground", children: getMarkerTitle(marker, markerIndex) }),
|
|
1534
|
-
marker.summary ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 line-clamp-2 text-xs text-muted-foreground", children: marker.summary }) : null
|
|
1535
|
-
]
|
|
1536
|
-
},
|
|
1537
|
-
marker.id
|
|
1538
|
-
)) })
|
|
1539
|
-
]
|
|
1540
|
-
}
|
|
1541
|
-
);
|
|
1542
|
-
}
|
|
1543
|
-
return null;
|
|
1544
|
-
};
|
|
1545
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1546
|
-
"div",
|
|
1547
|
-
{
|
|
1548
|
-
className: cn(
|
|
1549
|
-
"relative overflow-hidden rounded-2xl border border-border bg-background",
|
|
1550
|
-
className
|
|
1551
|
-
),
|
|
1552
|
-
children: [
|
|
1553
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-[520px] w-full", mapWrapperClassName), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1554
|
-
maps.MapLibre,
|
|
1555
|
-
{
|
|
1556
|
-
stadiaApiKey,
|
|
1557
|
-
mapStyle,
|
|
1558
|
-
styleUrl,
|
|
1559
|
-
mapLibreCssHref,
|
|
1560
|
-
viewState: resolvedViewState,
|
|
1561
|
-
onViewStateChange: applyViewState,
|
|
1562
|
-
markers: mapMarkers,
|
|
1563
|
-
onClick: (coord) => {
|
|
1564
|
-
onMapClick?.(coord);
|
|
1565
|
-
if (clearSelectionOnMapClick) {
|
|
1566
|
-
clearSelection();
|
|
1567
|
-
}
|
|
1568
|
-
},
|
|
1569
|
-
onMarkerDrag,
|
|
1570
|
-
showNavigationControl,
|
|
1571
|
-
showGeolocateControl,
|
|
1572
|
-
navigationControlPosition,
|
|
1573
|
-
geolocateControlPosition,
|
|
1574
|
-
flyToOptions,
|
|
1575
|
-
className: cn("h-full w-full", mapClassName),
|
|
1576
|
-
children: mapChildren
|
|
1577
|
-
}
|
|
1578
|
-
) }),
|
|
1579
|
-
selection.type !== "none" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1580
|
-
"div",
|
|
1581
|
-
{
|
|
1582
|
-
className: cn(
|
|
1583
|
-
"pointer-events-none absolute z-20",
|
|
1584
|
-
PANEL_POSITION_CLASS[panelPosition]
|
|
1585
|
-
),
|
|
1586
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-auto", children: renderMarkerPanel() })
|
|
1587
|
-
}
|
|
1588
|
-
) : null
|
|
1589
|
-
]
|
|
1590
|
-
}
|
|
1591
|
-
);
|
|
1592
|
-
}
|
|
1593
|
-
var sizeStyles = {
|
|
1594
|
-
sm: "max-w-md",
|
|
1595
|
-
md: "max-w-2xl",
|
|
1596
|
-
lg: "max-w-4xl",
|
|
1597
|
-
xl: "max-w-5xl",
|
|
1598
|
-
full: "max-w-7xl",
|
|
1599
|
-
compact: "max-w-[700px]"
|
|
1600
|
-
};
|
|
1601
|
-
var dialogTransition = {
|
|
1602
|
-
duration: 0.35,
|
|
1603
|
-
ease: [0.16, 1, 0.3, 1]
|
|
1604
|
-
};
|
|
1605
|
-
function AnimatedDialog({
|
|
1606
|
-
open,
|
|
1607
|
-
onOpenChange,
|
|
1608
|
-
title,
|
|
1609
|
-
eyebrow,
|
|
1610
|
-
description,
|
|
1611
|
-
children,
|
|
1612
|
-
header,
|
|
1613
|
-
footer,
|
|
1614
|
-
size = "lg",
|
|
1615
|
-
className,
|
|
1616
|
-
contentClassName,
|
|
1617
|
-
featuredMediaHeader
|
|
1618
|
-
}) {
|
|
1619
|
-
const titleId = React6.useId();
|
|
1620
|
-
const descriptionId = React6.useId();
|
|
1621
|
-
const containerRef = React6.useRef(null);
|
|
1622
|
-
useOnClickOutside.useOnClickOutside(containerRef, () => {
|
|
1623
|
-
if (open) {
|
|
1624
|
-
onOpenChange(false);
|
|
1625
|
-
}
|
|
1626
|
-
});
|
|
1627
|
-
React6.useEffect(() => {
|
|
1628
|
-
if (!open) {
|
|
1629
|
-
return;
|
|
1630
|
-
}
|
|
1631
|
-
const onKeyDown = (event) => {
|
|
1632
|
-
if (event.key === "Escape") {
|
|
1633
|
-
onOpenChange(false);
|
|
1634
|
-
}
|
|
1635
|
-
};
|
|
1636
|
-
const previousOverflow = document.body.style.overflow;
|
|
1637
|
-
document.body.style.overflow = "hidden";
|
|
1638
|
-
window.addEventListener("keydown", onKeyDown);
|
|
1639
|
-
return () => {
|
|
1640
|
-
document.body.style.overflow = previousOverflow;
|
|
1641
|
-
window.removeEventListener("keydown", onKeyDown);
|
|
1642
|
-
};
|
|
1643
|
-
}, [open, onOpenChange]);
|
|
1644
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-50 h-screen overflow-y-auto", children: [
|
|
1645
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1646
|
-
framerMotion.motion.div,
|
|
1647
|
-
{
|
|
1648
|
-
initial: { opacity: 0 },
|
|
1649
|
-
animate: { opacity: 1, transition: dialogTransition },
|
|
1650
|
-
exit: { opacity: 0, transition: dialogTransition },
|
|
1651
|
-
className: "fixed inset-0 h-full w-full bg-foreground/80 backdrop-blur-lg"
|
|
554
|
+
};
|
|
555
|
+
const previousOverflow = document.body.style.overflow;
|
|
556
|
+
document.body.style.overflow = "hidden";
|
|
557
|
+
window.addEventListener("keydown", onKeyDown);
|
|
558
|
+
return () => {
|
|
559
|
+
document.body.style.overflow = previousOverflow;
|
|
560
|
+
window.removeEventListener("keydown", onKeyDown);
|
|
561
|
+
};
|
|
562
|
+
}, [open, onOpenChange]);
|
|
563
|
+
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-50 h-screen overflow-y-auto", children: [
|
|
564
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
565
|
+
framerMotion.motion.div,
|
|
566
|
+
{
|
|
567
|
+
initial: { opacity: 0 },
|
|
568
|
+
animate: { opacity: 1, transition: dialogTransition },
|
|
569
|
+
exit: { opacity: 0, transition: dialogTransition },
|
|
570
|
+
className: "fixed inset-0 h-full w-full bg-foreground/80 backdrop-blur-lg"
|
|
1652
571
|
}
|
|
1653
572
|
),
|
|
1654
573
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1947,10 +866,10 @@ var ImageSlider = ({
|
|
|
1947
866
|
optixFlowConfig
|
|
1948
867
|
}) => {
|
|
1949
868
|
const hasImages = images.length > 0;
|
|
1950
|
-
const [currentIndex, setCurrentIndex] =
|
|
869
|
+
const [currentIndex, setCurrentIndex] = React4__namespace.useState(
|
|
1951
870
|
() => normalizeIndex(startIndex, images.length)
|
|
1952
871
|
);
|
|
1953
|
-
const handleNext =
|
|
872
|
+
const handleNext = React4__namespace.useCallback(() => {
|
|
1954
873
|
if (!hasImages) return;
|
|
1955
874
|
setCurrentIndex((prevIndex) => {
|
|
1956
875
|
const nextIndex = prevIndex + 1 >= images.length ? 0 : prevIndex + 1;
|
|
@@ -1958,7 +877,7 @@ var ImageSlider = ({
|
|
|
1958
877
|
return nextIndex;
|
|
1959
878
|
});
|
|
1960
879
|
}, [hasImages, images.length, onSlideChange]);
|
|
1961
|
-
const handlePrevious =
|
|
880
|
+
const handlePrevious = React4__namespace.useCallback(() => {
|
|
1962
881
|
if (!hasImages) return;
|
|
1963
882
|
setCurrentIndex((prevIndex) => {
|
|
1964
883
|
const nextIndex = prevIndex - 1 < 0 ? images.length - 1 : prevIndex - 1;
|
|
@@ -1966,11 +885,11 @@ var ImageSlider = ({
|
|
|
1966
885
|
return nextIndex;
|
|
1967
886
|
});
|
|
1968
887
|
}, [hasImages, images.length, onSlideChange]);
|
|
1969
|
-
|
|
888
|
+
React4__namespace.useEffect(() => {
|
|
1970
889
|
if (!hasImages) return;
|
|
1971
890
|
setCurrentIndex(normalizeIndex(startIndex, images.length));
|
|
1972
891
|
}, [startIndex, images.length, hasImages]);
|
|
1973
|
-
|
|
892
|
+
React4__namespace.useEffect(() => {
|
|
1974
893
|
if (!enableKeyboard || !hasImages) return;
|
|
1975
894
|
const handleKeyDown = (event) => {
|
|
1976
895
|
if (event.key === "ArrowRight") {
|
|
@@ -1984,7 +903,7 @@ var ImageSlider = ({
|
|
|
1984
903
|
window.removeEventListener("keydown", handleKeyDown);
|
|
1985
904
|
};
|
|
1986
905
|
}, [enableKeyboard, handleNext, handlePrevious, hasImages]);
|
|
1987
|
-
|
|
906
|
+
React4__namespace.useEffect(() => {
|
|
1988
907
|
if (!autoplay || images.length < 2) return;
|
|
1989
908
|
const interval = window.setInterval(handleNext, autoplayIntervalMs);
|
|
1990
909
|
return () => window.clearInterval(interval);
|
|
@@ -2055,8 +974,150 @@ var ImageSlider = ({
|
|
|
2055
974
|
) : null
|
|
2056
975
|
]
|
|
2057
976
|
}
|
|
2058
|
-
);
|
|
2059
|
-
};
|
|
977
|
+
);
|
|
978
|
+
};
|
|
979
|
+
var baseStyles = [
|
|
980
|
+
// Layout
|
|
981
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
|
|
982
|
+
// Typography - using CSS variables with sensible defaults
|
|
983
|
+
"font-[var(--button-font-family,inherit)]",
|
|
984
|
+
"font-[var(--button-font-weight,500)]",
|
|
985
|
+
"tracking-[var(--button-letter-spacing,0)]",
|
|
986
|
+
"leading-[var(--button-line-height,1.25)]",
|
|
987
|
+
"[text-transform:var(--button-text-transform,none)]",
|
|
988
|
+
"text-sm",
|
|
989
|
+
// Border radius
|
|
990
|
+
"rounded-[var(--button-radius,var(--radius,0.375rem))]",
|
|
991
|
+
// Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
|
|
992
|
+
"[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
|
|
993
|
+
// Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
|
|
994
|
+
"[box-shadow:var(--button-shadow,none)]",
|
|
995
|
+
"hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
|
|
996
|
+
// Disabled state
|
|
997
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
998
|
+
// SVG handling
|
|
999
|
+
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
1000
|
+
// Focus styles
|
|
1001
|
+
"outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
1002
|
+
// Invalid state
|
|
1003
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
1004
|
+
].join(" ");
|
|
1005
|
+
var buttonVariants = classVarianceAuthority.cva(baseStyles, {
|
|
1006
|
+
variants: {
|
|
1007
|
+
variant: {
|
|
1008
|
+
// Default (Primary) variant - full customization
|
|
1009
|
+
default: [
|
|
1010
|
+
"bg-[var(--button-default-bg,hsl(var(--primary)))]",
|
|
1011
|
+
"text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
|
|
1012
|
+
"border-[length:var(--button-default-border-width,0px)]",
|
|
1013
|
+
"border-[color:var(--button-default-border,transparent)]",
|
|
1014
|
+
"[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
|
|
1015
|
+
"hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
|
|
1016
|
+
"hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
|
|
1017
|
+
"hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
|
|
1018
|
+
"hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
|
|
1019
|
+
].join(" "),
|
|
1020
|
+
// Destructive variant - full customization
|
|
1021
|
+
destructive: [
|
|
1022
|
+
"bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
|
|
1023
|
+
"text-[var(--button-destructive-fg,white)]",
|
|
1024
|
+
"border-[length:var(--button-destructive-border-width,0px)]",
|
|
1025
|
+
"border-[color:var(--button-destructive-border,transparent)]",
|
|
1026
|
+
"[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
|
|
1027
|
+
"hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
|
|
1028
|
+
"hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
|
|
1029
|
+
"hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
|
|
1030
|
+
"hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
|
|
1031
|
+
"focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
1032
|
+
"dark:bg-destructive/60"
|
|
1033
|
+
].join(" "),
|
|
1034
|
+
// Outline variant - full customization with proper border handling
|
|
1035
|
+
outline: [
|
|
1036
|
+
"bg-[var(--button-outline-bg,hsl(var(--background)))]",
|
|
1037
|
+
"text-[var(--button-outline-fg,inherit)]",
|
|
1038
|
+
"border-[length:var(--button-outline-border-width,1px)]",
|
|
1039
|
+
"border-[color:var(--button-outline-border,hsl(var(--border)))]",
|
|
1040
|
+
"[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
|
|
1041
|
+
"hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
|
|
1042
|
+
"hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
|
|
1043
|
+
"hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
|
|
1044
|
+
"hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
|
|
1045
|
+
"dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
|
|
1046
|
+
].join(" "),
|
|
1047
|
+
// Secondary variant - full customization
|
|
1048
|
+
secondary: [
|
|
1049
|
+
"bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
|
|
1050
|
+
"text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
|
|
1051
|
+
"border-[length:var(--button-secondary-border-width,0px)]",
|
|
1052
|
+
"border-[color:var(--button-secondary-border,transparent)]",
|
|
1053
|
+
"[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
|
|
1054
|
+
"hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
|
|
1055
|
+
"hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
|
|
1056
|
+
"hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
|
|
1057
|
+
"hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
|
|
1058
|
+
].join(" "),
|
|
1059
|
+
// Ghost variant - full customization
|
|
1060
|
+
ghost: [
|
|
1061
|
+
"bg-[var(--button-ghost-bg,transparent)]",
|
|
1062
|
+
"text-[var(--button-ghost-fg,inherit)]",
|
|
1063
|
+
"border-[length:var(--button-ghost-border-width,0px)]",
|
|
1064
|
+
"border-[color:var(--button-ghost-border,transparent)]",
|
|
1065
|
+
"[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
|
|
1066
|
+
"hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
|
|
1067
|
+
"hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
|
|
1068
|
+
"hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
|
|
1069
|
+
"hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
|
|
1070
|
+
"dark:hover:bg-accent/50"
|
|
1071
|
+
].join(" "),
|
|
1072
|
+
// Link variant - full customization
|
|
1073
|
+
link: [
|
|
1074
|
+
"bg-[var(--button-link-bg,transparent)]",
|
|
1075
|
+
"text-[var(--button-link-fg,hsl(var(--primary)))]",
|
|
1076
|
+
"border-[length:var(--button-link-border-width,0px)]",
|
|
1077
|
+
"border-[color:var(--button-link-border,transparent)]",
|
|
1078
|
+
"[box-shadow:var(--button-link-shadow,none)]",
|
|
1079
|
+
"hover:bg-[var(--button-link-hover-bg,transparent)]",
|
|
1080
|
+
"hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
|
|
1081
|
+
"hover:[box-shadow:var(--button-link-shadow-hover,none)]",
|
|
1082
|
+
"underline-offset-4 hover:underline"
|
|
1083
|
+
].join(" ")
|
|
1084
|
+
},
|
|
1085
|
+
size: {
|
|
1086
|
+
default: [
|
|
1087
|
+
"h-[var(--button-height-md,2.25rem)]",
|
|
1088
|
+
"px-[var(--button-padding-x-md,1rem)]",
|
|
1089
|
+
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
1090
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
1091
|
+
].join(" "),
|
|
1092
|
+
sm: [
|
|
1093
|
+
"h-[var(--button-height-sm,2rem)]",
|
|
1094
|
+
"px-[var(--button-padding-x-sm,0.75rem)]",
|
|
1095
|
+
"py-[var(--button-padding-y-sm,0.25rem)]",
|
|
1096
|
+
"gap-1.5",
|
|
1097
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
|
|
1098
|
+
].join(" "),
|
|
1099
|
+
md: [
|
|
1100
|
+
"h-[var(--button-height-md,2.25rem)]",
|
|
1101
|
+
"px-[var(--button-padding-x-md,1rem)]",
|
|
1102
|
+
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
1103
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
1104
|
+
].join(" "),
|
|
1105
|
+
lg: [
|
|
1106
|
+
"h-[var(--button-height-lg,2.5rem)]",
|
|
1107
|
+
"px-[var(--button-padding-x-lg,1.5rem)]",
|
|
1108
|
+
"py-[var(--button-padding-y-lg,0.5rem)]",
|
|
1109
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
|
|
1110
|
+
].join(" "),
|
|
1111
|
+
icon: "size-[var(--button-height-md,2.25rem)]",
|
|
1112
|
+
"icon-sm": "size-[var(--button-height-sm,2rem)]",
|
|
1113
|
+
"icon-lg": "size-[var(--button-height-lg,2.5rem)]"
|
|
1114
|
+
}
|
|
1115
|
+
},
|
|
1116
|
+
defaultVariants: {
|
|
1117
|
+
variant: "default",
|
|
1118
|
+
size: "default"
|
|
1119
|
+
}
|
|
1120
|
+
});
|
|
2060
1121
|
function Button({
|
|
2061
1122
|
className,
|
|
2062
1123
|
variant = "default",
|
|
@@ -2100,127 +1161,412 @@ function CardHeader({ className, ...props }) {
|
|
|
2100
1161
|
),
|
|
2101
1162
|
...props
|
|
2102
1163
|
}
|
|
2103
|
-
);
|
|
2104
|
-
}
|
|
2105
|
-
function CardTitle({ className, ...props }) {
|
|
2106
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2107
|
-
"div",
|
|
2108
|
-
{
|
|
2109
|
-
"data-slot": "card-title",
|
|
2110
|
-
className: cn("leading-none font-semibold", className),
|
|
2111
|
-
...props
|
|
1164
|
+
);
|
|
1165
|
+
}
|
|
1166
|
+
function CardTitle({ className, ...props }) {
|
|
1167
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1168
|
+
"div",
|
|
1169
|
+
{
|
|
1170
|
+
"data-slot": "card-title",
|
|
1171
|
+
className: cn("leading-none font-semibold", className),
|
|
1172
|
+
...props
|
|
1173
|
+
}
|
|
1174
|
+
);
|
|
1175
|
+
}
|
|
1176
|
+
function CardDescription({ className, ...props }) {
|
|
1177
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1178
|
+
"div",
|
|
1179
|
+
{
|
|
1180
|
+
"data-slot": "card-description",
|
|
1181
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1182
|
+
...props
|
|
1183
|
+
}
|
|
1184
|
+
);
|
|
1185
|
+
}
|
|
1186
|
+
function CardContent({ className, ...props }) {
|
|
1187
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1188
|
+
"div",
|
|
1189
|
+
{
|
|
1190
|
+
"data-slot": "card-content",
|
|
1191
|
+
className: cn("px-6", className),
|
|
1192
|
+
...props
|
|
1193
|
+
}
|
|
1194
|
+
);
|
|
1195
|
+
}
|
|
1196
|
+
function CardFooter({ className, ...props }) {
|
|
1197
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1198
|
+
"div",
|
|
1199
|
+
{
|
|
1200
|
+
"data-slot": "card-footer",
|
|
1201
|
+
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
1202
|
+
...props
|
|
1203
|
+
}
|
|
1204
|
+
);
|
|
1205
|
+
}
|
|
1206
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
1207
|
+
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
1208
|
+
{
|
|
1209
|
+
variants: {
|
|
1210
|
+
variant: {
|
|
1211
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
1212
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
1213
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
1214
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
defaultVariants: {
|
|
1218
|
+
variant: "default"
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
);
|
|
1222
|
+
function Badge({
|
|
1223
|
+
className,
|
|
1224
|
+
variant,
|
|
1225
|
+
asChild = false,
|
|
1226
|
+
...props
|
|
1227
|
+
}) {
|
|
1228
|
+
const Comp = asChild ? reactSlot.Slot : "span";
|
|
1229
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1230
|
+
Comp,
|
|
1231
|
+
{
|
|
1232
|
+
"data-slot": "badge",
|
|
1233
|
+
className: cn(badgeVariants({ variant }), className),
|
|
1234
|
+
...props
|
|
1235
|
+
}
|
|
1236
|
+
);
|
|
1237
|
+
}
|
|
1238
|
+
function Popover({
|
|
1239
|
+
...props
|
|
1240
|
+
}) {
|
|
1241
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { "data-slot": "popover", ...props });
|
|
1242
|
+
}
|
|
1243
|
+
function PopoverTrigger({
|
|
1244
|
+
...props
|
|
1245
|
+
}) {
|
|
1246
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1247
|
+
}
|
|
1248
|
+
function PopoverContent({
|
|
1249
|
+
className,
|
|
1250
|
+
align = "center",
|
|
1251
|
+
sideOffset = 4,
|
|
1252
|
+
...props
|
|
1253
|
+
}) {
|
|
1254
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1255
|
+
PopoverPrimitive__namespace.Content,
|
|
1256
|
+
{
|
|
1257
|
+
"data-slot": "popover-content",
|
|
1258
|
+
align,
|
|
1259
|
+
sideOffset,
|
|
1260
|
+
className: cn(
|
|
1261
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
1262
|
+
className
|
|
1263
|
+
),
|
|
1264
|
+
...props
|
|
1265
|
+
}
|
|
1266
|
+
) });
|
|
1267
|
+
}
|
|
1268
|
+
var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
|
|
1269
|
+
var DynamicIcon = React4__namespace.memo(function DynamicIcon2({
|
|
1270
|
+
apiKey,
|
|
1271
|
+
...props
|
|
1272
|
+
}) {
|
|
1273
|
+
return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
|
|
1274
|
+
});
|
|
1275
|
+
DynamicIcon.displayName = "DynamicIcon";
|
|
1276
|
+
function StarRating({
|
|
1277
|
+
rating,
|
|
1278
|
+
size = 18,
|
|
1279
|
+
className
|
|
1280
|
+
}) {
|
|
1281
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center gap-0.5", className), children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1282
|
+
DynamicIcon,
|
|
1283
|
+
{
|
|
1284
|
+
name: "icon-park-solid/star",
|
|
1285
|
+
size,
|
|
1286
|
+
className: cn(
|
|
1287
|
+
star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
|
|
1288
|
+
)
|
|
1289
|
+
},
|
|
1290
|
+
star
|
|
1291
|
+
)) });
|
|
1292
|
+
}
|
|
1293
|
+
function normalizePhoneNumber(input) {
|
|
1294
|
+
const trimmed = input.trim();
|
|
1295
|
+
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
1296
|
+
return trimmed;
|
|
1297
|
+
}
|
|
1298
|
+
const match = trimmed.match(/^[\s\+\-\(\)]*(\d[\d\s\-\(\)\.]*\d)[\s\-]*(x|ext\.?|extension)?[\s\-]*(\d+)?$/i);
|
|
1299
|
+
if (match) {
|
|
1300
|
+
const mainNumber = match[1].replace(/[\s\-\(\)\.]/g, "");
|
|
1301
|
+
const extension = match[3];
|
|
1302
|
+
const normalized = mainNumber.length >= 10 && !trimmed.startsWith("+") ? `+${mainNumber}` : mainNumber;
|
|
1303
|
+
const withExtension = extension ? `${normalized};ext=${extension}` : normalized;
|
|
1304
|
+
return `tel:${withExtension}`;
|
|
1305
|
+
}
|
|
1306
|
+
const cleaned = trimmed.replace(/[\s\-\(\)\.]/g, "");
|
|
1307
|
+
return `tel:${cleaned}`;
|
|
1308
|
+
}
|
|
1309
|
+
function normalizeEmail(input) {
|
|
1310
|
+
const trimmed = input.trim();
|
|
1311
|
+
if (trimmed.toLowerCase().startsWith("mailto:")) {
|
|
1312
|
+
return trimmed;
|
|
1313
|
+
}
|
|
1314
|
+
return `mailto:${trimmed}`;
|
|
1315
|
+
}
|
|
1316
|
+
function isEmail(input) {
|
|
1317
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
1318
|
+
return emailRegex.test(input.trim());
|
|
1319
|
+
}
|
|
1320
|
+
function isPhoneNumber(input) {
|
|
1321
|
+
const trimmed = input.trim();
|
|
1322
|
+
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
1323
|
+
return true;
|
|
1324
|
+
}
|
|
1325
|
+
const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
|
|
1326
|
+
return phoneRegex.test(trimmed);
|
|
1327
|
+
}
|
|
1328
|
+
function isInternalUrl(href) {
|
|
1329
|
+
if (typeof window === "undefined") {
|
|
1330
|
+
return href.startsWith("/") && !href.startsWith("//");
|
|
1331
|
+
}
|
|
1332
|
+
const trimmed = href.trim();
|
|
1333
|
+
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
1334
|
+
return true;
|
|
1335
|
+
}
|
|
1336
|
+
try {
|
|
1337
|
+
const url = new URL(trimmed, window.location.href);
|
|
1338
|
+
const currentOrigin = window.location.origin;
|
|
1339
|
+
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
1340
|
+
return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
|
|
1341
|
+
} catch {
|
|
1342
|
+
return false;
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
function toRelativePath(href) {
|
|
1346
|
+
if (typeof window === "undefined") {
|
|
1347
|
+
return href;
|
|
1348
|
+
}
|
|
1349
|
+
const trimmed = href.trim();
|
|
1350
|
+
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
1351
|
+
return trimmed;
|
|
1352
|
+
}
|
|
1353
|
+
try {
|
|
1354
|
+
const url = new URL(trimmed, window.location.href);
|
|
1355
|
+
const currentOrigin = window.location.origin;
|
|
1356
|
+
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
1357
|
+
if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
|
|
1358
|
+
return url.pathname + url.search + url.hash;
|
|
1359
|
+
}
|
|
1360
|
+
} catch {
|
|
1361
|
+
}
|
|
1362
|
+
return trimmed;
|
|
1363
|
+
}
|
|
1364
|
+
function useNavigation({
|
|
1365
|
+
href,
|
|
1366
|
+
onClick
|
|
1367
|
+
} = {}) {
|
|
1368
|
+
const linkType = React4__namespace.useMemo(() => {
|
|
1369
|
+
if (!href || href.trim() === "") {
|
|
1370
|
+
return onClick ? "none" : "none";
|
|
1371
|
+
}
|
|
1372
|
+
const trimmed = href.trim();
|
|
1373
|
+
if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
|
|
1374
|
+
return "mailto";
|
|
1375
|
+
}
|
|
1376
|
+
if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
|
|
1377
|
+
return "tel";
|
|
1378
|
+
}
|
|
1379
|
+
if (isInternalUrl(trimmed)) {
|
|
1380
|
+
return "internal";
|
|
1381
|
+
}
|
|
1382
|
+
try {
|
|
1383
|
+
new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
|
|
1384
|
+
return "external";
|
|
1385
|
+
} catch {
|
|
1386
|
+
return "internal";
|
|
1387
|
+
}
|
|
1388
|
+
}, [href, onClick]);
|
|
1389
|
+
const normalizedHref = React4__namespace.useMemo(() => {
|
|
1390
|
+
if (!href || href.trim() === "") {
|
|
1391
|
+
return void 0;
|
|
1392
|
+
}
|
|
1393
|
+
const trimmed = href.trim();
|
|
1394
|
+
switch (linkType) {
|
|
1395
|
+
case "tel":
|
|
1396
|
+
return normalizePhoneNumber(trimmed);
|
|
1397
|
+
case "mailto":
|
|
1398
|
+
return normalizeEmail(trimmed);
|
|
1399
|
+
case "internal":
|
|
1400
|
+
return toRelativePath(trimmed);
|
|
1401
|
+
case "external":
|
|
1402
|
+
return trimmed;
|
|
1403
|
+
default:
|
|
1404
|
+
return trimmed;
|
|
1405
|
+
}
|
|
1406
|
+
}, [href, linkType]);
|
|
1407
|
+
const target = React4__namespace.useMemo(() => {
|
|
1408
|
+
switch (linkType) {
|
|
1409
|
+
case "external":
|
|
1410
|
+
return "_blank";
|
|
1411
|
+
case "internal":
|
|
1412
|
+
return "_self";
|
|
1413
|
+
case "mailto":
|
|
1414
|
+
case "tel":
|
|
1415
|
+
return void 0;
|
|
1416
|
+
default:
|
|
1417
|
+
return void 0;
|
|
1418
|
+
}
|
|
1419
|
+
}, [linkType]);
|
|
1420
|
+
const rel = React4__namespace.useMemo(() => {
|
|
1421
|
+
if (linkType === "external") {
|
|
1422
|
+
return "noopener noreferrer";
|
|
2112
1423
|
}
|
|
1424
|
+
return void 0;
|
|
1425
|
+
}, [linkType]);
|
|
1426
|
+
const isExternal = linkType === "external";
|
|
1427
|
+
const isInternal = linkType === "internal";
|
|
1428
|
+
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
1429
|
+
const handleClick = React4__namespace.useCallback(
|
|
1430
|
+
(event) => {
|
|
1431
|
+
if (onClick) {
|
|
1432
|
+
try {
|
|
1433
|
+
onClick(event);
|
|
1434
|
+
} catch (error) {
|
|
1435
|
+
console.error("Error in user onClick handler:", error);
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
if (event.defaultPrevented) {
|
|
1439
|
+
return;
|
|
1440
|
+
}
|
|
1441
|
+
if (shouldUseRouter && normalizedHref && event.button === 0 && // left-click only
|
|
1442
|
+
!event.metaKey && !event.altKey && !event.ctrlKey && !event.shiftKey) {
|
|
1443
|
+
if (typeof window !== "undefined") {
|
|
1444
|
+
const handler = window.__opensiteNavigationHandler;
|
|
1445
|
+
if (typeof handler === "function") {
|
|
1446
|
+
try {
|
|
1447
|
+
const handled = handler(normalizedHref, event.nativeEvent || event);
|
|
1448
|
+
if (handled !== false) {
|
|
1449
|
+
event.preventDefault();
|
|
1450
|
+
}
|
|
1451
|
+
} catch (error) {
|
|
1452
|
+
console.error("Error in navigation handler:", error);
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
},
|
|
1458
|
+
[onClick, shouldUseRouter, normalizedHref]
|
|
2113
1459
|
);
|
|
1460
|
+
return {
|
|
1461
|
+
linkType,
|
|
1462
|
+
normalizedHref,
|
|
1463
|
+
target,
|
|
1464
|
+
rel,
|
|
1465
|
+
isExternal,
|
|
1466
|
+
isInternal,
|
|
1467
|
+
shouldUseRouter,
|
|
1468
|
+
handleClick
|
|
1469
|
+
};
|
|
2114
1470
|
}
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
1471
|
+
var Pressable = React4__namespace.forwardRef(
|
|
1472
|
+
({
|
|
1473
|
+
children,
|
|
1474
|
+
className,
|
|
1475
|
+
href,
|
|
1476
|
+
onClick,
|
|
1477
|
+
variant,
|
|
1478
|
+
size,
|
|
1479
|
+
asButton = false,
|
|
1480
|
+
fallbackComponentType = "span",
|
|
1481
|
+
componentType,
|
|
1482
|
+
"aria-label": ariaLabel,
|
|
1483
|
+
"aria-describedby": ariaDescribedby,
|
|
1484
|
+
id,
|
|
1485
|
+
...props
|
|
1486
|
+
}, ref) => {
|
|
1487
|
+
const navigation = useNavigation({ href, onClick });
|
|
1488
|
+
const {
|
|
1489
|
+
normalizedHref,
|
|
1490
|
+
target,
|
|
1491
|
+
rel,
|
|
1492
|
+
linkType,
|
|
1493
|
+
isInternal,
|
|
1494
|
+
isExternal,
|
|
1495
|
+
handleClick
|
|
1496
|
+
} = navigation;
|
|
1497
|
+
const shouldRenderLink = normalizedHref && linkType !== "none";
|
|
1498
|
+
const shouldRenderButton = !shouldRenderLink && onClick;
|
|
1499
|
+
const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
|
|
1500
|
+
const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
|
|
1501
|
+
const shouldApplyButtonStyles = asButton || variant || size;
|
|
1502
|
+
const combinedClassName = cn(
|
|
1503
|
+
shouldApplyButtonStyles && buttonVariants({ variant, size }),
|
|
1504
|
+
className
|
|
1505
|
+
);
|
|
1506
|
+
const dataProps = Object.fromEntries(
|
|
1507
|
+
Object.entries(props).filter(([key]) => key.startsWith("data-"))
|
|
1508
|
+
);
|
|
1509
|
+
const buttonDataAttributes = shouldApplyButtonStyles ? {
|
|
1510
|
+
"data-slot": "button",
|
|
1511
|
+
"data-variant": variant ?? "default",
|
|
1512
|
+
"data-size": size ?? "default"
|
|
1513
|
+
} : {};
|
|
1514
|
+
const commonProps = {
|
|
1515
|
+
className: combinedClassName,
|
|
1516
|
+
onClick: handleClick,
|
|
1517
|
+
"aria-label": ariaLabel,
|
|
1518
|
+
"aria-describedby": ariaDescribedby,
|
|
1519
|
+
id,
|
|
1520
|
+
...dataProps,
|
|
1521
|
+
...buttonDataAttributes
|
|
1522
|
+
};
|
|
1523
|
+
if (finalComponentType === "a" && shouldRenderLink) {
|
|
1524
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1525
|
+
"a",
|
|
1526
|
+
{
|
|
1527
|
+
ref,
|
|
1528
|
+
href: normalizedHref,
|
|
1529
|
+
target,
|
|
1530
|
+
rel,
|
|
1531
|
+
...commonProps,
|
|
1532
|
+
...props,
|
|
1533
|
+
children
|
|
1534
|
+
}
|
|
1535
|
+
);
|
|
2122
1536
|
}
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
1537
|
+
if (finalComponentType === "button") {
|
|
1538
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1539
|
+
"button",
|
|
1540
|
+
{
|
|
1541
|
+
ref,
|
|
1542
|
+
type: props.type || "button",
|
|
1543
|
+
...commonProps,
|
|
1544
|
+
...props,
|
|
1545
|
+
children
|
|
1546
|
+
}
|
|
1547
|
+
);
|
|
2132
1548
|
}
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
1549
|
+
if (finalComponentType === "div") {
|
|
1550
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1551
|
+
"div",
|
|
1552
|
+
{
|
|
1553
|
+
ref,
|
|
1554
|
+
...commonProps,
|
|
1555
|
+
children
|
|
1556
|
+
}
|
|
1557
|
+
);
|
|
2142
1558
|
}
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
variant: {
|
|
2150
|
-
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
2151
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
2152
|
-
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
2153
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
1559
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1560
|
+
"span",
|
|
1561
|
+
{
|
|
1562
|
+
ref,
|
|
1563
|
+
...commonProps,
|
|
1564
|
+
children
|
|
2154
1565
|
}
|
|
2155
|
-
|
|
2156
|
-
defaultVariants: {
|
|
2157
|
-
variant: "default"
|
|
2158
|
-
}
|
|
1566
|
+
);
|
|
2159
1567
|
}
|
|
2160
1568
|
);
|
|
2161
|
-
|
|
2162
|
-
className,
|
|
2163
|
-
variant,
|
|
2164
|
-
asChild = false,
|
|
2165
|
-
...props
|
|
2166
|
-
}) {
|
|
2167
|
-
const Comp = asChild ? reactSlot.Slot : "span";
|
|
2168
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2169
|
-
Comp,
|
|
2170
|
-
{
|
|
2171
|
-
"data-slot": "badge",
|
|
2172
|
-
className: cn(badgeVariants({ variant }), className),
|
|
2173
|
-
...props
|
|
2174
|
-
}
|
|
2175
|
-
);
|
|
2176
|
-
}
|
|
2177
|
-
function Popover({
|
|
2178
|
-
...props
|
|
2179
|
-
}) {
|
|
2180
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { "data-slot": "popover", ...props });
|
|
2181
|
-
}
|
|
2182
|
-
function PopoverTrigger({
|
|
2183
|
-
...props
|
|
2184
|
-
}) {
|
|
2185
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
2186
|
-
}
|
|
2187
|
-
function PopoverContent({
|
|
2188
|
-
className,
|
|
2189
|
-
align = "center",
|
|
2190
|
-
sideOffset = 4,
|
|
2191
|
-
...props
|
|
2192
|
-
}) {
|
|
2193
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2194
|
-
PopoverPrimitive__namespace.Content,
|
|
2195
|
-
{
|
|
2196
|
-
"data-slot": "popover-content",
|
|
2197
|
-
align,
|
|
2198
|
-
sideOffset,
|
|
2199
|
-
className: cn(
|
|
2200
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
2201
|
-
className
|
|
2202
|
-
),
|
|
2203
|
-
...props
|
|
2204
|
-
}
|
|
2205
|
-
) });
|
|
2206
|
-
}
|
|
2207
|
-
function StarRating({
|
|
2208
|
-
rating,
|
|
2209
|
-
size = 18,
|
|
2210
|
-
className
|
|
2211
|
-
}) {
|
|
2212
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center gap-0.5", className), children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2213
|
-
DynamicIcon,
|
|
2214
|
-
{
|
|
2215
|
-
name: "icon-park-solid/star",
|
|
2216
|
-
size,
|
|
2217
|
-
className: cn(
|
|
2218
|
-
star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
|
|
2219
|
-
)
|
|
2220
|
-
},
|
|
2221
|
-
star
|
|
2222
|
-
)) });
|
|
2223
|
-
}
|
|
1569
|
+
Pressable.displayName = "Pressable";
|
|
2224
1570
|
var BUTTON_SIZES = {
|
|
2225
1571
|
sm: { buttonSize: "size-8", iconSize: 16 },
|
|
2226
1572
|
md: { buttonSize: "size-10", iconSize: 20 },
|
|
@@ -2312,7 +1658,7 @@ var platformIconMap = {
|
|
|
2312
1658
|
dribbble: "cib/dribbble",
|
|
2313
1659
|
unknown: "icon-park-solid/circular-connection"
|
|
2314
1660
|
};
|
|
2315
|
-
var SocialLinkIcon =
|
|
1661
|
+
var SocialLinkIcon = React4__namespace.forwardRef(
|
|
2316
1662
|
({
|
|
2317
1663
|
platformName,
|
|
2318
1664
|
label,
|
|
@@ -2326,16 +1672,16 @@ var SocialLinkIcon = React6__namespace.forwardRef(
|
|
|
2326
1672
|
...pressableProps
|
|
2327
1673
|
}, ref) => {
|
|
2328
1674
|
const platform = usePlatformFromUrl.usePlatformFromUrl(href);
|
|
2329
|
-
const smartPlatformName =
|
|
1675
|
+
const smartPlatformName = React4__namespace.useMemo(() => {
|
|
2330
1676
|
return platform || platformName;
|
|
2331
1677
|
}, [platform, platformName]);
|
|
2332
|
-
const iconName =
|
|
1678
|
+
const iconName = React4__namespace.useMemo(() => {
|
|
2333
1679
|
return iconNameOverride || platformIconMap[smartPlatformName];
|
|
2334
1680
|
}, [iconNameOverride, smartPlatformName]);
|
|
2335
|
-
const accessibleLabel =
|
|
1681
|
+
const accessibleLabel = React4__namespace.useMemo(() => {
|
|
2336
1682
|
return label || platformName;
|
|
2337
1683
|
}, [label, platformName]);
|
|
2338
|
-
const icon =
|
|
1684
|
+
const icon = React4__namespace.useMemo(() => {
|
|
2339
1685
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2340
1686
|
DynamicIcon,
|
|
2341
1687
|
{
|
|
@@ -2415,12 +1761,12 @@ function TextInner({ as, className, children, ...props }, ref) {
|
|
|
2415
1761
|
const Component = as || "span";
|
|
2416
1762
|
return /* @__PURE__ */ jsxRuntime.jsx(Component, { ref, className: cn(className), ...props, children });
|
|
2417
1763
|
}
|
|
2418
|
-
var Text =
|
|
1764
|
+
var Text = React4__namespace.forwardRef(TextInner);
|
|
2419
1765
|
Text.displayName = "Text";
|
|
2420
1766
|
function isContentTextItem(item) {
|
|
2421
|
-
return item !== null && typeof item === "object" && !
|
|
1767
|
+
return item !== null && typeof item === "object" && !React4__namespace.isValidElement(item) && "_type" in item && item._type === "text";
|
|
2422
1768
|
}
|
|
2423
|
-
var ContentGroup =
|
|
1769
|
+
var ContentGroup = React4__namespace.forwardRef(
|
|
2424
1770
|
({ items, className, children, ...props }, ref) => {
|
|
2425
1771
|
const hasContent = items && items.length > 0;
|
|
2426
1772
|
if (!hasContent) {
|
|
@@ -2433,10 +1779,10 @@ var ContentGroup = React6__namespace.forwardRef(
|
|
|
2433
1779
|
return /* @__PURE__ */ jsxRuntime.jsx(Text, { ...textProps }, idx);
|
|
2434
1780
|
}
|
|
2435
1781
|
const reactNode = item;
|
|
2436
|
-
if (
|
|
2437
|
-
return
|
|
1782
|
+
if (React4__namespace.isValidElement(reactNode)) {
|
|
1783
|
+
return React4__namespace.cloneElement(reactNode, { key: reactNode.key ?? idx });
|
|
2438
1784
|
}
|
|
2439
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1785
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React4__namespace.Fragment, { children: reactNode }, idx);
|
|
2440
1786
|
}),
|
|
2441
1787
|
children
|
|
2442
1788
|
] });
|
|
@@ -2460,7 +1806,7 @@ function AlternatingBlocks({
|
|
|
2460
1806
|
pattern,
|
|
2461
1807
|
patternOpacity
|
|
2462
1808
|
}) {
|
|
2463
|
-
const sectionsContent =
|
|
1809
|
+
const sectionsContent = React4.useMemo(() => {
|
|
2464
1810
|
if (sectionsSlot) return sectionsSlot;
|
|
2465
1811
|
if (!sections || sections.length === 0) return null;
|
|
2466
1812
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-12", sectionsClassName), children: sections.map((section, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2504,7 +1850,7 @@ function AlternatingBlocks({
|
|
|
2504
1850
|
sectionContentClassName,
|
|
2505
1851
|
sectionMediaClassName
|
|
2506
1852
|
]);
|
|
2507
|
-
const headerItems =
|
|
1853
|
+
const headerItems = React4.useMemo(() => {
|
|
2508
1854
|
const items = [];
|
|
2509
1855
|
if (subtitle) {
|
|
2510
1856
|
items.push(
|
|
@@ -2573,7 +1919,7 @@ function AboutSplitHero({
|
|
|
2573
1919
|
patternOpacity,
|
|
2574
1920
|
directionConfig = { desktop: "mediaRight", mobile: "mediaTop" }
|
|
2575
1921
|
}) {
|
|
2576
|
-
const ctaContent =
|
|
1922
|
+
const ctaContent = React4.useMemo(() => {
|
|
2577
1923
|
if (ctaSlot) return ctaSlot;
|
|
2578
1924
|
if (!ctaAction) return null;
|
|
2579
1925
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2595,7 +1941,7 @@ function AboutSplitHero({
|
|
|
2595
1941
|
}
|
|
2596
1942
|
);
|
|
2597
1943
|
}, [ctaSlot, ctaAction, ctaClassName]);
|
|
2598
|
-
const bgColorClass =
|
|
1944
|
+
const bgColorClass = React4.useMemo(() => {
|
|
2599
1945
|
switch (background) {
|
|
2600
1946
|
case "dark":
|
|
2601
1947
|
return "bg-foreground text-background";
|
|
@@ -2723,7 +2069,7 @@ function AboutMissionPrinciples({
|
|
|
2723
2069
|
pattern,
|
|
2724
2070
|
patternOpacity
|
|
2725
2071
|
}) {
|
|
2726
|
-
const missionActionContent =
|
|
2072
|
+
const missionActionContent = React4.useMemo(() => {
|
|
2727
2073
|
if (missionActionSlot) return missionActionSlot;
|
|
2728
2074
|
if (!missionAction) return null;
|
|
2729
2075
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("pt-2", missionActionClassName), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2748,7 +2094,7 @@ function AboutMissionPrinciples({
|
|
|
2748
2094
|
}
|
|
2749
2095
|
) });
|
|
2750
2096
|
}, [missionActionSlot, missionAction, missionActionClassName]);
|
|
2751
|
-
const principlesContent =
|
|
2097
|
+
const principlesContent = React4.useMemo(() => {
|
|
2752
2098
|
if (principlesSlot) return principlesSlot;
|
|
2753
2099
|
if (!principles || principles.length === 0) return null;
|
|
2754
2100
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2786,7 +2132,7 @@ function AboutMissionPrinciples({
|
|
|
2786
2132
|
}
|
|
2787
2133
|
);
|
|
2788
2134
|
}, [principlesSlot, principles, principlesClassName]);
|
|
2789
|
-
const visionActionContent =
|
|
2135
|
+
const visionActionContent = React4.useMemo(() => {
|
|
2790
2136
|
if (visionActionSlot) return visionActionSlot;
|
|
2791
2137
|
if (!visionAction) return null;
|
|
2792
2138
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2961,11 +2307,11 @@ function AboutExpandableValues({
|
|
|
2961
2307
|
pattern,
|
|
2962
2308
|
patternOpacity
|
|
2963
2309
|
}) {
|
|
2964
|
-
const [expandedValue, setExpandedValue] =
|
|
2965
|
-
const toggleExpand =
|
|
2310
|
+
const [expandedValue, setExpandedValue] = React4__namespace.useState(null);
|
|
2311
|
+
const toggleExpand = React4.useCallback((id) => {
|
|
2966
2312
|
setExpandedValue((prev) => prev === id ? null : id);
|
|
2967
2313
|
}, []);
|
|
2968
|
-
|
|
2314
|
+
React4.useMemo(() => {
|
|
2969
2315
|
if (actionsSlot) return actionsSlot;
|
|
2970
2316
|
if (!actions || actions.length === 0) return null;
|
|
2971
2317
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: actionsClassName, children: actions.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2981,7 +2327,7 @@ function AboutExpandableValues({
|
|
|
2981
2327
|
idx
|
|
2982
2328
|
)) });
|
|
2983
2329
|
}, [actionsSlot, actions, actionsClassName]);
|
|
2984
|
-
const valuesContent =
|
|
2330
|
+
const valuesContent = React4.useMemo(() => {
|
|
2985
2331
|
if (valuesSlot) return valuesSlot;
|
|
2986
2332
|
if (!values || values.length === 0) return null;
|
|
2987
2333
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid grid-cols-1 gap-6 mt-8", valuesClassName), children: values.map((value) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3197,17 +2543,17 @@ function CommunityInitiatives({
|
|
|
3197
2543
|
pattern,
|
|
3198
2544
|
patternOpacity
|
|
3199
2545
|
}) {
|
|
3200
|
-
const [activeCategory, setActiveCategory] =
|
|
2546
|
+
const [activeCategory, setActiveCategory] = React4__namespace.useState(
|
|
3201
2547
|
categories?.[0]?.id || ""
|
|
3202
2548
|
);
|
|
3203
2549
|
const currentCategory = categories?.find((category) => category.id === activeCategory) || categories?.[0];
|
|
3204
|
-
const handleCategoryChange =
|
|
2550
|
+
const handleCategoryChange = React4.useCallback(
|
|
3205
2551
|
(e) => {
|
|
3206
2552
|
setActiveCategory(e.target.value);
|
|
3207
2553
|
},
|
|
3208
2554
|
[]
|
|
3209
2555
|
);
|
|
3210
|
-
const categoriesContent =
|
|
2556
|
+
const categoriesContent = React4.useMemo(() => {
|
|
3211
2557
|
if (categoriesSlot) return categoriesSlot;
|
|
3212
2558
|
if (!categories || categories.length === 0) return null;
|
|
3213
2559
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3461,10 +2807,10 @@ function AboutCultureTabs({
|
|
|
3461
2807
|
patternOpacity
|
|
3462
2808
|
}) {
|
|
3463
2809
|
const resolvedAspects = aspects ?? [];
|
|
3464
|
-
const [activeTab, setActiveTab] =
|
|
2810
|
+
const [activeTab, setActiveTab] = React4__namespace.useState(
|
|
3465
2811
|
resolvedAspects[0]?.id || ""
|
|
3466
2812
|
);
|
|
3467
|
-
const headerItems =
|
|
2813
|
+
const headerItems = React4.useMemo(() => {
|
|
3468
2814
|
const items = [];
|
|
3469
2815
|
if (badgeText) {
|
|
3470
2816
|
if (typeof badgeText === "string") {
|
|
@@ -3511,7 +2857,7 @@ function AboutCultureTabs({
|
|
|
3511
2857
|
description,
|
|
3512
2858
|
descriptionClassName
|
|
3513
2859
|
]);
|
|
3514
|
-
const ctaImagesContent =
|
|
2860
|
+
const ctaImagesContent = React4.useMemo(() => {
|
|
3515
2861
|
if (ctaImagesSlot) return ctaImagesSlot;
|
|
3516
2862
|
if (!ctaImages || ctaImages.length === 0) return null;
|
|
3517
2863
|
return ctaImages.map((src, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3677,7 +3023,7 @@ function MediaHoverCtas({
|
|
|
3677
3023
|
optixFlowConfig
|
|
3678
3024
|
}) {
|
|
3679
3025
|
const resolvedItems = items ?? [];
|
|
3680
|
-
const itemsContent =
|
|
3026
|
+
const itemsContent = React4.useMemo(() => {
|
|
3681
3027
|
if (itemsSlot) return itemsSlot;
|
|
3682
3028
|
return resolvedItems.map((item, index) => {
|
|
3683
3029
|
const CardComponent = item.cardHref ? "a" : "div";
|
|
@@ -3767,13 +3113,13 @@ function BannerAnnouncementDismissible({
|
|
|
3767
3113
|
actionsClassName,
|
|
3768
3114
|
dismissButtonClassName
|
|
3769
3115
|
}) {
|
|
3770
|
-
const [isVisible, setIsVisible] =
|
|
3116
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
3771
3117
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
3772
|
-
const handleDismiss =
|
|
3118
|
+
const handleDismiss = React4.useCallback(() => {
|
|
3773
3119
|
setIsVisible(false);
|
|
3774
3120
|
onDismiss?.();
|
|
3775
3121
|
}, [onDismiss]);
|
|
3776
|
-
const actionsContent =
|
|
3122
|
+
const actionsContent = React4.useMemo(() => {
|
|
3777
3123
|
if (actionsSlot) return actionsSlot;
|
|
3778
3124
|
if (!actions || actions.length === 0) return null;
|
|
3779
3125
|
return actions.map((action, index) => {
|
|
@@ -3801,7 +3147,7 @@ function BannerAnnouncementDismissible({
|
|
|
3801
3147
|
);
|
|
3802
3148
|
});
|
|
3803
3149
|
}, [actions, actionsSlot]);
|
|
3804
|
-
const iconContent =
|
|
3150
|
+
const iconContent = React4.useMemo(() => {
|
|
3805
3151
|
if (icon) return icon;
|
|
3806
3152
|
if (!iconName) return null;
|
|
3807
3153
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3813,11 +3159,11 @@ function BannerAnnouncementDismissible({
|
|
|
3813
3159
|
}
|
|
3814
3160
|
);
|
|
3815
3161
|
}, [icon, iconName, iconClassName]);
|
|
3816
|
-
const dismissIconContent =
|
|
3162
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
3817
3163
|
if (dismissIcon) return dismissIcon;
|
|
3818
3164
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
3819
3165
|
}, [dismissIcon]);
|
|
3820
|
-
const messageContent =
|
|
3166
|
+
const messageContent = React4.useMemo(() => {
|
|
3821
3167
|
if (!message) return null;
|
|
3822
3168
|
return typeof message === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium text-sm", messageClassName), children: message }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: messageClassName, children: message });
|
|
3823
3169
|
}, [message, messageClassName]);
|
|
@@ -3863,12 +3209,12 @@ function BannerCountdownSale({
|
|
|
3863
3209
|
separatorClassName
|
|
3864
3210
|
}) {
|
|
3865
3211
|
const targetTime = endTime;
|
|
3866
|
-
const [timeLeft, setTimeLeft] =
|
|
3212
|
+
const [timeLeft, setTimeLeft] = React4.useState({
|
|
3867
3213
|
hours: 0,
|
|
3868
3214
|
minutes: 0,
|
|
3869
3215
|
seconds: 0
|
|
3870
3216
|
});
|
|
3871
|
-
|
|
3217
|
+
React4.useEffect(() => {
|
|
3872
3218
|
if (!targetTime) {
|
|
3873
3219
|
return;
|
|
3874
3220
|
}
|
|
@@ -3891,8 +3237,8 @@ function BannerCountdownSale({
|
|
|
3891
3237
|
}, 1e3);
|
|
3892
3238
|
return () => clearInterval(timer);
|
|
3893
3239
|
}, [targetTime]);
|
|
3894
|
-
const pad =
|
|
3895
|
-
const timerContent =
|
|
3240
|
+
const pad = React4.useCallback((n) => n.toString().padStart(2, "0"), []);
|
|
3241
|
+
const timerContent = React4.useMemo(() => {
|
|
3896
3242
|
if (timerSlot) return timerSlot;
|
|
3897
3243
|
if (renderTimer) return renderTimer(timeLeft);
|
|
3898
3244
|
if (!targetTime) return null;
|
|
@@ -3904,11 +3250,11 @@ function BannerCountdownSale({
|
|
|
3904
3250
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("rounded bg-destructive px-2 py-0.5", timeUnitClassName), children: pad(timeLeft.seconds) })
|
|
3905
3251
|
] });
|
|
3906
3252
|
}, [timerSlot, renderTimer, timeLeft, timerClassName, timeUnitClassName, separatorClassName, pad, targetTime]);
|
|
3907
|
-
const messageContent =
|
|
3253
|
+
const messageContent = React4.useMemo(() => {
|
|
3908
3254
|
if (!message) return null;
|
|
3909
3255
|
return typeof message === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium", messageClassName), children: message }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: messageClassName, children: message });
|
|
3910
3256
|
}, [message, messageClassName]);
|
|
3911
|
-
const descriptionContent =
|
|
3257
|
+
const descriptionContent = React4.useMemo(() => {
|
|
3912
3258
|
if (!description) return null;
|
|
3913
3259
|
return typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-destructive-foreground", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: descriptionClassName, children: description });
|
|
3914
3260
|
}, [description, descriptionClassName]);
|
|
@@ -3937,12 +3283,12 @@ function BannerDeliveryCountdown({
|
|
|
3937
3283
|
deliveryDateClassName
|
|
3938
3284
|
}) {
|
|
3939
3285
|
const targetTime = cutoffTime;
|
|
3940
|
-
const [timeLeft, setTimeLeft] =
|
|
3286
|
+
const [timeLeft, setTimeLeft] = React4.useState({
|
|
3941
3287
|
hours: 0,
|
|
3942
3288
|
minutes: 0,
|
|
3943
3289
|
seconds: 0
|
|
3944
3290
|
});
|
|
3945
|
-
|
|
3291
|
+
React4.useEffect(() => {
|
|
3946
3292
|
if (!targetTime) {
|
|
3947
3293
|
return;
|
|
3948
3294
|
}
|
|
@@ -3965,13 +3311,13 @@ function BannerDeliveryCountdown({
|
|
|
3965
3311
|
}, 1e3);
|
|
3966
3312
|
return () => clearInterval(timer);
|
|
3967
3313
|
}, [targetTime]);
|
|
3968
|
-
const pad =
|
|
3969
|
-
const iconContent =
|
|
3314
|
+
const pad = React4.useCallback((n) => n.toString().padStart(2, "0"), []);
|
|
3315
|
+
const iconContent = React4.useMemo(() => {
|
|
3970
3316
|
if (icon) return icon;
|
|
3971
3317
|
if (!iconName) return null;
|
|
3972
3318
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: iconName, size: 16, className: iconClassName });
|
|
3973
3319
|
}, [icon, iconName, iconClassName]);
|
|
3974
|
-
const timerContent =
|
|
3320
|
+
const timerContent = React4.useMemo(() => {
|
|
3975
3321
|
if (timerSlot) return timerSlot;
|
|
3976
3322
|
if (renderTimer) return renderTimer(timeLeft);
|
|
3977
3323
|
if (!targetTime) return null;
|
|
@@ -3983,18 +3329,18 @@ function BannerDeliveryCountdown({
|
|
|
3983
3329
|
pad(timeLeft.seconds)
|
|
3984
3330
|
] });
|
|
3985
3331
|
}, [timerSlot, renderTimer, timeLeft, timerClassName, pad, targetTime]);
|
|
3986
|
-
const deliveryDateContent =
|
|
3332
|
+
const deliveryDateContent = React4.useMemo(() => {
|
|
3987
3333
|
if (!deliveryDate) return null;
|
|
3988
3334
|
return typeof deliveryDate === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-semibold", deliveryDateClassName), children: deliveryDate }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: deliveryDateClassName, children: deliveryDate });
|
|
3989
3335
|
}, [deliveryDate, deliveryDateClassName]);
|
|
3990
|
-
const messageParts =
|
|
3336
|
+
const messageParts = React4.useMemo(() => {
|
|
3991
3337
|
return [prefixText, timerContent, middleText, deliveryDateContent].filter(
|
|
3992
3338
|
(part) => part !== null && part !== void 0
|
|
3993
3339
|
);
|
|
3994
3340
|
}, [prefixText, timerContent, middleText, deliveryDateContent]);
|
|
3995
3341
|
return /* @__PURE__ */ jsxRuntime.jsx(Section, { background, spacing: "none", className: cn("bg-accent text-accent-foreground", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("container py-2.5", containerClassName), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-wrap items-center justify-center gap-3 text-sm", contentClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2", messageClassName), children: [
|
|
3996
3342
|
iconContent,
|
|
3997
|
-
messageParts.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { children: messageParts.map((part, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3343
|
+
messageParts.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { children: messageParts.map((part, index) => /* @__PURE__ */ jsxRuntime.jsxs(React4__namespace.Fragment, { children: [
|
|
3998
3344
|
index > 0 ? " " : null,
|
|
3999
3345
|
part
|
|
4000
3346
|
] }, index)) })
|
|
@@ -4016,7 +3362,7 @@ function BannerEventPromo({
|
|
|
4016
3362
|
eventDetailsClassName,
|
|
4017
3363
|
actionsClassName
|
|
4018
3364
|
}) {
|
|
4019
|
-
const actionsContent =
|
|
3365
|
+
const actionsContent = React4.useMemo(() => {
|
|
4020
3366
|
if (actionsSlot) return actionsSlot;
|
|
4021
3367
|
if (!actions || actions.length === 0) return null;
|
|
4022
3368
|
return actions.map((action, index) => {
|
|
@@ -4044,7 +3390,7 @@ function BannerEventPromo({
|
|
|
4044
3390
|
);
|
|
4045
3391
|
});
|
|
4046
3392
|
}, [actions, actionsSlot]);
|
|
4047
|
-
const separatorContent =
|
|
3393
|
+
const separatorContent = React4.useMemo(() => {
|
|
4048
3394
|
if (separator) return separator;
|
|
4049
3395
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4050
3396
|
"svg",
|
|
@@ -4056,11 +3402,11 @@ function BannerEventPromo({
|
|
|
4056
3402
|
}
|
|
4057
3403
|
);
|
|
4058
3404
|
}, [separator, separatorClassName]);
|
|
4059
|
-
const eventNameContent =
|
|
3405
|
+
const eventNameContent = React4.useMemo(() => {
|
|
4060
3406
|
if (!eventName) return null;
|
|
4061
3407
|
return typeof eventName === "string" ? /* @__PURE__ */ jsxRuntime.jsx("strong", { className: cn("font-semibold", eventNameClassName), children: eventName }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: eventNameClassName, children: eventName });
|
|
4062
3408
|
}, [eventName, eventNameClassName]);
|
|
4063
|
-
const eventDetailsContent =
|
|
3409
|
+
const eventDetailsContent = React4.useMemo(() => {
|
|
4064
3410
|
if (!eventDetails) return null;
|
|
4065
3411
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: eventDetailsClassName, children: eventDetails });
|
|
4066
3412
|
}, [eventDetails, eventDetailsClassName]);
|
|
@@ -4097,22 +3443,22 @@ function BannerFloatingOffer({
|
|
|
4097
3443
|
}) {
|
|
4098
3444
|
const isControlled = open !== void 0;
|
|
4099
3445
|
const initialOpen = defaultOpen ?? true;
|
|
4100
|
-
const [internalOpen, setInternalOpen] =
|
|
3446
|
+
const [internalOpen, setInternalOpen] = React4.useState(initialOpen);
|
|
4101
3447
|
const isVisible = isControlled ? open : internalOpen;
|
|
4102
3448
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4103
3449
|
const isDismissible = dismissible ?? false;
|
|
4104
|
-
|
|
3450
|
+
React4.useEffect(() => {
|
|
4105
3451
|
if (!isControlled && defaultOpen !== internalOpen) {
|
|
4106
3452
|
setInternalOpen(initialOpen);
|
|
4107
3453
|
}
|
|
4108
3454
|
}, [defaultOpen, initialOpen, isControlled, internalOpen]);
|
|
4109
|
-
const handleDismiss =
|
|
3455
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4110
3456
|
if (!isControlled) {
|
|
4111
3457
|
setInternalOpen(false);
|
|
4112
3458
|
}
|
|
4113
3459
|
onOpenChange?.(false);
|
|
4114
3460
|
}, [isControlled, onOpenChange]);
|
|
4115
|
-
const actionsContent =
|
|
3461
|
+
const actionsContent = React4.useMemo(() => {
|
|
4116
3462
|
if (actionsSlot) return actionsSlot;
|
|
4117
3463
|
if (!actions || actions.length === 0) return null;
|
|
4118
3464
|
return actions.map((action, index) => {
|
|
@@ -4140,7 +3486,7 @@ function BannerFloatingOffer({
|
|
|
4140
3486
|
);
|
|
4141
3487
|
});
|
|
4142
3488
|
}, [actions, actionsSlot]);
|
|
4143
|
-
const separatorContent =
|
|
3489
|
+
const separatorContent = React4.useMemo(() => {
|
|
4144
3490
|
if (separator) return separator;
|
|
4145
3491
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4146
3492
|
"svg",
|
|
@@ -4152,15 +3498,15 @@ function BannerFloatingOffer({
|
|
|
4152
3498
|
}
|
|
4153
3499
|
);
|
|
4154
3500
|
}, [separator, separatorClassName]);
|
|
4155
|
-
const dismissIconContent =
|
|
3501
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4156
3502
|
if (dismissIcon) return dismissIcon;
|
|
4157
3503
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4158
3504
|
}, [dismissIcon]);
|
|
4159
|
-
const offerTitleContent =
|
|
3505
|
+
const offerTitleContent = React4.useMemo(() => {
|
|
4160
3506
|
if (!offerTitle) return null;
|
|
4161
3507
|
return typeof offerTitle === "string" ? /* @__PURE__ */ jsxRuntime.jsx("strong", { className: cn("font-semibold", offerTitleClassName), children: offerTitle }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: offerTitleClassName, children: offerTitle });
|
|
4162
3508
|
}, [offerTitle, offerTitleClassName]);
|
|
4163
|
-
const offerDescriptionContent =
|
|
3509
|
+
const offerDescriptionContent = React4.useMemo(() => {
|
|
4164
3510
|
if (!offerDescription) return null;
|
|
4165
3511
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: offerDescriptionClassName, children: offerDescription });
|
|
4166
3512
|
}, [offerDescription, offerDescriptionClassName]);
|
|
@@ -4221,13 +3567,13 @@ function BannerGdprRights({
|
|
|
4221
3567
|
actionsClassName,
|
|
4222
3568
|
dismissButtonClassName
|
|
4223
3569
|
}) {
|
|
4224
|
-
const [isVisible, setIsVisible] =
|
|
3570
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
4225
3571
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4226
|
-
const handleDismiss =
|
|
3572
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4227
3573
|
setIsVisible(false);
|
|
4228
3574
|
onDismiss?.();
|
|
4229
3575
|
}, [onDismiss]);
|
|
4230
|
-
const iconContent =
|
|
3576
|
+
const iconContent = React4.useMemo(() => {
|
|
4231
3577
|
if (icon) return icon;
|
|
4232
3578
|
if (!iconName) return null;
|
|
4233
3579
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4239,7 +3585,7 @@ function BannerGdprRights({
|
|
|
4239
3585
|
}
|
|
4240
3586
|
);
|
|
4241
3587
|
}, [icon, iconName, iconClassName]);
|
|
4242
|
-
const actionsContent =
|
|
3588
|
+
const actionsContent = React4.useMemo(() => {
|
|
4243
3589
|
if (actionsSlot) return actionsSlot;
|
|
4244
3590
|
if (!actions || actions.length === 0) return null;
|
|
4245
3591
|
return actions.map((action, index) => {
|
|
@@ -4266,15 +3612,15 @@ function BannerGdprRights({
|
|
|
4266
3612
|
);
|
|
4267
3613
|
});
|
|
4268
3614
|
}, [actions, actionsSlot]);
|
|
4269
|
-
const dismissIconContent =
|
|
3615
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4270
3616
|
if (dismissIcon) return dismissIcon;
|
|
4271
3617
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4272
3618
|
}, [dismissIcon]);
|
|
4273
|
-
const titleContent =
|
|
3619
|
+
const titleContent = React4.useMemo(() => {
|
|
4274
3620
|
if (!title) return null;
|
|
4275
3621
|
return typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("font-semibold text-sm", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: titleClassName, children: title });
|
|
4276
3622
|
}, [title, titleClassName]);
|
|
4277
|
-
const descriptionContent =
|
|
3623
|
+
const descriptionContent = React4.useMemo(() => {
|
|
4278
3624
|
if (!description && !actionsContent) return null;
|
|
4279
3625
|
return /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("text-sm text-muted-foreground mt-1", descriptionClassName), children: [
|
|
4280
3626
|
description,
|
|
@@ -4328,13 +3674,13 @@ function BannerPrivacyNotice({
|
|
|
4328
3674
|
actionsClassName,
|
|
4329
3675
|
dismissButtonClassName
|
|
4330
3676
|
}) {
|
|
4331
|
-
const [isVisible, setIsVisible] =
|
|
3677
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
4332
3678
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4333
|
-
const handleDismiss =
|
|
3679
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4334
3680
|
setIsVisible(false);
|
|
4335
3681
|
onDismiss?.();
|
|
4336
3682
|
}, [onDismiss]);
|
|
4337
|
-
const iconContent =
|
|
3683
|
+
const iconContent = React4.useMemo(() => {
|
|
4338
3684
|
if (icon) return icon;
|
|
4339
3685
|
if (!iconName) return null;
|
|
4340
3686
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4346,7 +3692,7 @@ function BannerPrivacyNotice({
|
|
|
4346
3692
|
}
|
|
4347
3693
|
);
|
|
4348
3694
|
}, [icon, iconName, iconClassName]);
|
|
4349
|
-
const actionsContent =
|
|
3695
|
+
const actionsContent = React4.useMemo(() => {
|
|
4350
3696
|
if (actionsSlot) return actionsSlot;
|
|
4351
3697
|
if (!actions || actions.length === 0) return null;
|
|
4352
3698
|
return actions.map((action, index) => {
|
|
@@ -4373,15 +3719,15 @@ function BannerPrivacyNotice({
|
|
|
4373
3719
|
);
|
|
4374
3720
|
});
|
|
4375
3721
|
}, [actions, actionsSlot]);
|
|
4376
|
-
const dismissIconContent =
|
|
3722
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4377
3723
|
if (dismissIcon) return dismissIcon;
|
|
4378
3724
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4379
3725
|
}, [dismissIcon]);
|
|
4380
|
-
const titleContent =
|
|
3726
|
+
const titleContent = React4.useMemo(() => {
|
|
4381
3727
|
if (!title) return null;
|
|
4382
3728
|
return typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("font-semibold text-sm", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: titleClassName, children: title });
|
|
4383
3729
|
}, [title, titleClassName]);
|
|
4384
|
-
const descriptionContent =
|
|
3730
|
+
const descriptionContent = React4.useMemo(() => {
|
|
4385
3731
|
if (!description) return null;
|
|
4386
3732
|
return typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm text-muted-foreground mt-1", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-sm text-muted-foreground mt-1", descriptionClassName), children: description });
|
|
4387
3733
|
}, [description, descriptionClassName]);
|
|
@@ -4428,7 +3774,7 @@ function BannerPromoCta({
|
|
|
4428
3774
|
discountClassName,
|
|
4429
3775
|
actionsClassName
|
|
4430
3776
|
}) {
|
|
4431
|
-
const actionsContent =
|
|
3777
|
+
const actionsContent = React4.useMemo(() => {
|
|
4432
3778
|
if (actionsSlot) return actionsSlot;
|
|
4433
3779
|
if (!actions || actions.length === 0) return null;
|
|
4434
3780
|
return actions.map((action, index) => {
|
|
@@ -4455,15 +3801,15 @@ function BannerPromoCta({
|
|
|
4455
3801
|
);
|
|
4456
3802
|
});
|
|
4457
3803
|
}, [actions, actionsSlot]);
|
|
4458
|
-
const separatorContent =
|
|
3804
|
+
const separatorContent = React4.useMemo(() => {
|
|
4459
3805
|
if (separator) return separator;
|
|
4460
3806
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("hidden sm:inline", separatorClassName), children: "\xB7" });
|
|
4461
3807
|
}, [separator, separatorClassName]);
|
|
4462
|
-
const messageContent =
|
|
3808
|
+
const messageContent = React4.useMemo(() => {
|
|
4463
3809
|
if (!message) return null;
|
|
4464
3810
|
return typeof message === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-semibold", messageClassName), children: message }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: messageClassName, children: message });
|
|
4465
3811
|
}, [message, messageClassName]);
|
|
4466
|
-
const discountContent =
|
|
3812
|
+
const discountContent = React4.useMemo(() => {
|
|
4467
3813
|
if (!discount) return null;
|
|
4468
3814
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: discountClassName, children: discount });
|
|
4469
3815
|
}, [discount, discountClassName]);
|
|
@@ -4491,13 +3837,13 @@ function BannerSocialFollow({
|
|
|
4491
3837
|
actionsClassName,
|
|
4492
3838
|
dismissButtonClassName
|
|
4493
3839
|
}) {
|
|
4494
|
-
const [isVisible, setIsVisible] =
|
|
3840
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
4495
3841
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4496
|
-
const handleDismiss =
|
|
3842
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4497
3843
|
setIsVisible(false);
|
|
4498
3844
|
onDismiss?.();
|
|
4499
3845
|
}, [onDismiss]);
|
|
4500
|
-
const iconContent =
|
|
3846
|
+
const iconContent = React4.useMemo(() => {
|
|
4501
3847
|
if (icon) return icon;
|
|
4502
3848
|
if (!iconName) return null;
|
|
4503
3849
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4509,7 +3855,7 @@ function BannerSocialFollow({
|
|
|
4509
3855
|
}
|
|
4510
3856
|
);
|
|
4511
3857
|
}, [icon, iconName, iconClassName]);
|
|
4512
|
-
const actionsContent =
|
|
3858
|
+
const actionsContent = React4.useMemo(() => {
|
|
4513
3859
|
if (actionsSlot) return actionsSlot;
|
|
4514
3860
|
if (!actions || actions.length === 0) return null;
|
|
4515
3861
|
return actions.map((action, index) => {
|
|
@@ -4537,11 +3883,11 @@ function BannerSocialFollow({
|
|
|
4537
3883
|
);
|
|
4538
3884
|
});
|
|
4539
3885
|
}, [actions, actionsSlot]);
|
|
4540
|
-
const dismissIconContent =
|
|
3886
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4541
3887
|
if (dismissIcon) return dismissIcon;
|
|
4542
3888
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4543
3889
|
}, [dismissIcon]);
|
|
4544
|
-
const messageContent =
|
|
3890
|
+
const messageContent = React4.useMemo(() => {
|
|
4545
3891
|
if (!message) return null;
|
|
4546
3892
|
return typeof message === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium", messageClassName), children: message }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: messageClassName, children: message });
|
|
4547
3893
|
}, [message, messageClassName]);
|
|
@@ -4589,13 +3935,13 @@ function BannerSurveyIncentive({
|
|
|
4589
3935
|
actionsClassName,
|
|
4590
3936
|
dismissButtonClassName
|
|
4591
3937
|
}) {
|
|
4592
|
-
const [isVisible, setIsVisible] =
|
|
3938
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
4593
3939
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4594
|
-
const handleDismiss =
|
|
3940
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4595
3941
|
setIsVisible(false);
|
|
4596
3942
|
onDismiss?.();
|
|
4597
3943
|
}, [onDismiss]);
|
|
4598
|
-
const iconContent =
|
|
3944
|
+
const iconContent = React4.useMemo(() => {
|
|
4599
3945
|
if (icon) return icon;
|
|
4600
3946
|
if (!iconName) return null;
|
|
4601
3947
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4607,7 +3953,7 @@ function BannerSurveyIncentive({
|
|
|
4607
3953
|
}
|
|
4608
3954
|
);
|
|
4609
3955
|
}, [icon, iconName, iconClassName]);
|
|
4610
|
-
const actionsContent =
|
|
3956
|
+
const actionsContent = React4.useMemo(() => {
|
|
4611
3957
|
if (actionsSlot) return actionsSlot;
|
|
4612
3958
|
if (!actions || actions.length === 0) return null;
|
|
4613
3959
|
return actions.map((action, index) => {
|
|
@@ -4635,15 +3981,15 @@ function BannerSurveyIncentive({
|
|
|
4635
3981
|
);
|
|
4636
3982
|
});
|
|
4637
3983
|
}, [actions, actionsSlot]);
|
|
4638
|
-
const dismissIconContent =
|
|
3984
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4639
3985
|
if (dismissIcon) return dismissIcon;
|
|
4640
3986
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4641
3987
|
}, [dismissIcon]);
|
|
4642
|
-
const titleContent =
|
|
3988
|
+
const titleContent = React4.useMemo(() => {
|
|
4643
3989
|
if (!title) return null;
|
|
4644
3990
|
return typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: titleClassName, children: title });
|
|
4645
3991
|
}, [title, titleClassName]);
|
|
4646
|
-
const descriptionContent =
|
|
3992
|
+
const descriptionContent = React4.useMemo(() => {
|
|
4647
3993
|
if (!description) return null;
|
|
4648
3994
|
return typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-muted-foreground", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: descriptionClassName, children: description });
|
|
4649
3995
|
}, [description, descriptionClassName]);
|
|
@@ -4753,7 +4099,7 @@ function FooterCopyright({
|
|
|
4753
4099
|
copyright,
|
|
4754
4100
|
className
|
|
4755
4101
|
}) {
|
|
4756
|
-
const currentYear =
|
|
4102
|
+
const currentYear = React4.useMemo(() => (/* @__PURE__ */ new Date()).getFullYear(), []);
|
|
4757
4103
|
if (!copyright) {
|
|
4758
4104
|
return null;
|
|
4759
4105
|
}
|
|
@@ -5265,8 +4611,8 @@ var BrandAttribution = ({
|
|
|
5265
4611
|
}
|
|
5266
4612
|
const { prefix = "", anchorText, href, suffix = "" } = options[optionIndex];
|
|
5267
4613
|
const ContainerEl = variant;
|
|
5268
|
-
const [trackedHref, setTrackedHref] =
|
|
5269
|
-
|
|
4614
|
+
const [trackedHref, setTrackedHref] = React4__namespace.useState(href);
|
|
4615
|
+
React4__namespace.useEffect(() => {
|
|
5270
4616
|
setTrackedHref(buildTrackedHref(href));
|
|
5271
4617
|
}, [href]);
|
|
5272
4618
|
return /* @__PURE__ */ jsxRuntime.jsxs(ContainerEl, { className: containerClassName, children: [
|
|
@@ -5386,7 +4732,7 @@ function FooterSocialNewsletter({
|
|
|
5386
4732
|
patternOpacity,
|
|
5387
4733
|
optixFlowConfig
|
|
5388
4734
|
}) {
|
|
5389
|
-
const renderForm =
|
|
4735
|
+
const renderForm = React4__namespace.useMemo(() => {
|
|
5390
4736
|
if (!formEngineSetup) return null;
|
|
5391
4737
|
const action = {
|
|
5392
4738
|
variant: "default",
|
|
@@ -5539,14 +4885,14 @@ function FooterSocialApps({
|
|
|
5539
4885
|
patternOpacity,
|
|
5540
4886
|
optixFlowConfig
|
|
5541
4887
|
}) {
|
|
5542
|
-
const sectionsContent =
|
|
4888
|
+
const sectionsContent = React4.useMemo(() => {
|
|
5543
4889
|
if (!sections || sections.length === 0) return null;
|
|
5544
4890
|
return sections.map((section, sectionIdx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 md:mt-0", children: [
|
|
5545
4891
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-4 font-bold", children: section.title }),
|
|
5546
4892
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-4", children: section.links.map((link, linkIdx) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "font-medium ", children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: link.href, children: link.name }) }, linkIdx)) })
|
|
5547
4893
|
] }, sectionIdx));
|
|
5548
4894
|
}, [sections]);
|
|
5549
|
-
const socialLinksContent =
|
|
4895
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
5550
4896
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
5551
4897
|
return socialLinks.map((social, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "font-medium", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5552
4898
|
SocialLinkIcon,
|
|
@@ -5561,7 +4907,7 @@ function FooterSocialApps({
|
|
|
5561
4907
|
}
|
|
5562
4908
|
) }, idx));
|
|
5563
4909
|
}, [socialLinks, background]);
|
|
5564
|
-
const appLinksContent =
|
|
4910
|
+
const appLinksContent = React4.useMemo(() => {
|
|
5565
4911
|
if (!appLinks || appLinks.length === 0) return null;
|
|
5566
4912
|
return appLinks.map((app, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "font-medium", children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: app.href, "aria-label": app.label, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5567
4913
|
"span",
|
|
@@ -5650,7 +4996,7 @@ function FooterSimpleCentered({
|
|
|
5650
4996
|
patternOpacity,
|
|
5651
4997
|
optixFlowConfig
|
|
5652
4998
|
}) {
|
|
5653
|
-
const sitemapContent =
|
|
4999
|
+
const sitemapContent = React4.useMemo(() => {
|
|
5654
5000
|
if (!sitemap || sitemap.length === 0) return null;
|
|
5655
5001
|
return sitemap.map((section) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(sitemapSectionClassName), children: [
|
|
5656
5002
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("mb-4 text-sm font-semibold", sitemapTitleClassName), children: section.title }),
|
|
@@ -5673,9 +5019,9 @@ function FooterSimpleCentered({
|
|
|
5673
5019
|
sitemapLinksClassName,
|
|
5674
5020
|
sitemapLinkClassName
|
|
5675
5021
|
]);
|
|
5676
|
-
const bottomLinksContent =
|
|
5022
|
+
const bottomLinksContent = React4.useMemo(() => {
|
|
5677
5023
|
if (!bottomLinks || bottomLinks.length === 0) return null;
|
|
5678
|
-
return bottomLinks.map((link, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5024
|
+
return bottomLinks.map((link, idx) => /* @__PURE__ */ jsxRuntime.jsx(React4__namespace.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5679
5025
|
Pressable,
|
|
5680
5026
|
{
|
|
5681
5027
|
href: link.href,
|
|
@@ -6000,7 +5346,7 @@ function FooterNewsletterGrid({
|
|
|
6000
5346
|
patternOpacity,
|
|
6001
5347
|
optixFlowConfig
|
|
6002
5348
|
}) {
|
|
6003
|
-
const sectionsContent =
|
|
5349
|
+
const sectionsContent = React4.useMemo(() => {
|
|
6004
5350
|
if (!sections || sections.length === 0) return null;
|
|
6005
5351
|
return sections.map((section, sectionIdx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-2 md:col-span-1", children: [
|
|
6006
5352
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-5 font-medium", children: section.title }),
|
|
@@ -6014,7 +5360,7 @@ function FooterNewsletterGrid({
|
|
|
6014
5360
|
)) })
|
|
6015
5361
|
] }, sectionIdx));
|
|
6016
5362
|
}, [sections]);
|
|
6017
|
-
const socialLinksContent =
|
|
5363
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
6018
5364
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
6019
5365
|
return socialLinks.map((social, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6020
5366
|
SocialLinkIcon,
|
|
@@ -6530,7 +5876,7 @@ function FooterBackgroundCard({
|
|
|
6530
5876
|
patternOpacity,
|
|
6531
5877
|
optixFlowConfig
|
|
6532
5878
|
}) {
|
|
6533
|
-
const sectionStyle =
|
|
5879
|
+
const sectionStyle = React4.useMemo(
|
|
6534
5880
|
() => backgroundImage ? { backgroundImage: `url('${backgroundImage}')` } : void 0,
|
|
6535
5881
|
[backgroundImage]
|
|
6536
5882
|
);
|
|
@@ -6804,7 +6150,7 @@ function FooterAnimatedSocial({
|
|
|
6804
6150
|
pattern,
|
|
6805
6151
|
patternOpacity
|
|
6806
6152
|
}) {
|
|
6807
|
-
const socialLinksContent =
|
|
6153
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
6808
6154
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
6809
6155
|
return socialLinks.map((link, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6810
6156
|
framerMotion.motion.div,
|
|
@@ -7022,7 +6368,7 @@ function FooterNewsletterMinimal({
|
|
|
7022
6368
|
buttonAction,
|
|
7023
6369
|
formSlot
|
|
7024
6370
|
}) {
|
|
7025
|
-
const navLinksContent =
|
|
6371
|
+
const navLinksContent = React4__namespace.useMemo(() => {
|
|
7026
6372
|
if (!navLinks || navLinks.length === 0) return null;
|
|
7027
6373
|
return navLinks.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7028
6374
|
Pressable,
|
|
@@ -7033,7 +6379,7 @@ function FooterNewsletterMinimal({
|
|
|
7033
6379
|
}
|
|
7034
6380
|
) }, idx));
|
|
7035
6381
|
}, [navLinks, navLinkClassName]);
|
|
7036
|
-
const socialLinksContent =
|
|
6382
|
+
const socialLinksContent = React4__namespace.useMemo(() => {
|
|
7037
6383
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
7038
6384
|
return socialLinks.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7039
6385
|
SocialLinkIcon,
|
|
@@ -7049,7 +6395,7 @@ function FooterNewsletterMinimal({
|
|
|
7049
6395
|
}
|
|
7050
6396
|
) }, idx));
|
|
7051
6397
|
}, [socialLinks, socialLinkClassName]);
|
|
7052
|
-
const footerLinksContent =
|
|
6398
|
+
const footerLinksContent = React4__namespace.useMemo(() => {
|
|
7053
6399
|
if (!footerLinks || footerLinks.length === 0) return null;
|
|
7054
6400
|
return footerLinks.map((item) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7055
6401
|
Pressable,
|
|
@@ -7063,7 +6409,7 @@ function FooterNewsletterMinimal({
|
|
|
7063
6409
|
}
|
|
7064
6410
|
) }, item.label));
|
|
7065
6411
|
}, [footerLinks, footerLinkClassName]);
|
|
7066
|
-
const renderForm =
|
|
6412
|
+
const renderForm = React4__namespace.useMemo(() => {
|
|
7067
6413
|
if (formSlot) return formSlot;
|
|
7068
6414
|
if (!formEngineSetup) return null;
|
|
7069
6415
|
const defaultButtonAction = {
|
|
@@ -7298,7 +6644,7 @@ function FooterCtaSocial({
|
|
|
7298
6644
|
pattern,
|
|
7299
6645
|
patternOpacity
|
|
7300
6646
|
}) {
|
|
7301
|
-
const socialLinksContent =
|
|
6647
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
7302
6648
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
7303
6649
|
return socialLinks.map((link) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7304
6650
|
SocialLinkIcon,
|
|
@@ -7416,7 +6762,7 @@ function FooterNavSocial({
|
|
|
7416
6762
|
patternOpacity,
|
|
7417
6763
|
optixFlowConfig
|
|
7418
6764
|
}) {
|
|
7419
|
-
const sectionsContent =
|
|
6765
|
+
const sectionsContent = React4.useMemo(() => {
|
|
7420
6766
|
if (!sections || sections.length === 0) return null;
|
|
7421
6767
|
return sections.map((section, sectionIdx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(navSectionClassName), children: [
|
|
7422
6768
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("mb-4 font-semibold", navTitleClassName), children: section.title }),
|
|
@@ -7429,7 +6775,7 @@ function FooterNavSocial({
|
|
|
7429
6775
|
navLinksClassName,
|
|
7430
6776
|
navLinkClassName
|
|
7431
6777
|
]);
|
|
7432
|
-
const socialLinksContent =
|
|
6778
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
7433
6779
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
7434
6780
|
return socialLinks.map((social, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7435
6781
|
SocialLinkIcon,
|
|
@@ -7444,7 +6790,7 @@ function FooterNavSocial({
|
|
|
7444
6790
|
}
|
|
7445
6791
|
) }, idx));
|
|
7446
6792
|
}, [socialLinks, socialLinkClassName]);
|
|
7447
|
-
const legalLinksContent =
|
|
6793
|
+
const legalLinksContent = React4.useMemo(() => {
|
|
7448
6794
|
if (!legalLinks || legalLinks.length === 0) return null;
|
|
7449
6795
|
return legalLinks.map((link, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: cn(legalLinkClassName), children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: link.href, className: "hover:opacity-100", children: link.name }) }, idx));
|
|
7450
6796
|
}, [legalLinks, legalLinkClassName]);
|
|
@@ -7612,7 +6958,7 @@ function FooterNavSocial({
|
|
|
7612
6958
|
var useResponsiveLayout = ({
|
|
7613
6959
|
directionConfig = { desktop: "mediaRight", mobile: "mediaTop" }
|
|
7614
6960
|
}) => {
|
|
7615
|
-
const responsiveClassName =
|
|
6961
|
+
const responsiveClassName = React4.useMemo(() => {
|
|
7616
6962
|
const desktopOrder = directionConfig.desktop === "mediaRight" ? "lg:flex-row" : "lg:flex-row-reverse";
|
|
7617
6963
|
const mobileOrder = directionConfig.mobile === "mediaTop" ? "flex-col-reverse" : "flex-col";
|
|
7618
6964
|
return `${mobileOrder} ${desktopOrder}`;
|
|
@@ -7693,7 +7039,6 @@ exports.FooterNewsletterMinimal = FooterNewsletterMinimal;
|
|
|
7693
7039
|
exports.FooterSimpleCentered = FooterSimpleCentered;
|
|
7694
7040
|
exports.FooterSocialApps = FooterSocialApps;
|
|
7695
7041
|
exports.FooterSocialNewsletter = FooterSocialNewsletter;
|
|
7696
|
-
exports.GeoMap = GeoMap;
|
|
7697
7042
|
exports.ImageSlider = ImageSlider;
|
|
7698
7043
|
exports.MediaHoverCtas = MediaHoverCtas;
|
|
7699
7044
|
exports.PageHeroBanner = PageHeroBanner;
|