@ekoru/ui 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ekoru/ui
2
2
 
3
+ ## 0.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - cb6bfc9: refactor for informational website
8
+
3
9
  ## 0.1.5
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -193,15 +193,26 @@ interface ModalProps extends VariantProps<typeof modalVariants> {
193
193
  }
194
194
  declare function Modal({ isOpen, onClose, children, title, size, showCloseButton, closeOnOverlayClick, closeOnEscape, className, }: ModalProps): React$1.ReactPortal | null;
195
195
 
196
+ interface NavigationLinkProps {
197
+ id: string;
198
+ label: string;
199
+ isAnchor?: boolean;
200
+ href?: string;
201
+ }
202
+ interface MobileNavigationLinkProps {
203
+ title: string;
204
+ links: NavigationLinkProps[];
205
+ }
196
206
  interface NavbarProps {
197
207
  brand?: React__default.ReactNode;
198
- navigationIcons?: React__default.ReactNode;
199
- navigationLinks?: React__default.ReactNode;
208
+ navigationLinks?: NavigationLinkProps[];
209
+ mobileMenuNavigationLinks?: MobileNavigationLinkProps[];
210
+ appNavigationItems?: React__default.ReactNode;
211
+ mobileMenuAppNavigationItems?: React__default.ReactNode;
200
212
  searchPlaceholder?: string;
201
213
  onSearch?: (query: string) => void;
202
- mobileMenuContent?: React__default.ReactNode;
203
- className?: string;
204
214
  searchEnabled?: boolean;
215
+ className?: string;
205
216
  sideMenuTitle?: string;
206
217
  navbarAriaLabel?: string;
207
218
  userActionsAriaLabel?: string;
@@ -209,7 +220,7 @@ interface NavbarProps {
209
220
  closeMobileMenuAriaLabel?: string;
210
221
  mobileMenuTitleAriaLabel?: string;
211
222
  }
212
- declare function Navbar({ navigationIcons, navigationLinks, brand, searchPlaceholder, onSearch, mobileMenuContent, className, searchEnabled, sideMenuTitle, navbarAriaLabel, userActionsAriaLabel, toggleMobileMenuAriaLabel, closeMobileMenuAriaLabel, mobileMenuTitleAriaLabel, }: NavbarProps): react_jsx_runtime.JSX.Element;
223
+ declare function Navbar({ brand, navigationLinks, mobileMenuNavigationLinks, appNavigationItems, mobileMenuAppNavigationItems, searchPlaceholder, onSearch, className, searchEnabled, sideMenuTitle, navbarAriaLabel, userActionsAriaLabel, toggleMobileMenuAriaLabel, closeMobileMenuAriaLabel, mobileMenuTitleAriaLabel, }: NavbarProps): react_jsx_runtime.JSX.Element;
213
224
 
214
225
  declare const paginationButtonVariants: (props?: ({
215
226
  variant?: "primary" | "outline" | "default" | null | undefined;
@@ -871,4 +882,4 @@ declare const Title: React$1.ForwardRefExoticComponent<TitleProps & React$1.RefA
871
882
  */
872
883
  declare function cn(...inputs: ClassValue[]): string;
873
884
 
874
- export { AdBanner, type AdBannerProps, type BackSideProps, Banner, type BannerProps, Button, type ButtonProps, Card, CardBackSide, CardFrontSide, type CardProps, Carousel, type CarouselProps, Checkbox, type CheckboxProps, type Column, EnvironmentalImpactModal, type EnvironmentalImpactModalProps, Footer, type FooterProps, type FrontSideProps, HeroCarousel, type HeroCarouselProps, Modal, type ModalProps, Navbar, type NavbarProps, type Option, Pagination, type PaginationProps, ProductCard, type ProductCardProps, Select, type SelectProps, StatsCard, type StatsCardProps, Table, type TableProps, Text, TextInput, type TextInputProps, type TextProps, Textarea, type TextareaProps, Title, type TitleProps, bannerVariants, buttonVariants, checkboxVariants, cn, inputVariants, paginationButtonVariants, selectVariants, tableVariants, textVariants, textareaVariants, titleVariants };
885
+ export { AdBanner, type AdBannerProps, type BackSideProps, Banner, type BannerProps, Button, type ButtonProps, Card, CardBackSide, CardFrontSide, type CardProps, Carousel, type CarouselProps, Checkbox, type CheckboxProps, type Column, EnvironmentalImpactModal, type EnvironmentalImpactModalProps, Footer, type FooterProps, type FrontSideProps, HeroCarousel, type HeroCarouselProps, type MobileNavigationLinkProps, Modal, type ModalProps, Navbar, type NavbarProps, type NavigationLinkProps, type Option, Pagination, type PaginationProps, ProductCard, type ProductCardProps, Select, type SelectProps, StatsCard, type StatsCardProps, Table, type TableProps, Text, TextInput, type TextInputProps, type TextProps, Textarea, type TextareaProps, Title, type TitleProps, bannerVariants, buttonVariants, checkboxVariants, cn, inputVariants, paginationButtonVariants, selectVariants, tableVariants, textVariants, textareaVariants, titleVariants };
package/dist/index.d.ts CHANGED
@@ -193,15 +193,26 @@ interface ModalProps extends VariantProps<typeof modalVariants> {
193
193
  }
194
194
  declare function Modal({ isOpen, onClose, children, title, size, showCloseButton, closeOnOverlayClick, closeOnEscape, className, }: ModalProps): React$1.ReactPortal | null;
195
195
 
196
+ interface NavigationLinkProps {
197
+ id: string;
198
+ label: string;
199
+ isAnchor?: boolean;
200
+ href?: string;
201
+ }
202
+ interface MobileNavigationLinkProps {
203
+ title: string;
204
+ links: NavigationLinkProps[];
205
+ }
196
206
  interface NavbarProps {
197
207
  brand?: React__default.ReactNode;
198
- navigationIcons?: React__default.ReactNode;
199
- navigationLinks?: React__default.ReactNode;
208
+ navigationLinks?: NavigationLinkProps[];
209
+ mobileMenuNavigationLinks?: MobileNavigationLinkProps[];
210
+ appNavigationItems?: React__default.ReactNode;
211
+ mobileMenuAppNavigationItems?: React__default.ReactNode;
200
212
  searchPlaceholder?: string;
201
213
  onSearch?: (query: string) => void;
202
- mobileMenuContent?: React__default.ReactNode;
203
- className?: string;
204
214
  searchEnabled?: boolean;
215
+ className?: string;
205
216
  sideMenuTitle?: string;
206
217
  navbarAriaLabel?: string;
207
218
  userActionsAriaLabel?: string;
@@ -209,7 +220,7 @@ interface NavbarProps {
209
220
  closeMobileMenuAriaLabel?: string;
210
221
  mobileMenuTitleAriaLabel?: string;
211
222
  }
212
- declare function Navbar({ navigationIcons, navigationLinks, brand, searchPlaceholder, onSearch, mobileMenuContent, className, searchEnabled, sideMenuTitle, navbarAriaLabel, userActionsAriaLabel, toggleMobileMenuAriaLabel, closeMobileMenuAriaLabel, mobileMenuTitleAriaLabel, }: NavbarProps): react_jsx_runtime.JSX.Element;
223
+ declare function Navbar({ brand, navigationLinks, mobileMenuNavigationLinks, appNavigationItems, mobileMenuAppNavigationItems, searchPlaceholder, onSearch, className, searchEnabled, sideMenuTitle, navbarAriaLabel, userActionsAriaLabel, toggleMobileMenuAriaLabel, closeMobileMenuAriaLabel, mobileMenuTitleAriaLabel, }: NavbarProps): react_jsx_runtime.JSX.Element;
213
224
 
214
225
  declare const paginationButtonVariants: (props?: ({
215
226
  variant?: "primary" | "outline" | "default" | null | undefined;
@@ -871,4 +882,4 @@ declare const Title: React$1.ForwardRefExoticComponent<TitleProps & React$1.RefA
871
882
  */
872
883
  declare function cn(...inputs: ClassValue[]): string;
873
884
 
874
- export { AdBanner, type AdBannerProps, type BackSideProps, Banner, type BannerProps, Button, type ButtonProps, Card, CardBackSide, CardFrontSide, type CardProps, Carousel, type CarouselProps, Checkbox, type CheckboxProps, type Column, EnvironmentalImpactModal, type EnvironmentalImpactModalProps, Footer, type FooterProps, type FrontSideProps, HeroCarousel, type HeroCarouselProps, Modal, type ModalProps, Navbar, type NavbarProps, type Option, Pagination, type PaginationProps, ProductCard, type ProductCardProps, Select, type SelectProps, StatsCard, type StatsCardProps, Table, type TableProps, Text, TextInput, type TextInputProps, type TextProps, Textarea, type TextareaProps, Title, type TitleProps, bannerVariants, buttonVariants, checkboxVariants, cn, inputVariants, paginationButtonVariants, selectVariants, tableVariants, textVariants, textareaVariants, titleVariants };
885
+ export { AdBanner, type AdBannerProps, type BackSideProps, Banner, type BannerProps, Button, type ButtonProps, Card, CardBackSide, CardFrontSide, type CardProps, Carousel, type CarouselProps, Checkbox, type CheckboxProps, type Column, EnvironmentalImpactModal, type EnvironmentalImpactModalProps, Footer, type FooterProps, type FrontSideProps, HeroCarousel, type HeroCarouselProps, type MobileNavigationLinkProps, Modal, type ModalProps, Navbar, type NavbarProps, type NavigationLinkProps, type Option, Pagination, type PaginationProps, ProductCard, type ProductCardProps, Select, type SelectProps, StatsCard, type StatsCardProps, Table, type TableProps, Text, TextInput, type TextInputProps, type TextProps, Textarea, type TextareaProps, Title, type TitleProps, bannerVariants, buttonVariants, checkboxVariants, cn, inputVariants, paginationButtonVariants, selectVariants, tableVariants, textVariants, textareaVariants, titleVariants };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- 'use strict';var L=require('react'),classVarianceAuthority=require('class-variance-authority'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),react=require('motion/react'),jsxRuntime=require('react/jsx-runtime'),lucideReact=require('lucide-react'),reactDom=require('react-dom');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var L__namespace=/*#__PURE__*/_interopNamespace(L);function e(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var zt=classVarianceAuthority.cva("w-full border-t border-b overflow-hidden rounded-none",{variants:{variant:{primary:"bg-gradient-to-r from-primary-dark via-primary to-primary-dark text-white",secondary:"bg-gradient-to-r from-secondary-dark via-secondary to-secondary-dark text-white",outlined:"bg-background border border-primary text-foreground",ghost:"bg-white/50 text-foreground"},animated:{true:"",false:""}},defaultVariants:{variant:"primary",animated:true}}),$e=L__namespace.forwardRef(({icon:t,title:a,description:s,cta:o,variant:r,animated:n,className:l,...d},u)=>{let g=react.motion.div,f=t;return jsxRuntime.jsx(g,{ref:u,initial:{opacity:0,y:-8},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{duration:.45},className:e(zt({variant:r,animated:n}),"p-4 md:p-5",l),...d,children:jsxRuntime.jsxs(react.motion.div,{className:e("flex flex-col sm:flex-row","items-center","gap-4 py-2 px-2","justify-between"),children:[jsxRuntime.jsxs(react.motion.div,{className:e("flex flex-col","items-center sm:items-start","justify-center"),children:[f&&jsxRuntime.jsx(react.motion.div,{className:e("w-20 h-20","flex items-center justify-center","rounded-lg","mb-2",{"bg-white/10":r==="primary"||r==="secondary","bg-primary/10":r==="outlined"||r==="ghost"}),children:jsxRuntime.jsx(f,{className:e("w-10 h-10",{"text-white":r==="primary"||r==="secondary","text-primary":r==="outlined"||r==="ghost"})})}),a&&jsxRuntime.jsx(react.motion.h3,{className:e("text-lg font-bold","text-center sm:text-left","mb-1"),children:a}),s&&jsxRuntime.jsx(react.motion.p,{className:e("text-sm text-center sm:text-left","text-muted","mb-0"),children:s})]}),jsxRuntime.jsx(react.motion.div,{className:e("flex items-center justify-center"),children:o})]})})});$e.displayName="AdBanner";var Ot=$e;var qe=classVarianceAuthority.cva("p-4 md:p-5 rounded-xl w-[95%] mx-auto overflow-hidden relative",{variants:{variant:{primary:"border-2 border-transparent bg-gradient-to-r from-primary-dark via-primary to-primary-dark text-white shadow-lg",secondary:"border-2 border-transparent bg-gradient-to-r from-secondary-dark via-secondary to-secondary-dark text-white shadow-lg",outlined:"border-2 border-primary shadow-lg bg-background backdrop-blur",ghost:"border-2 border-transparent bg-white/50 backdrop-blur"},animated:{true:"",false:""}},defaultVariants:{variant:"primary",animated:true}}),Ge=classVarianceAuthority.cva("w-3 h-3 rounded-full inline-block",{variants:{variant:{primary:"bg-white shadow-lg shadow-white/50",secondary:"bg-white",outlined:"bg-primary",ghost:"bg-gray-600"}},defaultVariants:{variant:"primary"}}),Ue=L__namespace.forwardRef(({className:t,variant:a,animated:s,title:o,description:r,showDots:n=true,...l},d)=>{let u=react.motion.div;return jsxRuntime.jsxs(u,{ref:d,initial:{opacity:0,y:-20},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{duration:.6},className:e(qe({variant:a,animated:s,className:t})),...l,children:[s&&a==="primary"&&jsxRuntime.jsx(react.motion.div,{animate:{x:["-100%","100%"]},transition:{duration:15,repeat:1/0,ease:"linear"},className:e("absolute inset-0","bg-gradient-to-r from-transparent via-white/10 to-transparent")}),jsxRuntime.jsxs(react.motion.div,{className:"relative z-10",children:[jsxRuntime.jsxs(react.motion.div,{className:e("flex flex-1 justify-center items-center","gap-2 md:gap-3","mb-3"),children:[n&&jsxRuntime.jsx(react.motion.span,{initial:{scale:0},whileInView:{scale:1},viewport:{once:true},transition:{delay:.2,type:"spring"},className:e(Ge({variant:a}))}),jsxRuntime.jsx(react.motion.h2,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:true},transition:{delay:.3},className:e("text-base sm:text-lg md:text-2xl","font-bold","text-center","tracking-tight"),children:o}),n&&jsxRuntime.jsx(react.motion.span,{initial:{scale:0},whileInView:{scale:1},viewport:{once:true},transition:{delay:.4,type:"spring"},className:e(Ge({variant:a}))})]}),jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{delay:.5},className:e("text-sm sm:text-base md:text-lg","text-center","leading-snug md:leading-normal","font-light"),children:r})]})]})});Ue.displayName="Banner";var Xe=classVarianceAuthority.cva("min-w-[140px] rounded-lg font-medium shadow-md transition-all duration-200 flex items-center justify-center space-x-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"border-2 border-primary bg-primary text-white hover:bg-primary/90 active:bg-primary/80 shadow-md",secondary:"border-2 border-secondary bg-secondary text-white hover:bg-secondary/90 active:bg-secondary/80",secondary_outline:"border-2 border-secondary bg-white text-secondary hover:bg-white/90 active:bg-white/80",outline:"border-2 border-primary text-primary hover:bg-primary/5 hover:text-accent-foreground active:bg-primary/10",ghost:"hover:bg-muted active:bg-muted/80 text-foreground",success:"border-2 border-success bg-success text-white hover:bg-success/90 active:bg-success/80 shadow-md",warning:"border-2 border-warning bg-warning text-white hover:bg-warning/90 active:bg-warning/80 shadow-md",error:"border-2 border-error bg-error text-white hover:bg-error/90 active:bg-error/80 shadow-md"},size:{sm:"min-h-[36px] px-2 py-2 text-sm",md:"min-h-[44px] px-6 py-2.5 text-base",lg:"min-h-[56px] px-8 py-3 text-lg"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"primary",size:"md"}}),ne=L__namespace.forwardRef(({className:t,variant:a,size:s,fullWidth:o,isLoading:r,leftIcon:n,rightIcon:l,children:d,disabled:u,loadingText:g="Loading...",...f},i)=>{let m=react.motion.button;return jsxRuntime.jsxs(m,{className:e(Xe({variant:a,size:s,fullWidth:o,className:t})),ref:i,disabled:u||r,whileHover:{scale:1.02,y:-2},whileTap:{scale:.96,y:0},transition:{type:"spring",stiffness:400,damping:17},...f,children:[jsxRuntime.jsxs(react.AnimatePresence,{mode:"wait",children:[r&&jsxRuntime.jsx(react.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex items-center space-x-2",children:jsxRuntime.jsx(lucideReact.Loader2,{className:"w-5 h-5 animate-spin mr-2"})},"loading"),!r&&n&&jsxRuntime.jsx(react.motion.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},className:"mr-2 inline-flex items-center justify-center flex-shrink-0",children:L__namespace.isValidElement(n)?n:L__namespace.createElement(n,{size:18,className:"flex-shrink-0"})},"leftIcon")]}),r?g:d,!r&&l&&jsxRuntime.jsx("span",{className:"ml-2 inline-flex items-center justify-center flex-shrink-0",children:L__namespace.isValidElement(l)?l:L__namespace.createElement(l,{size:18,className:"flex-shrink-0"})})]})});ne.displayName="Button";function Ye({image:t,title:a,description:s,cta:o,hasBadge:r,badgeText:n,badgeColor:l="bg-primary",textColor:d="text-white"}){return jsxRuntime.jsxs(react.motion.article,{className:e("w-64","bg-white","rounded-lg","overflow-hidden","shadow-md","relative"),children:[jsxRuntime.jsx(react.motion.div,{className:"h-40 w-full overflow-hidden",children:t||jsxRuntime.jsx(react.motion.div,{className:e("h-40 w-full","bg-gray-200","flex items-center justify-center"),children:jsxRuntime.jsx(react.motion.span,{className:"text-gray-500",children:jsxRuntime.jsx(lucideReact.Image,{})})})}),r&&n&&jsxRuntime.jsx(react.motion.div,{className:e("absolute top-2 left-2","text-xs","font-semibold","px-4 py-1","rounded-lg","shadow-md",l,d),children:n}),jsxRuntime.jsxs(react.motion.div,{className:"p-4",children:[jsxRuntime.jsx(react.motion.h3,{className:e("text-lg","font-semibold","text-gray-900","dark:text-stone-100"),children:a}),s&&jsxRuntime.jsx(react.motion.p,{className:e("text-sm","text-gray-600","dark:text-stone-400","mt-2"),children:s}),o&&jsxRuntime.jsx(react.motion.div,{className:"mt-2",children:o})]})]})}var Yt=classVarianceAuthority.cva("py-8",{variants:{variant:{default:"",compact:"py-4",centered:""}},defaultVariants:{variant:"default"}});function Ze({header:t,description:a,link:s,items:o,children:r,variant:n,className:l,...d}){let u=L.useRef(null),[g,f]=L.useState(false),[i,m]=L.useState(false),v=L.useCallback(()=>{let y=u.current;y&&(f(y.scrollLeft>0),m(y.scrollLeft<y.scrollWidth-y.clientWidth-1));},[]);L.useEffect(()=>{v();let y=u.current;if(y)return y.addEventListener("scroll",v),window.addEventListener("resize",v),()=>{y.removeEventListener("scroll",v),window.removeEventListener("resize",v);}},[v,o,r]);let x=y=>{let w=u.current;w&&w.scrollTo({left:w.scrollLeft+y,behavior:"smooth"});},c=()=>x(-(u.current?.clientWidth??300)*.8),b=()=>x((u.current?.clientWidth??300)*.8),N=Array.isArray(o)&&o.length>0;return jsxRuntime.jsx("section",{className:e(Yt({variant:n}),l),...d,children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[jsxRuntime.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between mb-4 items-start gap-2",children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-start gap-1",children:[t&&jsxRuntime.jsx("h2",{className:"font-bold",children:t}),a&&jsxRuntime.jsx("p",{className:"text-sm text-text-muted",children:a})]}),s&&jsxRuntime.jsx("div",{children:s})]}),jsxRuntime.jsxs("div",{className:"relative",children:[g&&jsxRuntime.jsx("button",{"aria-label":"Scroll left",onClick:c,className:"absolute left-0 top-1/2 -translate-y-1/2 z-10 p-2 rounded-full bg-background/70 backdrop-blur hover:scale-105 transition-transform",children:jsxRuntime.jsx(lucideReact.ArrowLeft,{className:"w-5 h-5"})}),i&&jsxRuntime.jsx("button",{"aria-label":"Scroll right",onClick:b,className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 p-2 rounded-full bg-background/70 backdrop-blur hover:scale-105 transition-transform",children:jsxRuntime.jsx(lucideReact.ArrowRight,{className:"w-5 h-5"})}),jsxRuntime.jsx("div",{ref:u,className:"flex gap-4 overflow-x-auto pb-4 scrollbar-hide scroll-smooth",role:"list",children:N?o.map((y,w)=>jsxRuntime.jsx("div",{className:"flex-shrink-0",children:y},L__namespace.default.isValidElement(y)?y.key??w:w)):r})]})]})})}var er=classVarianceAuthority.cva("relative rounded-md border-2 flex items-center justify-center transition-all duration-200 cursor-pointer",{variants:{variant:{default:"border-input-border hover:border-primary/50",filled:"border-transparent bg-background-secondary",outline:"border-primary bg-transparent"},size:{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},checked:{true:"bg-primary border-primary",false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{variant:"default",size:"md",checked:false,disabled:false}}),tr=L__namespace.forwardRef(({className:t,variant:a,size:s="md",label:o,description:r,errorMessage:n,checked:l=false,disabled:d=false,onCheckedChange:u,onChange:g,id:f,name:i,...m},v)=>{let x={sm:12,md:16,lg:20},c=y=>{let w=y.target.checked;u?.(w),g?.(y);},b=L__namespace.useId(),N=f||i||`checkbox-${b}`;return jsxRuntime.jsxs(react.motion.div,{className:"space-y-1",children:[jsxRuntime.jsxs(react.motion.div,{className:"flex items-start space-x-3",children:[jsxRuntime.jsxs(react.motion.div,{className:"relative",children:[jsxRuntime.jsx(react.motion.button,{type:"button",onClick:()=>!d&&u?.(!l),disabled:d,className:e(er({variant:a,size:s,checked:l,disabled:d,className:t})),whileTap:d?{}:{scale:.95},children:jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:l?1:0,scale:l?1:.5},transition:{duration:.2},children:jsxRuntime.jsx(lucideReact.Check,{size:x[s||"md"],className:"text-white"})})}),jsxRuntime.jsx("input",{ref:v,id:N,name:i,type:"checkbox",checked:l,onChange:c,disabled:d,className:"sr-only",...m})]}),o&&jsxRuntime.jsxs(react.motion.div,{className:"flex-1",children:[jsxRuntime.jsx(react.motion.label,{htmlFor:N,className:e("text-sm font-medium cursor-pointer",d?"text-foreground-tertiary cursor-not-allowed":"text-foreground",n&&"text-error"),children:o}),r&&jsxRuntime.jsx(react.motion.p,{className:"text-sm text-foreground-tertiary mt-1",children:r})]})]}),n&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"text-xs text-error ml-8",children:n})]})});tr.displayName="Checkbox";var sr=classVarianceAuthority.cva("relative w-full max-h-[90vh] rounded-lg shadow-2xl overflow-hidden z-10",{variants:{size:{sm:"max-w-md",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-7xl"}},defaultVariants:{size:"md"}});function ve({isOpen:t,onClose:a,children:s,title:o,size:r="md",showCloseButton:n=true,closeOnOverlayClick:l=true,closeOnEscape:d=true,className:u}){return L.useEffect(()=>{let g=f=>{f.key==="Escape"&&d&&a?.();};if(t){document.addEventListener("keydown",g);let f=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=f||"unset";}}return ()=>{document.removeEventListener("keydown",g);}},[t,a,d]),t?reactDom.createPortal(jsxRuntime.jsx(react.AnimatePresence,{mode:"wait",initial:false,children:t&&jsxRuntime.jsxs(react.motion.div,{transition:{duration:.2},className:e("fixed inset-0 z-[9999]","flex items-center justify-center","p-4"),role:"dialog","aria-modal":"true","aria-labelledby":o?"modal-title":void 0,children:[jsxRuntime.jsx(react.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:e("absolute inset-0","bg-black/60","backdrop-blur-sm"),onClick:l?a:void 0,"aria-label":"Close modal"}),jsxRuntime.jsxs(react.motion.div,{initial:{scale:.9,opacity:0,y:30},animate:{scale:1,opacity:1,y:0},exit:{scale:.9,opacity:0,y:30},transition:{type:"spring",damping:25,stiffness:300},onClick:g=>g.stopPropagation(),className:e(sr({size:r}),"bg-surface border border-border",u),children:[(o||n)&&jsxRuntime.jsxs("div",{className:e("flex items-center justify-between","p-6","border-b border-border"),children:[o&&jsxRuntime.jsx("h3",{id:"modal-title",className:"font-semibold text-lg text-foreground",children:o}),n&&jsxRuntime.jsx("button",{onClick:a,className:e("p-1 rounded-lg text-foreground-secondary","hover:text-foreground hover:bg-background-secondary","transition-colors"),"aria-label":"Close modal",children:jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5"})})]}),jsxRuntime.jsx("div",{className:e("p-6","overflow-y-auto","max-h-[calc(90vh-8rem)]","scrollbar-hide","text-foreground"),children:s})]})]},"modal")}),document.body):null}function ye({isOpen:t,onClose:a,environmentalImpact:s,co2SavingsTitle:o="CO\u2082 Savings",waterSavingsTitle:r="Water Savings",weightLabel:n="Weight",co2SavingsLabel:l="CO\u2082 Saved",waterSavingsLabel:d="Water Saved",materialBreakdownLabel:u="Material Breakdown",carDistanceLabel:g=" by car",showerCountLabel:f=" showers",co2EquivalenceLabel:i="Equivalent to",waterEquivalenceLabel:m="Equivalent to",infoText:v="These values are estimates based on the savings generated by reusing products instead of manufacturing new ones. The calculations consider the average impact of producing each material."}){let x=c=>new Intl.NumberFormat("es-CL",{minimumFractionDigits:1,maximumFractionDigits:1}).format(c);return jsxRuntime.jsx(ve,{isOpen:t,onClose:a,title:"Impacto Ambiental Detallado",size:"md",children:jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsxs("div",{className:e("flex flex-col md:flex-row","gap-4 md:gap-6"),children:[jsxRuntime.jsxs("div",{className:e("bg-success/10 dark:bg-success/20","rounded-lg","p-4","flex-1"),children:[jsxRuntime.jsxs("div",{className:e("flex items-center","gap-2","mb-2"),children:[jsxRuntime.jsx(lucideReact.Leaf,{className:"w-5 h-5 text-success"}),jsxRuntime.jsx("span",{className:e("text-sm font-medium text-text-muted","dark:text-stone-400"),children:o})]}),jsxRuntime.jsxs("p",{className:e("text-2xl font-bold text-success"),children:[x(s.totalCo2SavingsKG)," kg"]}),jsxRuntime.jsxs("p",{className:e("text-xs text-text-muted","dark:text-stone-400","mt-1"),children:[i," ",x(s.totalCo2SavingsKG*4.5)," km",g]})]}),jsxRuntime.jsxs("div",{className:e("bg-info/10","dark:bg-info/20","rounded-lg","p-4","flex-1"),children:[jsxRuntime.jsxs("div",{className:e("flex","items-center","gap-2","mb-2"),children:[jsxRuntime.jsx(lucideReact.Droplets,{className:"w-5 h-5 text-info"}),jsxRuntime.jsx("span",{className:e("text-sm","font-medium","text-text-muted","dark:text-stone-400"),children:r})]}),jsxRuntime.jsxs("p",{className:e("text-2xl","font-bold","text-info"),children:[x(s.totalWaterSavingsLT)," L"]}),jsxRuntime.jsxs("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mt-1"),children:[m," ",x(s.totalWaterSavingsLT/8)," ",f]})]})]}),s.materialBreakdown.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("h3",{className:e("text-lg","font-bold","text-text-primary","dark:text-stone-100","mb-4","flex","items-center","gap-2"),children:[jsxRuntime.jsx(lucideReact.Info,{className:"w-5 h-5"}),u]}),jsxRuntime.jsx("div",{className:e("space-y-3"),children:s.materialBreakdown.map((c,b)=>jsxRuntime.jsxs("div",{className:e("border","border-neutral/20","dark:border-stone-700","rounded-lg","p-4","hover:bg-neutral/5","dark:hover:bg-stone-800/50","transition-colors"),children:[jsxRuntime.jsxs("div",{className:e("flex","items-center","justify-between","mb-3"),children:[jsxRuntime.jsx("h4",{className:e("font-semibold","text-text-primary","dark:text-stone-100"),children:c.materialType}),jsxRuntime.jsxs("span",{className:e("text-lg","font-bold","text-primary"),children:[c.percentage.toFixed(1),"%"]})]}),jsxRuntime.jsxs("div",{className:e("grid","grid-cols-3","gap-3","text-sm"),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mb-1"),children:n}),jsxRuntime.jsxs("p",{className:e("font-semibold","text-text-secondary","dark:text-stone-300"),children:[x(c.weightKG)," kg"]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mb-1"),children:l}),jsxRuntime.jsxs("p",{className:e("font-semibold","text-success"),children:[x(c.co2SavingsKG)," kg"]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mb-1"),children:d}),jsxRuntime.jsxs("p",{className:e("font-semibold","text-info"),children:[x(c.waterSavingsLT)," L"]})]})]}),jsxRuntime.jsx("div",{className:e("mt-3","h-2","bg-neutral/10","dark:bg-stone-700","rounded-full","overflow-hidden"),children:jsxRuntime.jsx("div",{className:"h-full bg-primary rounded-full transition-all duration-500",style:{width:`${c.percentage}%`}})})]},b))})]}),jsxRuntime.jsx("div",{className:e("bg-primary/5","dark:bg-primary/10","rounded-lg","p-4","text-sm","text-text-secondary","dark:text-stone-300"),children:jsxRuntime.jsxs("p",{className:e("flex","items-start","gap-2"),children:[jsxRuntime.jsx(lucideReact.Info,{className:e("w-4","h-4","mt-0.5","text-primary","flex-shrink-0")}),jsxRuntime.jsx("span",{children:v})]})})]})})}function tt({brand:t,socialLinks:a,description:s,exploreItems:o,exploreLabel:r="Explore",communityItems:n,communityLabel:l="Community",legalItems:d,legalLabel:u="Legal",copyRightText:g="All rights reserved."}){return jsxRuntime.jsx(react.motion.footer,{className:e("bg-gradient-to-r from-primary-dark via-primary to-primary-dark"),children:jsxRuntime.jsxs(react.motion.div,{className:"max-w-7xl mx-auto px-6 py-12",children:[jsxRuntime.jsxs(react.motion.div,{className:"grid grid-cols-1 md:grid-cols-4 gap-8",children:[jsxRuntime.jsxs(react.motion.div,{className:"space-y-4 flex flex-col",children:[t,jsxRuntime.jsx(react.motion.p,{className:"text-sm text-white leading-relaxed",children:s}),a&&jsxRuntime.jsx(react.motion.div,{className:e("flex items-center gap-3"),children:a})]}),o&&jsxRuntime.jsxs(react.motion.div,{children:[jsxRuntime.jsx(react.motion.h3,{className:"font-semibold text-white mb-4",children:r}),jsxRuntime.jsx(react.motion.ul,{className:"space-y-3",children:o&&o.map((f,i)=>jsxRuntime.jsx(react.motion.li,{children:f},i))})]}),n&&jsxRuntime.jsxs(react.motion.div,{children:[jsxRuntime.jsx(react.motion.h3,{className:"font-semibold text-white mb-4",children:l}),jsxRuntime.jsx(react.motion.ul,{className:"space-y-3",children:n&&n.map((f,i)=>jsxRuntime.jsx(react.motion.li,{children:f},i))})]}),d&&jsxRuntime.jsxs(react.motion.div,{children:[jsxRuntime.jsx(react.motion.h3,{className:"font-semibold text-white mb-4",children:u}),jsxRuntime.jsx(react.motion.ul,{className:"space-y-3",children:d&&d.map((f,i)=>jsxRuntime.jsx(react.motion.li,{children:f},i))})]})]}),jsxRuntime.jsx(react.motion.div,{className:"mt-12 pt-8 border-t border-gray-200 dark:border-stone-800",children:jsxRuntime.jsxs(react.motion.p,{className:"text-sm text-center text-white",children:["\xA9 ",new Date().getFullYear()," EKORU. ",g]})})]})})}function at({banners:t,ImageComponent:a,autoScrollInterval:s=5e3}){let[o,r]=L.useState(0),[n,l]=L.useState(false);L.useEffect(()=>{if(n)return;let i=setInterval(()=>{r(m=>(m+1)%t.length);},s);return ()=>clearInterval(i)},[t.length,s,n]);let d=()=>{r(i=>(i+1)%t.length);},u=()=>{r(i=>(i-1+t.length)%t.length);},g=i=>{r(i);},f=a||"img";return jsxRuntime.jsxs("section",{className:"relative overflow-hidden",onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),children:[jsxRuntime.jsx("div",{className:"relative h-[300px] sm:h-[350px] md:h-[400px] lg:h-[500px] xl:h-[600px]",children:t.map((i,m)=>{let v=m===o,x=m<o;return jsxRuntime.jsx("div",{className:`absolute inset-0 transition-transform duration-700 ease-in-out ${v?"translate-x-0 opacity-100":x?"-translate-x-full opacity-0":"translate-x-full opacity-0"}`,"aria-hidden":!v,children:jsxRuntime.jsx("div",{className:`${i.bgColor} h-full flex items-center`,children:jsxRuntime.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-20 py-4 sm:py-6 md:py-6 lg:py-12 w-full",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-6 md:gap-6 lg:gap-8 items-center h-full",children:[jsxRuntime.jsxs("div",{className:"text-white text-center lg:text-left space-y-2 sm:space-y-3 lg:space-y-4",children:[jsxRuntime.jsx("h1",{className:"text-xl sm:text-2xl md:text-3xl lg:text-5xl xl:text-6xl font-bold leading-tight animate-fade-in",children:i.title}),jsxRuntime.jsx("h2",{className:"text-base sm:text-lg md:text-xl lg:text-2xl text-white/90 animate-fade-in-delay-100",children:i.subtitle}),jsxRuntime.jsx("p",{className:"text-xs sm:text-sm md:text-base lg:text-lg text-white/80 max-w-lg mx-auto lg:mx-0 line-clamp-3 animate-fade-in-delay-200",children:i.description}),jsxRuntime.jsx("div",{className:"text-xs sm:text-sm text-white/60 italic pt-2 animate-fade-in-delay-300",children:"Pronto..."})]}),jsxRuntime.jsx("div",{className:"flex justify-center lg:justify-end mt-2 lg:mt-0",children:jsxRuntime.jsx("div",{className:"relative w-24 h-24 sm:w-32 sm:h-32 md:w-48 md:h-48 lg:w-72 lg:h-72 xl:w-80 xl:h-80 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center overflow-hidden transition-transform duration-300 hover:scale-105",children:jsxRuntime.jsx(f,{src:i.image,alt:i.title,width:320,height:320,className:"w-12 h-12 sm:w-16 sm:h-16 md:w-24 md:h-24 lg:w-36 lg:h-36 xl:w-40 xl:h-40 object-contain",...a&&m===0?{priority:true}:{}})})})]})})})},i.id)})}),t.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:u,className:"absolute left-2 sm:left-4 top-1/2 transform -translate-y-1/2 bg-black/30 hover:bg-black/50 text-white p-2 sm:p-3 rounded-full backdrop-blur-sm transition-all duration-200 hover:scale-110 focus:outline-none focus:ring-2 focus:ring-white/50","aria-label":"Previous banner",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"w-4 h-4 sm:w-6 sm:h-6"})}),jsxRuntime.jsx("button",{onClick:d,className:"absolute right-2 sm:right-4 top-1/2 transform -translate-y-1/2 bg-black/30 hover:bg-black/50 text-white p-2 sm:p-3 rounded-full backdrop-blur-sm transition-all duration-200 hover:scale-110 focus:outline-none focus:ring-2 focus:ring-white/50","aria-label":"Next banner",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-4 h-4 sm:w-6 sm:h-6"})})]}),t.length>1&&jsxRuntime.jsx("div",{className:"absolute bottom-3 sm:bottom-6 left-1/2 transform -translate-x-1/2 flex space-x-2",children:t.map((i,m)=>jsxRuntime.jsx("button",{onClick:()=>g(m),className:`w-2 h-2 sm:w-3 sm:h-3 rounded-full transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-white/50 ${m===o?"bg-white w-6 sm:w-8":"bg-white/50 hover:bg-white/70"}`,"aria-label":`Go to banner ${m+1}`,"aria-current":m===o?"true":"false"},m))})]})}function st({navigationIcons:t,navigationLinks:a,brand:s,searchPlaceholder:o="Search...",onSearch:r,mobileMenuContent:n,className:l="",searchEnabled:d=true,sideMenuTitle:u="Menu",navbarAriaLabel:g="Main navigation",userActionsAriaLabel:f="User actions",toggleMobileMenuAriaLabel:i="Toggle mobile menu",closeMobileMenuAriaLabel:m="Close mobile menu",mobileMenuTitleAriaLabel:v="Mobile menu"}){let[x,c]=L.useState(false),[b,N]=L.useState(""),y=()=>c(false),w=P=>{N(P.target.value);},h=P=>{P.preventDefault(),r?.(b);},M=P=>{P.key==="Escape"&&x&&c(false);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("header",{className:e("bg-gradient-to-r from-navbar-dark via-navbar-main to-navbar-dark","sticky top-0 z-50",l),onKeyDown:M,children:jsxRuntime.jsxs("nav",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",role:"navigation","aria-label":g,children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center h-16",children:[jsxRuntime.jsx("div",{className:"flex-shrink-0",children:s||jsxRuntime.jsx("span",{className:"text-xl font-bold text-white",children:"EKORU"})}),d&&jsxRuntime.jsx("div",{className:"hidden md:flex flex-1 max-w-2xl mx-8",role:"search",children:jsxRuntime.jsxs("form",{onSubmit:h,className:"w-full flex items-center relative",children:[jsxRuntime.jsx("input",{id:"search-desktop",name:"search-desktop",type:"search",value:b,onChange:w,placeholder:o,className:e("w-full px-4 py-2","rounded-lg","border border-input-border","bg-input-bg","text-foreground","placeholder:text-foreground-tertiary","focus:outline-none","focus:ring-2","focus:ring-primary","focus:border-transparent")}),jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5 text-primary absolute right-4"})]})}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",role:"toolbar","aria-label":f,children:[t,jsxRuntime.jsx("div",{className:"hidden lg:flex items-center space-x-2",children:a}),jsxRuntime.jsx("button",{onClick:()=>c(!x),className:e("p-2","rounded-lg","text-white","hover:bg-primary/30","transition-colors","lg:hidden"),"aria-label":i,"aria-expanded":x,children:jsxRuntime.jsx(lucideReact.Menu,{className:"h-6 w-6"})})]})]}),d&&jsxRuntime.jsx("div",{className:"md:hidden pb-4",role:"search",children:jsxRuntime.jsxs("form",{onSubmit:h,className:"w-full flex items-center relative",children:[jsxRuntime.jsx("input",{id:"search-mobile",name:"search-mobile",type:"search",value:b,onChange:w,placeholder:o,className:e("w-full","px-4 py-2","rounded-lg","border border-input-border","bg-input-bg","text-foreground","placeholder:text-foreground-tertiary","focus:outline-none","focus:ring-2","focus:ring-primary","focus:border-transparent")}),jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5 text-primary absolute right-4"})]})})]})}),jsxRuntime.jsx(react.AnimatePresence,{children:x&&jsxRuntime.jsxs("div",{className:"lg:hidden fixed inset-0 z-50 flex justify-end",role:"dialog","aria-modal":"true","aria-labelledby":v,children:[jsxRuntime.jsx(react.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>c(false),"aria-label":m}),jsxRuntime.jsx(react.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"tween",duration:.3},className:e("relative","w-full","max-w-sm","bg-background","shadow-xl","h-full","overflow-y-auto"),children:jsxRuntime.jsxs("div",{className:"p-6",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-6",children:[jsxRuntime.jsx("h2",{id:"mobile-menu-title",className:"text-xl font-semibold text-foreground",children:u}),jsxRuntime.jsx("button",{onClick:y,className:e("p-2","rounded-lg","text-foreground","hover:bg-background-secondary","transition-colors"),"aria-label":"Close mobile menu",children:jsxRuntime.jsx(lucideReact.X,{className:"h-6 w-6"})})]}),jsxRuntime.jsx("nav",{className:"space-y-2",children:a}),n&&jsxRuntime.jsx("div",{className:"mt-6 pt-6 border-t border-surface-active",children:n})]})})]})})]})}var lt=classVarianceAuthority.cva("w-full rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 placeholder:text-input-placeholder text-left",{variants:{variant:{default:"bg-input-bg border-2 border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:ring-primary/20",filled:"bg-background border-2 border-transparent hover:bg-background focus:bg-input-bg focus:border-input-border-focus focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:bg-primary/5 focus:border-primary-active focus:ring-primary/20"},size:{sm:"h-9 text-sm",md:"h-11 text-base",lg:"h-14 text-lg"},hasError:{true:"border-error focus:border-error focus:ring-error/20"}},defaultVariants:{variant:"default",size:"md",hasError:false}}),we=L__namespace.forwardRef(({className:t,variant:a,size:s,label:o,leftIcon:r,errorMessage:n,value:l,onChange:d,options:u=[],width:g="full",disabled:f=false,readOnly:i=false,showColorIcon:m=false,renderOption:v,searchEnabled:x=true,dropdownDirection:c="down",placeholder:b="Select...",name:N,noResultsText:y="No results found"},w)=>{let[h,M]=L__namespace.useState(false),[P,I]=L__namespace.useState(false),[$,z]=L__namespace.useState(""),[C,F]=L__namespace.useState(-1),[ue,Ct]=L__namespace.useState({top:0,left:0,width:0}),[Et,St]=L__namespace.useState(false),Ee=L__namespace.useRef(null),Se=L__namespace.useRef(null),Te=L__namespace.useRef(null),ze=`${N}-listbox`,Tt=u.find(p=>p.value===l),J=u.filter(p=>p.label.toLowerCase().includes($.toLowerCase())),Lt={sm:"w-1/3",md:"w-1/2",lg:"w-2/3",full:"w-full"}[g],Le=!!n;L__namespace.useEffect(()=>{St(true);},[]);let ae=L__namespace.useCallback(()=>{if(Se.current){let p=Se.current.getBoundingClientRect();Ct({top:c==="down"?p.bottom+4:p.top-4,left:p.left,width:p.width});}},[c]);L__namespace.useEffect(()=>(P&&(ae(),window.addEventListener("scroll",ae,true),window.addEventListener("resize",ae)),()=>{window.removeEventListener("scroll",ae,true),window.removeEventListener("resize",ae);}),[P,ae]),L__namespace.useEffect(()=>{let p=G=>{Ee.current&&!Ee.current.contains(G.target)&&Te.current&&!Te.current.contains(G.target)&&(I(false),z(""));};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]),L__namespace.useEffect(()=>{P&&F(0);},[P,$]);let Mt=()=>{M(true);},It=()=>{M(false);},Oe=p=>jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[m&&p?.iconColor&&jsxRuntime.jsx(lucideReact.Circle,{size:18,style:{color:p.iconColor,fill:p.iconColor},className:e("rounded-full",{"border border-gray-400":p.iconColor==="#FFFFFF"})}),p?.label||b]}),Vt=p=>{if(!P){(p.key==="ArrowDown"||p.key==="Enter"||p.key===" ")&&(I(true),p.preventDefault());return}p.key==="ArrowDown"?(F(G=>Math.min(G+1,J.length-1)),p.preventDefault()):p.key==="ArrowUp"?(F(G=>Math.max(G-1,0)),p.preventDefault()):p.key==="Enter"?(J[C]&&(d?.(J[C].value),I(false),z("")),p.preventDefault()):p.key==="Escape"&&(I(false),z(""),p.preventDefault());},At=jsxRuntime.jsx(react.AnimatePresence,{children:P&&jsxRuntime.jsxs(react.motion.div,{ref:Te,initial:{opacity:0,y:c==="down"?-10:10},animate:{opacity:1,y:0},exit:{opacity:0,y:c==="down"?-10:10},transition:{duration:.15,ease:"easeOut"},id:ze,role:"listbox","aria-activedescendant":C>=0&&J[C]?`${N}-option-${J[C].value}`:void 0,tabIndex:-1,style:{position:"fixed",top:c==="down"?`${ue.top}px`:"auto",bottom:c==="up"?`${window.innerHeight-ue.top}px`:"auto",left:`${ue.left}px`,width:`${ue.width}px`,zIndex:9999},className:e("bg-surface-elevated","border-2 border-primary rounded-lg shadow-2xl overflow-hidden"),children:[x&&jsxRuntime.jsx("input",{type:"text",placeholder:"Search...",className:"w-full px-4 py-2 border-b border-input-border outline-none bg-surface-elevated text-foreground",value:$,onChange:p=>z(p.target.value),"aria-label":"Search options",onClick:p=>p.stopPropagation()}),jsxRuntime.jsx("ul",{className:"max-h-60 overflow-y-auto w-full bg-surface-elevated",children:J.length>0?J.map((p,G)=>jsxRuntime.jsx("li",{id:`${N}-option-${p.value}`,role:"option","aria-selected":p.value===l,tabIndex:0,onClick:()=>{d?.(p.value),I(false),z("");},onMouseEnter:()=>F(G),className:e("px-4 py-2 w-full cursor-pointer hover:bg-primary/10 flex items-center gap-2 transition-colors",p.value===l&&"bg-primary/10 font-semibold",C===G&&"bg-primary/20"),children:v?v(p,p.value===l):Oe(p)},p.value)):jsxRuntime.jsx("li",{className:"px-4 py-2 text-sm text-foreground-tertiary italic",children:y})})]},"dropdown")});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:e("space-y-2",Lt),ref:Ee,children:[o&&jsxRuntime.jsx("label",{htmlFor:N,className:"block text-sm font-medium text-foreground",children:o}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsxs(react.motion.div,{initial:false,animate:{scale:h?1.002:1},transition:{type:"spring",stiffness:400,damping:17},className:"relative",children:[r&&jsxRuntime.jsx(r,{className:e("absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 transition-colors duration-200 pointer-events-none",h?"text-primary":"text-foreground-tertiary",Le&&"text-error")}),jsxRuntime.jsxs("button",{type:"button",ref:p=>{Se.current=p,typeof w=="function"?w(p):w&&(w.current=p);},id:N,name:N,disabled:f||i,"aria-haspopup":"listbox","aria-expanded":P,"aria-controls":ze,onClick:()=>!i&&I(!P),onFocus:Mt,onBlur:It,onKeyDown:Vt,className:e(lt({variant:a,size:s,hasError:Le,className:t}),{"pl-3":!r,"pl-10":r,"pr-10":true}),children:[Oe(Tt),jsxRuntime.jsx(lucideReact.ChevronDown,{size:18,className:e("absolute right-3 top-1/2 transform -translate-y-1/2 transition-all duration-200 pointer-events-none",P&&"rotate-180",h?"text-primary":"text-foreground-tertiary",Le&&"text-error")})]})]}),n&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"mt-1 text-xs text-error",children:n})]})]}),Et&&reactDom.createPortal(At,document.body)]})});we.displayName="Select";var dt=classVarianceAuthority.cva("flex items-center justify-center min-w-[120px] rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-background-secondary text-foreground hover:bg-background border-2 border-transparent focus:border-primary focus:ring-primary/20",primary:"bg-primary text-white hover:bg-primary-hover focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:ring-primary/20"},size:{sm:"h-8 px-2 text-sm gap-1",md:"h-10 px-2.5 text-base gap-2",lg:"h-12 px-3 text-lg gap-2"}},defaultVariants:{variant:"default",size:"md"}}),Er=L__namespace.forwardRef(({currentPage:t,totalPages:a,onPageChange:s,itemsPerPage:o=10,onItemsPerPageChange:r,previousLabel:n="Previous",nextLabel:l="Next",rowsLabel:d="Rows:",previousAriaLabel:u="Go to previous page",nextAriaLabel:g="Go to next page",showItemsPerPage:f=true,itemsPerPageOptions:i=[10,25,50,100],showPageInfo:m=true,pageInfoTemplate:v="Page {current} of {total}",showIcons:x=true,variant:c,size:b,className:N},y)=>{let w=i.map(I=>({label:I.toString(),value:I})),h=v.replace("{current}",t.toString()).replace("{total}",a.toString()),M=()=>{t>1&&s(t-1);},P=()=>{t<a&&s(t+1);};return jsxRuntime.jsxs("div",{ref:y,className:e("flex flex-col items-center justify-between gap-4 md:flex-row",N),children:[m&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:h}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[f&&r&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:d}),jsxRuntime.jsx(we,{value:o,onChange:I=>r(I),options:w,size:b,variant:c==="primary"||c===null?"default":c,dropdownDirection:"up",searchEnabled:false,width:"lg"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("button",{onClick:M,disabled:t===1,className:e(dt({variant:c,size:b})),"aria-label":u,children:[x&&jsxRuntime.jsx(lucideReact.ChevronLeft,{size:16}),n]}),jsxRuntime.jsxs("button",{onClick:P,disabled:t===a,className:e(dt({variant:c,size:b})),"aria-label":g,children:[l,x&&jsxRuntime.jsx(lucideReact.ChevronRight,{size:16})]})]})]})]})});Er.displayName="Pagination";function Ne({isFlipped:t,setIsFlipped:a,onCardClick:s,productImage:o,fallbackImage:r,productCondition:n,brand:l,name:d,description:u,price:g,color:f,isExchangeable:i,isStoreProduct:m,hasOffer:v,offerPrice:x,onAddToCart:c,onExchange:b,addToCartAriaLabel:N="Add to cart",exchangeAriaLabel:y="Exchange product",offerLabel:w="Price Drop",localeString:h="es-CL",addToCartLabel:M="Agregar al carrito",exchangeLabel:P="Intercambiar",interests:I=["exchange interest1","exchange interest2","exchange interest3"]}){let $={NEW:"bg-green-500 text-white",OPEN_BOX:"bg-blue-400 text-white",LIKE_NEW:"bg-emerald-400 text-white",FAIR:"bg-yellow-400 text-gray-900",POOR:"bg-red-500 text-white",FOR_PARTS:"bg-gray-500 text-white",REFURBISHED:"bg-purple-500 text-white"},z=C=>C&&$[C]||"bg-gray-300 text-gray-700";return jsxRuntime.jsxs("div",{className:e("card-flip-front","bg-white dark:bg-stone-800","rounded-xl shadow-md","border border-gray-200/60 dark:border-stone-700/60","overflow-hidden","hover:shadow-xl","hover:border-primary/40","dark:hover:border-primary/50","transition-all duration-300","group"),children:[jsxRuntime.jsxs("figure",{className:e("relative","aspect-[4/3]","bg-gradient-to-br from-gray-100 to-gray-50","dark:from-stone-700 dark:to-stone-800","overflow-hidden"),children:[jsxRuntime.jsx("div",{className:e("absolute inset-0","opacity-0","group-hover:opacity-100","bg-gradient-to-t from-black/20 to-transparent","transition-opacity","duration-300","pointer-events-none","z-[1]")}),jsxRuntime.jsx("div",{className:e("relative","w-full","h-full","group-hover:scale-105","transition-transform","duration-500"),children:o||r}),m?v?jsxRuntime.jsx("span",{className:e("absolute","bottom-2","left-2","bg-red-500","text-white","backdrop-blur-md","text-[10px]","font-semibold","px-2.5","py-1","rounded-lg","shadow-md","border","border-white/50","dark:border-stone-700/50"),children:w}):null:jsxRuntime.jsx("span",{className:e("absolute","bottom-2","left-2",z(n),"backdrop-blur-md","text-[10px]","font-semibold","px-2.5","py-1","rounded-lg","capitalize","shadow-md","border","border-white/50","dark:border-stone-700/50"),children:n}),jsxRuntime.jsx("button",{onClick:C=>{C.stopPropagation(),a(!t);},className:e("absolute","top-2","right-2","bg-white/90","dark:bg-stone-800/90","hover:bg-primary","dark:hover:bg-primary","text-gray-700","dark:text-stone-200","hover:text-white","p-1.5","rounded-lg","shadow-lg","transition-all","duration-200","hover:scale-110","backdrop-blur-sm","border","border-gray-200/50","dark:border-stone-600/50","z-[2]"),"aria-label":"Ver impacto ambiental",children:jsxRuntime.jsx(lucideReact.RotateCcw,{className:"w-3.5 h-3.5"})})]}),jsxRuntime.jsxs("div",{className:"p-3.5",onClick:s,children:[jsxRuntime.jsxs("header",{className:e("flex","items-center","justify-between","gap-2","mb-2"),children:[jsxRuntime.jsx("span",{className:e("text-gray-500","dark:text-stone-400","text-[10px]","font-medium","uppercase","tracking-wide","truncate"),children:l}),f&&jsxRuntime.jsx("span",{className:e("text-gray-400","dark:text-stone-500","text-[10px]","font-medium","truncate","max-w-[60px]"),children:f})]}),jsxRuntime.jsx("h3",{className:e("font-semibold","text-sm","text-gray-900","dark:text-stone-50","line-clamp-1","mb-1.5","group-hover:text-primary","dark:group-hover:text-primary-hover","transition-colors","duration-200"),children:d}),jsxRuntime.jsx("p",{className:e("text-gray-600","dark:text-stone-400","text-xs","line-clamp-1","mb-3","leading-relaxed"),children:u}),jsxRuntime.jsxs("footer",{className:e("flex","flex-col","items-start","justify-between","gap-2"),children:[m&&v&&!i&&jsxRuntime.jsxs("div",{className:"flex items-center justify-center gap-1",children:[jsxRuntime.jsxs("span",{className:"text-primary dark:text-primary-hover font-bold text-xl",children:["$",x?.toLocaleString(h)]}),jsxRuntime.jsxs("span",{className:"text-sm text-gray-500 line-through",children:["$",g?.toLocaleString(h)]})]})," ",(!m||!v)&&!i&&jsxRuntime.jsxs("p",{className:"text-primary dark:text-primary-hover font-bold text-xl",children:["$",g?.toLocaleString(h)]}),i&&I&&jsxRuntime.jsx("div",{className:e("flex","items-center","gap-2","mb-2","overflow-x-auto","scroll-smooth","snap-x","snap-mandatory","px-3","flex-nowrap","w-full","scrollbar-hide"),style:{WebkitOverflowScrolling:"touch"},tabIndex:0,role:"list","aria-label":"Interests",children:I.map((C,F)=>jsxRuntime.jsx("span",{role:"listitem",className:e("inline-flex","items-center","flex-shrink-0","snap-start","text-[10px]","whitespace-nowrap","px-2","py-1","rounded-full","bg-gray-100","dark:bg-stone-700","text-gray-800","dark:text-stone-100","font-medium"),children:C},F))}),m&&!i&&jsxRuntime.jsx(ne,{variant:"primary",size:"sm",fullWidth:true,"aria-label":N,rightIcon:lucideReact.ShoppingCart,onClick:C=>{C.stopPropagation(),c?.();},children:M}),i&&jsxRuntime.jsx(ne,{variant:"primary",size:"sm",fullWidth:true,"aria-label":y,rightIcon:lucideReact.IterationCw,onClick:C=>{C.stopPropagation(),b?.();},children:P})," ",!i&&!m&&jsxRuntime.jsx(ne,{variant:"primary",size:"sm",fullWidth:true,"aria-label":N,rightIcon:lucideReact.ShoppingCart,onClick:C=>{C.stopPropagation(),c?.();},children:M})]})]})]})}function ke({isFlipped:t,setIsFlipped:a,setShowImpactModal:s,environmentalImpact:o,sellerName:r,sellerPhone:n,sellerAddress:l,impactLabel:d="Environmental Impact",materialsLabel:u="Materials:",viewMoreLabel:g="View Full Impact",sellerLabel:f="Seller Information",co2Label:i="CO\u2082 Saved",waterLabel:m="Water Saved"}){let v=b=>b>50?{level:"High",color:"success",width:"100%"}:b>20?{level:"Medium",color:"warning",width:"66%"}:{level:"Low",color:"info",width:"33%"},x=(()=>{if(o){if(Array.isArray(o)){let b=o.map(w=>{let h=w,M=h.material?.materialType??h.materialType??"Material",P=h.material?.percentage??h.percentage??0,I=h.quantity??h.weightKG??0,$=h.material?.estimatedCo2SavingsKG??h.co2SavingsKG??0,z=h.material?.estimatedWaterSavingsLT??h.waterSavingsLT??0;return {materialType:M,percentage:P,weightKG:I,co2SavingsKG:$,waterSavingsLT:z}}),N=b.reduce((w,h)=>w+(h.co2SavingsKG||0),0),y=b.reduce((w,h)=>w+(h.waterSavingsLT||0),0);return {totalCo2SavingsKG:N,totalWaterSavingsLT:y,materialBreakdown:b}}return o}})(),c=x?v(x.totalCo2SavingsKG):null;return jsxRuntime.jsx("div",{className:e("card-flip-back","bg-gradient-to-br from-white via-emerald-50/20 to-white","dark:from-stone-800 dark:via-stone-850 dark:to-stone-900","border-2 border-gray-200/60","dark:border-stone-700/50"),children:jsxRuntime.jsxs("div",{className:e("py-4","px-4","w-full","h-full","flex","flex-col","overflow-y-auto","scrollbar-hide","relative"),children:[jsxRuntime.jsx("button",{onClick:b=>{b.stopPropagation(),a(!t);},className:e("absolute top-2 right-2","bg-white/90","dark:bg-stone-800/90","hover:bg-primary","dark:hover:bg-primary","backdrop-blur-md","text-gray-700","dark:text-stone-200","hover:text-white","p-1.5","rounded-lg","shadow-lg","transition-all","duration-200","hover:scale-110","z-10","border","border-gray-200/50","dark:border-stone-600/50"),"aria-label":"Ver producto",children:jsxRuntime.jsx(lucideReact.RotateCcw,{className:"w-3.5 h-3.5"})}),o&&jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("div",{className:"flex items-center justify-between mb-0.5",children:jsxRuntime.jsxs("h4",{className:e("font-bold","text-gray-900","dark:text-stone-100","text-xs","flex","items-center","gap-1.5"),children:[jsxRuntime.jsx(lucideReact.Leaf,{className:"w-3.5 h-3.5 text-success"}),d]})}),jsxRuntime.jsx("div",{className:"mb-3",children:c&&jsxRuntime.jsx("span",{className:e("text-[9px]","font-semibold","px-2","py-0.5","rounded-full",`bg-${c.color}/15`,`text-${c.color}`,"border",`border-${c.color}/30`),children:c.level})}),jsxRuntime.jsx("div",{className:e("mb-2.5","bg-gray-200/60","dark:bg-stone-700/50","rounded-full","h-1","overflow-hidden"),children:jsxRuntime.jsx("div",{className:e("h-full","bg-gradient-to-r from-success to-success/70","rounded-full","transition-all","duration-1000"),style:{width:c?.width||"0%"}})}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-2.5",children:[jsxRuntime.jsxs("div",{className:e("bg-gradient-to-br from-success/8 to-transparent","dark:from-success/15 dark:to-transparent","rounded-lg","p-1.5","border","border-success/20","dark:border-success/30"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[jsxRuntime.jsx(lucideReact.Leaf,{className:"w-3 h-3 text-success"}),jsxRuntime.jsx("span",{className:"text-[9px] text-gray-600 dark:text-stone-400 font-medium",children:i})]}),jsxRuntime.jsxs("p",{className:"text-sm font-bold text-success",children:[x?.totalCo2SavingsKG," kg"]})]}),jsxRuntime.jsxs("div",{className:e("bg-gradient-to-br from-info/8 to-transparent","dark:from-info/15 dark:to-transparent","rounded-lg","p-1.5","border","border-info/20","dark:border-info/30"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[jsxRuntime.jsx(lucideReact.Droplets,{className:"w-3 h-3 text-info"}),jsxRuntime.jsx("span",{className:"text-[9px] text-gray-600 dark:text-stone-400 font-medium",children:m})]}),jsxRuntime.jsxs("p",{className:"text-sm font-bold text-info",children:[x?.totalWaterSavingsLT," L"]})]})]}),x&&x.materialBreakdown.length>0&&jsxRuntime.jsxs("div",{className:e("bg-gray-50/80","dark:bg-stone-800/50","rounded-lg","p-2.5","border","border-gray-200/50","dark:border-stone-700/50"),children:[jsxRuntime.jsx("p",{className:"text-[9px] font-semibold text-gray-700 dark:text-stone-300 mb-2",children:u}),jsxRuntime.jsx("div",{className:"space-y-2",children:x.materialBreakdown.slice(0,2).map((b,N)=>jsxRuntime.jsxs("div",{className:"space-y-1",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between text-[9px]",children:[jsxRuntime.jsx("span",{className:"text-gray-700 dark:text-stone-300 font-medium truncate",children:b.materialType}),jsxRuntime.jsxs("span",{className:"font-bold text-primary dark:text-primary ml-1",children:[b.percentage.toFixed(1),"%"]})]}),jsxRuntime.jsx("div",{className:"bg-gray-200 dark:bg-stone-700 rounded-full h-1 overflow-hidden",children:jsxRuntime.jsx("div",{className:e("h-full","bg-gradient-to-r from-primary to-primary-hover","rounded-full","transition-all","duration-500"),style:{width:`${b.percentage}%`}})})]},N))}),jsxRuntime.jsxs("button",{onClick:b=>{b.stopPropagation(),s(true);},className:e("w-full","mt-2.5","py-1.5","px-3","bg-primary/5","hover:bg-primary/10","dark:bg-primary/10","dark:hover:bg-primary/15","text-primary","dark:text-primary-hover","rounded-lg","text-[9px]","font-semibold","transition-all","duration-200","flex","items-center","justify-center","gap-1","border","border-primary/20","hover:border-primary/30","group/viewmore"),children:[g,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-3 h-3 group-hover/viewmore:translate-x-0.5 transition-transform duration-200"})]})]})]}),jsxRuntime.jsxs("div",{className:"mt-auto pt-3 border-t border-gray-200/60 dark:border-stone-700/50",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[jsxRuntime.jsx(lucideReact.UserRound,{className:"w-3.5 h-3.5 text-primary"}),jsxRuntime.jsx("h4",{className:"font-bold text-gray-900 dark:text-stone-100 text-xs",children:f})]}),jsxRuntime.jsxs("div",{className:e("space-y-1.5","bg-gray-50/80","dark:bg-stone-800/50","rounded-lg","p-2.5","border","border-gray-200/50","dark:border-stone-700/50"),children:[r&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-700 dark:text-stone-300 text-[9px] font-medium",children:[jsxRuntime.jsx(lucideReact.UserRound,{className:"w-3 h-3 flex-shrink-0 text-gray-400 dark:text-stone-500"}),jsxRuntime.jsx("span",{className:"truncate",children:r})]}),n&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-700 dark:text-stone-300 text-[9px] font-medium",children:[jsxRuntime.jsx(lucideReact.Phone,{className:"w-3 h-3 flex-shrink-0 text-gray-400 dark:text-stone-500"}),jsxRuntime.jsx("span",{className:"truncate",children:n})]}),l&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-700 dark:text-stone-300 text-[9px] font-medium",children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"w-3 h-3 flex-shrink-0 text-gray-400 dark:text-stone-500"}),jsxRuntime.jsx("span",{className:"truncate",children:l})]})]})]})]})})}function bt({product:t}){let[a,s]=L.useState(false),[o,r]=L.useState(false),{images:n,price:l,name:d,brand:u,color:g,description:f,seller:i}=t,m="hasOffer"in t,v=!!t.hasOffer,x=t.offerPrice,c=t.environmentalImpact,b=t.productCategory?.materials;return jsxRuntime.jsxs("article",{className:e("flex-shrink-0","w-[220px]","h-[350px]","card-flip-perspective"),children:[jsxRuntime.jsxs("div",{className:e("card-flip-inner",a?"card-flip-flipped":""),children:[jsxRuntime.jsx(Ne,{isFlipped:a,setIsFlipped:s,productImage:n&&n.length>0?jsxRuntime.jsx("img",{src:n[0],alt:d}):null,price:l,name:d,brand:u,productCondition:t.condition,color:g,description:f,isExchangeable:!m&&t.isExchangeable,isStoreProduct:m,hasOffer:v,offerPrice:x,fallbackImage:"https://images.unsplash.com/photo-1503023345310-bd7c1de61c7d?w=800&q=60&auto=format&fit=crop",onCardClick:()=>{},onAddToCart:()=>{},onExchange:()=>{}}),jsxRuntime.jsx(ke,{isFlipped:a,setIsFlipped:s,setShowImpactModal:r,environmentalImpact:c??b,sellerName:i?.profile?.firstName,sellerPhone:i?.phone,sellerAddress:i?.address})]}),c&&jsxRuntime.jsx(ye,{isOpen:o,onClose:()=>r(false),environmentalImpact:c})]})}function xt({icon:t,mainText:a,description:s}){return jsxRuntime.jsx("article",{className:"inline-flex p-4 shadow-md flex-col items-center justify-center min-w-40 rounded-lg bg-white dark:bg-stone-900",children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-lg bg-primary/10 text-primary mb-4",children:jsxRuntime.jsx(t,{className:"w-5 h-5"})}),jsxRuntime.jsx("h3",{className:"text-2xl font-bold text-gray-900 dark:text-stone-100 mb-1",children:a}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-stone-400 text-center",children:s})]})})}var yt=classVarianceAuthority.cva("w-full table-auto border-collapse",{variants:{variant:{default:"",outlined:"border border-border rounded-lg overflow-hidden"},size:{sm:"text-sm",md:"text-base",lg:"text-lg"},striped:{true:""},hover:{true:""}},defaultVariants:{variant:"default",size:"md"}}),ht=L__namespace.forwardRef(({columns:t,data:a,rowKey:s,className:o,variant:r,size:n,striped:l,hover:d,emptyMessage:u="No data",...g},f)=>{let i=react.motion.div;return jsxRuntime.jsx(i,{ref:f,className:e("w-full overflow-auto",o),initial:{opacity:0,y:-6},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{duration:.35},...g,children:jsxRuntime.jsxs("table",{className:e(yt({variant:r,size:n})),role:"table",children:[jsxRuntime.jsx("thead",{className:"bg-primary text-white",children:jsxRuntime.jsx("tr",{children:t.map(m=>jsxRuntime.jsx("th",{className:e("text-left px-4 py-2 font-medium text-white",m.className),children:m.header},m.key))})}),jsxRuntime.jsx("tbody",{children:a.length===0?jsxRuntime.jsx("tr",{children:jsxRuntime.jsx("td",{className:"px-4 py-6 text-center text-text-muted",colSpan:t.length,children:u})}):a.map((m,v)=>{let x=s?s(m):m.id??v;return jsxRuntime.jsx("tr",{className:e(l&&v%2===1?"bg-neutral/5 dark:bg-stone-800/40":"",d?"hover:bg-neutral/5 dark:hover:bg-stone-800/50":""),children:t.map(c=>{let b=m[c.key];return jsxRuntime.jsx("td",{className:"px-4 py-3 align-top",children:c.render?c.render(b,m):String(b??"")},c.key)})},String(x))})})]})})});ht.displayName="Table";var zr=ht;var Kr=classVarianceAuthority.cva("transition-colors",{variants:{variant:{p:"block",span:"inline",label:"block font-medium cursor-pointer",blockquote:"block border-l-4 border-primary pl-4 italic",small:"block text-sm",code:"inline-block font-mono bg-background-secondary px-1.5 py-0.5 rounded text-sm"},size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},color:{default:"text-foreground",primary:"text-primary",secondary:"text-foreground-secondary",tertiary:"text-foreground-tertiary",error:"text-error",success:"text-success",warning:"text-warning",muted:"text-muted"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"p",size:"base",weight:"normal",color:"default",align:"left"}}),$r=L__namespace.forwardRef(({className:t,variant:a="p",size:s,weight:o,color:r,align:n,as:l,htmlFor:d,children:u,...g},f)=>jsxRuntime.jsx(l||a,{ref:f,htmlFor:a==="label"||l==="label"?d:void 0,className:e(Kr({variant:a,size:s,weight:o,color:r,align:n,className:t})),...g,children:u}));$r.displayName="Text";var jr=classVarianceAuthority.cva("w-full rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 placeholder:text-input-placeholder resize-none",{variants:{variant:{default:"bg-input-bg border-2 border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:ring-primary/20",filled:"bg-background-secondary border-2 border-transparent hover:bg-background focus:bg-input-bg focus:border-input-border-focus focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:bg-primary/5 focus:border-primary-active focus:ring-primary/20"},textSize:{sm:"text-sm py-2 px-3 min-h-[80px]",md:"text-base py-3 px-3 min-h-[120px]",lg:"text-lg py-4 px-4 min-h-[160px]"},hasError:{true:"border-error focus:border-error focus:ring-error/20"}},defaultVariants:{variant:"default",textSize:"md",hasError:false}}),qr=L__namespace.forwardRef(({className:t,variant:a,textSize:s,label:o,errorMessage:r,showCharCount:n=false,width:l="full",disabled:d=false,readOnly:u=false,maxLength:g,value:f="",name:i,id:m,...v},x)=>{let[c,b]=L__namespace.useState(false),N=!!r,y=String(f).length,w={sm:"w-1/3",md:"w-1/2",lg:"w-2/3",full:"w-full"}[l],h=L__namespace.useId(),M=m||i||`textarea-${h}`;return jsxRuntime.jsxs("div",{className:e("space-y-2",w),children:[o&&jsxRuntime.jsx("label",{htmlFor:M,className:"block text-sm font-medium text-foreground",children:o}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(react.motion.div,{initial:false,animate:{scale:c?1.002:1},transition:{type:"spring",stiffness:400,damping:17},className:"relative",children:jsxRuntime.jsx("textarea",{ref:x,id:M,name:i,value:f,disabled:d,readOnly:u,maxLength:g,onFocus:()=>b(true),onBlur:()=>b(false),className:e(jr({variant:a,textSize:s,hasError:N,className:t})),...v})}),n&&g&&jsxRuntime.jsxs("div",{className:"mt-1 text-xs text-foreground-tertiary text-right",children:[y," / ",g]})]}),r&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"text-xs text-error",children:r})]})});qr.displayName="Textarea";var kt=classVarianceAuthority.cva("w-full rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 placeholder:text-input-placeholder",{variants:{variant:{default:"bg-input-bg border-2 border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:ring-primary/20",filled:"bg-background-secondary border-2 border-transparent hover:bg-background-tertiary focus:bg-input-bg focus:border-input-border-focus focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:bg-primary/5 focus:border-primary-active focus:ring-primary/20"},size:{sm:"h-9 text-sm",md:"h-11 text-base",lg:"h-14 text-lg"},hasError:{true:"border-error focus:border-error focus:ring-error/20"}},defaultVariants:{variant:"default",size:"md",hasError:false}}),Pt=L__namespace.forwardRef(({className:t,variant:a,size:s,hasError:o,label:r,leftIcon:n,errorMessage:l,type:d="text",width:u="full",id:g,name:f,disabled:i,onFocus:m,onBlur:v,...x},c)=>{let[b,N]=L__namespace.useState(false),[y,w]=L__namespace.useState(false),h={sm:"w-1/3",md:"w-1/2",lg:"w-2/3",full:"w-full"}[u],M=d==="password",P=M&&y?"text":d,I=o||!!l,$=F=>{N(true),m?.(F);},z=F=>{N(false),v?.(F);},C=()=>{w(F=>!F);};return jsxRuntime.jsxs("div",{className:e("space-y-2",h),children:[r&&jsxRuntime.jsx("label",{htmlFor:g||f,className:"block text-sm font-medium text-foreground",children:r}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsxs(react.motion.div,{initial:false,animate:{scale:b?1.002:1},transition:{type:"spring",stiffness:400,damping:17},className:"relative",children:[n&&jsxRuntime.jsx(n,{className:e("absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 transition-colors duration-200",b?"text-primary":"text-foreground-tertiary",I&&"text-error")}),jsxRuntime.jsx("input",{ref:c,id:g||f,name:f,type:P,disabled:i,onFocus:$,onBlur:z,className:e(kt({variant:a,size:s,hasError:I,className:t}),{"pl-3":!n,"pl-10":n,"pr-10":M,"pr-3":!M}),...x}),M&&jsxRuntime.jsx("button",{type:"button",onClick:C,disabled:i,className:e("absolute right-3 top-1/2","transform","-translate-y-1/2","text-foreground-tertiary","hover:text-foreground-secondary","transition-colors","duration-200","disabled:opacity-50","disabled:cursor-not-allowed"),tabIndex:-1,children:jsxRuntime.jsx(react.AnimatePresence,{mode:"wait",children:y?jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsxRuntime.jsx(lucideReact.EyeOff,{className:"w-5 h-5"})},"eye-off"):jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsxRuntime.jsx(lucideReact.Eye,{className:"w-5 h-5"})},"eye")})})]}),l&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"mt-1 text-xs text-error",children:l})]})]})});Pt.displayName="TextInput";var Jr=classVarianceAuthority.cva("font-bold tracking-tight transition-colors",{variants:{level:{h1:"text-5xl md:text-6xl lg:text-7xl",h2:"text-4xl md:text-5xl lg:text-6xl",h3:"text-3xl md:text-4xl lg:text-5xl",h4:"text-2xl md:text-3xl lg:text-4xl",h5:"text-xl md:text-2xl lg:text-3xl",h6:"text-lg md:text-xl lg:text-2xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},color:{default:"text-foreground",primary:"text-primary",secondary:"text-foreground-secondary",tertiary:"text-foreground-tertiary",error:"text-error",success:"text-success",warning:"text-warning"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{level:"h1",weight:"bold",color:"default",align:"left"}}),Zr=L__namespace.forwardRef(({className:t,level:a="h1",weight:s,color:o,align:r,as:n,children:l,...d},u)=>jsxRuntime.jsx(n||a,{ref:u,className:e(Jr({level:a,weight:s,color:o,align:r,className:t})),...d,children:l}));Zr.displayName="Title";
2
- exports.AdBanner=Ot;exports.Banner=Ue;exports.Button=ne;exports.Card=Ye;exports.CardBackSide=ke;exports.CardFrontSide=Ne;exports.Carousel=Ze;exports.Checkbox=tr;exports.EnvironmentalImpactModal=ye;exports.Footer=tt;exports.HeroCarousel=at;exports.Modal=ve;exports.Navbar=st;exports.Pagination=Er;exports.ProductCard=bt;exports.Select=we;exports.StatsCard=xt;exports.Table=zr;exports.Text=$r;exports.TextInput=Pt;exports.Textarea=qr;exports.Title=Zr;exports.bannerVariants=qe;exports.buttonVariants=Xe;exports.checkboxVariants=er;exports.cn=e;exports.inputVariants=kt;exports.paginationButtonVariants=dt;exports.selectVariants=lt;exports.tableVariants=yt;exports.textVariants=Kr;exports.textareaVariants=jr;exports.titleVariants=Jr;//# sourceMappingURL=index.js.map
1
+ 'use strict';var I=require('react'),classVarianceAuthority=require('class-variance-authority'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),react=require('motion/react'),jsxRuntime=require('react/jsx-runtime'),lucideReact=require('lucide-react'),reactDom=require('react-dom');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var I__namespace=/*#__PURE__*/_interopNamespace(I);function e(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var zt=classVarianceAuthority.cva("w-full border-t border-b overflow-hidden rounded-none",{variants:{variant:{primary:"bg-gradient-to-r from-primary-dark via-primary to-primary-dark text-white",secondary:"bg-gradient-to-r from-secondary-dark via-secondary to-secondary-dark text-white",outlined:"bg-background border border-primary text-foreground",ghost:"bg-white/50 text-foreground"},animated:{true:"",false:""}},defaultVariants:{variant:"primary",animated:true}}),Ue=I__namespace.forwardRef(({icon:t,title:r,description:s,cta:n,variant:a,animated:o,className:l,...c},p)=>{let b=react.motion.div,f=t;return jsxRuntime.jsx(b,{ref:p,initial:{opacity:0,y:-8},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{duration:.45},className:e(zt({variant:a,animated:o}),"p-4 md:p-5",l),...c,children:jsxRuntime.jsxs(react.motion.div,{className:e("flex flex-col sm:flex-row","items-center","gap-4 py-2 px-2","justify-between"),children:[jsxRuntime.jsxs(react.motion.div,{className:e("flex flex-col","items-center sm:items-start","justify-center"),children:[f&&jsxRuntime.jsx(react.motion.div,{className:e("w-20 h-20","flex items-center justify-center","rounded-lg","mb-2",{"bg-white/10":a==="primary"||a==="secondary","bg-primary/10":a==="outlined"||a==="ghost"}),children:jsxRuntime.jsx(f,{className:e("w-10 h-10",{"text-white":a==="primary"||a==="secondary","text-primary":a==="outlined"||a==="ghost"})})}),r&&jsxRuntime.jsx(react.motion.h3,{className:e("text-lg font-bold","text-center sm:text-left","mb-1"),children:r}),s&&jsxRuntime.jsx(react.motion.p,{className:e("text-sm text-center sm:text-left","text-muted","mb-0"),children:s})]}),jsxRuntime.jsx(react.motion.div,{className:e("flex items-center justify-center"),children:n})]})})});Ue.displayName="AdBanner";var Ot=Ue;var Ye=classVarianceAuthority.cva("p-4 md:p-5 rounded-xl w-[95%] mx-auto overflow-hidden relative",{variants:{variant:{primary:"border-2 border-transparent bg-gradient-to-r from-primary-dark via-primary to-primary-dark text-white shadow-lg",secondary:"border-2 border-transparent bg-gradient-to-r from-secondary-dark via-secondary to-secondary-dark text-white shadow-lg",outlined:"border-2 border-primary shadow-lg bg-background backdrop-blur",ghost:"border-2 border-transparent bg-white/50 backdrop-blur"},animated:{true:"",false:""}},defaultVariants:{variant:"primary",animated:true}}),Xe=classVarianceAuthority.cva("w-3 h-3 rounded-full inline-block",{variants:{variant:{primary:"bg-white shadow-lg shadow-white/50",secondary:"bg-white",outlined:"bg-primary",ghost:"bg-gray-600"}},defaultVariants:{variant:"primary"}}),Je=I__namespace.forwardRef(({className:t,variant:r,animated:s,title:n,description:a,showDots:o=true,...l},c)=>{let p=react.motion.div;return jsxRuntime.jsxs(p,{ref:c,initial:{opacity:0,y:-20},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{duration:.6},className:e(Ye({variant:r,animated:s,className:t})),...l,children:[s&&r==="primary"&&jsxRuntime.jsx(react.motion.div,{animate:{x:["-100%","100%"]},transition:{duration:15,repeat:1/0,ease:"linear"},className:e("absolute inset-0","bg-gradient-to-r from-transparent via-white/10 to-transparent")}),jsxRuntime.jsxs(react.motion.div,{className:"relative z-10",children:[jsxRuntime.jsxs(react.motion.div,{className:e("flex flex-1 justify-center items-center","gap-2 md:gap-3","mb-3"),children:[o&&jsxRuntime.jsx(react.motion.span,{initial:{scale:0},whileInView:{scale:1},viewport:{once:true},transition:{delay:.2,type:"spring"},className:e(Xe({variant:r}))}),jsxRuntime.jsx(react.motion.h2,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:true},transition:{delay:.3},className:e("text-base sm:text-lg md:text-2xl","font-bold","text-center","tracking-tight"),children:n}),o&&jsxRuntime.jsx(react.motion.span,{initial:{scale:0},whileInView:{scale:1},viewport:{once:true},transition:{delay:.4,type:"spring"},className:e(Xe({variant:r}))})]}),jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{delay:.5},className:e("text-sm sm:text-base md:text-lg","text-center","leading-snug md:leading-normal","font-light"),children:a})]})]})});Je.displayName="Banner";var et=classVarianceAuthority.cva("min-w-[140px] rounded-lg font-medium shadow-md transition-all duration-200 flex items-center justify-center space-x-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"border-2 border-primary bg-primary text-white hover:bg-primary/90 active:bg-primary/80 shadow-md",secondary:"border-2 border-secondary bg-secondary text-white hover:bg-secondary/90 active:bg-secondary/80",secondary_outline:"border-2 border-secondary bg-white text-secondary hover:bg-white/90 active:bg-white/80",outline:"border-2 border-primary text-primary hover:bg-primary/5 hover:text-accent-foreground active:bg-primary/10",ghost:"hover:bg-muted active:bg-muted/80 text-foreground",success:"border-2 border-success bg-success text-white hover:bg-success/90 active:bg-success/80 shadow-md",warning:"border-2 border-warning bg-warning text-white hover:bg-warning/90 active:bg-warning/80 shadow-md",error:"border-2 border-error bg-error text-white hover:bg-error/90 active:bg-error/80 shadow-md"},size:{sm:"min-h-[36px] px-2 py-2 text-sm",md:"min-h-[44px] px-6 py-2.5 text-base",lg:"min-h-[56px] px-8 py-3 text-lg"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"primary",size:"md"}}),se=I__namespace.forwardRef(({className:t,variant:r,size:s,fullWidth:n,isLoading:a,leftIcon:o,rightIcon:l,children:c,disabled:p,loadingText:b="Loading...",...f},i)=>{let m=react.motion.button;return jsxRuntime.jsxs(m,{className:e(et({variant:r,size:s,fullWidth:n,className:t})),ref:i,disabled:p||a,whileHover:{scale:1.02,y:-2},whileTap:{scale:.96,y:0},transition:{type:"spring",stiffness:400,damping:17},...f,children:[jsxRuntime.jsxs(react.AnimatePresence,{mode:"wait",children:[a&&jsxRuntime.jsx(react.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex items-center space-x-2",children:jsxRuntime.jsx(lucideReact.Loader2,{className:"w-5 h-5 animate-spin mr-2"})},"loading"),!a&&o&&jsxRuntime.jsx(react.motion.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},className:"mr-2 inline-flex items-center justify-center flex-shrink-0",children:I__namespace.isValidElement(o)?o:I__namespace.createElement(o,{size:18,className:"flex-shrink-0"})},"leftIcon")]}),a?b:c,!a&&l&&jsxRuntime.jsx("span",{className:"ml-2 inline-flex items-center justify-center flex-shrink-0",children:I__namespace.isValidElement(l)?l:I__namespace.createElement(l,{size:18,className:"flex-shrink-0"})})]})});se.displayName="Button";function at({image:t,title:r,description:s,cta:n,hasBadge:a,badgeText:o,badgeColor:l="bg-primary",textColor:c="text-white"}){return jsxRuntime.jsxs(react.motion.article,{className:e("w-64","bg-white","rounded-lg","overflow-hidden","shadow-md","relative"),children:[jsxRuntime.jsx(react.motion.div,{className:"h-40 w-full overflow-hidden",children:t||jsxRuntime.jsx(react.motion.div,{className:e("h-40 w-full","bg-gray-200","flex items-center justify-center"),children:jsxRuntime.jsx(react.motion.span,{className:"text-gray-500",children:jsxRuntime.jsx(lucideReact.Image,{})})})}),a&&o&&jsxRuntime.jsx(react.motion.div,{className:e("absolute top-2 left-2","text-xs","font-semibold","px-4 py-1","rounded-lg","shadow-md",l,c),children:o}),jsxRuntime.jsxs(react.motion.div,{className:"p-4",children:[jsxRuntime.jsx(react.motion.h3,{className:e("text-lg","font-semibold","text-gray-900","dark:text-stone-100"),children:r}),s&&jsxRuntime.jsx(react.motion.p,{className:e("text-sm","text-gray-600","dark:text-stone-400","mt-2"),children:s}),n&&jsxRuntime.jsx(react.motion.div,{className:"mt-2",children:n})]})]})}var Yt=classVarianceAuthority.cva("py-8",{variants:{variant:{default:"",compact:"py-4",centered:""}},defaultVariants:{variant:"default"}});function ot({header:t,description:r,link:s,items:n,children:a,variant:o,className:l,...c}){let p=I.useRef(null),[b,f]=I.useState(false),[i,m]=I.useState(false),y=I.useCallback(()=>{let h=p.current;h&&(f(h.scrollLeft>0),m(h.scrollLeft<h.scrollWidth-h.clientWidth-1));},[]);I.useEffect(()=>{y();let h=p.current;if(h)return h.addEventListener("scroll",y),window.addEventListener("resize",y),()=>{h.removeEventListener("scroll",y),window.removeEventListener("resize",y);}},[y,n,a]);let v=h=>{let w=p.current;w&&w.scrollTo({left:w.scrollLeft+h,behavior:"smooth"});},d=()=>v(-(p.current?.clientWidth??300)*.8),g=()=>v((p.current?.clientWidth??300)*.8),k=Array.isArray(n)&&n.length>0;return jsxRuntime.jsx("section",{className:e(Yt({variant:o}),l),...c,children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[jsxRuntime.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between mb-4 items-start gap-2",children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-start gap-1",children:[t&&jsxRuntime.jsx("h2",{className:"font-bold",children:t}),r&&jsxRuntime.jsx("p",{className:"text-sm text-text-muted",children:r})]}),s&&jsxRuntime.jsx("div",{children:s})]}),jsxRuntime.jsxs("div",{className:"relative",children:[b&&jsxRuntime.jsx("button",{"aria-label":"Scroll left",onClick:d,className:"absolute left-0 top-1/2 -translate-y-1/2 z-10 p-2 rounded-full bg-background/70 backdrop-blur hover:scale-105 transition-transform",children:jsxRuntime.jsx(lucideReact.ArrowLeft,{className:"w-5 h-5"})}),i&&jsxRuntime.jsx("button",{"aria-label":"Scroll right",onClick:g,className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 p-2 rounded-full bg-background/70 backdrop-blur hover:scale-105 transition-transform",children:jsxRuntime.jsx(lucideReact.ArrowRight,{className:"w-5 h-5"})}),jsxRuntime.jsx("div",{ref:p,className:"flex gap-4 overflow-x-auto pb-4 scrollbar-hide scroll-smooth",role:"list",children:k?n.map((h,w)=>jsxRuntime.jsx("div",{className:"flex-shrink-0",children:h},I__namespace.default.isValidElement(h)?h.key??w:w)):a})]})]})})}var ea=classVarianceAuthority.cva("relative rounded-md border-2 flex items-center justify-center transition-all duration-200 cursor-pointer",{variants:{variant:{default:"border-input-border hover:border-primary/50",filled:"border-transparent bg-background-secondary",outline:"border-primary bg-transparent"},size:{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},checked:{true:"bg-primary border-primary",false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{variant:"default",size:"md",checked:false,disabled:false}}),ta=I__namespace.forwardRef(({className:t,variant:r,size:s="md",label:n,description:a,errorMessage:o,checked:l=false,disabled:c=false,onCheckedChange:p,onChange:b,id:f,name:i,...m},y)=>{let v={sm:12,md:16,lg:20},d=h=>{let w=h.target.checked;p?.(w),b?.(h);},g=I__namespace.useId(),k=f||i||`checkbox-${g}`;return jsxRuntime.jsxs(react.motion.div,{className:"space-y-1",children:[jsxRuntime.jsxs(react.motion.div,{className:"flex items-start space-x-3",children:[jsxRuntime.jsxs(react.motion.div,{className:"relative",children:[jsxRuntime.jsx(react.motion.button,{type:"button",onClick:()=>!c&&p?.(!l),disabled:c,className:e(ea({variant:r,size:s,checked:l,disabled:c,className:t})),whileTap:c?{}:{scale:.95},children:jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:l?1:0,scale:l?1:.5},transition:{duration:.2},children:jsxRuntime.jsx(lucideReact.Check,{size:v[s||"md"],className:"text-white"})})}),jsxRuntime.jsx("input",{ref:y,id:k,name:i,type:"checkbox",checked:l,onChange:d,disabled:c,className:"sr-only",...m})]}),n&&jsxRuntime.jsxs(react.motion.div,{className:"flex-1",children:[jsxRuntime.jsx(react.motion.label,{htmlFor:k,className:e("text-sm font-medium cursor-pointer",c?"text-foreground-tertiary cursor-not-allowed":"text-foreground",o&&"text-error"),children:n}),a&&jsxRuntime.jsx(react.motion.p,{className:"text-sm text-foreground-tertiary mt-1",children:a})]})]}),o&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"text-xs text-error ml-8",children:o})]})});ta.displayName="Checkbox";var sa=classVarianceAuthority.cva("relative w-full max-h-[90vh] rounded-lg shadow-2xl overflow-hidden z-10",{variants:{size:{sm:"max-w-md",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-7xl"}},defaultVariants:{size:"md"}});function he({isOpen:t,onClose:r,children:s,title:n,size:a="md",showCloseButton:o=true,closeOnOverlayClick:l=true,closeOnEscape:c=true,className:p}){return I.useEffect(()=>{let b=f=>{f.key==="Escape"&&c&&r?.();};if(t){document.addEventListener("keydown",b);let f=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",b),document.body.style.overflow=f||"unset";}}return ()=>{document.removeEventListener("keydown",b);}},[t,r,c]),t?reactDom.createPortal(jsxRuntime.jsx(react.AnimatePresence,{mode:"wait",initial:false,children:t&&jsxRuntime.jsxs(react.motion.div,{transition:{duration:.2},className:e("fixed inset-0 z-[9999]","flex items-center justify-center","p-4"),role:"dialog","aria-modal":"true","aria-labelledby":n?"modal-title":void 0,children:[jsxRuntime.jsx(react.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:e("absolute inset-0","bg-black/60","backdrop-blur-sm"),onClick:l?r:void 0,"aria-label":"Close modal"}),jsxRuntime.jsxs(react.motion.div,{initial:{scale:.9,opacity:0,y:30},animate:{scale:1,opacity:1,y:0},exit:{scale:.9,opacity:0,y:30},transition:{type:"spring",damping:25,stiffness:300},onClick:b=>b.stopPropagation(),className:e(sa({size:a}),"bg-surface border border-border",p),children:[(n||o)&&jsxRuntime.jsxs("div",{className:e("flex items-center justify-between","p-6","border-b border-border"),children:[n&&jsxRuntime.jsx("h3",{id:"modal-title",className:"font-semibold text-lg text-foreground",children:n}),o&&jsxRuntime.jsx("button",{onClick:r,className:e("p-1 rounded-lg text-foreground-secondary","hover:text-foreground hover:bg-background-secondary","transition-colors"),"aria-label":"Close modal",children:jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5"})})]}),jsxRuntime.jsx("div",{className:e("p-6","overflow-y-auto","max-h-[calc(90vh-8rem)]","scrollbar-hide","text-foreground"),children:s})]})]},"modal")}),document.body):null}function we({isOpen:t,onClose:r,environmentalImpact:s,co2SavingsTitle:n="CO\u2082 Savings",waterSavingsTitle:a="Water Savings",weightLabel:o="Weight",co2SavingsLabel:l="CO\u2082 Saved",waterSavingsLabel:c="Water Saved",materialBreakdownLabel:p="Material Breakdown",carDistanceLabel:b=" by car",showerCountLabel:f=" showers",co2EquivalenceLabel:i="Equivalent to",waterEquivalenceLabel:m="Equivalent to",infoText:y="These values are estimates based on the savings generated by reusing products instead of manufacturing new ones. The calculations consider the average impact of producing each material."}){let v=d=>new Intl.NumberFormat("es-CL",{minimumFractionDigits:1,maximumFractionDigits:1}).format(d);return jsxRuntime.jsx(he,{isOpen:t,onClose:r,title:"Impacto Ambiental Detallado",size:"md",children:jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsxs("div",{className:e("flex flex-col md:flex-row","gap-4 md:gap-6"),children:[jsxRuntime.jsxs("div",{className:e("bg-success/10 dark:bg-success/20","rounded-lg","p-4","flex-1"),children:[jsxRuntime.jsxs("div",{className:e("flex items-center","gap-2","mb-2"),children:[jsxRuntime.jsx(lucideReact.Leaf,{className:"w-5 h-5 text-success"}),jsxRuntime.jsx("span",{className:e("text-sm font-medium text-text-muted","dark:text-stone-400"),children:n})]}),jsxRuntime.jsxs("p",{className:e("text-2xl font-bold text-success"),children:[v(s.totalCo2SavingsKG)," kg"]}),jsxRuntime.jsxs("p",{className:e("text-xs text-text-muted","dark:text-stone-400","mt-1"),children:[i," ",v(s.totalCo2SavingsKG*4.5)," km",b]})]}),jsxRuntime.jsxs("div",{className:e("bg-info/10","dark:bg-info/20","rounded-lg","p-4","flex-1"),children:[jsxRuntime.jsxs("div",{className:e("flex","items-center","gap-2","mb-2"),children:[jsxRuntime.jsx(lucideReact.Droplets,{className:"w-5 h-5 text-info"}),jsxRuntime.jsx("span",{className:e("text-sm","font-medium","text-text-muted","dark:text-stone-400"),children:a})]}),jsxRuntime.jsxs("p",{className:e("text-2xl","font-bold","text-info"),children:[v(s.totalWaterSavingsLT)," L"]}),jsxRuntime.jsxs("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mt-1"),children:[m," ",v(s.totalWaterSavingsLT/8)," ",f]})]})]}),s.materialBreakdown.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("h3",{className:e("text-lg","font-bold","text-text-primary","dark:text-stone-100","mb-4","flex","items-center","gap-2"),children:[jsxRuntime.jsx(lucideReact.Info,{className:"w-5 h-5"}),p]}),jsxRuntime.jsx("div",{className:e("space-y-3"),children:s.materialBreakdown.map((d,g)=>jsxRuntime.jsxs("div",{className:e("border","border-neutral/20","dark:border-stone-700","rounded-lg","p-4","hover:bg-neutral/5","dark:hover:bg-stone-800/50","transition-colors"),children:[jsxRuntime.jsxs("div",{className:e("flex","items-center","justify-between","mb-3"),children:[jsxRuntime.jsx("h4",{className:e("font-semibold","text-text-primary","dark:text-stone-100"),children:d.materialType}),jsxRuntime.jsxs("span",{className:e("text-lg","font-bold","text-primary"),children:[d.percentage.toFixed(1),"%"]})]}),jsxRuntime.jsxs("div",{className:e("grid","grid-cols-3","gap-3","text-sm"),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mb-1"),children:o}),jsxRuntime.jsxs("p",{className:e("font-semibold","text-text-secondary","dark:text-stone-300"),children:[v(d.weightKG)," kg"]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mb-1"),children:l}),jsxRuntime.jsxs("p",{className:e("font-semibold","text-success"),children:[v(d.co2SavingsKG)," kg"]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mb-1"),children:c}),jsxRuntime.jsxs("p",{className:e("font-semibold","text-info"),children:[v(d.waterSavingsLT)," L"]})]})]}),jsxRuntime.jsx("div",{className:e("mt-3","h-2","bg-neutral/10","dark:bg-stone-700","rounded-full","overflow-hidden"),children:jsxRuntime.jsx("div",{className:"h-full bg-primary rounded-full transition-all duration-500",style:{width:`${d.percentage}%`}})})]},g))})]}),jsxRuntime.jsx("div",{className:e("bg-primary/5","dark:bg-primary/10","rounded-lg","p-4","text-sm","text-text-secondary","dark:text-stone-300"),children:jsxRuntime.jsxs("p",{className:e("flex","items-start","gap-2"),children:[jsxRuntime.jsx(lucideReact.Info,{className:e("w-4","h-4","mt-0.5","text-primary","flex-shrink-0")}),jsxRuntime.jsx("span",{children:y})]})})]})})}function it({brand:t,socialLinks:r,description:s,exploreItems:n,exploreLabel:a="Explore",communityItems:o,communityLabel:l="Community",legalItems:c,legalLabel:p="Legal",copyRightText:b="All rights reserved."}){return jsxRuntime.jsx(react.motion.footer,{className:e("bg-gradient-to-r from-primary-dark via-primary to-primary-dark"),children:jsxRuntime.jsxs(react.motion.div,{className:"max-w-7xl mx-auto px-6 py-12",children:[jsxRuntime.jsxs(react.motion.div,{className:"grid grid-cols-1 md:grid-cols-4 gap-8",children:[jsxRuntime.jsxs(react.motion.div,{className:"space-y-4 flex flex-col",children:[t,jsxRuntime.jsx(react.motion.p,{className:"text-sm text-white leading-relaxed",children:s}),r&&jsxRuntime.jsx(react.motion.div,{className:e("flex items-center gap-3"),children:r})]}),n&&jsxRuntime.jsxs(react.motion.div,{children:[jsxRuntime.jsx(react.motion.h3,{className:"font-semibold text-white mb-4",children:a}),jsxRuntime.jsx(react.motion.ul,{className:"space-y-3",children:n&&n.map((f,i)=>jsxRuntime.jsx(react.motion.li,{children:f},i))})]}),o&&jsxRuntime.jsxs(react.motion.div,{children:[jsxRuntime.jsx(react.motion.h3,{className:"font-semibold text-white mb-4",children:l}),jsxRuntime.jsx(react.motion.ul,{className:"space-y-3",children:o&&o.map((f,i)=>jsxRuntime.jsx(react.motion.li,{children:f},i))})]}),c&&jsxRuntime.jsxs(react.motion.div,{children:[jsxRuntime.jsx(react.motion.h3,{className:"font-semibold text-white mb-4",children:p}),jsxRuntime.jsx(react.motion.ul,{className:"space-y-3",children:c&&c.map((f,i)=>jsxRuntime.jsx(react.motion.li,{children:f},i))})]})]}),jsxRuntime.jsx(react.motion.div,{className:"mt-12 pt-8 border-t border-gray-200 dark:border-stone-800",children:jsxRuntime.jsxs(react.motion.p,{className:"text-sm text-center text-white",children:["\xA9 ",new Date().getFullYear()," EKORU. ",b]})})]})})}function lt({banners:t,ImageComponent:r,autoScrollInterval:s=5e3}){let[n,a]=I.useState(0),[o,l]=I.useState(false);I.useEffect(()=>{if(o)return;let i=setInterval(()=>{a(m=>(m+1)%t.length);},s);return ()=>clearInterval(i)},[t.length,s,o]);let c=()=>{a(i=>(i+1)%t.length);},p=()=>{a(i=>(i-1+t.length)%t.length);},b=i=>{a(i);},f=r||"img";return jsxRuntime.jsxs("section",{className:"relative overflow-hidden",onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),children:[jsxRuntime.jsx("div",{className:"relative h-[300px] sm:h-[350px] md:h-[400px] lg:h-[500px] xl:h-[600px]",children:t.map((i,m)=>{let y=m===n,v=m<n;return jsxRuntime.jsx("div",{className:`absolute inset-0 transition-transform duration-700 ease-in-out ${y?"translate-x-0 opacity-100":v?"-translate-x-full opacity-0":"translate-x-full opacity-0"}`,"aria-hidden":!y,children:jsxRuntime.jsx("div",{className:`${i.bgColor} h-full flex items-center`,children:jsxRuntime.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-20 py-4 sm:py-6 md:py-6 lg:py-12 w-full",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-6 md:gap-6 lg:gap-8 items-center h-full",children:[jsxRuntime.jsxs("div",{className:"text-white text-center lg:text-left space-y-2 sm:space-y-3 lg:space-y-4",children:[jsxRuntime.jsx("h1",{className:"text-xl sm:text-2xl md:text-3xl lg:text-5xl xl:text-6xl font-bold leading-tight animate-fade-in",children:i.title}),jsxRuntime.jsx("h2",{className:"text-base sm:text-lg md:text-xl lg:text-2xl text-white/90 animate-fade-in-delay-100",children:i.subtitle}),jsxRuntime.jsx("p",{className:"text-xs sm:text-sm md:text-base lg:text-lg text-white/80 max-w-lg mx-auto lg:mx-0 line-clamp-3 animate-fade-in-delay-200",children:i.description}),jsxRuntime.jsx("div",{className:"text-xs sm:text-sm text-white/60 italic pt-2 animate-fade-in-delay-300",children:"Pronto..."})]}),jsxRuntime.jsx("div",{className:"flex justify-center lg:justify-end mt-2 lg:mt-0",children:jsxRuntime.jsx("div",{className:"relative w-24 h-24 sm:w-32 sm:h-32 md:w-48 md:h-48 lg:w-72 lg:h-72 xl:w-80 xl:h-80 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center overflow-hidden transition-transform duration-300 hover:scale-105",children:jsxRuntime.jsx(f,{src:i.image,alt:i.title,width:320,height:320,className:"w-12 h-12 sm:w-16 sm:h-16 md:w-24 md:h-24 lg:w-36 lg:h-36 xl:w-40 xl:h-40 object-contain",...r&&m===0?{priority:true}:{}})})})]})})})},i.id)})}),t.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:p,className:"absolute left-2 sm:left-4 top-1/2 transform -translate-y-1/2 bg-black/30 hover:bg-black/50 text-white p-2 sm:p-3 rounded-full backdrop-blur-sm transition-all duration-200 hover:scale-110 focus:outline-none focus:ring-2 focus:ring-white/50","aria-label":"Previous banner",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"w-4 h-4 sm:w-6 sm:h-6"})}),jsxRuntime.jsx("button",{onClick:c,className:"absolute right-2 sm:right-4 top-1/2 transform -translate-y-1/2 bg-black/30 hover:bg-black/50 text-white p-2 sm:p-3 rounded-full backdrop-blur-sm transition-all duration-200 hover:scale-110 focus:outline-none focus:ring-2 focus:ring-white/50","aria-label":"Next banner",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-4 h-4 sm:w-6 sm:h-6"})})]}),t.length>1&&jsxRuntime.jsx("div",{className:"absolute bottom-3 sm:bottom-6 left-1/2 transform -translate-x-1/2 flex space-x-2",children:t.map((i,m)=>jsxRuntime.jsx("button",{onClick:()=>b(m),className:`w-2 h-2 sm:w-3 sm:h-3 rounded-full transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-white/50 ${m===n?"bg-white w-6 sm:w-8":"bg-white/50 hover:bg-white/70"}`,"aria-label":`Go to banner ${m+1}`,"aria-current":m===n?"true":"false"},m))})]})}function ct({brand:t,navigationLinks:r,mobileMenuNavigationLinks:s,appNavigationItems:n,mobileMenuAppNavigationItems:a,searchPlaceholder:o="Search...",onSearch:l,className:c="",searchEnabled:p=true,sideMenuTitle:b="Menu",navbarAriaLabel:f="Main navigation",userActionsAriaLabel:i="User actions",toggleMobileMenuAriaLabel:m="Toggle mobile menu",closeMobileMenuAriaLabel:y="Close mobile menu",mobileMenuTitleAriaLabel:v="Mobile menu"}){let[d,g]=I.useState(false),[k,h]=I.useState(""),[w,N]=I.useState("");I.useEffect(()=>{let x=new IntersectionObserver(R=>{R.forEach(H=>{H.isIntersecting&&N(H.target.id);});},{threshold:.3});return r?.forEach(({id:R})=>{let H=document.getElementById(R);H&&x.observe(H);}),()=>x.disconnect()},[]);let V=()=>g(false),T=x=>{h(x.target.value);},S=x=>{x.preventDefault(),l?.(k);},D=x=>{x.key==="Escape"&&d&&g(false);},z=x=>{g(false),setTimeout(()=>{let R=document.getElementById(x);R&&R.scrollIntoView({behavior:"smooth"});},200);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("header",{className:e("bg-gradient-to-r from-navbar-dark via-navbar-main to-navbar-dark","sticky top-0 z-50",c),onKeyDown:D,children:jsxRuntime.jsxs("nav",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",role:"navigation","aria-label":f,children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center h-16",children:[jsxRuntime.jsx("div",{className:"flex-shrink-0",children:t||jsxRuntime.jsx("span",{className:"text-xl font-bold text-white",children:"EKORU"})}),p&&jsxRuntime.jsx("div",{className:"hidden md:flex flex-1 max-w-2xl mx-8",role:"search",children:jsxRuntime.jsxs("form",{onSubmit:S,className:"w-full flex items-center relative",children:[jsxRuntime.jsx("input",{id:"search-desktop",name:"search-desktop",type:"search",value:k,onChange:T,placeholder:o,className:e("w-full px-4 py-2","rounded-lg","border border-input-border","bg-input-bg","text-foreground","placeholder:text-foreground-tertiary","focus:outline-none","focus:ring-2","focus:ring-primary","focus:border-transparent")}),jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5 text-primary absolute right-4"})]})}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",role:"toolbar","aria-label":i,children:[n,jsxRuntime.jsx("div",{className:"hidden lg:flex items-center space-x-2",children:r&&r.map((x,R)=>jsxRuntime.jsxs(react.motion.a,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.4,delay:.3+R*.1},href:`#${x.id}`,className:e("relative","text-white","transition-all duration-200 ease-in-out","font-medium text-sm","group",{"text-secondary":w===x.id}),children:[x.label,jsxRuntime.jsx(react.motion.span,{initial:{scaleX:0},animate:{scaleX:w===x.id?1:0},transition:{duration:.3},className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary-light origin-left"}),jsxRuntime.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-white scale-x-0 group-hover:scale-x-100 transition-transform origin-left"})]},x.id))}),jsxRuntime.jsx("button",{onClick:()=>g(!d),className:e("p-2","rounded-lg","text-white","hover:bg-primary/30","transition-colors","lg:hidden"),"aria-label":m,"aria-expanded":d,children:jsxRuntime.jsx(lucideReact.Menu,{className:"h-6 w-6"})})]})]}),p&&jsxRuntime.jsx("div",{className:"md:hidden pb-4",role:"search",children:jsxRuntime.jsxs("form",{onSubmit:S,className:"w-full flex items-center relative",children:[jsxRuntime.jsx("input",{id:"search-mobile",name:"search-mobile",type:"search",value:k,onChange:T,placeholder:o,className:e("w-full","px-4 py-2","rounded-lg","border border-input-border","bg-input-bg","text-foreground","placeholder:text-foreground-tertiary","focus:outline-none","focus:ring-2","focus:ring-primary","focus:border-transparent")}),jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5 text-primary absolute right-4"})]})})]})}),jsxRuntime.jsx(react.AnimatePresence,{children:d&&jsxRuntime.jsxs("div",{className:"lg:hidden fixed inset-0 z-50 flex justify-end",role:"dialog","aria-modal":"true","aria-labelledby":v,children:[jsxRuntime.jsx(react.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>g(false),"aria-label":y}),jsxRuntime.jsx(react.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"tween",duration:.3},className:e("relative","w-full","max-w-sm","bg-background","shadow-xl","h-full","overflow-y-auto"),children:jsxRuntime.jsxs("div",{className:"p-6",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-6",children:[jsxRuntime.jsx(react.motion.h2,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},id:"mobile-menu-title",className:"text-xl font-semibold text-foreground",children:b}),jsxRuntime.jsx("button",{onClick:V,className:e("p-2","rounded-lg","text-foreground","hover:bg-background-secondary","transition-colors"),"aria-label":"Close mobile menu",children:jsxRuntime.jsx(lucideReact.X,{className:"h-6 w-6"})})]}),jsxRuntime.jsx("nav",{className:"space-y-2",children:a}),s&&jsxRuntime.jsx("div",{className:"mt-6 pt-6 border-t border-surface-active",children:s.map((x,R)=>jsxRuntime.jsx("div",{className:"h-full overflow-y-auto pb-20",children:jsxRuntime.jsxs("div",{className:"p-4 space-y-1",children:[jsxRuntime.jsx(react.motion.h3,{className:"text-sm font-semibold text-text-muted uppercase tracking-wide mb-3",children:x.title}),x.links.map(({id:H,isAnchor:Le,href:Te,label:ge})=>Le?jsxRuntime.jsx(react.motion.a,{href:Te||"#",className:e("w-full flex items-center justify-between","p-3","text-left","hover:bg-neutral-light/50","transition-colors","rounded-lg","border-b border-neutral/10"),children:jsxRuntime.jsx(react.motion.span,{className:"font-medium text-text-primary",children:ge})},H):jsxRuntime.jsx(react.motion.button,{onClick:()=>z(H),className:e("w-full flex items-center justify-between","p-3","text-left","hover:bg-neutral-light/50","transition-colors","rounded-lg","border-b border-neutral/10"),children:jsxRuntime.jsx(react.motion.span,{className:"font-medium text-text-primary",children:ge})},H))]})},R))})]})})]})})]})}var mt=classVarianceAuthority.cva("w-full rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 placeholder:text-input-placeholder text-left",{variants:{variant:{default:"bg-input-bg border-2 border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:ring-primary/20",filled:"bg-background border-2 border-transparent hover:bg-background focus:bg-input-bg focus:border-input-border-focus focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:bg-primary/5 focus:border-primary-active focus:ring-primary/20"},size:{sm:"h-9 text-sm",md:"h-11 text-base",lg:"h-14 text-lg"},hasError:{true:"border-error focus:border-error focus:ring-error/20"}},defaultVariants:{variant:"default",size:"md",hasError:false}}),ke=I__namespace.forwardRef(({className:t,variant:r,size:s,label:n,leftIcon:a,errorMessage:o,value:l,onChange:c,options:p=[],width:b="full",disabled:f=false,readOnly:i=false,showColorIcon:m=false,renderOption:y,searchEnabled:v=true,dropdownDirection:d="down",placeholder:g="Select...",name:k,noResultsText:h="No results found"},w)=>{let[N,V]=I__namespace.useState(false),[T,S]=I__namespace.useState(false),[D,z]=I__namespace.useState(""),[x,R]=I__namespace.useState(-1),[H,Le]=I__namespace.useState({top:0,left:0,width:0}),[Te,ge]=I__namespace.useState(false),Me=I__namespace.useRef(null),Ie=I__namespace.useRef(null),Ve=I__namespace.useRef(null),Ge=`${k}-listbox`,Lt=p.find(u=>u.value===l),ee=p.filter(u=>u.label.toLowerCase().includes(D.toLowerCase())),Tt={sm:"w-1/3",md:"w-1/2",lg:"w-2/3",full:"w-full"}[b],Ae=!!o;I__namespace.useEffect(()=>{ge(true);},[]);let ne=I__namespace.useCallback(()=>{if(Ie.current){let u=Ie.current.getBoundingClientRect();Le({top:d==="down"?u.bottom+4:u.top-4,left:u.left,width:u.width});}},[d]);I__namespace.useEffect(()=>(T&&(ne(),window.addEventListener("scroll",ne,true),window.addEventListener("resize",ne)),()=>{window.removeEventListener("scroll",ne,true),window.removeEventListener("resize",ne);}),[T,ne]),I__namespace.useEffect(()=>{let u=q=>{Me.current&&!Me.current.contains(q.target)&&Ve.current&&!Ve.current.contains(q.target)&&(S(false),z(""));};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]),I__namespace.useEffect(()=>{T&&R(0);},[T,D]);let Mt=()=>{V(true);},It=()=>{V(false);},We=u=>jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[m&&u?.iconColor&&jsxRuntime.jsx(lucideReact.Circle,{size:18,style:{color:u.iconColor,fill:u.iconColor},className:e("rounded-full",{"border border-gray-400":u.iconColor==="#FFFFFF"})}),u?.label||g]}),Vt=u=>{if(!T){(u.key==="ArrowDown"||u.key==="Enter"||u.key===" ")&&(S(true),u.preventDefault());return}u.key==="ArrowDown"?(R(q=>Math.min(q+1,ee.length-1)),u.preventDefault()):u.key==="ArrowUp"?(R(q=>Math.max(q-1,0)),u.preventDefault()):u.key==="Enter"?(ee[x]&&(c?.(ee[x].value),S(false),z("")),u.preventDefault()):u.key==="Escape"&&(S(false),z(""),u.preventDefault());},At=jsxRuntime.jsx(react.AnimatePresence,{children:T&&jsxRuntime.jsxs(react.motion.div,{ref:Ve,initial:{opacity:0,y:d==="down"?-10:10},animate:{opacity:1,y:0},exit:{opacity:0,y:d==="down"?-10:10},transition:{duration:.15,ease:"easeOut"},id:Ge,role:"listbox","aria-activedescendant":x>=0&&ee[x]?`${k}-option-${ee[x].value}`:void 0,tabIndex:-1,style:{position:"fixed",top:d==="down"?`${H.top}px`:"auto",bottom:d==="up"?`${window.innerHeight-H.top}px`:"auto",left:`${H.left}px`,width:`${H.width}px`,zIndex:9999},className:e("bg-surface-elevated","border-2 border-primary rounded-lg shadow-2xl overflow-hidden"),children:[v&&jsxRuntime.jsx("input",{type:"text",placeholder:"Search...",className:"w-full px-4 py-2 border-b border-input-border outline-none bg-surface-elevated text-foreground",value:D,onChange:u=>z(u.target.value),"aria-label":"Search options",onClick:u=>u.stopPropagation()}),jsxRuntime.jsx("ul",{className:"max-h-60 overflow-y-auto w-full bg-surface-elevated",children:ee.length>0?ee.map((u,q)=>jsxRuntime.jsx("li",{id:`${k}-option-${u.value}`,role:"option","aria-selected":u.value===l,tabIndex:0,onClick:()=>{c?.(u.value),S(false),z("");},onMouseEnter:()=>R(q),className:e("px-4 py-2 w-full cursor-pointer hover:bg-primary/10 flex items-center gap-2 transition-colors",u.value===l&&"bg-primary/10 font-semibold",x===q&&"bg-primary/20"),children:y?y(u,u.value===l):We(u)},u.value)):jsxRuntime.jsx("li",{className:"px-4 py-2 text-sm text-foreground-tertiary italic",children:h})})]},"dropdown")});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:e("space-y-2",Tt),ref:Me,children:[n&&jsxRuntime.jsx("label",{htmlFor:k,className:"block text-sm font-medium text-foreground",children:n}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsxs(react.motion.div,{initial:false,animate:{scale:N?1.002:1},transition:{type:"spring",stiffness:400,damping:17},className:"relative",children:[a&&jsxRuntime.jsx(a,{className:e("absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 transition-colors duration-200 pointer-events-none",N?"text-primary":"text-foreground-tertiary",Ae&&"text-error")}),jsxRuntime.jsxs("button",{type:"button",ref:u=>{Ie.current=u,typeof w=="function"?w(u):w&&(w.current=u);},id:k,name:k,disabled:f||i,"aria-haspopup":"listbox","aria-expanded":T,"aria-controls":Ge,onClick:()=>!i&&S(!T),onFocus:Mt,onBlur:It,onKeyDown:Vt,className:e(mt({variant:r,size:s,hasError:Ae,className:t}),{"pl-3":!a,"pl-10":a,"pr-10":true}),children:[We(Lt),jsxRuntime.jsx(lucideReact.ChevronDown,{size:18,className:e("absolute right-3 top-1/2 transform -translate-y-1/2 transition-all duration-200 pointer-events-none",T&&"rotate-180",N?"text-primary":"text-foreground-tertiary",Ae&&"text-error")})]})]}),o&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"mt-1 text-xs text-error",children:o})]})]}),Te&&reactDom.createPortal(At,document.body)]})});ke.displayName="Select";var pt=classVarianceAuthority.cva("flex items-center justify-center min-w-[120px] rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-background-secondary text-foreground hover:bg-background border-2 border-transparent focus:border-primary focus:ring-primary/20",primary:"bg-primary text-white hover:bg-primary-hover focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:ring-primary/20"},size:{sm:"h-8 px-2 text-sm gap-1",md:"h-10 px-2.5 text-base gap-2",lg:"h-12 px-3 text-lg gap-2"}},defaultVariants:{variant:"default",size:"md"}}),Sa=I__namespace.forwardRef(({currentPage:t,totalPages:r,onPageChange:s,itemsPerPage:n=10,onItemsPerPageChange:a,previousLabel:o="Previous",nextLabel:l="Next",rowsLabel:c="Rows:",previousAriaLabel:p="Go to previous page",nextAriaLabel:b="Go to next page",showItemsPerPage:f=true,itemsPerPageOptions:i=[10,25,50,100],showPageInfo:m=true,pageInfoTemplate:y="Page {current} of {total}",showIcons:v=true,variant:d,size:g,className:k},h)=>{let w=i.map(S=>({label:S.toString(),value:S})),N=y.replace("{current}",t.toString()).replace("{total}",r.toString()),V=()=>{t>1&&s(t-1);},T=()=>{t<r&&s(t+1);};return jsxRuntime.jsxs("div",{ref:h,className:e("flex flex-col items-center justify-between gap-4 md:flex-row",k),children:[m&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:N}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[f&&a&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:c}),jsxRuntime.jsx(ke,{value:n,onChange:S=>a(S),options:w,size:g,variant:d==="primary"||d===null?"default":d,dropdownDirection:"up",searchEnabled:false,width:"lg"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("button",{onClick:V,disabled:t===1,className:e(pt({variant:d,size:g})),"aria-label":p,children:[v&&jsxRuntime.jsx(lucideReact.ChevronLeft,{size:16}),o]}),jsxRuntime.jsxs("button",{onClick:T,disabled:t===r,className:e(pt({variant:d,size:g})),"aria-label":b,children:[l,v&&jsxRuntime.jsx(lucideReact.ChevronRight,{size:16})]})]})]})]})});Sa.displayName="Pagination";function Pe({isFlipped:t,setIsFlipped:r,onCardClick:s,productImage:n,fallbackImage:a,productCondition:o,brand:l,name:c,description:p,price:b,color:f,isExchangeable:i,isStoreProduct:m,hasOffer:y,offerPrice:v,onAddToCart:d,onExchange:g,addToCartAriaLabel:k="Add to cart",exchangeAriaLabel:h="Exchange product",offerLabel:w="Price Drop",localeString:N="es-CL",addToCartLabel:V="Agregar al carrito",exchangeLabel:T="Intercambiar",interests:S=["exchange interest1","exchange interest2","exchange interest3"]}){let D={NEW:"bg-green-500 text-white",OPEN_BOX:"bg-blue-400 text-white",LIKE_NEW:"bg-emerald-400 text-white",FAIR:"bg-yellow-400 text-gray-900",POOR:"bg-red-500 text-white",FOR_PARTS:"bg-gray-500 text-white",REFURBISHED:"bg-purple-500 text-white"},z=x=>x&&D[x]||"bg-gray-300 text-gray-700";return jsxRuntime.jsxs("div",{className:e("card-flip-front","bg-white dark:bg-stone-800","rounded-xl shadow-md","border border-gray-200/60 dark:border-stone-700/60","overflow-hidden","hover:shadow-xl","hover:border-primary/40","dark:hover:border-primary/50","transition-all duration-300","group"),children:[jsxRuntime.jsxs("figure",{className:e("relative","aspect-[4/3]","bg-gradient-to-br from-gray-100 to-gray-50","dark:from-stone-700 dark:to-stone-800","overflow-hidden"),children:[jsxRuntime.jsx("div",{className:e("absolute inset-0","opacity-0","group-hover:opacity-100","bg-gradient-to-t from-black/20 to-transparent","transition-opacity","duration-300","pointer-events-none","z-[1]")}),jsxRuntime.jsx("div",{className:e("relative","w-full","h-full","group-hover:scale-105","transition-transform","duration-500"),children:n||a}),m?y?jsxRuntime.jsx("span",{className:e("absolute","bottom-2","left-2","bg-red-500","text-white","backdrop-blur-md","text-[10px]","font-semibold","px-2.5","py-1","rounded-lg","shadow-md","border","border-white/50","dark:border-stone-700/50"),children:w}):null:jsxRuntime.jsx("span",{className:e("absolute","bottom-2","left-2",z(o),"backdrop-blur-md","text-[10px]","font-semibold","px-2.5","py-1","rounded-lg","capitalize","shadow-md","border","border-white/50","dark:border-stone-700/50"),children:o}),jsxRuntime.jsx("button",{onClick:x=>{x.stopPropagation(),r(!t);},className:e("absolute","top-2","right-2","bg-white/90","dark:bg-stone-800/90","hover:bg-primary","dark:hover:bg-primary","text-gray-700","dark:text-stone-200","hover:text-white","p-1.5","rounded-lg","shadow-lg","transition-all","duration-200","hover:scale-110","backdrop-blur-sm","border","border-gray-200/50","dark:border-stone-600/50","z-[2]"),"aria-label":"Ver impacto ambiental",children:jsxRuntime.jsx(lucideReact.RotateCcw,{className:"w-3.5 h-3.5"})})]}),jsxRuntime.jsxs("div",{className:"p-3.5",onClick:s,children:[jsxRuntime.jsxs("header",{className:e("flex","items-center","justify-between","gap-2","mb-2"),children:[jsxRuntime.jsx("span",{className:e("text-gray-500","dark:text-stone-400","text-[10px]","font-medium","uppercase","tracking-wide","truncate"),children:l}),f&&jsxRuntime.jsx("span",{className:e("text-gray-400","dark:text-stone-500","text-[10px]","font-medium","truncate","max-w-[60px]"),children:f})]}),jsxRuntime.jsx("h3",{className:e("font-semibold","text-sm","text-gray-900","dark:text-stone-50","line-clamp-1","mb-1.5","group-hover:text-primary","dark:group-hover:text-primary-hover","transition-colors","duration-200"),children:c}),jsxRuntime.jsx("p",{className:e("text-gray-600","dark:text-stone-400","text-xs","line-clamp-1","mb-3","leading-relaxed"),children:p}),jsxRuntime.jsxs("footer",{className:e("flex","flex-col","items-start","justify-between","gap-2"),children:[m&&y&&!i&&jsxRuntime.jsxs("div",{className:"flex items-center justify-center gap-1",children:[jsxRuntime.jsxs("span",{className:"text-primary dark:text-primary-hover font-bold text-xl",children:["$",v?.toLocaleString(N)]}),jsxRuntime.jsxs("span",{className:"text-sm text-gray-500 line-through",children:["$",b?.toLocaleString(N)]})]})," ",(!m||!y)&&!i&&jsxRuntime.jsxs("p",{className:"text-primary dark:text-primary-hover font-bold text-xl",children:["$",b?.toLocaleString(N)]}),i&&S&&jsxRuntime.jsx("div",{className:e("flex","items-center","gap-2","mb-2","overflow-x-auto","scroll-smooth","snap-x","snap-mandatory","px-3","flex-nowrap","w-full","scrollbar-hide"),style:{WebkitOverflowScrolling:"touch"},tabIndex:0,role:"list","aria-label":"Interests",children:S.map((x,R)=>jsxRuntime.jsx("span",{role:"listitem",className:e("inline-flex","items-center","flex-shrink-0","snap-start","text-[10px]","whitespace-nowrap","px-2","py-1","rounded-full","bg-gray-100","dark:bg-stone-700","text-gray-800","dark:text-stone-100","font-medium"),children:x},R))}),m&&!i&&jsxRuntime.jsx(se,{variant:"primary",size:"sm",fullWidth:true,"aria-label":k,rightIcon:lucideReact.ShoppingCart,onClick:x=>{x.stopPropagation(),d?.();},children:V}),i&&jsxRuntime.jsx(se,{variant:"primary",size:"sm",fullWidth:true,"aria-label":h,rightIcon:lucideReact.IterationCw,onClick:x=>{x.stopPropagation(),g?.();},children:T})," ",!i&&!m&&jsxRuntime.jsx(se,{variant:"primary",size:"sm",fullWidth:true,"aria-label":k,rightIcon:lucideReact.ShoppingCart,onClick:x=>{x.stopPropagation(),d?.();},children:V})]})]})]})}function Ce({isFlipped:t,setIsFlipped:r,setShowImpactModal:s,environmentalImpact:n,sellerName:a,sellerPhone:o,sellerAddress:l,impactLabel:c="Environmental Impact",materialsLabel:p="Materials:",viewMoreLabel:b="View Full Impact",sellerLabel:f="Seller Information",co2Label:i="CO\u2082 Saved",waterLabel:m="Water Saved"}){let y=g=>g>50?{level:"High",color:"success",width:"100%"}:g>20?{level:"Medium",color:"warning",width:"66%"}:{level:"Low",color:"info",width:"33%"},v=(()=>{if(n){if(Array.isArray(n)){let g=n.map(w=>{let N=w,V=N.material?.materialType??N.materialType??"Material",T=N.material?.percentage??N.percentage??0,S=N.quantity??N.weightKG??0,D=N.material?.estimatedCo2SavingsKG??N.co2SavingsKG??0,z=N.material?.estimatedWaterSavingsLT??N.waterSavingsLT??0;return {materialType:V,percentage:T,weightKG:S,co2SavingsKG:D,waterSavingsLT:z}}),k=g.reduce((w,N)=>w+(N.co2SavingsKG||0),0),h=g.reduce((w,N)=>w+(N.waterSavingsLT||0),0);return {totalCo2SavingsKG:k,totalWaterSavingsLT:h,materialBreakdown:g}}return n}})(),d=v?y(v.totalCo2SavingsKG):null;return jsxRuntime.jsx("div",{className:e("card-flip-back","bg-gradient-to-br from-white via-emerald-50/20 to-white","dark:from-stone-800 dark:via-stone-850 dark:to-stone-900","border-2 border-gray-200/60","dark:border-stone-700/50"),children:jsxRuntime.jsxs("div",{className:e("py-4","px-4","w-full","h-full","flex","flex-col","overflow-y-auto","scrollbar-hide","relative"),children:[jsxRuntime.jsx("button",{onClick:g=>{g.stopPropagation(),r(!t);},className:e("absolute top-2 right-2","bg-white/90","dark:bg-stone-800/90","hover:bg-primary","dark:hover:bg-primary","backdrop-blur-md","text-gray-700","dark:text-stone-200","hover:text-white","p-1.5","rounded-lg","shadow-lg","transition-all","duration-200","hover:scale-110","z-10","border","border-gray-200/50","dark:border-stone-600/50"),"aria-label":"Ver producto",children:jsxRuntime.jsx(lucideReact.RotateCcw,{className:"w-3.5 h-3.5"})}),n&&jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("div",{className:"flex items-center justify-between mb-0.5",children:jsxRuntime.jsxs("h4",{className:e("font-bold","text-gray-900","dark:text-stone-100","text-xs","flex","items-center","gap-1.5"),children:[jsxRuntime.jsx(lucideReact.Leaf,{className:"w-3.5 h-3.5 text-success"}),c]})}),jsxRuntime.jsx("div",{className:"mb-3",children:d&&jsxRuntime.jsx("span",{className:e("text-[9px]","font-semibold","px-2","py-0.5","rounded-full",`bg-${d.color}/15`,`text-${d.color}`,"border",`border-${d.color}/30`),children:d.level})}),jsxRuntime.jsx("div",{className:e("mb-2.5","bg-gray-200/60","dark:bg-stone-700/50","rounded-full","h-1","overflow-hidden"),children:jsxRuntime.jsx("div",{className:e("h-full","bg-gradient-to-r from-success to-success/70","rounded-full","transition-all","duration-1000"),style:{width:d?.width||"0%"}})}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-2.5",children:[jsxRuntime.jsxs("div",{className:e("bg-gradient-to-br from-success/8 to-transparent","dark:from-success/15 dark:to-transparent","rounded-lg","p-1.5","border","border-success/20","dark:border-success/30"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[jsxRuntime.jsx(lucideReact.Leaf,{className:"w-3 h-3 text-success"}),jsxRuntime.jsx("span",{className:"text-[9px] text-gray-600 dark:text-stone-400 font-medium",children:i})]}),jsxRuntime.jsxs("p",{className:"text-sm font-bold text-success",children:[v?.totalCo2SavingsKG," kg"]})]}),jsxRuntime.jsxs("div",{className:e("bg-gradient-to-br from-info/8 to-transparent","dark:from-info/15 dark:to-transparent","rounded-lg","p-1.5","border","border-info/20","dark:border-info/30"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[jsxRuntime.jsx(lucideReact.Droplets,{className:"w-3 h-3 text-info"}),jsxRuntime.jsx("span",{className:"text-[9px] text-gray-600 dark:text-stone-400 font-medium",children:m})]}),jsxRuntime.jsxs("p",{className:"text-sm font-bold text-info",children:[v?.totalWaterSavingsLT," L"]})]})]}),v&&v.materialBreakdown.length>0&&jsxRuntime.jsxs("div",{className:e("bg-gray-50/80","dark:bg-stone-800/50","rounded-lg","p-2.5","border","border-gray-200/50","dark:border-stone-700/50"),children:[jsxRuntime.jsx("p",{className:"text-[9px] font-semibold text-gray-700 dark:text-stone-300 mb-2",children:p}),jsxRuntime.jsx("div",{className:"space-y-2",children:v.materialBreakdown.slice(0,2).map((g,k)=>jsxRuntime.jsxs("div",{className:"space-y-1",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between text-[9px]",children:[jsxRuntime.jsx("span",{className:"text-gray-700 dark:text-stone-300 font-medium truncate",children:g.materialType}),jsxRuntime.jsxs("span",{className:"font-bold text-primary dark:text-primary ml-1",children:[g.percentage.toFixed(1),"%"]})]}),jsxRuntime.jsx("div",{className:"bg-gray-200 dark:bg-stone-700 rounded-full h-1 overflow-hidden",children:jsxRuntime.jsx("div",{className:e("h-full","bg-gradient-to-r from-primary to-primary-hover","rounded-full","transition-all","duration-500"),style:{width:`${g.percentage}%`}})})]},k))}),jsxRuntime.jsxs("button",{onClick:g=>{g.stopPropagation(),s(true);},className:e("w-full","mt-2.5","py-1.5","px-3","bg-primary/5","hover:bg-primary/10","dark:bg-primary/10","dark:hover:bg-primary/15","text-primary","dark:text-primary-hover","rounded-lg","text-[9px]","font-semibold","transition-all","duration-200","flex","items-center","justify-center","gap-1","border","border-primary/20","hover:border-primary/30","group/viewmore"),children:[b,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-3 h-3 group-hover/viewmore:translate-x-0.5 transition-transform duration-200"})]})]})]}),jsxRuntime.jsxs("div",{className:"mt-auto pt-3 border-t border-gray-200/60 dark:border-stone-700/50",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[jsxRuntime.jsx(lucideReact.UserRound,{className:"w-3.5 h-3.5 text-primary"}),jsxRuntime.jsx("h4",{className:"font-bold text-gray-900 dark:text-stone-100 text-xs",children:f})]}),jsxRuntime.jsxs("div",{className:e("space-y-1.5","bg-gray-50/80","dark:bg-stone-800/50","rounded-lg","p-2.5","border","border-gray-200/50","dark:border-stone-700/50"),children:[a&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-700 dark:text-stone-300 text-[9px] font-medium",children:[jsxRuntime.jsx(lucideReact.UserRound,{className:"w-3 h-3 flex-shrink-0 text-gray-400 dark:text-stone-500"}),jsxRuntime.jsx("span",{className:"truncate",children:a})]}),o&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-700 dark:text-stone-300 text-[9px] font-medium",children:[jsxRuntime.jsx(lucideReact.Phone,{className:"w-3 h-3 flex-shrink-0 text-gray-400 dark:text-stone-500"}),jsxRuntime.jsx("span",{className:"truncate",children:o})]}),l&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-700 dark:text-stone-300 text-[9px] font-medium",children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"w-3 h-3 flex-shrink-0 text-gray-400 dark:text-stone-500"}),jsxRuntime.jsx("span",{className:"truncate",children:l})]})]})]})]})})}function yt({product:t}){let[r,s]=I.useState(false),[n,a]=I.useState(false),{images:o,price:l,name:c,brand:p,color:b,description:f,seller:i}=t,m="hasOffer"in t,y=!!t.hasOffer,v=t.offerPrice,d=t.environmentalImpact,g=t.productCategory?.materials;return jsxRuntime.jsxs("article",{className:e("flex-shrink-0","w-[220px]","h-[350px]","card-flip-perspective"),children:[jsxRuntime.jsxs("div",{className:e("card-flip-inner",r?"card-flip-flipped":""),children:[jsxRuntime.jsx(Pe,{isFlipped:r,setIsFlipped:s,productImage:o&&o.length>0?jsxRuntime.jsx("img",{src:o[0],alt:c}):null,price:l,name:c,brand:p,productCondition:t.condition,color:b,description:f,isExchangeable:!m&&t.isExchangeable,isStoreProduct:m,hasOffer:y,offerPrice:v,fallbackImage:"https://images.unsplash.com/photo-1503023345310-bd7c1de61c7d?w=800&q=60&auto=format&fit=crop",onCardClick:()=>{},onAddToCart:()=>{},onExchange:()=>{}}),jsxRuntime.jsx(Ce,{isFlipped:r,setIsFlipped:s,setShowImpactModal:a,environmentalImpact:d??g,sellerName:i?.profile?.firstName,sellerPhone:i?.phone,sellerAddress:i?.address})]}),d&&jsxRuntime.jsx(we,{isOpen:n,onClose:()=>a(false),environmentalImpact:d})]})}function ht({icon:t,mainText:r,description:s}){return jsxRuntime.jsx("article",{className:"inline-flex p-4 shadow-md flex-col items-center justify-center min-w-40 rounded-lg bg-white dark:bg-stone-900",children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-lg bg-primary/10 text-primary mb-4",children:jsxRuntime.jsx(t,{className:"w-5 h-5"})}),jsxRuntime.jsx("h3",{className:"text-2xl font-bold text-gray-900 dark:text-stone-100 mb-1",children:r}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-stone-400 text-center",children:s})]})})}var Nt=classVarianceAuthority.cva("w-full table-auto border-collapse",{variants:{variant:{default:"",outlined:"border border-border rounded-lg overflow-hidden"},size:{sm:"text-sm",md:"text-base",lg:"text-lg"},striped:{true:""},hover:{true:""}},defaultVariants:{variant:"default",size:"md"}}),kt=I__namespace.forwardRef(({columns:t,data:r,rowKey:s,className:n,variant:a,size:o,striped:l,hover:c,emptyMessage:p="No data",...b},f)=>{let i=react.motion.div;return jsxRuntime.jsx(i,{ref:f,className:e("w-full overflow-auto",n),initial:{opacity:0,y:-6},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{duration:.35},...b,children:jsxRuntime.jsxs("table",{className:e(Nt({variant:a,size:o})),role:"table",children:[jsxRuntime.jsx("thead",{className:"bg-primary text-white",children:jsxRuntime.jsx("tr",{children:t.map(m=>jsxRuntime.jsx("th",{className:e("text-left px-4 py-2 font-medium text-white",m.className),children:m.header},m.key))})}),jsxRuntime.jsx("tbody",{children:r.length===0?jsxRuntime.jsx("tr",{children:jsxRuntime.jsx("td",{className:"px-4 py-6 text-center text-text-muted",colSpan:t.length,children:p})}):r.map((m,y)=>{let v=s?s(m):m.id??y;return jsxRuntime.jsx("tr",{className:e(l&&y%2===1?"bg-neutral/5 dark:bg-stone-800/40":"",c?"hover:bg-neutral/5 dark:hover:bg-stone-800/50":""),children:t.map(d=>{let g=m[d.key];return jsxRuntime.jsx("td",{className:"px-4 py-3 align-top",children:d.render?d.render(g,m):String(g??"")},d.key)})},String(v))})})]})})});kt.displayName="Table";var Oa=kt;var $a=classVarianceAuthority.cva("transition-colors",{variants:{variant:{p:"block",span:"inline",label:"block font-medium cursor-pointer",blockquote:"block border-l-4 border-primary pl-4 italic",small:"block text-sm",code:"inline-block font-mono bg-background-secondary px-1.5 py-0.5 rounded text-sm"},size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},color:{default:"text-foreground",primary:"text-primary",secondary:"text-foreground-secondary",tertiary:"text-foreground-tertiary",error:"text-error",success:"text-success",warning:"text-warning",muted:"text-muted"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"p",size:"base",weight:"normal",color:"default",align:"left"}}),Ga=I__namespace.forwardRef(({className:t,variant:r="p",size:s,weight:n,color:a,align:o,as:l,htmlFor:c,children:p,...b},f)=>jsxRuntime.jsx(l||r,{ref:f,htmlFor:r==="label"||l==="label"?c:void 0,className:e($a({variant:r,size:s,weight:n,color:a,align:o,className:t})),...b,children:p}));Ga.displayName="Text";var qa=classVarianceAuthority.cva("w-full rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 placeholder:text-input-placeholder resize-none",{variants:{variant:{default:"bg-input-bg border-2 border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:ring-primary/20",filled:"bg-background-secondary border-2 border-transparent hover:bg-background focus:bg-input-bg focus:border-input-border-focus focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:bg-primary/5 focus:border-primary-active focus:ring-primary/20"},textSize:{sm:"text-sm py-2 px-3 min-h-[80px]",md:"text-base py-3 px-3 min-h-[120px]",lg:"text-lg py-4 px-4 min-h-[160px]"},hasError:{true:"border-error focus:border-error focus:ring-error/20"}},defaultVariants:{variant:"default",textSize:"md",hasError:false}}),Ua=I__namespace.forwardRef(({className:t,variant:r,textSize:s,label:n,errorMessage:a,showCharCount:o=false,width:l="full",disabled:c=false,readOnly:p=false,maxLength:b,value:f="",name:i,id:m,...y},v)=>{let[d,g]=I__namespace.useState(false),k=!!a,h=String(f).length,w={sm:"w-1/3",md:"w-1/2",lg:"w-2/3",full:"w-full"}[l],N=I__namespace.useId(),V=m||i||`textarea-${N}`;return jsxRuntime.jsxs("div",{className:e("space-y-2",w),children:[n&&jsxRuntime.jsx("label",{htmlFor:V,className:"block text-sm font-medium text-foreground",children:n}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(react.motion.div,{initial:false,animate:{scale:d?1.002:1},transition:{type:"spring",stiffness:400,damping:17},className:"relative",children:jsxRuntime.jsx("textarea",{ref:v,id:V,name:i,value:f,disabled:c,readOnly:p,maxLength:b,onFocus:()=>g(true),onBlur:()=>g(false),className:e(qa({variant:r,textSize:s,hasError:k,className:t})),...y})}),o&&b&&jsxRuntime.jsxs("div",{className:"mt-1 text-xs text-foreground-tertiary text-right",children:[h," / ",b]})]}),a&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"text-xs text-error",children:a})]})});Ua.displayName="Textarea";var Rt=classVarianceAuthority.cva("w-full rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 placeholder:text-input-placeholder",{variants:{variant:{default:"bg-input-bg border-2 border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:ring-primary/20",filled:"bg-background-secondary border-2 border-transparent hover:bg-background-tertiary focus:bg-input-bg focus:border-input-border-focus focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:bg-primary/5 focus:border-primary-active focus:ring-primary/20"},size:{sm:"h-9 text-sm",md:"h-11 text-base",lg:"h-14 text-lg"},hasError:{true:"border-error focus:border-error focus:ring-error/20"}},defaultVariants:{variant:"default",size:"md",hasError:false}}),Et=I__namespace.forwardRef(({className:t,variant:r,size:s,hasError:n,label:a,leftIcon:o,errorMessage:l,type:c="text",width:p="full",id:b,name:f,disabled:i,onFocus:m,onBlur:y,...v},d)=>{let[g,k]=I__namespace.useState(false),[h,w]=I__namespace.useState(false),N={sm:"w-1/3",md:"w-1/2",lg:"w-2/3",full:"w-full"}[p],V=c==="password",T=V&&h?"text":c,S=n||!!l,D=R=>{k(true),m?.(R);},z=R=>{k(false),y?.(R);},x=()=>{w(R=>!R);};return jsxRuntime.jsxs("div",{className:e("space-y-2",N),children:[a&&jsxRuntime.jsx("label",{htmlFor:b||f,className:"block text-sm font-medium text-foreground",children:a}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsxs(react.motion.div,{initial:false,animate:{scale:g?1.002:1},transition:{type:"spring",stiffness:400,damping:17},className:"relative",children:[o&&jsxRuntime.jsx(o,{className:e("absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 transition-colors duration-200",g?"text-primary":"text-foreground-tertiary",S&&"text-error")}),jsxRuntime.jsx("input",{ref:d,id:b||f,name:f,type:T,disabled:i,onFocus:D,onBlur:z,className:e(Rt({variant:r,size:s,hasError:S,className:t}),{"pl-3":!o,"pl-10":o,"pr-10":V,"pr-3":!V}),...v}),V&&jsxRuntime.jsx("button",{type:"button",onClick:x,disabled:i,className:e("absolute right-3 top-1/2","transform","-translate-y-1/2","text-foreground-tertiary","hover:text-foreground-secondary","transition-colors","duration-200","disabled:opacity-50","disabled:cursor-not-allowed"),tabIndex:-1,children:jsxRuntime.jsx(react.AnimatePresence,{mode:"wait",children:h?jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsxRuntime.jsx(lucideReact.EyeOff,{className:"w-5 h-5"})},"eye-off"):jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsxRuntime.jsx(lucideReact.Eye,{className:"w-5 h-5"})},"eye")})})]}),l&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"mt-1 text-xs text-error",children:l})]})]})});Et.displayName="TextInput";var Za=classVarianceAuthority.cva("font-bold tracking-tight transition-colors",{variants:{level:{h1:"text-5xl md:text-6xl lg:text-7xl",h2:"text-4xl md:text-5xl lg:text-6xl",h3:"text-3xl md:text-4xl lg:text-5xl",h4:"text-2xl md:text-3xl lg:text-4xl",h5:"text-xl md:text-2xl lg:text-3xl",h6:"text-lg md:text-xl lg:text-2xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},color:{default:"text-foreground",primary:"text-primary",secondary:"text-foreground-secondary",tertiary:"text-foreground-tertiary",error:"text-error",success:"text-success",warning:"text-warning"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{level:"h1",weight:"bold",color:"default",align:"left"}}),er=I__namespace.forwardRef(({className:t,level:r="h1",weight:s,color:n,align:a,as:o,children:l,...c},p)=>jsxRuntime.jsx(o||r,{ref:p,className:e(Za({level:r,weight:s,color:n,align:a,className:t})),...c,children:l}));er.displayName="Title";
2
+ exports.AdBanner=Ot;exports.Banner=Je;exports.Button=se;exports.Card=at;exports.CardBackSide=Ce;exports.CardFrontSide=Pe;exports.Carousel=ot;exports.Checkbox=ta;exports.EnvironmentalImpactModal=we;exports.Footer=it;exports.HeroCarousel=lt;exports.Modal=he;exports.Navbar=ct;exports.Pagination=Sa;exports.ProductCard=yt;exports.Select=ke;exports.StatsCard=ht;exports.Table=Oa;exports.Text=Ga;exports.TextInput=Et;exports.Textarea=Ua;exports.Title=er;exports.bannerVariants=Ye;exports.buttonVariants=et;exports.checkboxVariants=ea;exports.cn=e;exports.inputVariants=Rt;exports.paginationButtonVariants=pt;exports.selectVariants=mt;exports.tableVariants=Nt;exports.textVariants=$a;exports.textareaVariants=qa;exports.titleVariants=Za;//# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map