@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/components.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
|
|
|
@@ -83,7 +82,7 @@ var maxWidthStyles = {
|
|
|
83
82
|
"4xl": "max-w-[1536px]",
|
|
84
83
|
full: "max-w-full"
|
|
85
84
|
};
|
|
86
|
-
var Container =
|
|
85
|
+
var Container = React4__namespace.default.forwardRef(
|
|
87
86
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
88
87
|
const Component = as;
|
|
89
88
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -389,7 +388,7 @@ var spacingStyles = {
|
|
|
389
388
|
};
|
|
390
389
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl", "hero"];
|
|
391
390
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
392
|
-
var Section =
|
|
391
|
+
var Section = React4__namespace.default.forwardRef(
|
|
393
392
|
({
|
|
394
393
|
id,
|
|
395
394
|
title,
|
|
@@ -450,1144 +449,65 @@ var Section = React6__namespace.default.forwardRef(
|
|
|
450
449
|
}
|
|
451
450
|
);
|
|
452
451
|
Section.displayName = "Section";
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
const
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
|
|
486
|
-
return phoneRegex.test(trimmed);
|
|
487
|
-
}
|
|
488
|
-
function isInternalUrl(href) {
|
|
489
|
-
if (typeof window === "undefined") {
|
|
490
|
-
return href.startsWith("/") && !href.startsWith("//");
|
|
491
|
-
}
|
|
492
|
-
const trimmed = href.trim();
|
|
493
|
-
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
494
|
-
return true;
|
|
495
|
-
}
|
|
496
|
-
try {
|
|
497
|
-
const url = new URL(trimmed, window.location.href);
|
|
498
|
-
const currentOrigin = window.location.origin;
|
|
499
|
-
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
500
|
-
return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
|
|
501
|
-
} catch {
|
|
502
|
-
return false;
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
function toRelativePath(href) {
|
|
506
|
-
if (typeof window === "undefined") {
|
|
507
|
-
return href;
|
|
508
|
-
}
|
|
509
|
-
const trimmed = href.trim();
|
|
510
|
-
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
511
|
-
return trimmed;
|
|
512
|
-
}
|
|
513
|
-
try {
|
|
514
|
-
const url = new URL(trimmed, window.location.href);
|
|
515
|
-
const currentOrigin = window.location.origin;
|
|
516
|
-
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
517
|
-
if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
|
|
518
|
-
return url.pathname + url.search + url.hash;
|
|
519
|
-
}
|
|
520
|
-
} catch {
|
|
521
|
-
}
|
|
522
|
-
return trimmed;
|
|
523
|
-
}
|
|
524
|
-
function useNavigation({
|
|
525
|
-
href,
|
|
526
|
-
onClick
|
|
527
|
-
} = {}) {
|
|
528
|
-
const linkType = React6__namespace.useMemo(() => {
|
|
529
|
-
if (!href || href.trim() === "") {
|
|
530
|
-
return onClick ? "none" : "none";
|
|
531
|
-
}
|
|
532
|
-
const trimmed = href.trim();
|
|
533
|
-
if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
|
|
534
|
-
return "mailto";
|
|
535
|
-
}
|
|
536
|
-
if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
|
|
537
|
-
return "tel";
|
|
538
|
-
}
|
|
539
|
-
if (isInternalUrl(trimmed)) {
|
|
540
|
-
return "internal";
|
|
541
|
-
}
|
|
542
|
-
try {
|
|
543
|
-
new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
|
|
544
|
-
return "external";
|
|
545
|
-
} catch {
|
|
546
|
-
return "internal";
|
|
547
|
-
}
|
|
548
|
-
}, [href, onClick]);
|
|
549
|
-
const normalizedHref = React6__namespace.useMemo(() => {
|
|
550
|
-
if (!href || href.trim() === "") {
|
|
551
|
-
return void 0;
|
|
552
|
-
}
|
|
553
|
-
const trimmed = href.trim();
|
|
554
|
-
switch (linkType) {
|
|
555
|
-
case "tel":
|
|
556
|
-
return normalizePhoneNumber(trimmed);
|
|
557
|
-
case "mailto":
|
|
558
|
-
return normalizeEmail(trimmed);
|
|
559
|
-
case "internal":
|
|
560
|
-
return toRelativePath(trimmed);
|
|
561
|
-
case "external":
|
|
562
|
-
return trimmed;
|
|
563
|
-
default:
|
|
564
|
-
return trimmed;
|
|
565
|
-
}
|
|
566
|
-
}, [href, linkType]);
|
|
567
|
-
const target = React6__namespace.useMemo(() => {
|
|
568
|
-
switch (linkType) {
|
|
569
|
-
case "external":
|
|
570
|
-
return "_blank";
|
|
571
|
-
case "internal":
|
|
572
|
-
return "_self";
|
|
573
|
-
case "mailto":
|
|
574
|
-
case "tel":
|
|
575
|
-
return void 0;
|
|
576
|
-
default:
|
|
577
|
-
return void 0;
|
|
452
|
+
var sizeStyles = {
|
|
453
|
+
sm: "max-w-md",
|
|
454
|
+
md: "max-w-2xl",
|
|
455
|
+
lg: "max-w-4xl",
|
|
456
|
+
xl: "max-w-5xl",
|
|
457
|
+
full: "max-w-7xl",
|
|
458
|
+
compact: "max-w-[700px]"
|
|
459
|
+
};
|
|
460
|
+
var dialogTransition = {
|
|
461
|
+
duration: 0.35,
|
|
462
|
+
ease: [0.16, 1, 0.3, 1]
|
|
463
|
+
};
|
|
464
|
+
function AnimatedDialog({
|
|
465
|
+
open,
|
|
466
|
+
onOpenChange,
|
|
467
|
+
title,
|
|
468
|
+
eyebrow,
|
|
469
|
+
description,
|
|
470
|
+
children,
|
|
471
|
+
header,
|
|
472
|
+
footer,
|
|
473
|
+
size = "lg",
|
|
474
|
+
className,
|
|
475
|
+
contentClassName,
|
|
476
|
+
featuredMediaHeader
|
|
477
|
+
}) {
|
|
478
|
+
const titleId = React4.useId();
|
|
479
|
+
const descriptionId = React4.useId();
|
|
480
|
+
const containerRef = React4.useRef(null);
|
|
481
|
+
useOnClickOutside.useOnClickOutside(containerRef, () => {
|
|
482
|
+
if (open) {
|
|
483
|
+
onOpenChange(false);
|
|
578
484
|
}
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
if (
|
|
582
|
-
return
|
|
485
|
+
});
|
|
486
|
+
React4.useEffect(() => {
|
|
487
|
+
if (!open) {
|
|
488
|
+
return;
|
|
583
489
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
const isInternal = linkType === "internal";
|
|
588
|
-
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
589
|
-
const handleClick = React6__namespace.useCallback(
|
|
590
|
-
(event) => {
|
|
591
|
-
if (onClick) {
|
|
592
|
-
try {
|
|
593
|
-
onClick(event);
|
|
594
|
-
} catch (error) {
|
|
595
|
-
console.error("Error in user onClick handler:", error);
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
if (event.defaultPrevented) {
|
|
599
|
-
return;
|
|
490
|
+
const onKeyDown = (event) => {
|
|
491
|
+
if (event.key === "Escape") {
|
|
492
|
+
onOpenChange(false);
|
|
600
493
|
}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
[onClick, shouldUseRouter, normalizedHref]
|
|
619
|
-
);
|
|
620
|
-
return {
|
|
621
|
-
linkType,
|
|
622
|
-
normalizedHref,
|
|
623
|
-
target,
|
|
624
|
-
rel,
|
|
625
|
-
isExternal,
|
|
626
|
-
isInternal,
|
|
627
|
-
shouldUseRouter,
|
|
628
|
-
handleClick
|
|
629
|
-
};
|
|
630
|
-
}
|
|
631
|
-
var baseStyles = [
|
|
632
|
-
// Layout
|
|
633
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
|
|
634
|
-
// Typography - using CSS variables with sensible defaults
|
|
635
|
-
"font-[var(--button-font-family,inherit)]",
|
|
636
|
-
"font-[var(--button-font-weight,500)]",
|
|
637
|
-
"tracking-[var(--button-letter-spacing,0)]",
|
|
638
|
-
"leading-[var(--button-line-height,1.25)]",
|
|
639
|
-
"[text-transform:var(--button-text-transform,none)]",
|
|
640
|
-
"text-sm",
|
|
641
|
-
// Border radius
|
|
642
|
-
"rounded-[var(--button-radius,var(--radius,0.375rem))]",
|
|
643
|
-
// Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
|
|
644
|
-
"[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
|
|
645
|
-
// Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
|
|
646
|
-
"[box-shadow:var(--button-shadow,none)]",
|
|
647
|
-
"hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
|
|
648
|
-
// Disabled state
|
|
649
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
650
|
-
// SVG handling
|
|
651
|
-
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
652
|
-
// Focus styles
|
|
653
|
-
"outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
654
|
-
// Invalid state
|
|
655
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
656
|
-
].join(" ");
|
|
657
|
-
var buttonVariants = classVarianceAuthority.cva(baseStyles, {
|
|
658
|
-
variants: {
|
|
659
|
-
variant: {
|
|
660
|
-
// Default (Primary) variant - full customization
|
|
661
|
-
default: [
|
|
662
|
-
"bg-[var(--button-default-bg,hsl(var(--primary)))]",
|
|
663
|
-
"text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
|
|
664
|
-
"border-[length:var(--button-default-border-width,0px)]",
|
|
665
|
-
"border-[color:var(--button-default-border,transparent)]",
|
|
666
|
-
"[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
|
|
667
|
-
"hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
|
|
668
|
-
"hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
|
|
669
|
-
"hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
|
|
670
|
-
"hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
|
|
671
|
-
].join(" "),
|
|
672
|
-
// Destructive variant - full customization
|
|
673
|
-
destructive: [
|
|
674
|
-
"bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
|
|
675
|
-
"text-[var(--button-destructive-fg,white)]",
|
|
676
|
-
"border-[length:var(--button-destructive-border-width,0px)]",
|
|
677
|
-
"border-[color:var(--button-destructive-border,transparent)]",
|
|
678
|
-
"[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
|
|
679
|
-
"hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
|
|
680
|
-
"hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
|
|
681
|
-
"hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
|
|
682
|
-
"hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
|
|
683
|
-
"focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
684
|
-
"dark:bg-destructive/60"
|
|
685
|
-
].join(" "),
|
|
686
|
-
// Outline variant - full customization with proper border handling
|
|
687
|
-
outline: [
|
|
688
|
-
"bg-[var(--button-outline-bg,hsl(var(--background)))]",
|
|
689
|
-
"text-[var(--button-outline-fg,inherit)]",
|
|
690
|
-
"border-[length:var(--button-outline-border-width,1px)]",
|
|
691
|
-
"border-[color:var(--button-outline-border,hsl(var(--border)))]",
|
|
692
|
-
"[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
|
|
693
|
-
"hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
|
|
694
|
-
"hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
|
|
695
|
-
"hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
|
|
696
|
-
"hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
|
|
697
|
-
"dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
|
|
698
|
-
].join(" "),
|
|
699
|
-
// Secondary variant - full customization
|
|
700
|
-
secondary: [
|
|
701
|
-
"bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
|
|
702
|
-
"text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
|
|
703
|
-
"border-[length:var(--button-secondary-border-width,0px)]",
|
|
704
|
-
"border-[color:var(--button-secondary-border,transparent)]",
|
|
705
|
-
"[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
|
|
706
|
-
"hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
|
|
707
|
-
"hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
|
|
708
|
-
"hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
|
|
709
|
-
"hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
|
|
710
|
-
].join(" "),
|
|
711
|
-
// Ghost variant - full customization
|
|
712
|
-
ghost: [
|
|
713
|
-
"bg-[var(--button-ghost-bg,transparent)]",
|
|
714
|
-
"text-[var(--button-ghost-fg,inherit)]",
|
|
715
|
-
"border-[length:var(--button-ghost-border-width,0px)]",
|
|
716
|
-
"border-[color:var(--button-ghost-border,transparent)]",
|
|
717
|
-
"[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
|
|
718
|
-
"hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
|
|
719
|
-
"hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
|
|
720
|
-
"hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
|
|
721
|
-
"hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
|
|
722
|
-
"dark:hover:bg-accent/50"
|
|
723
|
-
].join(" "),
|
|
724
|
-
// Link variant - full customization
|
|
725
|
-
link: [
|
|
726
|
-
"bg-[var(--button-link-bg,transparent)]",
|
|
727
|
-
"text-[var(--button-link-fg,hsl(var(--primary)))]",
|
|
728
|
-
"border-[length:var(--button-link-border-width,0px)]",
|
|
729
|
-
"border-[color:var(--button-link-border,transparent)]",
|
|
730
|
-
"[box-shadow:var(--button-link-shadow,none)]",
|
|
731
|
-
"hover:bg-[var(--button-link-hover-bg,transparent)]",
|
|
732
|
-
"hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
|
|
733
|
-
"hover:[box-shadow:var(--button-link-shadow-hover,none)]",
|
|
734
|
-
"underline-offset-4 hover:underline"
|
|
735
|
-
].join(" ")
|
|
736
|
-
},
|
|
737
|
-
size: {
|
|
738
|
-
default: [
|
|
739
|
-
"h-[var(--button-height-md,2.25rem)]",
|
|
740
|
-
"px-[var(--button-padding-x-md,1rem)]",
|
|
741
|
-
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
742
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
743
|
-
].join(" "),
|
|
744
|
-
sm: [
|
|
745
|
-
"h-[var(--button-height-sm,2rem)]",
|
|
746
|
-
"px-[var(--button-padding-x-sm,0.75rem)]",
|
|
747
|
-
"py-[var(--button-padding-y-sm,0.25rem)]",
|
|
748
|
-
"gap-1.5",
|
|
749
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
|
|
750
|
-
].join(" "),
|
|
751
|
-
md: [
|
|
752
|
-
"h-[var(--button-height-md,2.25rem)]",
|
|
753
|
-
"px-[var(--button-padding-x-md,1rem)]",
|
|
754
|
-
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
755
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
756
|
-
].join(" "),
|
|
757
|
-
lg: [
|
|
758
|
-
"h-[var(--button-height-lg,2.5rem)]",
|
|
759
|
-
"px-[var(--button-padding-x-lg,1.5rem)]",
|
|
760
|
-
"py-[var(--button-padding-y-lg,0.5rem)]",
|
|
761
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
|
|
762
|
-
].join(" "),
|
|
763
|
-
icon: "size-[var(--button-height-md,2.25rem)]",
|
|
764
|
-
"icon-sm": "size-[var(--button-height-sm,2rem)]",
|
|
765
|
-
"icon-lg": "size-[var(--button-height-lg,2.5rem)]"
|
|
766
|
-
}
|
|
767
|
-
},
|
|
768
|
-
defaultVariants: {
|
|
769
|
-
variant: "default",
|
|
770
|
-
size: "default"
|
|
771
|
-
}
|
|
772
|
-
});
|
|
773
|
-
var Pressable = React6__namespace.forwardRef(
|
|
774
|
-
({
|
|
775
|
-
children,
|
|
776
|
-
className,
|
|
777
|
-
href,
|
|
778
|
-
onClick,
|
|
779
|
-
variant,
|
|
780
|
-
size,
|
|
781
|
-
asButton = false,
|
|
782
|
-
fallbackComponentType = "span",
|
|
783
|
-
componentType,
|
|
784
|
-
"aria-label": ariaLabel,
|
|
785
|
-
"aria-describedby": ariaDescribedby,
|
|
786
|
-
id,
|
|
787
|
-
...props
|
|
788
|
-
}, ref) => {
|
|
789
|
-
const navigation = useNavigation({ href, onClick });
|
|
790
|
-
const {
|
|
791
|
-
normalizedHref,
|
|
792
|
-
target,
|
|
793
|
-
rel,
|
|
794
|
-
linkType,
|
|
795
|
-
isInternal,
|
|
796
|
-
handleClick
|
|
797
|
-
} = navigation;
|
|
798
|
-
const shouldRenderLink = normalizedHref && linkType !== "none";
|
|
799
|
-
const shouldRenderButton = !shouldRenderLink && onClick;
|
|
800
|
-
const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
|
|
801
|
-
const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
|
|
802
|
-
const shouldApplyButtonStyles = asButton || variant || size;
|
|
803
|
-
const combinedClassName = cn(
|
|
804
|
-
shouldApplyButtonStyles && buttonVariants({ variant, size }),
|
|
805
|
-
className
|
|
806
|
-
);
|
|
807
|
-
const dataProps = Object.fromEntries(
|
|
808
|
-
Object.entries(props).filter(([key]) => key.startsWith("data-"))
|
|
809
|
-
);
|
|
810
|
-
const buttonDataAttributes = shouldApplyButtonStyles ? {
|
|
811
|
-
"data-slot": "button",
|
|
812
|
-
"data-variant": variant ?? "default",
|
|
813
|
-
"data-size": size ?? "default"
|
|
814
|
-
} : {};
|
|
815
|
-
const commonProps = {
|
|
816
|
-
className: combinedClassName,
|
|
817
|
-
onClick: handleClick,
|
|
818
|
-
"aria-label": ariaLabel,
|
|
819
|
-
"aria-describedby": ariaDescribedby,
|
|
820
|
-
id,
|
|
821
|
-
...dataProps,
|
|
822
|
-
...buttonDataAttributes
|
|
823
|
-
};
|
|
824
|
-
if (finalComponentType === "a" && shouldRenderLink) {
|
|
825
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
826
|
-
"a",
|
|
827
|
-
{
|
|
828
|
-
ref,
|
|
829
|
-
href: normalizedHref,
|
|
830
|
-
target,
|
|
831
|
-
rel,
|
|
832
|
-
...commonProps,
|
|
833
|
-
...props,
|
|
834
|
-
children
|
|
835
|
-
}
|
|
836
|
-
);
|
|
837
|
-
}
|
|
838
|
-
if (finalComponentType === "button") {
|
|
839
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
840
|
-
"button",
|
|
841
|
-
{
|
|
842
|
-
ref,
|
|
843
|
-
type: props.type || "button",
|
|
844
|
-
...commonProps,
|
|
845
|
-
...props,
|
|
846
|
-
children
|
|
847
|
-
}
|
|
848
|
-
);
|
|
849
|
-
}
|
|
850
|
-
if (finalComponentType === "div") {
|
|
851
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
852
|
-
"div",
|
|
853
|
-
{
|
|
854
|
-
ref,
|
|
855
|
-
...commonProps,
|
|
856
|
-
children
|
|
857
|
-
}
|
|
858
|
-
);
|
|
859
|
-
}
|
|
860
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
861
|
-
"span",
|
|
862
|
-
{
|
|
863
|
-
ref,
|
|
864
|
-
...commonProps,
|
|
865
|
-
children
|
|
866
|
-
}
|
|
867
|
-
);
|
|
868
|
-
}
|
|
869
|
-
);
|
|
870
|
-
Pressable.displayName = "Pressable";
|
|
871
|
-
var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
|
|
872
|
-
var DynamicIcon = React6__namespace.memo(function DynamicIcon2({
|
|
873
|
-
apiKey,
|
|
874
|
-
...props
|
|
875
|
-
}) {
|
|
876
|
-
return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
|
|
877
|
-
});
|
|
878
|
-
DynamicIcon.displayName = "DynamicIcon";
|
|
879
|
-
var PANEL_POSITION_CLASS = {
|
|
880
|
-
"top-left": "left-4 top-4",
|
|
881
|
-
"top-right": "right-4 top-4",
|
|
882
|
-
"bottom-left": "bottom-4 left-4",
|
|
883
|
-
"bottom-right": "bottom-4 right-4"
|
|
884
|
-
};
|
|
885
|
-
var DEFAULT_VIEW_STATE = {
|
|
886
|
-
latitude: 39.5,
|
|
887
|
-
longitude: -98.35,
|
|
888
|
-
zoom: 3
|
|
889
|
-
};
|
|
890
|
-
var VIDEO_FILE_EXTENSION_REGEX = /\.(mp4|webm|ogg|mov|m4v|m3u8)(\?.*)?$/i;
|
|
891
|
-
function resolveMediaType(item) {
|
|
892
|
-
if (item.type) {
|
|
893
|
-
return item.type;
|
|
894
|
-
}
|
|
895
|
-
return VIDEO_FILE_EXTENSION_REGEX.test(item.src) ? "video" : "image";
|
|
896
|
-
}
|
|
897
|
-
function normalizeId(value, fallback) {
|
|
898
|
-
if (value === null || value === void 0 || value === "") {
|
|
899
|
-
return fallback;
|
|
900
|
-
}
|
|
901
|
-
return String(value);
|
|
902
|
-
}
|
|
903
|
-
function buildClusterCenter(markers) {
|
|
904
|
-
if (!markers.length) {
|
|
905
|
-
return null;
|
|
906
|
-
}
|
|
907
|
-
const total = markers.reduce(
|
|
908
|
-
(accumulator, marker) => ({
|
|
909
|
-
latitude: accumulator.latitude + marker.latitude,
|
|
910
|
-
longitude: accumulator.longitude + marker.longitude
|
|
911
|
-
}),
|
|
912
|
-
{ latitude: 0, longitude: 0 }
|
|
913
|
-
);
|
|
914
|
-
return {
|
|
915
|
-
latitude: total.latitude / markers.length,
|
|
916
|
-
longitude: total.longitude / markers.length
|
|
917
|
-
};
|
|
918
|
-
}
|
|
919
|
-
function resolveActionKey(action, index) {
|
|
920
|
-
if (typeof action.label === "string" && action.label.trim().length > 0) {
|
|
921
|
-
return `label:${action.label}:${index}`;
|
|
922
|
-
}
|
|
923
|
-
if (action.href) {
|
|
924
|
-
return `href:${action.href}:${index}`;
|
|
925
|
-
}
|
|
926
|
-
return `action:${index}`;
|
|
927
|
-
}
|
|
928
|
-
function MarkerActions({ actions }) {
|
|
929
|
-
if (!actions || actions.length === 0) {
|
|
930
|
-
return null;
|
|
931
|
-
}
|
|
932
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 flex flex-wrap gap-2", children: actions.map((action, index) => {
|
|
933
|
-
const {
|
|
934
|
-
label,
|
|
935
|
-
icon,
|
|
936
|
-
iconAfter,
|
|
937
|
-
children,
|
|
938
|
-
href,
|
|
939
|
-
onClick,
|
|
940
|
-
className: actionClassName,
|
|
941
|
-
variant,
|
|
942
|
-
size,
|
|
943
|
-
asButton,
|
|
944
|
-
...rest
|
|
945
|
-
} = action;
|
|
946
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
947
|
-
Pressable,
|
|
948
|
-
{
|
|
949
|
-
href,
|
|
950
|
-
onClick,
|
|
951
|
-
variant: variant ?? (index === 0 ? "default" : "outline"),
|
|
952
|
-
size: size ?? "sm",
|
|
953
|
-
asButton: asButton ?? true,
|
|
954
|
-
className: cn("inline-flex items-center gap-2", actionClassName),
|
|
955
|
-
...rest,
|
|
956
|
-
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
957
|
-
icon,
|
|
958
|
-
label,
|
|
959
|
-
iconAfter
|
|
960
|
-
] })
|
|
961
|
-
},
|
|
962
|
-
resolveActionKey(action, index)
|
|
963
|
-
);
|
|
964
|
-
}) });
|
|
965
|
-
}
|
|
966
|
-
function MarkerMediaCarousel({
|
|
967
|
-
mediaItems,
|
|
968
|
-
optixFlowConfig
|
|
969
|
-
}) {
|
|
970
|
-
const [activeIndex, setActiveIndex] = React6__namespace.useState(0);
|
|
971
|
-
const totalItems = mediaItems.length;
|
|
972
|
-
const mediaResetKey = React6__namespace.useMemo(
|
|
973
|
-
() => mediaItems.map((item, index) => {
|
|
974
|
-
const itemId = normalizeId(item.id, `media-${index}`);
|
|
975
|
-
return `${itemId}:${item.src}:${item.type ?? ""}:${item.poster ?? ""}`;
|
|
976
|
-
}).join("|"),
|
|
977
|
-
[mediaItems]
|
|
978
|
-
);
|
|
979
|
-
const activeItemIndex = Math.min(activeIndex, Math.max(0, totalItems - 1));
|
|
980
|
-
React6__namespace.useEffect(() => {
|
|
981
|
-
setActiveIndex(0);
|
|
982
|
-
}, [mediaResetKey]);
|
|
983
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative border-b border-border/60 bg-muted/40", children: [
|
|
984
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative aspect-video w-full overflow-hidden", children: mediaItems.map((item, index) => {
|
|
985
|
-
const isActive = index === activeItemIndex;
|
|
986
|
-
const mediaType = resolveMediaType(item);
|
|
987
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
988
|
-
"div",
|
|
989
|
-
{
|
|
990
|
-
"aria-hidden": !isActive,
|
|
991
|
-
className: cn(
|
|
992
|
-
"absolute inset-0 transition-opacity duration-500 ease-in-out",
|
|
993
|
-
isActive ? "opacity-100 z-[1]" : "opacity-0 z-0 pointer-events-none"
|
|
994
|
-
),
|
|
995
|
-
children: mediaType === "video" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
996
|
-
"video",
|
|
997
|
-
{
|
|
998
|
-
className: "h-full w-full object-cover",
|
|
999
|
-
controls: isActive,
|
|
1000
|
-
preload: "metadata",
|
|
1001
|
-
poster: item.poster,
|
|
1002
|
-
tabIndex: isActive ? 0 : -1,
|
|
1003
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("source", { src: item.src })
|
|
1004
|
-
}
|
|
1005
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1006
|
-
img.Img,
|
|
1007
|
-
{
|
|
1008
|
-
src: item.src,
|
|
1009
|
-
alt: item.alt ?? "Map marker media",
|
|
1010
|
-
className: "h-full w-full object-cover",
|
|
1011
|
-
loading: "eager",
|
|
1012
|
-
optixFlowConfig
|
|
1013
|
-
}
|
|
1014
|
-
)
|
|
1015
|
-
},
|
|
1016
|
-
normalizeId(item.id, `media-slide-${index}`)
|
|
1017
|
-
);
|
|
1018
|
-
}) }),
|
|
1019
|
-
totalItems > 1 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1020
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1021
|
-
"button",
|
|
1022
|
-
{
|
|
1023
|
-
type: "button",
|
|
1024
|
-
"aria-label": "Show previous media",
|
|
1025
|
-
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]",
|
|
1026
|
-
onClick: () => {
|
|
1027
|
-
setActiveIndex(
|
|
1028
|
-
(current) => (current - 1 + totalItems) % totalItems
|
|
1029
|
-
);
|
|
1030
|
-
},
|
|
1031
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/arrow-left", size: 18 })
|
|
1032
|
-
}
|
|
1033
|
-
),
|
|
1034
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1035
|
-
"button",
|
|
1036
|
-
{
|
|
1037
|
-
type: "button",
|
|
1038
|
-
"aria-label": "Show next media",
|
|
1039
|
-
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]",
|
|
1040
|
-
onClick: () => {
|
|
1041
|
-
setActiveIndex((current) => (current + 1) % totalItems);
|
|
1042
|
-
},
|
|
1043
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/arrow-right", size: 18 })
|
|
1044
|
-
}
|
|
1045
|
-
),
|
|
1046
|
-
/* @__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(
|
|
1047
|
-
"button",
|
|
1048
|
-
{
|
|
1049
|
-
type: "button",
|
|
1050
|
-
"aria-label": `Show media item ${index + 1}`,
|
|
1051
|
-
className: cn(
|
|
1052
|
-
"h-2 rounded-full transition-all duration-300",
|
|
1053
|
-
index === activeItemIndex ? "w-6 bg-card" : "w-2 bg-card opacity-50 hover:opacity-100"
|
|
1054
|
-
),
|
|
1055
|
-
onClick: () => setActiveIndex(index)
|
|
1056
|
-
},
|
|
1057
|
-
normalizeId(item.id, `media-dot-${index}`)
|
|
1058
|
-
)) })
|
|
1059
|
-
] }) : null
|
|
1060
|
-
] });
|
|
1061
|
-
}
|
|
1062
|
-
function getMarkerTitle(marker, markerIndex) {
|
|
1063
|
-
if (marker.title !== void 0 && marker.title !== null) {
|
|
1064
|
-
return marker.title;
|
|
1065
|
-
}
|
|
1066
|
-
if (marker.label !== void 0 && marker.label !== null) {
|
|
1067
|
-
return marker.label;
|
|
1068
|
-
}
|
|
1069
|
-
return `Location ${markerIndex + 1}`;
|
|
1070
|
-
}
|
|
1071
|
-
function GeoMap({
|
|
1072
|
-
className,
|
|
1073
|
-
mapWrapperClassName,
|
|
1074
|
-
mapClassName,
|
|
1075
|
-
panelClassName,
|
|
1076
|
-
panelPosition = "top-left",
|
|
1077
|
-
stadiaApiKey = "",
|
|
1078
|
-
mapStyle = "osm-bright",
|
|
1079
|
-
styleUrl,
|
|
1080
|
-
mapLibreCssHref,
|
|
1081
|
-
markers = [],
|
|
1082
|
-
clusters = [],
|
|
1083
|
-
viewState,
|
|
1084
|
-
defaultViewState,
|
|
1085
|
-
onViewStateChange,
|
|
1086
|
-
onMapClick,
|
|
1087
|
-
onMarkerDrag,
|
|
1088
|
-
showNavigationControl = true,
|
|
1089
|
-
showGeolocateControl = false,
|
|
1090
|
-
navigationControlPosition = "top-right",
|
|
1091
|
-
geolocateControlPosition = "top-left",
|
|
1092
|
-
flyToOptions,
|
|
1093
|
-
markerFocusZoom = 14,
|
|
1094
|
-
clusterFocusZoom = 5,
|
|
1095
|
-
selectedMarkerId,
|
|
1096
|
-
initialSelectedMarkerId,
|
|
1097
|
-
onSelectionChange,
|
|
1098
|
-
clearSelectionOnMapClick = true,
|
|
1099
|
-
mapChildren,
|
|
1100
|
-
optixFlowConfig
|
|
1101
|
-
}) {
|
|
1102
|
-
const normalizedStandaloneMarkers = React6__namespace.useMemo(
|
|
1103
|
-
() => markers.map((marker, index) => ({
|
|
1104
|
-
...marker,
|
|
1105
|
-
id: normalizeId(marker.id, `marker-${index}`)
|
|
1106
|
-
})),
|
|
1107
|
-
[markers]
|
|
1108
|
-
);
|
|
1109
|
-
const normalizedClusters = React6__namespace.useMemo(() => {
|
|
1110
|
-
const results = [];
|
|
1111
|
-
clusters.forEach((cluster, clusterIndex) => {
|
|
1112
|
-
const clusterId = normalizeId(cluster.id, `cluster-${clusterIndex}`);
|
|
1113
|
-
const normalizedClusterMarkers = cluster.markers.map(
|
|
1114
|
-
(marker, markerIndex) => ({
|
|
1115
|
-
...marker,
|
|
1116
|
-
id: normalizeId(marker.id, `${clusterId}-marker-${markerIndex}`),
|
|
1117
|
-
clusterId
|
|
1118
|
-
})
|
|
1119
|
-
);
|
|
1120
|
-
const clusterCenter = cluster.latitude !== void 0 && cluster.longitude !== void 0 ? { latitude: cluster.latitude, longitude: cluster.longitude } : buildClusterCenter(normalizedClusterMarkers);
|
|
1121
|
-
if (!clusterCenter) {
|
|
1122
|
-
return;
|
|
1123
|
-
}
|
|
1124
|
-
results.push({
|
|
1125
|
-
...cluster,
|
|
1126
|
-
id: clusterId,
|
|
1127
|
-
latitude: clusterCenter.latitude,
|
|
1128
|
-
longitude: clusterCenter.longitude,
|
|
1129
|
-
markers: normalizedClusterMarkers
|
|
1130
|
-
});
|
|
1131
|
-
});
|
|
1132
|
-
return results;
|
|
1133
|
-
}, [clusters]);
|
|
1134
|
-
const markerLookup = React6__namespace.useMemo(() => {
|
|
1135
|
-
const lookup = /* @__PURE__ */ new Map();
|
|
1136
|
-
normalizedStandaloneMarkers.forEach((marker) => {
|
|
1137
|
-
lookup.set(marker.id, marker);
|
|
1138
|
-
});
|
|
1139
|
-
normalizedClusters.forEach((cluster) => {
|
|
1140
|
-
cluster.markers.forEach((marker) => {
|
|
1141
|
-
lookup.set(marker.id, marker);
|
|
1142
|
-
});
|
|
1143
|
-
});
|
|
1144
|
-
return lookup;
|
|
1145
|
-
}, [normalizedClusters, normalizedStandaloneMarkers]);
|
|
1146
|
-
const clusterLookup = React6__namespace.useMemo(() => {
|
|
1147
|
-
const lookup = /* @__PURE__ */ new Map();
|
|
1148
|
-
normalizedClusters.forEach((cluster) => {
|
|
1149
|
-
lookup.set(cluster.id, cluster);
|
|
1150
|
-
});
|
|
1151
|
-
return lookup;
|
|
1152
|
-
}, [normalizedClusters]);
|
|
1153
|
-
const firstCoordinate = React6__namespace.useMemo(() => {
|
|
1154
|
-
if (normalizedStandaloneMarkers.length > 0) {
|
|
1155
|
-
const firstStandaloneMarker = normalizedStandaloneMarkers[0];
|
|
1156
|
-
return {
|
|
1157
|
-
latitude: firstStandaloneMarker.latitude,
|
|
1158
|
-
longitude: firstStandaloneMarker.longitude
|
|
1159
|
-
};
|
|
1160
|
-
}
|
|
1161
|
-
if (normalizedClusters.length > 0) {
|
|
1162
|
-
const firstCluster = normalizedClusters[0];
|
|
1163
|
-
return {
|
|
1164
|
-
latitude: firstCluster.latitude,
|
|
1165
|
-
longitude: firstCluster.longitude
|
|
1166
|
-
};
|
|
1167
|
-
}
|
|
1168
|
-
return {
|
|
1169
|
-
latitude: DEFAULT_VIEW_STATE.latitude,
|
|
1170
|
-
longitude: DEFAULT_VIEW_STATE.longitude
|
|
1171
|
-
};
|
|
1172
|
-
}, [normalizedClusters, normalizedStandaloneMarkers]);
|
|
1173
|
-
const [uncontrolledViewState, setUncontrolledViewState] = React6__namespace.useState({
|
|
1174
|
-
latitude: defaultViewState?.latitude ?? firstCoordinate.latitude,
|
|
1175
|
-
longitude: defaultViewState?.longitude ?? firstCoordinate.longitude,
|
|
1176
|
-
zoom: defaultViewState?.zoom ?? DEFAULT_VIEW_STATE.zoom
|
|
1177
|
-
});
|
|
1178
|
-
const isControlledViewState = viewState !== void 0;
|
|
1179
|
-
const resolvedViewState = isControlledViewState ? viewState : uncontrolledViewState;
|
|
1180
|
-
const applyViewState = React6__namespace.useCallback(
|
|
1181
|
-
(nextState) => {
|
|
1182
|
-
if (!isControlledViewState) {
|
|
1183
|
-
setUncontrolledViewState((current) => {
|
|
1184
|
-
const next = { ...current, ...nextState };
|
|
1185
|
-
const hasChanged = current.latitude !== next.latitude || current.longitude !== next.longitude || current.zoom !== next.zoom;
|
|
1186
|
-
return hasChanged ? next : current;
|
|
1187
|
-
});
|
|
1188
|
-
}
|
|
1189
|
-
onViewStateChange?.(nextState);
|
|
1190
|
-
},
|
|
1191
|
-
[isControlledViewState, onViewStateChange]
|
|
1192
|
-
);
|
|
1193
|
-
const [selection, setSelection] = React6__namespace.useState(() => {
|
|
1194
|
-
if (initialSelectedMarkerId !== void 0 && initialSelectedMarkerId !== null) {
|
|
1195
|
-
return {
|
|
1196
|
-
type: "marker",
|
|
1197
|
-
markerId: String(initialSelectedMarkerId)
|
|
1198
|
-
};
|
|
1199
|
-
}
|
|
1200
|
-
return { type: "none" };
|
|
1201
|
-
});
|
|
1202
|
-
React6__namespace.useEffect(() => {
|
|
1203
|
-
if (selectedMarkerId === void 0 || selectedMarkerId === null) {
|
|
1204
|
-
return;
|
|
1205
|
-
}
|
|
1206
|
-
setSelection({
|
|
1207
|
-
type: "marker",
|
|
1208
|
-
markerId: String(selectedMarkerId)
|
|
1209
|
-
});
|
|
1210
|
-
}, [selectedMarkerId]);
|
|
1211
|
-
const selectedMarker = selection.markerId ? markerLookup.get(selection.markerId) : void 0;
|
|
1212
|
-
const selectedCluster = selection.clusterId ? clusterLookup.get(selection.clusterId) : void 0;
|
|
1213
|
-
React6__namespace.useEffect(() => {
|
|
1214
|
-
if (selection.type === "marker" && selection.markerId && !selectedMarker) {
|
|
1215
|
-
setSelection({ type: "none" });
|
|
1216
|
-
onSelectionChange?.({ type: "none" });
|
|
1217
|
-
}
|
|
1218
|
-
}, [onSelectionChange, selectedMarker, selection]);
|
|
1219
|
-
const emitSelectionChange = React6__namespace.useCallback(
|
|
1220
|
-
(nextSelection) => {
|
|
1221
|
-
if (nextSelection.type === "none") {
|
|
1222
|
-
onSelectionChange?.({ type: "none" });
|
|
1223
|
-
return;
|
|
1224
|
-
}
|
|
1225
|
-
if (nextSelection.type === "marker") {
|
|
1226
|
-
const parentCluster = nextSelection.marker.clusterId ? clusterLookup.get(nextSelection.marker.clusterId) : void 0;
|
|
1227
|
-
onSelectionChange?.({
|
|
1228
|
-
type: "marker",
|
|
1229
|
-
marker: nextSelection.marker,
|
|
1230
|
-
cluster: parentCluster
|
|
1231
|
-
});
|
|
1232
|
-
return;
|
|
1233
|
-
}
|
|
1234
|
-
onSelectionChange?.({
|
|
1235
|
-
type: "cluster",
|
|
1236
|
-
cluster: nextSelection.cluster
|
|
1237
|
-
});
|
|
1238
|
-
},
|
|
1239
|
-
[clusterLookup, onSelectionChange]
|
|
1240
|
-
);
|
|
1241
|
-
const selectMarker = React6__namespace.useCallback(
|
|
1242
|
-
(marker) => {
|
|
1243
|
-
setSelection({
|
|
1244
|
-
type: "marker",
|
|
1245
|
-
markerId: marker.id,
|
|
1246
|
-
clusterId: marker.clusterId
|
|
1247
|
-
});
|
|
1248
|
-
applyViewState({
|
|
1249
|
-
latitude: marker.latitude,
|
|
1250
|
-
longitude: marker.longitude,
|
|
1251
|
-
zoom: markerFocusZoom
|
|
1252
|
-
});
|
|
1253
|
-
emitSelectionChange({ type: "marker", marker });
|
|
1254
|
-
},
|
|
1255
|
-
[applyViewState, emitSelectionChange, markerFocusZoom]
|
|
1256
|
-
);
|
|
1257
|
-
const selectCluster = React6__namespace.useCallback(
|
|
1258
|
-
(cluster) => {
|
|
1259
|
-
setSelection({
|
|
1260
|
-
type: "cluster",
|
|
1261
|
-
clusterId: cluster.id
|
|
1262
|
-
});
|
|
1263
|
-
applyViewState({
|
|
1264
|
-
latitude: cluster.latitude,
|
|
1265
|
-
longitude: cluster.longitude,
|
|
1266
|
-
zoom: clusterFocusZoom
|
|
1267
|
-
});
|
|
1268
|
-
emitSelectionChange({ type: "cluster", cluster });
|
|
1269
|
-
},
|
|
1270
|
-
[applyViewState, clusterFocusZoom, emitSelectionChange]
|
|
1271
|
-
);
|
|
1272
|
-
const clearSelection = React6__namespace.useCallback(() => {
|
|
1273
|
-
setSelection({ type: "none" });
|
|
1274
|
-
emitSelectionChange({ type: "none" });
|
|
1275
|
-
}, [emitSelectionChange]);
|
|
1276
|
-
const mapMarkers = React6__namespace.useMemo(() => {
|
|
1277
|
-
const resolvedMarkers = [];
|
|
1278
|
-
normalizedClusters.forEach((cluster) => {
|
|
1279
|
-
const isSelected = selection.type === "cluster" && selection.clusterId === cluster.id;
|
|
1280
|
-
resolvedMarkers.push({
|
|
1281
|
-
id: `cluster-pin:${cluster.id}`,
|
|
1282
|
-
latitude: cluster.latitude,
|
|
1283
|
-
longitude: cluster.longitude,
|
|
1284
|
-
element: () => {
|
|
1285
|
-
const customMarkerElement = cluster.markerElement;
|
|
1286
|
-
const markerBody = typeof customMarkerElement === "function" ? customMarkerElement({
|
|
1287
|
-
isSelected,
|
|
1288
|
-
count: cluster.markers.length
|
|
1289
|
-
}) : customMarkerElement;
|
|
1290
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1291
|
-
"button",
|
|
1292
|
-
{
|
|
1293
|
-
type: "button",
|
|
1294
|
-
className: "group cursor-pointer",
|
|
1295
|
-
onClick: (event) => {
|
|
1296
|
-
event.preventDefault();
|
|
1297
|
-
event.stopPropagation();
|
|
1298
|
-
selectCluster(cluster);
|
|
1299
|
-
},
|
|
1300
|
-
"aria-label": `View ${cluster.markers.length} clustered locations`,
|
|
1301
|
-
children: markerBody ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1302
|
-
"span",
|
|
1303
|
-
{
|
|
1304
|
-
className: cn(
|
|
1305
|
-
"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",
|
|
1306
|
-
isSelected && "ring-4 ring-primary/30",
|
|
1307
|
-
cluster.pinClassName
|
|
1308
|
-
),
|
|
1309
|
-
style: {
|
|
1310
|
-
backgroundColor: cluster.pinColor ?? "var(--foreground)"
|
|
1311
|
-
},
|
|
1312
|
-
children: cluster.markers.length
|
|
1313
|
-
}
|
|
1314
|
-
)
|
|
1315
|
-
}
|
|
1316
|
-
);
|
|
1317
|
-
}
|
|
1318
|
-
});
|
|
1319
|
-
});
|
|
1320
|
-
normalizedStandaloneMarkers.forEach((marker) => {
|
|
1321
|
-
const isSelected = selection.type === "marker" && selection.markerId === marker.id;
|
|
1322
|
-
const customMarkerElement = marker.markerElement;
|
|
1323
|
-
resolvedMarkers.push({
|
|
1324
|
-
id: marker.id,
|
|
1325
|
-
latitude: marker.latitude,
|
|
1326
|
-
longitude: marker.longitude,
|
|
1327
|
-
draggable: marker.draggable,
|
|
1328
|
-
element: () => {
|
|
1329
|
-
const markerBody = typeof customMarkerElement === "function" ? customMarkerElement({ isSelected }) : customMarkerElement;
|
|
1330
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1331
|
-
"button",
|
|
1332
|
-
{
|
|
1333
|
-
type: "button",
|
|
1334
|
-
className: "group cursor-pointer",
|
|
1335
|
-
onClick: (event) => {
|
|
1336
|
-
event.preventDefault();
|
|
1337
|
-
event.stopPropagation();
|
|
1338
|
-
selectMarker(marker);
|
|
1339
|
-
},
|
|
1340
|
-
"aria-label": typeof marker.title === "string" ? `View ${marker.title}` : "View location details",
|
|
1341
|
-
children: markerBody ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1342
|
-
"span",
|
|
1343
|
-
{
|
|
1344
|
-
className: cn(
|
|
1345
|
-
"inline-flex h-4 w-4 rounded-full border-2 border-white shadow-md transition-transform duration-200 group-hover:scale-110",
|
|
1346
|
-
isSelected && "h-5 w-5 ring-4 ring-primary/30",
|
|
1347
|
-
marker.pinClassName
|
|
1348
|
-
),
|
|
1349
|
-
style: {
|
|
1350
|
-
backgroundColor: marker.pinColor ?? "#f43f5e"
|
|
1351
|
-
}
|
|
1352
|
-
}
|
|
1353
|
-
)
|
|
1354
|
-
}
|
|
1355
|
-
);
|
|
1356
|
-
}
|
|
1357
|
-
});
|
|
1358
|
-
});
|
|
1359
|
-
return resolvedMarkers;
|
|
1360
|
-
}, [
|
|
1361
|
-
normalizedClusters,
|
|
1362
|
-
normalizedStandaloneMarkers,
|
|
1363
|
-
selectCluster,
|
|
1364
|
-
selectMarker,
|
|
1365
|
-
selection
|
|
1366
|
-
]);
|
|
1367
|
-
const renderMarkerPanel = () => {
|
|
1368
|
-
if (selectedMarker) {
|
|
1369
|
-
const markerMediaItems = selectedMarker.mediaItems ?? [];
|
|
1370
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1371
|
-
"div",
|
|
1372
|
-
{
|
|
1373
|
-
className: cn(
|
|
1374
|
-
"relative w-[min(24rem,calc(100vw-2rem))] overflow-hidden rounded-xl border border-border bg-card text-card-foreground shadow-2xl",
|
|
1375
|
-
panelClassName
|
|
1376
|
-
),
|
|
1377
|
-
children: [
|
|
1378
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1379
|
-
"button",
|
|
1380
|
-
{
|
|
1381
|
-
type: "button",
|
|
1382
|
-
"aria-label": "Close marker details",
|
|
1383
|
-
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",
|
|
1384
|
-
onClick: clearSelection,
|
|
1385
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", size: 20 })
|
|
1386
|
-
}
|
|
1387
|
-
),
|
|
1388
|
-
markerMediaItems.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1389
|
-
MarkerMediaCarousel,
|
|
1390
|
-
{
|
|
1391
|
-
mediaItems: markerMediaItems,
|
|
1392
|
-
optixFlowConfig
|
|
1393
|
-
}
|
|
1394
|
-
) : null,
|
|
1395
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 p-4", children: [
|
|
1396
|
-
/* @__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: [
|
|
1397
|
-
selectedMarker.eyebrow ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wide", children: selectedMarker.eyebrow }) : null,
|
|
1398
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base font-semibold leading-tight", children: selectedMarker.title ?? selectedMarker.label ?? "Location" })
|
|
1399
|
-
] }) }),
|
|
1400
|
-
selectedMarker.summary ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm leading-relaxed", children: selectedMarker.summary }) : null,
|
|
1401
|
-
selectedMarker.locationLine ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-start text-sm gap-2", children: [
|
|
1402
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1403
|
-
DynamicIcon,
|
|
1404
|
-
{
|
|
1405
|
-
name: "lucide:map-pin",
|
|
1406
|
-
className: "opacity-50",
|
|
1407
|
-
size: 18
|
|
1408
|
-
}
|
|
1409
|
-
),
|
|
1410
|
-
typeof selectedMarker.locationLine === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1411
|
-
Pressable,
|
|
1412
|
-
{
|
|
1413
|
-
href: selectedMarker.locationUrl,
|
|
1414
|
-
className: cn(
|
|
1415
|
-
"transition-all duration-500",
|
|
1416
|
-
"font-medium opacity-75 hover:opacity-100",
|
|
1417
|
-
selectedMarker.locationUrl ? "underline underline-offset-4" : ""
|
|
1418
|
-
),
|
|
1419
|
-
children: selectedMarker.locationLine
|
|
1420
|
-
}
|
|
1421
|
-
) : selectedMarker.locationLine
|
|
1422
|
-
] }) : null,
|
|
1423
|
-
selectedMarker.hoursLine ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-start text-sm gap-2", children: [
|
|
1424
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1425
|
-
DynamicIcon,
|
|
1426
|
-
{
|
|
1427
|
-
name: "lucide:clock",
|
|
1428
|
-
className: "opacity-50",
|
|
1429
|
-
size: 18
|
|
1430
|
-
}
|
|
1431
|
-
),
|
|
1432
|
-
typeof selectedMarker.hoursLine === "string" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: selectedMarker.hoursLine }) : selectedMarker.hoursLine
|
|
1433
|
-
] }) : null,
|
|
1434
|
-
selectedMarker.markerContentComponent ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: selectedMarker.markerContentComponent }) : null,
|
|
1435
|
-
/* @__PURE__ */ jsxRuntime.jsx(MarkerActions, { actions: selectedMarker.actions })
|
|
1436
|
-
] })
|
|
1437
|
-
]
|
|
1438
|
-
}
|
|
1439
|
-
);
|
|
1440
|
-
}
|
|
1441
|
-
if (selectedCluster) {
|
|
1442
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1443
|
-
"div",
|
|
1444
|
-
{
|
|
1445
|
-
className: cn(
|
|
1446
|
-
"relative w-[min(24rem,calc(100vw-2rem))] overflow-hidden rounded-xl border border-border bg-card text-card-foreground p-4 shadow-2xl",
|
|
1447
|
-
panelClassName
|
|
1448
|
-
),
|
|
1449
|
-
children: [
|
|
1450
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1451
|
-
"button",
|
|
1452
|
-
{
|
|
1453
|
-
type: "button",
|
|
1454
|
-
"aria-label": "Close cluster details",
|
|
1455
|
-
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",
|
|
1456
|
-
onClick: clearSelection,
|
|
1457
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", size: 20 })
|
|
1458
|
-
}
|
|
1459
|
-
),
|
|
1460
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-start justify-between gap-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
1461
|
-
selectedCluster.label ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: selectedCluster.label }) : null,
|
|
1462
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base font-semibold leading-tight text-foreground", children: selectedCluster.title ?? "Clustered Locations" }),
|
|
1463
|
-
/* @__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.` })
|
|
1464
|
-
] }) }),
|
|
1465
|
-
/* @__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(
|
|
1466
|
-
"button",
|
|
1467
|
-
{
|
|
1468
|
-
type: "button",
|
|
1469
|
-
className: "w-full rounded-lg border border-border/60 p-3 text-left transition hover:border-border hover:bg-muted/50",
|
|
1470
|
-
onClick: () => selectMarker(marker),
|
|
1471
|
-
children: [
|
|
1472
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "line-clamp-1 text-sm font-semibold text-foreground", children: getMarkerTitle(marker, markerIndex) }),
|
|
1473
|
-
marker.summary ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 line-clamp-2 text-xs text-muted-foreground", children: marker.summary }) : null
|
|
1474
|
-
]
|
|
1475
|
-
},
|
|
1476
|
-
marker.id
|
|
1477
|
-
)) })
|
|
1478
|
-
]
|
|
1479
|
-
}
|
|
1480
|
-
);
|
|
1481
|
-
}
|
|
1482
|
-
return null;
|
|
1483
|
-
};
|
|
1484
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1485
|
-
"div",
|
|
1486
|
-
{
|
|
1487
|
-
className: cn(
|
|
1488
|
-
"relative overflow-hidden rounded-2xl border border-border bg-background",
|
|
1489
|
-
className
|
|
1490
|
-
),
|
|
1491
|
-
children: [
|
|
1492
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-[520px] w-full", mapWrapperClassName), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1493
|
-
maps.MapLibre,
|
|
1494
|
-
{
|
|
1495
|
-
stadiaApiKey,
|
|
1496
|
-
mapStyle,
|
|
1497
|
-
styleUrl,
|
|
1498
|
-
mapLibreCssHref,
|
|
1499
|
-
viewState: resolvedViewState,
|
|
1500
|
-
onViewStateChange: applyViewState,
|
|
1501
|
-
markers: mapMarkers,
|
|
1502
|
-
onClick: (coord) => {
|
|
1503
|
-
onMapClick?.(coord);
|
|
1504
|
-
if (clearSelectionOnMapClick) {
|
|
1505
|
-
clearSelection();
|
|
1506
|
-
}
|
|
1507
|
-
},
|
|
1508
|
-
onMarkerDrag,
|
|
1509
|
-
showNavigationControl,
|
|
1510
|
-
showGeolocateControl,
|
|
1511
|
-
navigationControlPosition,
|
|
1512
|
-
geolocateControlPosition,
|
|
1513
|
-
flyToOptions,
|
|
1514
|
-
className: cn("h-full w-full", mapClassName),
|
|
1515
|
-
children: mapChildren
|
|
1516
|
-
}
|
|
1517
|
-
) }),
|
|
1518
|
-
selection.type !== "none" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1519
|
-
"div",
|
|
1520
|
-
{
|
|
1521
|
-
className: cn(
|
|
1522
|
-
"pointer-events-none absolute z-20",
|
|
1523
|
-
PANEL_POSITION_CLASS[panelPosition]
|
|
1524
|
-
),
|
|
1525
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-auto", children: renderMarkerPanel() })
|
|
1526
|
-
}
|
|
1527
|
-
) : null
|
|
1528
|
-
]
|
|
1529
|
-
}
|
|
1530
|
-
);
|
|
1531
|
-
}
|
|
1532
|
-
var sizeStyles = {
|
|
1533
|
-
sm: "max-w-md",
|
|
1534
|
-
md: "max-w-2xl",
|
|
1535
|
-
lg: "max-w-4xl",
|
|
1536
|
-
xl: "max-w-5xl",
|
|
1537
|
-
full: "max-w-7xl",
|
|
1538
|
-
compact: "max-w-[700px]"
|
|
1539
|
-
};
|
|
1540
|
-
var dialogTransition = {
|
|
1541
|
-
duration: 0.35,
|
|
1542
|
-
ease: [0.16, 1, 0.3, 1]
|
|
1543
|
-
};
|
|
1544
|
-
function AnimatedDialog({
|
|
1545
|
-
open,
|
|
1546
|
-
onOpenChange,
|
|
1547
|
-
title,
|
|
1548
|
-
eyebrow,
|
|
1549
|
-
description,
|
|
1550
|
-
children,
|
|
1551
|
-
header,
|
|
1552
|
-
footer,
|
|
1553
|
-
size = "lg",
|
|
1554
|
-
className,
|
|
1555
|
-
contentClassName,
|
|
1556
|
-
featuredMediaHeader
|
|
1557
|
-
}) {
|
|
1558
|
-
const titleId = React6.useId();
|
|
1559
|
-
const descriptionId = React6.useId();
|
|
1560
|
-
const containerRef = React6.useRef(null);
|
|
1561
|
-
useOnClickOutside.useOnClickOutside(containerRef, () => {
|
|
1562
|
-
if (open) {
|
|
1563
|
-
onOpenChange(false);
|
|
1564
|
-
}
|
|
1565
|
-
});
|
|
1566
|
-
React6.useEffect(() => {
|
|
1567
|
-
if (!open) {
|
|
1568
|
-
return;
|
|
1569
|
-
}
|
|
1570
|
-
const onKeyDown = (event) => {
|
|
1571
|
-
if (event.key === "Escape") {
|
|
1572
|
-
onOpenChange(false);
|
|
1573
|
-
}
|
|
1574
|
-
};
|
|
1575
|
-
const previousOverflow = document.body.style.overflow;
|
|
1576
|
-
document.body.style.overflow = "hidden";
|
|
1577
|
-
window.addEventListener("keydown", onKeyDown);
|
|
1578
|
-
return () => {
|
|
1579
|
-
document.body.style.overflow = previousOverflow;
|
|
1580
|
-
window.removeEventListener("keydown", onKeyDown);
|
|
1581
|
-
};
|
|
1582
|
-
}, [open, onOpenChange]);
|
|
1583
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-50 h-screen overflow-y-auto", children: [
|
|
1584
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1585
|
-
framerMotion.motion.div,
|
|
1586
|
-
{
|
|
1587
|
-
initial: { opacity: 0 },
|
|
1588
|
-
animate: { opacity: 1, transition: dialogTransition },
|
|
1589
|
-
exit: { opacity: 0, transition: dialogTransition },
|
|
1590
|
-
className: "fixed inset-0 h-full w-full bg-foreground/80 backdrop-blur-lg"
|
|
494
|
+
};
|
|
495
|
+
const previousOverflow = document.body.style.overflow;
|
|
496
|
+
document.body.style.overflow = "hidden";
|
|
497
|
+
window.addEventListener("keydown", onKeyDown);
|
|
498
|
+
return () => {
|
|
499
|
+
document.body.style.overflow = previousOverflow;
|
|
500
|
+
window.removeEventListener("keydown", onKeyDown);
|
|
501
|
+
};
|
|
502
|
+
}, [open, onOpenChange]);
|
|
503
|
+
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-50 h-screen overflow-y-auto", children: [
|
|
504
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
505
|
+
framerMotion.motion.div,
|
|
506
|
+
{
|
|
507
|
+
initial: { opacity: 0 },
|
|
508
|
+
animate: { opacity: 1, transition: dialogTransition },
|
|
509
|
+
exit: { opacity: 0, transition: dialogTransition },
|
|
510
|
+
className: "fixed inset-0 h-full w-full bg-foreground/80 backdrop-blur-lg"
|
|
1591
511
|
}
|
|
1592
512
|
),
|
|
1593
513
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1886,10 +806,10 @@ var ImageSlider = ({
|
|
|
1886
806
|
optixFlowConfig
|
|
1887
807
|
}) => {
|
|
1888
808
|
const hasImages = images.length > 0;
|
|
1889
|
-
const [currentIndex, setCurrentIndex] =
|
|
809
|
+
const [currentIndex, setCurrentIndex] = React4__namespace.useState(
|
|
1890
810
|
() => normalizeIndex(startIndex, images.length)
|
|
1891
811
|
);
|
|
1892
|
-
const handleNext =
|
|
812
|
+
const handleNext = React4__namespace.useCallback(() => {
|
|
1893
813
|
if (!hasImages) return;
|
|
1894
814
|
setCurrentIndex((prevIndex) => {
|
|
1895
815
|
const nextIndex = prevIndex + 1 >= images.length ? 0 : prevIndex + 1;
|
|
@@ -1897,7 +817,7 @@ var ImageSlider = ({
|
|
|
1897
817
|
return nextIndex;
|
|
1898
818
|
});
|
|
1899
819
|
}, [hasImages, images.length, onSlideChange]);
|
|
1900
|
-
const handlePrevious =
|
|
820
|
+
const handlePrevious = React4__namespace.useCallback(() => {
|
|
1901
821
|
if (!hasImages) return;
|
|
1902
822
|
setCurrentIndex((prevIndex) => {
|
|
1903
823
|
const nextIndex = prevIndex - 1 < 0 ? images.length - 1 : prevIndex - 1;
|
|
@@ -1905,11 +825,11 @@ var ImageSlider = ({
|
|
|
1905
825
|
return nextIndex;
|
|
1906
826
|
});
|
|
1907
827
|
}, [hasImages, images.length, onSlideChange]);
|
|
1908
|
-
|
|
828
|
+
React4__namespace.useEffect(() => {
|
|
1909
829
|
if (!hasImages) return;
|
|
1910
830
|
setCurrentIndex(normalizeIndex(startIndex, images.length));
|
|
1911
831
|
}, [startIndex, images.length, hasImages]);
|
|
1912
|
-
|
|
832
|
+
React4__namespace.useEffect(() => {
|
|
1913
833
|
if (!enableKeyboard || !hasImages) return;
|
|
1914
834
|
const handleKeyDown = (event) => {
|
|
1915
835
|
if (event.key === "ArrowRight") {
|
|
@@ -1923,7 +843,7 @@ var ImageSlider = ({
|
|
|
1923
843
|
window.removeEventListener("keydown", handleKeyDown);
|
|
1924
844
|
};
|
|
1925
845
|
}, [enableKeyboard, handleNext, handlePrevious, hasImages]);
|
|
1926
|
-
|
|
846
|
+
React4__namespace.useEffect(() => {
|
|
1927
847
|
if (!autoplay || images.length < 2) return;
|
|
1928
848
|
const interval = window.setInterval(handleNext, autoplayIntervalMs);
|
|
1929
849
|
return () => window.clearInterval(interval);
|
|
@@ -1994,8 +914,150 @@ var ImageSlider = ({
|
|
|
1994
914
|
) : null
|
|
1995
915
|
]
|
|
1996
916
|
}
|
|
1997
|
-
);
|
|
1998
|
-
};
|
|
917
|
+
);
|
|
918
|
+
};
|
|
919
|
+
var baseStyles = [
|
|
920
|
+
// Layout
|
|
921
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
|
|
922
|
+
// Typography - using CSS variables with sensible defaults
|
|
923
|
+
"font-[var(--button-font-family,inherit)]",
|
|
924
|
+
"font-[var(--button-font-weight,500)]",
|
|
925
|
+
"tracking-[var(--button-letter-spacing,0)]",
|
|
926
|
+
"leading-[var(--button-line-height,1.25)]",
|
|
927
|
+
"[text-transform:var(--button-text-transform,none)]",
|
|
928
|
+
"text-sm",
|
|
929
|
+
// Border radius
|
|
930
|
+
"rounded-[var(--button-radius,var(--radius,0.375rem))]",
|
|
931
|
+
// Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
|
|
932
|
+
"[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
|
|
933
|
+
// Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
|
|
934
|
+
"[box-shadow:var(--button-shadow,none)]",
|
|
935
|
+
"hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
|
|
936
|
+
// Disabled state
|
|
937
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
938
|
+
// SVG handling
|
|
939
|
+
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
940
|
+
// Focus styles
|
|
941
|
+
"outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
942
|
+
// Invalid state
|
|
943
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
944
|
+
].join(" ");
|
|
945
|
+
var buttonVariants = classVarianceAuthority.cva(baseStyles, {
|
|
946
|
+
variants: {
|
|
947
|
+
variant: {
|
|
948
|
+
// Default (Primary) variant - full customization
|
|
949
|
+
default: [
|
|
950
|
+
"bg-[var(--button-default-bg,hsl(var(--primary)))]",
|
|
951
|
+
"text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
|
|
952
|
+
"border-[length:var(--button-default-border-width,0px)]",
|
|
953
|
+
"border-[color:var(--button-default-border,transparent)]",
|
|
954
|
+
"[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
|
|
955
|
+
"hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
|
|
956
|
+
"hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
|
|
957
|
+
"hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
|
|
958
|
+
"hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
|
|
959
|
+
].join(" "),
|
|
960
|
+
// Destructive variant - full customization
|
|
961
|
+
destructive: [
|
|
962
|
+
"bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
|
|
963
|
+
"text-[var(--button-destructive-fg,white)]",
|
|
964
|
+
"border-[length:var(--button-destructive-border-width,0px)]",
|
|
965
|
+
"border-[color:var(--button-destructive-border,transparent)]",
|
|
966
|
+
"[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
|
|
967
|
+
"hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
|
|
968
|
+
"hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
|
|
969
|
+
"hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
|
|
970
|
+
"hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
|
|
971
|
+
"focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
972
|
+
"dark:bg-destructive/60"
|
|
973
|
+
].join(" "),
|
|
974
|
+
// Outline variant - full customization with proper border handling
|
|
975
|
+
outline: [
|
|
976
|
+
"bg-[var(--button-outline-bg,hsl(var(--background)))]",
|
|
977
|
+
"text-[var(--button-outline-fg,inherit)]",
|
|
978
|
+
"border-[length:var(--button-outline-border-width,1px)]",
|
|
979
|
+
"border-[color:var(--button-outline-border,hsl(var(--border)))]",
|
|
980
|
+
"[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
|
|
981
|
+
"hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
|
|
982
|
+
"hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
|
|
983
|
+
"hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
|
|
984
|
+
"hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
|
|
985
|
+
"dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
|
|
986
|
+
].join(" "),
|
|
987
|
+
// Secondary variant - full customization
|
|
988
|
+
secondary: [
|
|
989
|
+
"bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
|
|
990
|
+
"text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
|
|
991
|
+
"border-[length:var(--button-secondary-border-width,0px)]",
|
|
992
|
+
"border-[color:var(--button-secondary-border,transparent)]",
|
|
993
|
+
"[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
|
|
994
|
+
"hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
|
|
995
|
+
"hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
|
|
996
|
+
"hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
|
|
997
|
+
"hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
|
|
998
|
+
].join(" "),
|
|
999
|
+
// Ghost variant - full customization
|
|
1000
|
+
ghost: [
|
|
1001
|
+
"bg-[var(--button-ghost-bg,transparent)]",
|
|
1002
|
+
"text-[var(--button-ghost-fg,inherit)]",
|
|
1003
|
+
"border-[length:var(--button-ghost-border-width,0px)]",
|
|
1004
|
+
"border-[color:var(--button-ghost-border,transparent)]",
|
|
1005
|
+
"[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
|
|
1006
|
+
"hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
|
|
1007
|
+
"hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
|
|
1008
|
+
"hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
|
|
1009
|
+
"hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
|
|
1010
|
+
"dark:hover:bg-accent/50"
|
|
1011
|
+
].join(" "),
|
|
1012
|
+
// Link variant - full customization
|
|
1013
|
+
link: [
|
|
1014
|
+
"bg-[var(--button-link-bg,transparent)]",
|
|
1015
|
+
"text-[var(--button-link-fg,hsl(var(--primary)))]",
|
|
1016
|
+
"border-[length:var(--button-link-border-width,0px)]",
|
|
1017
|
+
"border-[color:var(--button-link-border,transparent)]",
|
|
1018
|
+
"[box-shadow:var(--button-link-shadow,none)]",
|
|
1019
|
+
"hover:bg-[var(--button-link-hover-bg,transparent)]",
|
|
1020
|
+
"hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
|
|
1021
|
+
"hover:[box-shadow:var(--button-link-shadow-hover,none)]",
|
|
1022
|
+
"underline-offset-4 hover:underline"
|
|
1023
|
+
].join(" ")
|
|
1024
|
+
},
|
|
1025
|
+
size: {
|
|
1026
|
+
default: [
|
|
1027
|
+
"h-[var(--button-height-md,2.25rem)]",
|
|
1028
|
+
"px-[var(--button-padding-x-md,1rem)]",
|
|
1029
|
+
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
1030
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
1031
|
+
].join(" "),
|
|
1032
|
+
sm: [
|
|
1033
|
+
"h-[var(--button-height-sm,2rem)]",
|
|
1034
|
+
"px-[var(--button-padding-x-sm,0.75rem)]",
|
|
1035
|
+
"py-[var(--button-padding-y-sm,0.25rem)]",
|
|
1036
|
+
"gap-1.5",
|
|
1037
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
|
|
1038
|
+
].join(" "),
|
|
1039
|
+
md: [
|
|
1040
|
+
"h-[var(--button-height-md,2.25rem)]",
|
|
1041
|
+
"px-[var(--button-padding-x-md,1rem)]",
|
|
1042
|
+
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
1043
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
1044
|
+
].join(" "),
|
|
1045
|
+
lg: [
|
|
1046
|
+
"h-[var(--button-height-lg,2.5rem)]",
|
|
1047
|
+
"px-[var(--button-padding-x-lg,1.5rem)]",
|
|
1048
|
+
"py-[var(--button-padding-y-lg,0.5rem)]",
|
|
1049
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
|
|
1050
|
+
].join(" "),
|
|
1051
|
+
icon: "size-[var(--button-height-md,2.25rem)]",
|
|
1052
|
+
"icon-sm": "size-[var(--button-height-sm,2rem)]",
|
|
1053
|
+
"icon-lg": "size-[var(--button-height-lg,2.5rem)]"
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
defaultVariants: {
|
|
1057
|
+
variant: "default",
|
|
1058
|
+
size: "default"
|
|
1059
|
+
}
|
|
1060
|
+
});
|
|
1999
1061
|
function Button({
|
|
2000
1062
|
className,
|
|
2001
1063
|
variant = "default",
|
|
@@ -2039,127 +1101,411 @@ function CardHeader({ className, ...props }) {
|
|
|
2039
1101
|
),
|
|
2040
1102
|
...props
|
|
2041
1103
|
}
|
|
2042
|
-
);
|
|
2043
|
-
}
|
|
2044
|
-
function CardTitle({ className, ...props }) {
|
|
2045
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2046
|
-
"div",
|
|
2047
|
-
{
|
|
2048
|
-
"data-slot": "card-title",
|
|
2049
|
-
className: cn("leading-none font-semibold", className),
|
|
2050
|
-
...props
|
|
1104
|
+
);
|
|
1105
|
+
}
|
|
1106
|
+
function CardTitle({ className, ...props }) {
|
|
1107
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1108
|
+
"div",
|
|
1109
|
+
{
|
|
1110
|
+
"data-slot": "card-title",
|
|
1111
|
+
className: cn("leading-none font-semibold", className),
|
|
1112
|
+
...props
|
|
1113
|
+
}
|
|
1114
|
+
);
|
|
1115
|
+
}
|
|
1116
|
+
function CardDescription({ className, ...props }) {
|
|
1117
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1118
|
+
"div",
|
|
1119
|
+
{
|
|
1120
|
+
"data-slot": "card-description",
|
|
1121
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1122
|
+
...props
|
|
1123
|
+
}
|
|
1124
|
+
);
|
|
1125
|
+
}
|
|
1126
|
+
function CardContent({ className, ...props }) {
|
|
1127
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1128
|
+
"div",
|
|
1129
|
+
{
|
|
1130
|
+
"data-slot": "card-content",
|
|
1131
|
+
className: cn("px-6", className),
|
|
1132
|
+
...props
|
|
1133
|
+
}
|
|
1134
|
+
);
|
|
1135
|
+
}
|
|
1136
|
+
function CardFooter({ className, ...props }) {
|
|
1137
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1138
|
+
"div",
|
|
1139
|
+
{
|
|
1140
|
+
"data-slot": "card-footer",
|
|
1141
|
+
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
1142
|
+
...props
|
|
1143
|
+
}
|
|
1144
|
+
);
|
|
1145
|
+
}
|
|
1146
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
1147
|
+
"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",
|
|
1148
|
+
{
|
|
1149
|
+
variants: {
|
|
1150
|
+
variant: {
|
|
1151
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
1152
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
1153
|
+
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",
|
|
1154
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
1155
|
+
}
|
|
1156
|
+
},
|
|
1157
|
+
defaultVariants: {
|
|
1158
|
+
variant: "default"
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
);
|
|
1162
|
+
function Badge({
|
|
1163
|
+
className,
|
|
1164
|
+
variant,
|
|
1165
|
+
asChild = false,
|
|
1166
|
+
...props
|
|
1167
|
+
}) {
|
|
1168
|
+
const Comp = asChild ? reactSlot.Slot : "span";
|
|
1169
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1170
|
+
Comp,
|
|
1171
|
+
{
|
|
1172
|
+
"data-slot": "badge",
|
|
1173
|
+
className: cn(badgeVariants({ variant }), className),
|
|
1174
|
+
...props
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
}
|
|
1178
|
+
function Popover({
|
|
1179
|
+
...props
|
|
1180
|
+
}) {
|
|
1181
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { "data-slot": "popover", ...props });
|
|
1182
|
+
}
|
|
1183
|
+
function PopoverTrigger({
|
|
1184
|
+
...props
|
|
1185
|
+
}) {
|
|
1186
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1187
|
+
}
|
|
1188
|
+
function PopoverContent({
|
|
1189
|
+
className,
|
|
1190
|
+
align = "center",
|
|
1191
|
+
sideOffset = 4,
|
|
1192
|
+
...props
|
|
1193
|
+
}) {
|
|
1194
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1195
|
+
PopoverPrimitive__namespace.Content,
|
|
1196
|
+
{
|
|
1197
|
+
"data-slot": "popover-content",
|
|
1198
|
+
align,
|
|
1199
|
+
sideOffset,
|
|
1200
|
+
className: cn(
|
|
1201
|
+
"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",
|
|
1202
|
+
className
|
|
1203
|
+
),
|
|
1204
|
+
...props
|
|
1205
|
+
}
|
|
1206
|
+
) });
|
|
1207
|
+
}
|
|
1208
|
+
var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
|
|
1209
|
+
var DynamicIcon = React4__namespace.memo(function DynamicIcon2({
|
|
1210
|
+
apiKey,
|
|
1211
|
+
...props
|
|
1212
|
+
}) {
|
|
1213
|
+
return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
|
|
1214
|
+
});
|
|
1215
|
+
DynamicIcon.displayName = "DynamicIcon";
|
|
1216
|
+
function StarRating({
|
|
1217
|
+
rating,
|
|
1218
|
+
size = 18,
|
|
1219
|
+
className
|
|
1220
|
+
}) {
|
|
1221
|
+
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(
|
|
1222
|
+
DynamicIcon,
|
|
1223
|
+
{
|
|
1224
|
+
name: "icon-park-solid/star",
|
|
1225
|
+
size,
|
|
1226
|
+
className: cn(
|
|
1227
|
+
star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
|
|
1228
|
+
)
|
|
1229
|
+
},
|
|
1230
|
+
star
|
|
1231
|
+
)) });
|
|
1232
|
+
}
|
|
1233
|
+
function normalizePhoneNumber(input) {
|
|
1234
|
+
const trimmed = input.trim();
|
|
1235
|
+
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
1236
|
+
return trimmed;
|
|
1237
|
+
}
|
|
1238
|
+
const match = trimmed.match(/^[\s\+\-\(\)]*(\d[\d\s\-\(\)\.]*\d)[\s\-]*(x|ext\.?|extension)?[\s\-]*(\d+)?$/i);
|
|
1239
|
+
if (match) {
|
|
1240
|
+
const mainNumber = match[1].replace(/[\s\-\(\)\.]/g, "");
|
|
1241
|
+
const extension = match[3];
|
|
1242
|
+
const normalized = mainNumber.length >= 10 && !trimmed.startsWith("+") ? `+${mainNumber}` : mainNumber;
|
|
1243
|
+
const withExtension = extension ? `${normalized};ext=${extension}` : normalized;
|
|
1244
|
+
return `tel:${withExtension}`;
|
|
1245
|
+
}
|
|
1246
|
+
const cleaned = trimmed.replace(/[\s\-\(\)\.]/g, "");
|
|
1247
|
+
return `tel:${cleaned}`;
|
|
1248
|
+
}
|
|
1249
|
+
function normalizeEmail(input) {
|
|
1250
|
+
const trimmed = input.trim();
|
|
1251
|
+
if (trimmed.toLowerCase().startsWith("mailto:")) {
|
|
1252
|
+
return trimmed;
|
|
1253
|
+
}
|
|
1254
|
+
return `mailto:${trimmed}`;
|
|
1255
|
+
}
|
|
1256
|
+
function isEmail(input) {
|
|
1257
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
1258
|
+
return emailRegex.test(input.trim());
|
|
1259
|
+
}
|
|
1260
|
+
function isPhoneNumber(input) {
|
|
1261
|
+
const trimmed = input.trim();
|
|
1262
|
+
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
1263
|
+
return true;
|
|
1264
|
+
}
|
|
1265
|
+
const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
|
|
1266
|
+
return phoneRegex.test(trimmed);
|
|
1267
|
+
}
|
|
1268
|
+
function isInternalUrl(href) {
|
|
1269
|
+
if (typeof window === "undefined") {
|
|
1270
|
+
return href.startsWith("/") && !href.startsWith("//");
|
|
1271
|
+
}
|
|
1272
|
+
const trimmed = href.trim();
|
|
1273
|
+
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
1274
|
+
return true;
|
|
1275
|
+
}
|
|
1276
|
+
try {
|
|
1277
|
+
const url = new URL(trimmed, window.location.href);
|
|
1278
|
+
const currentOrigin = window.location.origin;
|
|
1279
|
+
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
1280
|
+
return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
|
|
1281
|
+
} catch {
|
|
1282
|
+
return false;
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
function toRelativePath(href) {
|
|
1286
|
+
if (typeof window === "undefined") {
|
|
1287
|
+
return href;
|
|
1288
|
+
}
|
|
1289
|
+
const trimmed = href.trim();
|
|
1290
|
+
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
1291
|
+
return trimmed;
|
|
1292
|
+
}
|
|
1293
|
+
try {
|
|
1294
|
+
const url = new URL(trimmed, window.location.href);
|
|
1295
|
+
const currentOrigin = window.location.origin;
|
|
1296
|
+
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
1297
|
+
if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
|
|
1298
|
+
return url.pathname + url.search + url.hash;
|
|
1299
|
+
}
|
|
1300
|
+
} catch {
|
|
1301
|
+
}
|
|
1302
|
+
return trimmed;
|
|
1303
|
+
}
|
|
1304
|
+
function useNavigation({
|
|
1305
|
+
href,
|
|
1306
|
+
onClick
|
|
1307
|
+
} = {}) {
|
|
1308
|
+
const linkType = React4__namespace.useMemo(() => {
|
|
1309
|
+
if (!href || href.trim() === "") {
|
|
1310
|
+
return onClick ? "none" : "none";
|
|
1311
|
+
}
|
|
1312
|
+
const trimmed = href.trim();
|
|
1313
|
+
if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
|
|
1314
|
+
return "mailto";
|
|
1315
|
+
}
|
|
1316
|
+
if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
|
|
1317
|
+
return "tel";
|
|
1318
|
+
}
|
|
1319
|
+
if (isInternalUrl(trimmed)) {
|
|
1320
|
+
return "internal";
|
|
1321
|
+
}
|
|
1322
|
+
try {
|
|
1323
|
+
new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
|
|
1324
|
+
return "external";
|
|
1325
|
+
} catch {
|
|
1326
|
+
return "internal";
|
|
1327
|
+
}
|
|
1328
|
+
}, [href, onClick]);
|
|
1329
|
+
const normalizedHref = React4__namespace.useMemo(() => {
|
|
1330
|
+
if (!href || href.trim() === "") {
|
|
1331
|
+
return void 0;
|
|
1332
|
+
}
|
|
1333
|
+
const trimmed = href.trim();
|
|
1334
|
+
switch (linkType) {
|
|
1335
|
+
case "tel":
|
|
1336
|
+
return normalizePhoneNumber(trimmed);
|
|
1337
|
+
case "mailto":
|
|
1338
|
+
return normalizeEmail(trimmed);
|
|
1339
|
+
case "internal":
|
|
1340
|
+
return toRelativePath(trimmed);
|
|
1341
|
+
case "external":
|
|
1342
|
+
return trimmed;
|
|
1343
|
+
default:
|
|
1344
|
+
return trimmed;
|
|
1345
|
+
}
|
|
1346
|
+
}, [href, linkType]);
|
|
1347
|
+
const target = React4__namespace.useMemo(() => {
|
|
1348
|
+
switch (linkType) {
|
|
1349
|
+
case "external":
|
|
1350
|
+
return "_blank";
|
|
1351
|
+
case "internal":
|
|
1352
|
+
return "_self";
|
|
1353
|
+
case "mailto":
|
|
1354
|
+
case "tel":
|
|
1355
|
+
return void 0;
|
|
1356
|
+
default:
|
|
1357
|
+
return void 0;
|
|
1358
|
+
}
|
|
1359
|
+
}, [linkType]);
|
|
1360
|
+
const rel = React4__namespace.useMemo(() => {
|
|
1361
|
+
if (linkType === "external") {
|
|
1362
|
+
return "noopener noreferrer";
|
|
2051
1363
|
}
|
|
1364
|
+
return void 0;
|
|
1365
|
+
}, [linkType]);
|
|
1366
|
+
const isExternal = linkType === "external";
|
|
1367
|
+
const isInternal = linkType === "internal";
|
|
1368
|
+
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
1369
|
+
const handleClick = React4__namespace.useCallback(
|
|
1370
|
+
(event) => {
|
|
1371
|
+
if (onClick) {
|
|
1372
|
+
try {
|
|
1373
|
+
onClick(event);
|
|
1374
|
+
} catch (error) {
|
|
1375
|
+
console.error("Error in user onClick handler:", error);
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
if (event.defaultPrevented) {
|
|
1379
|
+
return;
|
|
1380
|
+
}
|
|
1381
|
+
if (shouldUseRouter && normalizedHref && event.button === 0 && // left-click only
|
|
1382
|
+
!event.metaKey && !event.altKey && !event.ctrlKey && !event.shiftKey) {
|
|
1383
|
+
if (typeof window !== "undefined") {
|
|
1384
|
+
const handler = window.__opensiteNavigationHandler;
|
|
1385
|
+
if (typeof handler === "function") {
|
|
1386
|
+
try {
|
|
1387
|
+
const handled = handler(normalizedHref, event.nativeEvent || event);
|
|
1388
|
+
if (handled !== false) {
|
|
1389
|
+
event.preventDefault();
|
|
1390
|
+
}
|
|
1391
|
+
} catch (error) {
|
|
1392
|
+
console.error("Error in navigation handler:", error);
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
},
|
|
1398
|
+
[onClick, shouldUseRouter, normalizedHref]
|
|
2052
1399
|
);
|
|
1400
|
+
return {
|
|
1401
|
+
linkType,
|
|
1402
|
+
normalizedHref,
|
|
1403
|
+
target,
|
|
1404
|
+
rel,
|
|
1405
|
+
isExternal,
|
|
1406
|
+
isInternal,
|
|
1407
|
+
shouldUseRouter,
|
|
1408
|
+
handleClick
|
|
1409
|
+
};
|
|
2053
1410
|
}
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
1411
|
+
var Pressable = React4__namespace.forwardRef(
|
|
1412
|
+
({
|
|
1413
|
+
children,
|
|
1414
|
+
className,
|
|
1415
|
+
href,
|
|
1416
|
+
onClick,
|
|
1417
|
+
variant,
|
|
1418
|
+
size,
|
|
1419
|
+
asButton = false,
|
|
1420
|
+
fallbackComponentType = "span",
|
|
1421
|
+
componentType,
|
|
1422
|
+
"aria-label": ariaLabel,
|
|
1423
|
+
"aria-describedby": ariaDescribedby,
|
|
1424
|
+
id,
|
|
1425
|
+
...props
|
|
1426
|
+
}, ref) => {
|
|
1427
|
+
const navigation = useNavigation({ href, onClick });
|
|
1428
|
+
const {
|
|
1429
|
+
normalizedHref,
|
|
1430
|
+
target,
|
|
1431
|
+
rel,
|
|
1432
|
+
linkType,
|
|
1433
|
+
isInternal,
|
|
1434
|
+
handleClick
|
|
1435
|
+
} = navigation;
|
|
1436
|
+
const shouldRenderLink = normalizedHref && linkType !== "none";
|
|
1437
|
+
const shouldRenderButton = !shouldRenderLink && onClick;
|
|
1438
|
+
const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
|
|
1439
|
+
const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
|
|
1440
|
+
const shouldApplyButtonStyles = asButton || variant || size;
|
|
1441
|
+
const combinedClassName = cn(
|
|
1442
|
+
shouldApplyButtonStyles && buttonVariants({ variant, size }),
|
|
1443
|
+
className
|
|
1444
|
+
);
|
|
1445
|
+
const dataProps = Object.fromEntries(
|
|
1446
|
+
Object.entries(props).filter(([key]) => key.startsWith("data-"))
|
|
1447
|
+
);
|
|
1448
|
+
const buttonDataAttributes = shouldApplyButtonStyles ? {
|
|
1449
|
+
"data-slot": "button",
|
|
1450
|
+
"data-variant": variant ?? "default",
|
|
1451
|
+
"data-size": size ?? "default"
|
|
1452
|
+
} : {};
|
|
1453
|
+
const commonProps = {
|
|
1454
|
+
className: combinedClassName,
|
|
1455
|
+
onClick: handleClick,
|
|
1456
|
+
"aria-label": ariaLabel,
|
|
1457
|
+
"aria-describedby": ariaDescribedby,
|
|
1458
|
+
id,
|
|
1459
|
+
...dataProps,
|
|
1460
|
+
...buttonDataAttributes
|
|
1461
|
+
};
|
|
1462
|
+
if (finalComponentType === "a" && shouldRenderLink) {
|
|
1463
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1464
|
+
"a",
|
|
1465
|
+
{
|
|
1466
|
+
ref,
|
|
1467
|
+
href: normalizedHref,
|
|
1468
|
+
target,
|
|
1469
|
+
rel,
|
|
1470
|
+
...commonProps,
|
|
1471
|
+
...props,
|
|
1472
|
+
children
|
|
1473
|
+
}
|
|
1474
|
+
);
|
|
2061
1475
|
}
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
1476
|
+
if (finalComponentType === "button") {
|
|
1477
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1478
|
+
"button",
|
|
1479
|
+
{
|
|
1480
|
+
ref,
|
|
1481
|
+
type: props.type || "button",
|
|
1482
|
+
...commonProps,
|
|
1483
|
+
...props,
|
|
1484
|
+
children
|
|
1485
|
+
}
|
|
1486
|
+
);
|
|
2071
1487
|
}
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
1488
|
+
if (finalComponentType === "div") {
|
|
1489
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1490
|
+
"div",
|
|
1491
|
+
{
|
|
1492
|
+
ref,
|
|
1493
|
+
...commonProps,
|
|
1494
|
+
children
|
|
1495
|
+
}
|
|
1496
|
+
);
|
|
2081
1497
|
}
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
variant: {
|
|
2089
|
-
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
2090
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
2091
|
-
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",
|
|
2092
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
1498
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1499
|
+
"span",
|
|
1500
|
+
{
|
|
1501
|
+
ref,
|
|
1502
|
+
...commonProps,
|
|
1503
|
+
children
|
|
2093
1504
|
}
|
|
2094
|
-
|
|
2095
|
-
defaultVariants: {
|
|
2096
|
-
variant: "default"
|
|
2097
|
-
}
|
|
1505
|
+
);
|
|
2098
1506
|
}
|
|
2099
1507
|
);
|
|
2100
|
-
|
|
2101
|
-
className,
|
|
2102
|
-
variant,
|
|
2103
|
-
asChild = false,
|
|
2104
|
-
...props
|
|
2105
|
-
}) {
|
|
2106
|
-
const Comp = asChild ? reactSlot.Slot : "span";
|
|
2107
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2108
|
-
Comp,
|
|
2109
|
-
{
|
|
2110
|
-
"data-slot": "badge",
|
|
2111
|
-
className: cn(badgeVariants({ variant }), className),
|
|
2112
|
-
...props
|
|
2113
|
-
}
|
|
2114
|
-
);
|
|
2115
|
-
}
|
|
2116
|
-
function Popover({
|
|
2117
|
-
...props
|
|
2118
|
-
}) {
|
|
2119
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { "data-slot": "popover", ...props });
|
|
2120
|
-
}
|
|
2121
|
-
function PopoverTrigger({
|
|
2122
|
-
...props
|
|
2123
|
-
}) {
|
|
2124
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
2125
|
-
}
|
|
2126
|
-
function PopoverContent({
|
|
2127
|
-
className,
|
|
2128
|
-
align = "center",
|
|
2129
|
-
sideOffset = 4,
|
|
2130
|
-
...props
|
|
2131
|
-
}) {
|
|
2132
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2133
|
-
PopoverPrimitive__namespace.Content,
|
|
2134
|
-
{
|
|
2135
|
-
"data-slot": "popover-content",
|
|
2136
|
-
align,
|
|
2137
|
-
sideOffset,
|
|
2138
|
-
className: cn(
|
|
2139
|
-
"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",
|
|
2140
|
-
className
|
|
2141
|
-
),
|
|
2142
|
-
...props
|
|
2143
|
-
}
|
|
2144
|
-
) });
|
|
2145
|
-
}
|
|
2146
|
-
function StarRating({
|
|
2147
|
-
rating,
|
|
2148
|
-
size = 18,
|
|
2149
|
-
className
|
|
2150
|
-
}) {
|
|
2151
|
-
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(
|
|
2152
|
-
DynamicIcon,
|
|
2153
|
-
{
|
|
2154
|
-
name: "icon-park-solid/star",
|
|
2155
|
-
size,
|
|
2156
|
-
className: cn(
|
|
2157
|
-
star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
|
|
2158
|
-
)
|
|
2159
|
-
},
|
|
2160
|
-
star
|
|
2161
|
-
)) });
|
|
2162
|
-
}
|
|
1508
|
+
Pressable.displayName = "Pressable";
|
|
2163
1509
|
var BUTTON_SIZES = {
|
|
2164
1510
|
sm: { buttonSize: "size-8", iconSize: 16 },
|
|
2165
1511
|
md: { buttonSize: "size-10", iconSize: 20 },
|
|
@@ -2251,7 +1597,7 @@ var platformIconMap = {
|
|
|
2251
1597
|
dribbble: "cib/dribbble",
|
|
2252
1598
|
unknown: "icon-park-solid/circular-connection"
|
|
2253
1599
|
};
|
|
2254
|
-
var SocialLinkIcon =
|
|
1600
|
+
var SocialLinkIcon = React4__namespace.forwardRef(
|
|
2255
1601
|
({
|
|
2256
1602
|
platformName,
|
|
2257
1603
|
label,
|
|
@@ -2265,16 +1611,16 @@ var SocialLinkIcon = React6__namespace.forwardRef(
|
|
|
2265
1611
|
...pressableProps
|
|
2266
1612
|
}, ref) => {
|
|
2267
1613
|
const platform = usePlatformFromUrl.usePlatformFromUrl(href);
|
|
2268
|
-
const smartPlatformName =
|
|
1614
|
+
const smartPlatformName = React4__namespace.useMemo(() => {
|
|
2269
1615
|
return platform || platformName;
|
|
2270
1616
|
}, [platform, platformName]);
|
|
2271
|
-
const iconName =
|
|
1617
|
+
const iconName = React4__namespace.useMemo(() => {
|
|
2272
1618
|
return iconNameOverride || platformIconMap[smartPlatformName];
|
|
2273
1619
|
}, [iconNameOverride, smartPlatformName]);
|
|
2274
|
-
const accessibleLabel =
|
|
1620
|
+
const accessibleLabel = React4__namespace.useMemo(() => {
|
|
2275
1621
|
return label || platformName;
|
|
2276
1622
|
}, [label, platformName]);
|
|
2277
|
-
const icon =
|
|
1623
|
+
const icon = React4__namespace.useMemo(() => {
|
|
2278
1624
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2279
1625
|
DynamicIcon,
|
|
2280
1626
|
{
|
|
@@ -2354,12 +1700,12 @@ function TextInner({ as, className, children, ...props }, ref) {
|
|
|
2354
1700
|
const Component = as || "span";
|
|
2355
1701
|
return /* @__PURE__ */ jsxRuntime.jsx(Component, { ref, className: cn(className), ...props, children });
|
|
2356
1702
|
}
|
|
2357
|
-
var Text =
|
|
1703
|
+
var Text = React4__namespace.forwardRef(TextInner);
|
|
2358
1704
|
Text.displayName = "Text";
|
|
2359
1705
|
function isContentTextItem(item) {
|
|
2360
|
-
return item !== null && typeof item === "object" && !
|
|
1706
|
+
return item !== null && typeof item === "object" && !React4__namespace.isValidElement(item) && "_type" in item && item._type === "text";
|
|
2361
1707
|
}
|
|
2362
|
-
var ContentGroup =
|
|
1708
|
+
var ContentGroup = React4__namespace.forwardRef(
|
|
2363
1709
|
({ items, className, children, ...props }, ref) => {
|
|
2364
1710
|
const hasContent = items && items.length > 0;
|
|
2365
1711
|
if (!hasContent) {
|
|
@@ -2372,10 +1718,10 @@ var ContentGroup = React6__namespace.forwardRef(
|
|
|
2372
1718
|
return /* @__PURE__ */ jsxRuntime.jsx(Text, { ...textProps }, idx);
|
|
2373
1719
|
}
|
|
2374
1720
|
const reactNode = item;
|
|
2375
|
-
if (
|
|
2376
|
-
return
|
|
1721
|
+
if (React4__namespace.isValidElement(reactNode)) {
|
|
1722
|
+
return React4__namespace.cloneElement(reactNode, { key: reactNode.key ?? idx });
|
|
2377
1723
|
}
|
|
2378
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1724
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React4__namespace.Fragment, { children: reactNode }, idx);
|
|
2379
1725
|
}),
|
|
2380
1726
|
children
|
|
2381
1727
|
] });
|
|
@@ -2399,7 +1745,7 @@ function AlternatingBlocks({
|
|
|
2399
1745
|
pattern,
|
|
2400
1746
|
patternOpacity
|
|
2401
1747
|
}) {
|
|
2402
|
-
const sectionsContent =
|
|
1748
|
+
const sectionsContent = React4.useMemo(() => {
|
|
2403
1749
|
if (sectionsSlot) return sectionsSlot;
|
|
2404
1750
|
if (!sections || sections.length === 0) return null;
|
|
2405
1751
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-12", sectionsClassName), children: sections.map((section, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2443,7 +1789,7 @@ function AlternatingBlocks({
|
|
|
2443
1789
|
sectionContentClassName,
|
|
2444
1790
|
sectionMediaClassName
|
|
2445
1791
|
]);
|
|
2446
|
-
const headerItems =
|
|
1792
|
+
const headerItems = React4.useMemo(() => {
|
|
2447
1793
|
const items = [];
|
|
2448
1794
|
if (subtitle) {
|
|
2449
1795
|
items.push(
|
|
@@ -2512,7 +1858,7 @@ function AboutSplitHero({
|
|
|
2512
1858
|
patternOpacity,
|
|
2513
1859
|
directionConfig = { desktop: "mediaRight", mobile: "mediaTop" }
|
|
2514
1860
|
}) {
|
|
2515
|
-
const ctaContent =
|
|
1861
|
+
const ctaContent = React4.useMemo(() => {
|
|
2516
1862
|
if (ctaSlot) return ctaSlot;
|
|
2517
1863
|
if (!ctaAction) return null;
|
|
2518
1864
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2534,7 +1880,7 @@ function AboutSplitHero({
|
|
|
2534
1880
|
}
|
|
2535
1881
|
);
|
|
2536
1882
|
}, [ctaSlot, ctaAction, ctaClassName]);
|
|
2537
|
-
const bgColorClass =
|
|
1883
|
+
const bgColorClass = React4.useMemo(() => {
|
|
2538
1884
|
switch (background) {
|
|
2539
1885
|
case "dark":
|
|
2540
1886
|
return "bg-foreground text-background";
|
|
@@ -2662,7 +2008,7 @@ function AboutMissionPrinciples({
|
|
|
2662
2008
|
pattern,
|
|
2663
2009
|
patternOpacity
|
|
2664
2010
|
}) {
|
|
2665
|
-
const missionActionContent =
|
|
2011
|
+
const missionActionContent = React4.useMemo(() => {
|
|
2666
2012
|
if (missionActionSlot) return missionActionSlot;
|
|
2667
2013
|
if (!missionAction) return null;
|
|
2668
2014
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("pt-2", missionActionClassName), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2687,7 +2033,7 @@ function AboutMissionPrinciples({
|
|
|
2687
2033
|
}
|
|
2688
2034
|
) });
|
|
2689
2035
|
}, [missionActionSlot, missionAction, missionActionClassName]);
|
|
2690
|
-
const principlesContent =
|
|
2036
|
+
const principlesContent = React4.useMemo(() => {
|
|
2691
2037
|
if (principlesSlot) return principlesSlot;
|
|
2692
2038
|
if (!principles || principles.length === 0) return null;
|
|
2693
2039
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2725,7 +2071,7 @@ function AboutMissionPrinciples({
|
|
|
2725
2071
|
}
|
|
2726
2072
|
);
|
|
2727
2073
|
}, [principlesSlot, principles, principlesClassName]);
|
|
2728
|
-
const visionActionContent =
|
|
2074
|
+
const visionActionContent = React4.useMemo(() => {
|
|
2729
2075
|
if (visionActionSlot) return visionActionSlot;
|
|
2730
2076
|
if (!visionAction) return null;
|
|
2731
2077
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2900,11 +2246,11 @@ function AboutExpandableValues({
|
|
|
2900
2246
|
pattern,
|
|
2901
2247
|
patternOpacity
|
|
2902
2248
|
}) {
|
|
2903
|
-
const [expandedValue, setExpandedValue] =
|
|
2904
|
-
const toggleExpand =
|
|
2249
|
+
const [expandedValue, setExpandedValue] = React4__namespace.useState(null);
|
|
2250
|
+
const toggleExpand = React4.useCallback((id) => {
|
|
2905
2251
|
setExpandedValue((prev) => prev === id ? null : id);
|
|
2906
2252
|
}, []);
|
|
2907
|
-
|
|
2253
|
+
React4.useMemo(() => {
|
|
2908
2254
|
if (actionsSlot) return actionsSlot;
|
|
2909
2255
|
if (!actions || actions.length === 0) return null;
|
|
2910
2256
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: actionsClassName, children: actions.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2920,7 +2266,7 @@ function AboutExpandableValues({
|
|
|
2920
2266
|
idx
|
|
2921
2267
|
)) });
|
|
2922
2268
|
}, [actionsSlot, actions, actionsClassName]);
|
|
2923
|
-
const valuesContent =
|
|
2269
|
+
const valuesContent = React4.useMemo(() => {
|
|
2924
2270
|
if (valuesSlot) return valuesSlot;
|
|
2925
2271
|
if (!values || values.length === 0) return null;
|
|
2926
2272
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid grid-cols-1 gap-6 mt-8", valuesClassName), children: values.map((value) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3136,17 +2482,17 @@ function CommunityInitiatives({
|
|
|
3136
2482
|
pattern,
|
|
3137
2483
|
patternOpacity
|
|
3138
2484
|
}) {
|
|
3139
|
-
const [activeCategory, setActiveCategory] =
|
|
2485
|
+
const [activeCategory, setActiveCategory] = React4__namespace.useState(
|
|
3140
2486
|
categories?.[0]?.id || ""
|
|
3141
2487
|
);
|
|
3142
2488
|
const currentCategory = categories?.find((category) => category.id === activeCategory) || categories?.[0];
|
|
3143
|
-
const handleCategoryChange =
|
|
2489
|
+
const handleCategoryChange = React4.useCallback(
|
|
3144
2490
|
(e) => {
|
|
3145
2491
|
setActiveCategory(e.target.value);
|
|
3146
2492
|
},
|
|
3147
2493
|
[]
|
|
3148
2494
|
);
|
|
3149
|
-
const categoriesContent =
|
|
2495
|
+
const categoriesContent = React4.useMemo(() => {
|
|
3150
2496
|
if (categoriesSlot) return categoriesSlot;
|
|
3151
2497
|
if (!categories || categories.length === 0) return null;
|
|
3152
2498
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3400,10 +2746,10 @@ function AboutCultureTabs({
|
|
|
3400
2746
|
patternOpacity
|
|
3401
2747
|
}) {
|
|
3402
2748
|
const resolvedAspects = aspects ?? [];
|
|
3403
|
-
const [activeTab, setActiveTab] =
|
|
2749
|
+
const [activeTab, setActiveTab] = React4__namespace.useState(
|
|
3404
2750
|
resolvedAspects[0]?.id || ""
|
|
3405
2751
|
);
|
|
3406
|
-
const headerItems =
|
|
2752
|
+
const headerItems = React4.useMemo(() => {
|
|
3407
2753
|
const items = [];
|
|
3408
2754
|
if (badgeText) {
|
|
3409
2755
|
if (typeof badgeText === "string") {
|
|
@@ -3450,7 +2796,7 @@ function AboutCultureTabs({
|
|
|
3450
2796
|
description,
|
|
3451
2797
|
descriptionClassName
|
|
3452
2798
|
]);
|
|
3453
|
-
const ctaImagesContent =
|
|
2799
|
+
const ctaImagesContent = React4.useMemo(() => {
|
|
3454
2800
|
if (ctaImagesSlot) return ctaImagesSlot;
|
|
3455
2801
|
if (!ctaImages || ctaImages.length === 0) return null;
|
|
3456
2802
|
return ctaImages.map((src, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3616,7 +2962,7 @@ function MediaHoverCtas({
|
|
|
3616
2962
|
optixFlowConfig
|
|
3617
2963
|
}) {
|
|
3618
2964
|
const resolvedItems = items ?? [];
|
|
3619
|
-
const itemsContent =
|
|
2965
|
+
const itemsContent = React4.useMemo(() => {
|
|
3620
2966
|
if (itemsSlot) return itemsSlot;
|
|
3621
2967
|
return resolvedItems.map((item, index) => {
|
|
3622
2968
|
const CardComponent = item.cardHref ? "a" : "div";
|
|
@@ -3706,13 +3052,13 @@ function BannerAnnouncementDismissible({
|
|
|
3706
3052
|
actionsClassName,
|
|
3707
3053
|
dismissButtonClassName
|
|
3708
3054
|
}) {
|
|
3709
|
-
const [isVisible, setIsVisible] =
|
|
3055
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
3710
3056
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
3711
|
-
const handleDismiss =
|
|
3057
|
+
const handleDismiss = React4.useCallback(() => {
|
|
3712
3058
|
setIsVisible(false);
|
|
3713
3059
|
onDismiss?.();
|
|
3714
3060
|
}, [onDismiss]);
|
|
3715
|
-
const actionsContent =
|
|
3061
|
+
const actionsContent = React4.useMemo(() => {
|
|
3716
3062
|
if (actionsSlot) return actionsSlot;
|
|
3717
3063
|
if (!actions || actions.length === 0) return null;
|
|
3718
3064
|
return actions.map((action, index) => {
|
|
@@ -3740,7 +3086,7 @@ function BannerAnnouncementDismissible({
|
|
|
3740
3086
|
);
|
|
3741
3087
|
});
|
|
3742
3088
|
}, [actions, actionsSlot]);
|
|
3743
|
-
const iconContent =
|
|
3089
|
+
const iconContent = React4.useMemo(() => {
|
|
3744
3090
|
if (icon) return icon;
|
|
3745
3091
|
if (!iconName) return null;
|
|
3746
3092
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3752,11 +3098,11 @@ function BannerAnnouncementDismissible({
|
|
|
3752
3098
|
}
|
|
3753
3099
|
);
|
|
3754
3100
|
}, [icon, iconName, iconClassName]);
|
|
3755
|
-
const dismissIconContent =
|
|
3101
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
3756
3102
|
if (dismissIcon) return dismissIcon;
|
|
3757
3103
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
3758
3104
|
}, [dismissIcon]);
|
|
3759
|
-
const messageContent =
|
|
3105
|
+
const messageContent = React4.useMemo(() => {
|
|
3760
3106
|
if (!message) return null;
|
|
3761
3107
|
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 });
|
|
3762
3108
|
}, [message, messageClassName]);
|
|
@@ -3802,12 +3148,12 @@ function BannerCountdownSale({
|
|
|
3802
3148
|
separatorClassName
|
|
3803
3149
|
}) {
|
|
3804
3150
|
const targetTime = endTime;
|
|
3805
|
-
const [timeLeft, setTimeLeft] =
|
|
3151
|
+
const [timeLeft, setTimeLeft] = React4.useState({
|
|
3806
3152
|
hours: 0,
|
|
3807
3153
|
minutes: 0,
|
|
3808
3154
|
seconds: 0
|
|
3809
3155
|
});
|
|
3810
|
-
|
|
3156
|
+
React4.useEffect(() => {
|
|
3811
3157
|
if (!targetTime) {
|
|
3812
3158
|
return;
|
|
3813
3159
|
}
|
|
@@ -3830,8 +3176,8 @@ function BannerCountdownSale({
|
|
|
3830
3176
|
}, 1e3);
|
|
3831
3177
|
return () => clearInterval(timer);
|
|
3832
3178
|
}, [targetTime]);
|
|
3833
|
-
const pad =
|
|
3834
|
-
const timerContent =
|
|
3179
|
+
const pad = React4.useCallback((n) => n.toString().padStart(2, "0"), []);
|
|
3180
|
+
const timerContent = React4.useMemo(() => {
|
|
3835
3181
|
if (timerSlot) return timerSlot;
|
|
3836
3182
|
if (renderTimer) return renderTimer(timeLeft);
|
|
3837
3183
|
if (!targetTime) return null;
|
|
@@ -3843,11 +3189,11 @@ function BannerCountdownSale({
|
|
|
3843
3189
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("rounded bg-destructive px-2 py-0.5", timeUnitClassName), children: pad(timeLeft.seconds) })
|
|
3844
3190
|
] });
|
|
3845
3191
|
}, [timerSlot, renderTimer, timeLeft, timerClassName, timeUnitClassName, separatorClassName, pad, targetTime]);
|
|
3846
|
-
const messageContent =
|
|
3192
|
+
const messageContent = React4.useMemo(() => {
|
|
3847
3193
|
if (!message) return null;
|
|
3848
3194
|
return typeof message === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium", messageClassName), children: message }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: messageClassName, children: message });
|
|
3849
3195
|
}, [message, messageClassName]);
|
|
3850
|
-
const descriptionContent =
|
|
3196
|
+
const descriptionContent = React4.useMemo(() => {
|
|
3851
3197
|
if (!description) return null;
|
|
3852
3198
|
return typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-destructive-foreground", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: descriptionClassName, children: description });
|
|
3853
3199
|
}, [description, descriptionClassName]);
|
|
@@ -3876,12 +3222,12 @@ function BannerDeliveryCountdown({
|
|
|
3876
3222
|
deliveryDateClassName
|
|
3877
3223
|
}) {
|
|
3878
3224
|
const targetTime = cutoffTime;
|
|
3879
|
-
const [timeLeft, setTimeLeft] =
|
|
3225
|
+
const [timeLeft, setTimeLeft] = React4.useState({
|
|
3880
3226
|
hours: 0,
|
|
3881
3227
|
minutes: 0,
|
|
3882
3228
|
seconds: 0
|
|
3883
3229
|
});
|
|
3884
|
-
|
|
3230
|
+
React4.useEffect(() => {
|
|
3885
3231
|
if (!targetTime) {
|
|
3886
3232
|
return;
|
|
3887
3233
|
}
|
|
@@ -3904,13 +3250,13 @@ function BannerDeliveryCountdown({
|
|
|
3904
3250
|
}, 1e3);
|
|
3905
3251
|
return () => clearInterval(timer);
|
|
3906
3252
|
}, [targetTime]);
|
|
3907
|
-
const pad =
|
|
3908
|
-
const iconContent =
|
|
3253
|
+
const pad = React4.useCallback((n) => n.toString().padStart(2, "0"), []);
|
|
3254
|
+
const iconContent = React4.useMemo(() => {
|
|
3909
3255
|
if (icon) return icon;
|
|
3910
3256
|
if (!iconName) return null;
|
|
3911
3257
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: iconName, size: 16, className: iconClassName });
|
|
3912
3258
|
}, [icon, iconName, iconClassName]);
|
|
3913
|
-
const timerContent =
|
|
3259
|
+
const timerContent = React4.useMemo(() => {
|
|
3914
3260
|
if (timerSlot) return timerSlot;
|
|
3915
3261
|
if (renderTimer) return renderTimer(timeLeft);
|
|
3916
3262
|
if (!targetTime) return null;
|
|
@@ -3922,18 +3268,18 @@ function BannerDeliveryCountdown({
|
|
|
3922
3268
|
pad(timeLeft.seconds)
|
|
3923
3269
|
] });
|
|
3924
3270
|
}, [timerSlot, renderTimer, timeLeft, timerClassName, pad, targetTime]);
|
|
3925
|
-
const deliveryDateContent =
|
|
3271
|
+
const deliveryDateContent = React4.useMemo(() => {
|
|
3926
3272
|
if (!deliveryDate) return null;
|
|
3927
3273
|
return typeof deliveryDate === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-semibold", deliveryDateClassName), children: deliveryDate }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: deliveryDateClassName, children: deliveryDate });
|
|
3928
3274
|
}, [deliveryDate, deliveryDateClassName]);
|
|
3929
|
-
const messageParts =
|
|
3275
|
+
const messageParts = React4.useMemo(() => {
|
|
3930
3276
|
return [prefixText, timerContent, middleText, deliveryDateContent].filter(
|
|
3931
3277
|
(part) => part !== null && part !== void 0
|
|
3932
3278
|
);
|
|
3933
3279
|
}, [prefixText, timerContent, middleText, deliveryDateContent]);
|
|
3934
3280
|
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: [
|
|
3935
3281
|
iconContent,
|
|
3936
|
-
messageParts.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { children: messageParts.map((part, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3282
|
+
messageParts.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { children: messageParts.map((part, index) => /* @__PURE__ */ jsxRuntime.jsxs(React4__namespace.Fragment, { children: [
|
|
3937
3283
|
index > 0 ? " " : null,
|
|
3938
3284
|
part
|
|
3939
3285
|
] }, index)) })
|
|
@@ -3955,7 +3301,7 @@ function BannerEventPromo({
|
|
|
3955
3301
|
eventDetailsClassName,
|
|
3956
3302
|
actionsClassName
|
|
3957
3303
|
}) {
|
|
3958
|
-
const actionsContent =
|
|
3304
|
+
const actionsContent = React4.useMemo(() => {
|
|
3959
3305
|
if (actionsSlot) return actionsSlot;
|
|
3960
3306
|
if (!actions || actions.length === 0) return null;
|
|
3961
3307
|
return actions.map((action, index) => {
|
|
@@ -3983,7 +3329,7 @@ function BannerEventPromo({
|
|
|
3983
3329
|
);
|
|
3984
3330
|
});
|
|
3985
3331
|
}, [actions, actionsSlot]);
|
|
3986
|
-
const separatorContent =
|
|
3332
|
+
const separatorContent = React4.useMemo(() => {
|
|
3987
3333
|
if (separator) return separator;
|
|
3988
3334
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3989
3335
|
"svg",
|
|
@@ -3995,11 +3341,11 @@ function BannerEventPromo({
|
|
|
3995
3341
|
}
|
|
3996
3342
|
);
|
|
3997
3343
|
}, [separator, separatorClassName]);
|
|
3998
|
-
const eventNameContent =
|
|
3344
|
+
const eventNameContent = React4.useMemo(() => {
|
|
3999
3345
|
if (!eventName) return null;
|
|
4000
3346
|
return typeof eventName === "string" ? /* @__PURE__ */ jsxRuntime.jsx("strong", { className: cn("font-semibold", eventNameClassName), children: eventName }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: eventNameClassName, children: eventName });
|
|
4001
3347
|
}, [eventName, eventNameClassName]);
|
|
4002
|
-
const eventDetailsContent =
|
|
3348
|
+
const eventDetailsContent = React4.useMemo(() => {
|
|
4003
3349
|
if (!eventDetails) return null;
|
|
4004
3350
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: eventDetailsClassName, children: eventDetails });
|
|
4005
3351
|
}, [eventDetails, eventDetailsClassName]);
|
|
@@ -4036,22 +3382,22 @@ function BannerFloatingOffer({
|
|
|
4036
3382
|
}) {
|
|
4037
3383
|
const isControlled = open !== void 0;
|
|
4038
3384
|
const initialOpen = defaultOpen ?? true;
|
|
4039
|
-
const [internalOpen, setInternalOpen] =
|
|
3385
|
+
const [internalOpen, setInternalOpen] = React4.useState(initialOpen);
|
|
4040
3386
|
const isVisible = isControlled ? open : internalOpen;
|
|
4041
3387
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4042
3388
|
const isDismissible = dismissible ?? false;
|
|
4043
|
-
|
|
3389
|
+
React4.useEffect(() => {
|
|
4044
3390
|
if (!isControlled && defaultOpen !== internalOpen) {
|
|
4045
3391
|
setInternalOpen(initialOpen);
|
|
4046
3392
|
}
|
|
4047
3393
|
}, [defaultOpen, initialOpen, isControlled, internalOpen]);
|
|
4048
|
-
const handleDismiss =
|
|
3394
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4049
3395
|
if (!isControlled) {
|
|
4050
3396
|
setInternalOpen(false);
|
|
4051
3397
|
}
|
|
4052
3398
|
onOpenChange?.(false);
|
|
4053
3399
|
}, [isControlled, onOpenChange]);
|
|
4054
|
-
const actionsContent =
|
|
3400
|
+
const actionsContent = React4.useMemo(() => {
|
|
4055
3401
|
if (actionsSlot) return actionsSlot;
|
|
4056
3402
|
if (!actions || actions.length === 0) return null;
|
|
4057
3403
|
return actions.map((action, index) => {
|
|
@@ -4079,7 +3425,7 @@ function BannerFloatingOffer({
|
|
|
4079
3425
|
);
|
|
4080
3426
|
});
|
|
4081
3427
|
}, [actions, actionsSlot]);
|
|
4082
|
-
const separatorContent =
|
|
3428
|
+
const separatorContent = React4.useMemo(() => {
|
|
4083
3429
|
if (separator) return separator;
|
|
4084
3430
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4085
3431
|
"svg",
|
|
@@ -4091,15 +3437,15 @@ function BannerFloatingOffer({
|
|
|
4091
3437
|
}
|
|
4092
3438
|
);
|
|
4093
3439
|
}, [separator, separatorClassName]);
|
|
4094
|
-
const dismissIconContent =
|
|
3440
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4095
3441
|
if (dismissIcon) return dismissIcon;
|
|
4096
3442
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4097
3443
|
}, [dismissIcon]);
|
|
4098
|
-
const offerTitleContent =
|
|
3444
|
+
const offerTitleContent = React4.useMemo(() => {
|
|
4099
3445
|
if (!offerTitle) return null;
|
|
4100
3446
|
return typeof offerTitle === "string" ? /* @__PURE__ */ jsxRuntime.jsx("strong", { className: cn("font-semibold", offerTitleClassName), children: offerTitle }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: offerTitleClassName, children: offerTitle });
|
|
4101
3447
|
}, [offerTitle, offerTitleClassName]);
|
|
4102
|
-
const offerDescriptionContent =
|
|
3448
|
+
const offerDescriptionContent = React4.useMemo(() => {
|
|
4103
3449
|
if (!offerDescription) return null;
|
|
4104
3450
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: offerDescriptionClassName, children: offerDescription });
|
|
4105
3451
|
}, [offerDescription, offerDescriptionClassName]);
|
|
@@ -4160,13 +3506,13 @@ function BannerGdprRights({
|
|
|
4160
3506
|
actionsClassName,
|
|
4161
3507
|
dismissButtonClassName
|
|
4162
3508
|
}) {
|
|
4163
|
-
const [isVisible, setIsVisible] =
|
|
3509
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
4164
3510
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4165
|
-
const handleDismiss =
|
|
3511
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4166
3512
|
setIsVisible(false);
|
|
4167
3513
|
onDismiss?.();
|
|
4168
3514
|
}, [onDismiss]);
|
|
4169
|
-
const iconContent =
|
|
3515
|
+
const iconContent = React4.useMemo(() => {
|
|
4170
3516
|
if (icon) return icon;
|
|
4171
3517
|
if (!iconName) return null;
|
|
4172
3518
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4178,7 +3524,7 @@ function BannerGdprRights({
|
|
|
4178
3524
|
}
|
|
4179
3525
|
);
|
|
4180
3526
|
}, [icon, iconName, iconClassName]);
|
|
4181
|
-
const actionsContent =
|
|
3527
|
+
const actionsContent = React4.useMemo(() => {
|
|
4182
3528
|
if (actionsSlot) return actionsSlot;
|
|
4183
3529
|
if (!actions || actions.length === 0) return null;
|
|
4184
3530
|
return actions.map((action, index) => {
|
|
@@ -4205,15 +3551,15 @@ function BannerGdprRights({
|
|
|
4205
3551
|
);
|
|
4206
3552
|
});
|
|
4207
3553
|
}, [actions, actionsSlot]);
|
|
4208
|
-
const dismissIconContent =
|
|
3554
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4209
3555
|
if (dismissIcon) return dismissIcon;
|
|
4210
3556
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4211
3557
|
}, [dismissIcon]);
|
|
4212
|
-
const titleContent =
|
|
3558
|
+
const titleContent = React4.useMemo(() => {
|
|
4213
3559
|
if (!title) return null;
|
|
4214
3560
|
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 });
|
|
4215
3561
|
}, [title, titleClassName]);
|
|
4216
|
-
const descriptionContent =
|
|
3562
|
+
const descriptionContent = React4.useMemo(() => {
|
|
4217
3563
|
if (!description && !actionsContent) return null;
|
|
4218
3564
|
return /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("text-sm text-muted-foreground mt-1", descriptionClassName), children: [
|
|
4219
3565
|
description,
|
|
@@ -4267,13 +3613,13 @@ function BannerPrivacyNotice({
|
|
|
4267
3613
|
actionsClassName,
|
|
4268
3614
|
dismissButtonClassName
|
|
4269
3615
|
}) {
|
|
4270
|
-
const [isVisible, setIsVisible] =
|
|
3616
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
4271
3617
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4272
|
-
const handleDismiss =
|
|
3618
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4273
3619
|
setIsVisible(false);
|
|
4274
3620
|
onDismiss?.();
|
|
4275
3621
|
}, [onDismiss]);
|
|
4276
|
-
const iconContent =
|
|
3622
|
+
const iconContent = React4.useMemo(() => {
|
|
4277
3623
|
if (icon) return icon;
|
|
4278
3624
|
if (!iconName) return null;
|
|
4279
3625
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4285,7 +3631,7 @@ function BannerPrivacyNotice({
|
|
|
4285
3631
|
}
|
|
4286
3632
|
);
|
|
4287
3633
|
}, [icon, iconName, iconClassName]);
|
|
4288
|
-
const actionsContent =
|
|
3634
|
+
const actionsContent = React4.useMemo(() => {
|
|
4289
3635
|
if (actionsSlot) return actionsSlot;
|
|
4290
3636
|
if (!actions || actions.length === 0) return null;
|
|
4291
3637
|
return actions.map((action, index) => {
|
|
@@ -4312,15 +3658,15 @@ function BannerPrivacyNotice({
|
|
|
4312
3658
|
);
|
|
4313
3659
|
});
|
|
4314
3660
|
}, [actions, actionsSlot]);
|
|
4315
|
-
const dismissIconContent =
|
|
3661
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4316
3662
|
if (dismissIcon) return dismissIcon;
|
|
4317
3663
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4318
3664
|
}, [dismissIcon]);
|
|
4319
|
-
const titleContent =
|
|
3665
|
+
const titleContent = React4.useMemo(() => {
|
|
4320
3666
|
if (!title) return null;
|
|
4321
3667
|
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 });
|
|
4322
3668
|
}, [title, titleClassName]);
|
|
4323
|
-
const descriptionContent =
|
|
3669
|
+
const descriptionContent = React4.useMemo(() => {
|
|
4324
3670
|
if (!description) return null;
|
|
4325
3671
|
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 });
|
|
4326
3672
|
}, [description, descriptionClassName]);
|
|
@@ -4367,7 +3713,7 @@ function BannerPromoCta({
|
|
|
4367
3713
|
discountClassName,
|
|
4368
3714
|
actionsClassName
|
|
4369
3715
|
}) {
|
|
4370
|
-
const actionsContent =
|
|
3716
|
+
const actionsContent = React4.useMemo(() => {
|
|
4371
3717
|
if (actionsSlot) return actionsSlot;
|
|
4372
3718
|
if (!actions || actions.length === 0) return null;
|
|
4373
3719
|
return actions.map((action, index) => {
|
|
@@ -4394,15 +3740,15 @@ function BannerPromoCta({
|
|
|
4394
3740
|
);
|
|
4395
3741
|
});
|
|
4396
3742
|
}, [actions, actionsSlot]);
|
|
4397
|
-
const separatorContent =
|
|
3743
|
+
const separatorContent = React4.useMemo(() => {
|
|
4398
3744
|
if (separator) return separator;
|
|
4399
3745
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("hidden sm:inline", separatorClassName), children: "\xB7" });
|
|
4400
3746
|
}, [separator, separatorClassName]);
|
|
4401
|
-
const messageContent =
|
|
3747
|
+
const messageContent = React4.useMemo(() => {
|
|
4402
3748
|
if (!message) return null;
|
|
4403
3749
|
return typeof message === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-semibold", messageClassName), children: message }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: messageClassName, children: message });
|
|
4404
3750
|
}, [message, messageClassName]);
|
|
4405
|
-
const discountContent =
|
|
3751
|
+
const discountContent = React4.useMemo(() => {
|
|
4406
3752
|
if (!discount) return null;
|
|
4407
3753
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: discountClassName, children: discount });
|
|
4408
3754
|
}, [discount, discountClassName]);
|
|
@@ -4430,13 +3776,13 @@ function BannerSocialFollow({
|
|
|
4430
3776
|
actionsClassName,
|
|
4431
3777
|
dismissButtonClassName
|
|
4432
3778
|
}) {
|
|
4433
|
-
const [isVisible, setIsVisible] =
|
|
3779
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
4434
3780
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4435
|
-
const handleDismiss =
|
|
3781
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4436
3782
|
setIsVisible(false);
|
|
4437
3783
|
onDismiss?.();
|
|
4438
3784
|
}, [onDismiss]);
|
|
4439
|
-
const iconContent =
|
|
3785
|
+
const iconContent = React4.useMemo(() => {
|
|
4440
3786
|
if (icon) return icon;
|
|
4441
3787
|
if (!iconName) return null;
|
|
4442
3788
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4448,7 +3794,7 @@ function BannerSocialFollow({
|
|
|
4448
3794
|
}
|
|
4449
3795
|
);
|
|
4450
3796
|
}, [icon, iconName, iconClassName]);
|
|
4451
|
-
const actionsContent =
|
|
3797
|
+
const actionsContent = React4.useMemo(() => {
|
|
4452
3798
|
if (actionsSlot) return actionsSlot;
|
|
4453
3799
|
if (!actions || actions.length === 0) return null;
|
|
4454
3800
|
return actions.map((action, index) => {
|
|
@@ -4476,11 +3822,11 @@ function BannerSocialFollow({
|
|
|
4476
3822
|
);
|
|
4477
3823
|
});
|
|
4478
3824
|
}, [actions, actionsSlot]);
|
|
4479
|
-
const dismissIconContent =
|
|
3825
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4480
3826
|
if (dismissIcon) return dismissIcon;
|
|
4481
3827
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4482
3828
|
}, [dismissIcon]);
|
|
4483
|
-
const messageContent =
|
|
3829
|
+
const messageContent = React4.useMemo(() => {
|
|
4484
3830
|
if (!message) return null;
|
|
4485
3831
|
return typeof message === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium", messageClassName), children: message }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: messageClassName, children: message });
|
|
4486
3832
|
}, [message, messageClassName]);
|
|
@@ -4528,13 +3874,13 @@ function BannerSurveyIncentive({
|
|
|
4528
3874
|
actionsClassName,
|
|
4529
3875
|
dismissButtonClassName
|
|
4530
3876
|
}) {
|
|
4531
|
-
const [isVisible, setIsVisible] =
|
|
3877
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
4532
3878
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4533
|
-
const handleDismiss =
|
|
3879
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4534
3880
|
setIsVisible(false);
|
|
4535
3881
|
onDismiss?.();
|
|
4536
3882
|
}, [onDismiss]);
|
|
4537
|
-
const iconContent =
|
|
3883
|
+
const iconContent = React4.useMemo(() => {
|
|
4538
3884
|
if (icon) return icon;
|
|
4539
3885
|
if (!iconName) return null;
|
|
4540
3886
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4546,7 +3892,7 @@ function BannerSurveyIncentive({
|
|
|
4546
3892
|
}
|
|
4547
3893
|
);
|
|
4548
3894
|
}, [icon, iconName, iconClassName]);
|
|
4549
|
-
const actionsContent =
|
|
3895
|
+
const actionsContent = React4.useMemo(() => {
|
|
4550
3896
|
if (actionsSlot) return actionsSlot;
|
|
4551
3897
|
if (!actions || actions.length === 0) return null;
|
|
4552
3898
|
return actions.map((action, index) => {
|
|
@@ -4574,15 +3920,15 @@ function BannerSurveyIncentive({
|
|
|
4574
3920
|
);
|
|
4575
3921
|
});
|
|
4576
3922
|
}, [actions, actionsSlot]);
|
|
4577
|
-
const dismissIconContent =
|
|
3923
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4578
3924
|
if (dismissIcon) return dismissIcon;
|
|
4579
3925
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4580
3926
|
}, [dismissIcon]);
|
|
4581
|
-
const titleContent =
|
|
3927
|
+
const titleContent = React4.useMemo(() => {
|
|
4582
3928
|
if (!title) return null;
|
|
4583
3929
|
return typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: titleClassName, children: title });
|
|
4584
3930
|
}, [title, titleClassName]);
|
|
4585
|
-
const descriptionContent =
|
|
3931
|
+
const descriptionContent = React4.useMemo(() => {
|
|
4586
3932
|
if (!description) return null;
|
|
4587
3933
|
return typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-muted-foreground", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: descriptionClassName, children: description });
|
|
4588
3934
|
}, [description, descriptionClassName]);
|
|
@@ -4692,7 +4038,7 @@ function FooterCopyright({
|
|
|
4692
4038
|
copyright,
|
|
4693
4039
|
className
|
|
4694
4040
|
}) {
|
|
4695
|
-
const currentYear =
|
|
4041
|
+
const currentYear = React4.useMemo(() => (/* @__PURE__ */ new Date()).getFullYear(), []);
|
|
4696
4042
|
if (!copyright) {
|
|
4697
4043
|
return null;
|
|
4698
4044
|
}
|
|
@@ -5204,8 +4550,8 @@ var BrandAttribution = ({
|
|
|
5204
4550
|
}
|
|
5205
4551
|
const { prefix = "", anchorText, href, suffix = "" } = options[optionIndex];
|
|
5206
4552
|
const ContainerEl = variant;
|
|
5207
|
-
const [trackedHref, setTrackedHref] =
|
|
5208
|
-
|
|
4553
|
+
const [trackedHref, setTrackedHref] = React4__namespace.useState(href);
|
|
4554
|
+
React4__namespace.useEffect(() => {
|
|
5209
4555
|
setTrackedHref(buildTrackedHref(href));
|
|
5210
4556
|
}, [href]);
|
|
5211
4557
|
return /* @__PURE__ */ jsxRuntime.jsxs(ContainerEl, { className: containerClassName, children: [
|
|
@@ -5325,7 +4671,7 @@ function FooterSocialNewsletter({
|
|
|
5325
4671
|
patternOpacity,
|
|
5326
4672
|
optixFlowConfig
|
|
5327
4673
|
}) {
|
|
5328
|
-
const renderForm =
|
|
4674
|
+
const renderForm = React4__namespace.useMemo(() => {
|
|
5329
4675
|
if (!formEngineSetup) return null;
|
|
5330
4676
|
const action = {
|
|
5331
4677
|
variant: "default",
|
|
@@ -5478,14 +4824,14 @@ function FooterSocialApps({
|
|
|
5478
4824
|
patternOpacity,
|
|
5479
4825
|
optixFlowConfig
|
|
5480
4826
|
}) {
|
|
5481
|
-
const sectionsContent =
|
|
4827
|
+
const sectionsContent = React4.useMemo(() => {
|
|
5482
4828
|
if (!sections || sections.length === 0) return null;
|
|
5483
4829
|
return sections.map((section, sectionIdx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 md:mt-0", children: [
|
|
5484
4830
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-4 font-bold", children: section.title }),
|
|
5485
4831
|
/* @__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)) })
|
|
5486
4832
|
] }, sectionIdx));
|
|
5487
4833
|
}, [sections]);
|
|
5488
|
-
const socialLinksContent =
|
|
4834
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
5489
4835
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
5490
4836
|
return socialLinks.map((social, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "font-medium", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5491
4837
|
SocialLinkIcon,
|
|
@@ -5500,7 +4846,7 @@ function FooterSocialApps({
|
|
|
5500
4846
|
}
|
|
5501
4847
|
) }, idx));
|
|
5502
4848
|
}, [socialLinks, background]);
|
|
5503
|
-
const appLinksContent =
|
|
4849
|
+
const appLinksContent = React4.useMemo(() => {
|
|
5504
4850
|
if (!appLinks || appLinks.length === 0) return null;
|
|
5505
4851
|
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(
|
|
5506
4852
|
"span",
|
|
@@ -5589,7 +4935,7 @@ function FooterSimpleCentered({
|
|
|
5589
4935
|
patternOpacity,
|
|
5590
4936
|
optixFlowConfig
|
|
5591
4937
|
}) {
|
|
5592
|
-
const sitemapContent =
|
|
4938
|
+
const sitemapContent = React4.useMemo(() => {
|
|
5593
4939
|
if (!sitemap || sitemap.length === 0) return null;
|
|
5594
4940
|
return sitemap.map((section) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(sitemapSectionClassName), children: [
|
|
5595
4941
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("mb-4 text-sm font-semibold", sitemapTitleClassName), children: section.title }),
|
|
@@ -5612,9 +4958,9 @@ function FooterSimpleCentered({
|
|
|
5612
4958
|
sitemapLinksClassName,
|
|
5613
4959
|
sitemapLinkClassName
|
|
5614
4960
|
]);
|
|
5615
|
-
const bottomLinksContent =
|
|
4961
|
+
const bottomLinksContent = React4.useMemo(() => {
|
|
5616
4962
|
if (!bottomLinks || bottomLinks.length === 0) return null;
|
|
5617
|
-
return bottomLinks.map((link, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4963
|
+
return bottomLinks.map((link, idx) => /* @__PURE__ */ jsxRuntime.jsx(React4__namespace.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5618
4964
|
Pressable,
|
|
5619
4965
|
{
|
|
5620
4966
|
href: link.href,
|
|
@@ -5939,7 +5285,7 @@ function FooterNewsletterGrid({
|
|
|
5939
5285
|
patternOpacity,
|
|
5940
5286
|
optixFlowConfig
|
|
5941
5287
|
}) {
|
|
5942
|
-
const sectionsContent =
|
|
5288
|
+
const sectionsContent = React4.useMemo(() => {
|
|
5943
5289
|
if (!sections || sections.length === 0) return null;
|
|
5944
5290
|
return sections.map((section, sectionIdx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-2 md:col-span-1", children: [
|
|
5945
5291
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-5 font-medium", children: section.title }),
|
|
@@ -5953,7 +5299,7 @@ function FooterNewsletterGrid({
|
|
|
5953
5299
|
)) })
|
|
5954
5300
|
] }, sectionIdx));
|
|
5955
5301
|
}, [sections]);
|
|
5956
|
-
const socialLinksContent =
|
|
5302
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
5957
5303
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
5958
5304
|
return socialLinks.map((social, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5959
5305
|
SocialLinkIcon,
|
|
@@ -6469,7 +5815,7 @@ function FooterBackgroundCard({
|
|
|
6469
5815
|
patternOpacity,
|
|
6470
5816
|
optixFlowConfig
|
|
6471
5817
|
}) {
|
|
6472
|
-
const sectionStyle =
|
|
5818
|
+
const sectionStyle = React4.useMemo(
|
|
6473
5819
|
() => backgroundImage ? { backgroundImage: `url('${backgroundImage}')` } : void 0,
|
|
6474
5820
|
[backgroundImage]
|
|
6475
5821
|
);
|
|
@@ -6743,7 +6089,7 @@ function FooterAnimatedSocial({
|
|
|
6743
6089
|
pattern,
|
|
6744
6090
|
patternOpacity
|
|
6745
6091
|
}) {
|
|
6746
|
-
const socialLinksContent =
|
|
6092
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
6747
6093
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
6748
6094
|
return socialLinks.map((link, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6749
6095
|
framerMotion.motion.div,
|
|
@@ -6961,7 +6307,7 @@ function FooterNewsletterMinimal({
|
|
|
6961
6307
|
buttonAction,
|
|
6962
6308
|
formSlot
|
|
6963
6309
|
}) {
|
|
6964
|
-
const navLinksContent =
|
|
6310
|
+
const navLinksContent = React4__namespace.useMemo(() => {
|
|
6965
6311
|
if (!navLinks || navLinks.length === 0) return null;
|
|
6966
6312
|
return navLinks.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6967
6313
|
Pressable,
|
|
@@ -6972,7 +6318,7 @@ function FooterNewsletterMinimal({
|
|
|
6972
6318
|
}
|
|
6973
6319
|
) }, idx));
|
|
6974
6320
|
}, [navLinks, navLinkClassName]);
|
|
6975
|
-
const socialLinksContent =
|
|
6321
|
+
const socialLinksContent = React4__namespace.useMemo(() => {
|
|
6976
6322
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
6977
6323
|
return socialLinks.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6978
6324
|
SocialLinkIcon,
|
|
@@ -6988,7 +6334,7 @@ function FooterNewsletterMinimal({
|
|
|
6988
6334
|
}
|
|
6989
6335
|
) }, idx));
|
|
6990
6336
|
}, [socialLinks, socialLinkClassName]);
|
|
6991
|
-
const footerLinksContent =
|
|
6337
|
+
const footerLinksContent = React4__namespace.useMemo(() => {
|
|
6992
6338
|
if (!footerLinks || footerLinks.length === 0) return null;
|
|
6993
6339
|
return footerLinks.map((item) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6994
6340
|
Pressable,
|
|
@@ -7002,7 +6348,7 @@ function FooterNewsletterMinimal({
|
|
|
7002
6348
|
}
|
|
7003
6349
|
) }, item.label));
|
|
7004
6350
|
}, [footerLinks, footerLinkClassName]);
|
|
7005
|
-
const renderForm =
|
|
6351
|
+
const renderForm = React4__namespace.useMemo(() => {
|
|
7006
6352
|
if (formSlot) return formSlot;
|
|
7007
6353
|
if (!formEngineSetup) return null;
|
|
7008
6354
|
const defaultButtonAction = {
|
|
@@ -7237,7 +6583,7 @@ function FooterCtaSocial({
|
|
|
7237
6583
|
pattern,
|
|
7238
6584
|
patternOpacity
|
|
7239
6585
|
}) {
|
|
7240
|
-
const socialLinksContent =
|
|
6586
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
7241
6587
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
7242
6588
|
return socialLinks.map((link) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7243
6589
|
SocialLinkIcon,
|
|
@@ -7355,7 +6701,7 @@ function FooterNavSocial({
|
|
|
7355
6701
|
patternOpacity,
|
|
7356
6702
|
optixFlowConfig
|
|
7357
6703
|
}) {
|
|
7358
|
-
const sectionsContent =
|
|
6704
|
+
const sectionsContent = React4.useMemo(() => {
|
|
7359
6705
|
if (!sections || sections.length === 0) return null;
|
|
7360
6706
|
return sections.map((section, sectionIdx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(navSectionClassName), children: [
|
|
7361
6707
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("mb-4 font-semibold", navTitleClassName), children: section.title }),
|
|
@@ -7368,7 +6714,7 @@ function FooterNavSocial({
|
|
|
7368
6714
|
navLinksClassName,
|
|
7369
6715
|
navLinkClassName
|
|
7370
6716
|
]);
|
|
7371
|
-
const socialLinksContent =
|
|
6717
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
7372
6718
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
7373
6719
|
return socialLinks.map((social, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7374
6720
|
SocialLinkIcon,
|
|
@@ -7383,7 +6729,7 @@ function FooterNavSocial({
|
|
|
7383
6729
|
}
|
|
7384
6730
|
) }, idx));
|
|
7385
6731
|
}, [socialLinks, socialLinkClassName]);
|
|
7386
|
-
const legalLinksContent =
|
|
6732
|
+
const legalLinksContent = React4.useMemo(() => {
|
|
7387
6733
|
if (!legalLinks || legalLinks.length === 0) return null;
|
|
7388
6734
|
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));
|
|
7389
6735
|
}, [legalLinks, legalLinkClassName]);
|
|
@@ -7590,7 +6936,6 @@ exports.FooterNewsletterMinimal = FooterNewsletterMinimal;
|
|
|
7590
6936
|
exports.FooterSimpleCentered = FooterSimpleCentered;
|
|
7591
6937
|
exports.FooterSocialApps = FooterSocialApps;
|
|
7592
6938
|
exports.FooterSocialNewsletter = FooterSocialNewsletter;
|
|
7593
|
-
exports.GeoMap = GeoMap;
|
|
7594
6939
|
exports.ImageSlider = ImageSlider;
|
|
7595
6940
|
exports.MediaHoverCtas = MediaHoverCtas;
|
|
7596
6941
|
exports.PageHeroBanner = PageHeroBanner;
|