@nuskin/react-mysite-elements 1.5.0-ui-fixes.2 → 1.5.0-ui-fixes.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/shopping-dashboard/TranslationKeys/ShoppingDashboardTranslationKeys.d.ts +0 -12
- package/dist/common/shopping-dashboard/shared/ConversionRate/ConversionRateFullView.styled.d.ts +12 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/gitlab-runner-data/builds/nextgen-development/mysite/npm/react-mysite-elements/dist/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/index.js","../src/index.ts","../src/common/card/NsProductCard.tsx","../src/common/card/styles/NsProductCard.Styled.tsx","../src/common/carousel/NsProductCarousel.tsx","../src/common/carousel/NsProductCarousel.styled.ts","../src/common/carousel/ProductTabCarousel.tsx","../src/common/Nav-Category-Navigation/NsCategoryNavigation.tsx","../src/common/Nav-Category-Navigation/NsCategoryNavigation.styled.tsx","../src/common/carousel/ProductTabCarousel.styled.tsx","../src/common/headers/MysiteHero.tsx","../src/common/headers/MysiteHero.styled.tsx","../src/common/icon/icons/PlaceholderImage.tsx","../src/common/icon/icons/ArrowDownIcon.tsx","../src/common/utils/gtmTracking.ts","../src/common/shopping-dashboard/ShoppingDashboard.styled.tsx","../src/common/shopping-dashboard/shared/DashboardHeader.tsx","../src/common/shopping-dashboard/shared/DashboardHeader.styled.tsx","../src/common/shopping-dashboard/TranslationKeys/translationResolver.ts","../src/common/shopping-dashboard/TranslationKeys/ShoppingDashboardTranslationKeys.ts","../src/common/shopping-dashboard/utils/marketOptions.ts","../src/common/shopping-dashboard/shared/StatsCard.tsx","../src/common/shopping-dashboard/shared/StatsCard.styled.tsx","../src/common/shopping-dashboard/shared/LoadingSkeletons.tsx","../src/common/shopping-dashboard/shared/LoadingSkeletons.styled.tsx","../src/common/shopping-dashboard/shared/TopProducts/TopSellingProductsList.tsx","../src/common/shopping-dashboard/utils/trendUtils.tsx","../src/common/shopping-dashboard/utils/dataUtils.ts","../src/common/shopping-dashboard/shared/TopProducts/TopSellingProductsList.styled.tsx","../src/common/shopping-dashboard/shared/WidgetMenu.tsx","../src/common/shopping-dashboard/shared/WidgetMenu.styled.tsx","../src/common/shopping-dashboard/shared/ConversionRate/ConversionRateChart.tsx","../src/common/shopping-dashboard/shared/ConversionRate/ConversionRateChart.styled.tsx","../src/common/shopping-dashboard/utils/dateConstants.ts","../src/common/shopping-dashboard/utils/dateFormat.ts","../src/common/shopping-dashboard/shared/Signups/SignupsChart.tsx","../src/common/shopping-dashboard/shared/Signups/SignupsChart.styled.tsx","../src/common/shopping-dashboard/shared/TopCategories/TopCategoriesPieChart.tsx","../src/common/shopping-dashboard/shared/TopCategories/TopCategoriesPieChart.styled.tsx","../src/common/shopping-dashboard/ShoppingDashboard.tsx","../src/common/shopping-dashboard/MysiteDashboardWithNavigation.tsx","../src/common/shopping-dashboard/shared/TopProducts/ProductsFullView.tsx","../src/common/shopping-dashboard/shared/PageHeader.tsx","../src/common/shopping-dashboard/shared/PageHeader.styled.tsx","../src/common/shopping-dashboard/shared/DataTable.tsx","../src/common/shopping-dashboard/shared/DataTable.styled.tsx","../src/common/shopping-dashboard/shared/Pagination.tsx","../src/common/shopping-dashboard/shared/Pagination.styled.tsx","../src/common/shopping-dashboard/shared/FullViewComponents.styled.tsx","../src/common/shopping-dashboard/shared/TopProducts/ProductsFullView.styled.tsx","../src/common/shopping-dashboard/shared/useViewport.ts","../src/common/shopping-dashboard/shared/ConversionRate/ConversionRateFullView.tsx","../src/common/shopping-dashboard/shared/ConversionRate/ConversionRateFullView.styled.tsx","../src/common/shopping-dashboard/shared/Signups/SignupsFullView.tsx","../src/common/shopping-dashboard/shared/Signups/SignupsFullView.styled.tsx","../src/common/shopping-dashboard/shared/TopCategories/CategoriesFullView.tsx","../src/common/shopping-dashboard/shared/TopCategories/CategoriesFullView.styled.tsx","../src/common/shopping-dashboard/TranslationContext.tsx","../src/common/shopping-dashboard/ProductOfferDashboard.styled.tsx","../src/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersPieChart.tsx","../src/common/shopping-dashboard/TranslationKeys/ProductOfferDashboardTranslationKeys.ts","../src/common/shopping-dashboard/ProductOfferDashboard.tsx","../src/common/shopping-dashboard/PoDashboardWithNavigation.tsx","../src/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersFullView.tsx","../src/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersFullView.styled.tsx","../src/common/shopping-dashboard/shared/FilterBar.styled.tsx","../src/common/shopping-dashboard/shared/FilterBar.tsx","../src/common/shopping-dashboard/fixtures/mockDashboardData.ts","../src/common/shopping-dashboard/fixtures/mockProductOfferData.ts"],"names":["rc","Object","create","qo","defineProperty","ac","getOwnPropertyDescriptor","nc","getOwnPropertyNames","ic","getPrototypeOf","lc","prototype","hasOwnProperty","ma","e","t","exports","sc","o","get","enumerable","ln","n","i","call","M","__esModule","value","dc","require_ReactPropTypesSecret","__commonJSMin","module","ReactPropTypesSecret","require_factoryWithThrowingShims","emptyFunction","emptyFunctionWithReset","Vn","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","name","isRequired","getShim","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require_prop_types","En","ReactIs","throwOnDirectAccess","index_exports","__export","CategoriesFullView","ConversionRateChart","ConversionRateFullView","DATE_RANGE_LABELS","DAYS_MAP","DashboardHeader","DataTable","FilterBar","MysiteDashboardWithNavigation","MysiteHero","NsCategoryNavigation","NsProductCard","NsProductCard_default","PageHeader","Pagination","PoDashboardWithNavigation","ProductCarousel","ProductCardCarousel","ProductOfferDashboard","ProductOfferDashboardTranslationKeys","ProductTabCarousel","ProductTabCarousel_default","ProductsFullView","ShoppingDashboard","ShoppingDashboardTranslationKeys","SignupsChart","SignupsFullView","StatsCard","TopCategoriesPieChart","TopPerformingOffersFullView","TopPerformingOffersPieChart","TopSellingProductsList","TranslationProvider","WidgetMenu","buildDefaultMarketOptions","calculatePercentage","calculateTotalPages","formatDateRange","formatDateRangeLabel","formatDisplayDate","formatISODate","formatShortDate","getDateRangeLabel","getDaysFromDateRange","getTranslation","getTranslationResolver","getTrendColor","getTrendIcon","mockCategories","mockConversionData","mockOrders","mockProductOfferStats","mockSignupData","mockSignupDetails","mockStats","mockTopOffers","mockTopProducts","paginateItems","resolveMarketOptions","resolveTranslation","setTranslationResolver","sortByNumericProperty","useTranslation","useTranslationResolver","__toCommonJS","import_react","require","import_foundation_ui_components","import_foundation_theme","PriceComponent","Bt","styled","ProductCardContainer","isMobile","ImageContainer","bgColor","DefaultImage","ProductTitle","ProductBadgeContainer","AddToCartButton","disabled","isHovered","CartIcon","import_material","import_jsx_runtime","productTitle","imageDetails","className","button","onCardClick","productStatusBadge","directSellerBadge","mySitePriceComponent","testId","mn","useState","isButtonHovered","setIsButtonHovered","xn","useMediaQuery","handleImageError","target","noImageFallback","fallbackImage","src","Ue","jsxs","onClick","tabIndex","children","jsx","onError","imageSrc","hn","NsImage","alt","imageAlt","areaLabel","width","title","showButton","buttonText","stopPropagation","onMouseEnter","onMouseLeave","height","viewBox","fill","xmlns","fillRule","clipRule","d","import_react_slick","import_useMediaQuery","import_Box","SlickContainer","ze","uo","Box","ScrollableContainer","CardList","ControlsContainer","ViewAllWrapper","$isMobile","ProductCountWrapper","ArrowsWrapper","$isDisabled","Scrollablewrapper","CustomTypography","bn","NsTypography","ViewAllLink","$disabled","EmptyProductCategories","ControlsHeaderRow","ProductInfoWrapper","CategoryNameWrapper","entries","renderEntry","settings","showControlButtons","allEntryLabel","allEntryLink","categoryName","emptyProductMessage","productsCountLabel","isInitialDataLoading","history","sliderRef","Ao","useRef","$n","prev","useCallback","current","slickPrev","next","slickNext","renderProductEntry","entry","index","ye","directSeller","sliderSettings","dots","infinite","speed","slidesToShow","Math","min","length","slidesToScroll","swipe","draggable","arrows","responsive","breakpoint","shouldShowNavigation","renderCarouselContent","map","Ln","Slider","ref","variant","preventDefault","push","In","NsCarouselControl","viewAllLabel","viewAllUrl","React","import_Tabs","import_Tab","import_prop_types","Wn","NsCategoryNavigationContainer","_n","div","TabPanel","other","Et","role","hidden","id","xa","propTypes","Xo","itemArray","controlledValue","onChange","Un","internalValue","setInternalValue","Yn","Gn","Tabs","orientation","event","newValue","item","jn","Tab","label","categoryId","findIndex","content","getMinHeight","$hasCategories","ProductTabCarouselContainer","oo","TabsContainer","ContentContainer","LoadingContainer","NoTabsContainer","SpinnerContainer","fetchCategories","fetchProducts","showCustomCategory","emptyProductTabs","getCategoryId","categories","ti","Ge","isLoadingInitialData","setIsLoadingInitialData","setCategories","isCategoriesLoaded","setIsCategoriesLoaded","selectedTab","setSelectedTab","products","setProducts","loading","setLoading","shouldShowSpinner","setShouldShowSpinner","checkForExistingSpinners","existingSpinners","document","querySelectorAll","useEffect","then","data","finally","cat","bt","_","oi","NsSpinner","getContactTextStyles","hasWhiteBackground","fontSize","fontStyle","fontWeight","lineHeight","letterSpacing","color","textDecoration","getSocialTitleStyles","textTransform","paddingLeft","getSocialIconsStyles","display","flexDirection","gap","alignItems","getContactTextMobileStyles","paddingBottom","wordBreak","overflowWrap","getSocialTitleMobileStyles","marginBottom","transition","opacity","transform","MysiteHeroContainer","yt","tr","go","bannerProps","isCircularImage","backgroundClip","background","backgroundColor","position","overflow","willChange","backfaceVisibility","top","left","right","boxShadow","paddingTop","justifyContent","fontFamily","headlineFont","padding","objectFit","objectPosition","marginLeft","marginRight","boxSizing","whiteSpace","textOverflow","paragraphFont","WebkitBoxOrient","WebkitLineClamp","MysiteHeroContainerMobile","paddingRight","maxHeight","bottom","pointerEvents","BadgeContainer","Badge","backdropFilter","borderRadius","border","minHeight","ToggleButtonMobile","cursor","margin","StyledSpan","ImgTabIndex","ContactLink","BadgeValue","PlaceholderImage","wt","fi","sx","ArrowDownIcon","Ca","trackGTMEvent","eventData","window","url","href","updatedEventData","prefix","includes","dataLayer","console","error","renderImageContent","placeholderClass","B","Bo","pe","renderBadges","showBadges","expirationDate","totalSavings","badgeClass","renderMobileContent","isScrolled","renderSocialMediaIcons","shopTitle","socialTitleText","email","phone","Typography","component","trim","Fragment","renderContactLink","renderDesktopContent","shopDescription","Tooltip","arrow","checkIfImageIsCircular","Promise","resolve","reject","imageContext","Image","crossOrigin","onload","canvas","createElement","context","getContext","drawImage","isCircular","getImageData","every","corner","Array","slice","onerror","isWhiteOrNearWhite","hex","replace","toLowerCase","test","fullHex","split","char","join","r","Number","parseInt","substring","g","b","threshold","createContactClickHandler","contactType","contactValue","contact_type","contact_value","click_element","onKeyDown","key","globalThis","protocol","handlers","socialIcons","gt","setIsScrolled","isDescriptionExpanded","setIsDescriptionExpanded","setHasWhiteBackground","isImageCircular","setIsImageCircular","toggleDescription","debounceTimeout","lastScrollY","scrollY","currentScrollState","isTransitioning","lastUpdateTime","updateScrollState","newState","now","Date","clearTimeout","setTimeout","scrollTo","behavior","handleScroll","currentScrollY","abs","scrollingDown","scrollDownThreshold","scrollUpThreshold","initializeState","initialScrollY","shouldStartCompact","rafId","lastRafTime","throttledScrollHandler","requestAnimationFrame","addEventListener","passive","removeEventListener","cancelAnimationFrame","useMemo","icon","social_platform","type","social_url","open","NsLink","containerClass","getCharacterLimit","innerWidth","shouldShowToggle","DashboardContainer","fo","StatsRow","WidgetContainer","TwoColumnGrid","ErrorContainer","import_CalendarToday","import_Public","Be","ColorUtils","getGenomeColor","HeaderContainer","theme","TitleSection","ShopTitle","DateRangeLabel","FiltersSection","FilterDropdownContainer","FilterLabel","StyledSelect","FilterIcon","LoadingIndicatorContainer","DesktopFiltersContainer","StyledCircularProgress","activeResolver","resolver","fallback","result","stats","revenue","volume","visits","subtitle","dcSv","conversionRate","trend","increased","decreased","unchanged","details","filter","dateRange","last7days","last30days","last90days","thisMonth","dateRangeLabel","market","all","marketLabel","productSort","units","byUnits","byRevenue","byVolume","signupView","members","retail","brandAffiliates","showAll","showMembers","showRetail","showBrandAffiliates","conversionType","standard","subscription","categorySort","byTrend","widget","topProducts","viewAll","empty","ariaLabel","titleAriaLabel","sortAriaLabel","noImageAriaLabel","unitsSuffix","revenueSuffix","dcSvSuffix","rank","formula","comparison","chartAriaLabel","filterAriaLabel","noData","noChange","tooltipOrders","tooltipVisits","ordersPerSiteVisits","signups","total","totalSignupsInPeriod","noTrendData","topCategories","menu","fullView","navigation","backToDashboard","backAriaLabel","dashboard","statsRow","dashboardFilters","loadingDashboard","dateRangeFilter","marketFilter","filterSuffix","columns","date","status","detailsTitle","orderId","customer","items","bv","orderTotal","totalSv","orderDetailsTitle","notAvailable","product","unitsSold","skuPrefix","noProducts","category","percentOfTotal","allCategoriesTitle","noCategoryData","dataTable","noDataAvailable","sortableColumn","pagination","previousPage","nextPage","goToPage","of","defaults","zeroTrend","noValue","markets","useMarketOptions","Oi","dateRangeLabelProp","isLoading","onDateRangeChange","onMarketChange","marketOptions","handleDateRangeChange","newDateRange","handleMarketChange","newMarket","handleFilterKeyDown","blur","getDateRangeLabelText","ae","as","$i","htmlFor","Fi","CalendarTodayIcon","Li","PublicIcon","find","opt","String","option","import_ShowChart","import_TrendingUp","import_TrendingDown","we","StatsCardContainer","$layout","SplitTitle","SplitRow","LegendColumn","SplitTrend","direction","LegendCaption","StatsTitle","StatsValueContainer","StatsValue","ValueSubtitleWrapper","StatsSubtitle","TrendContainer","TrendIcon","TrendText","StatsCardHeader","import_Skeleton","SkeletonCard","J","SkeletonHeader","SkeletonRow","StatsCardWrapper","StatsCardHeaderRow","StatsCardBody","StatsCardSubtitle","xo","Skeleton","ProductRowInfo","ProductRowMetrics","ChartMetricRow","ChartMetricTrend","ChartAreaSkeleton","PieChartLayout","PieCircleSkeleton","LegendList","LegendRowWrapper","LegendRowInfo","DashboardLayout","DashboardHeaderRow","DashboardFilterGroup","StatsGrid","WidgetGrid","FullViewLayout","FullViewMetricCard","FullViewMetricCenter","FullViewChartArea","FullViewTableCard","FullViewTableRow","SummaryCardsGrid","StatsCardSkeleton","T","ee","ProductRowSkeleton","ProductsListSkeleton","rowKey","ChartWidgetSkeleton","LegendRowSkeleton","CategoriesPieChartSkeleton","FullViewChartSkeleton","FullViewTableSkeleton","StatsCardComponent","caption","layout","trendDirection","trendValue","le","getTrendAriaLabel","directionText","getTrendChartIcon","iconSize","fl","TrendingUpIcon","ml","TrendingDownIcon","gl","ShowChartIcon","ul","memo","displayName","import_ShoppingCart","import_ArrowUpward","import_ArrowDownward","import_Remove","parseTrendPercent","cleanedValue","parsedValue","isFinite","resolveTrendDirection","calculateWeightedRevenueTrend","getRevenue","getTrend","reduce","accumulator","weightedSum","weight","average","formatted","toFixed","getTrendDirectionLabel","cr","hl","ArrowUpwardIcon","xl","ArrowDownwardIcon","bl","RemoveIcon","itemsPerPage","ceil","currentPage","startIndex","endIndex","sort","a","aVal","bVal","decimalPlaces","usePaginatedItems","totalPages","Na","pageItems","formatMoney","currencyCode","locale","fractionDigits","amount","Intl","NumberFormat","style","currency","minimumFractionDigits","maximumFractionDigits","format","toLocaleString","ue","ProductsListContainer","WidgetHeader","HeaderActionsContainer","WidgetTitle","SortDropdown","ProductsList","ProductItem","ProductRank","ProductImage","ProductImagePlaceholder","ProductInfo","ProductName","ProductSubtitle","ProductMetrics","ProductValue","ProductTrend","EmptyState","EmptyStateText","import_Menu","import_MenuItem","import_ListItemIcon","import_ListItemText","import_MoreVert","import_Visibility","import_IconButton","StyledIconButton","zl","Al","IconButton","widgetId","onFullView","El","anchorEl","setAnchorEl","buttonId","menuId","handleClick","currentTarget","handleClose","handleFullView","at","size","Ul","MoreVertIcon","Hl","Menu","onClose","MenuListProps","anchorOrigin","vertical","horizontal","transformOrigin","Wl","MenuItem","_l","ListItemIcon","Gl","VisibilityIcon","Kl","ListItemText","TopSellingProductsListComponent","maxProducts","onSortChange","onTitleClick","handleSortChange","newSort","formatValue","sortBy","getSubtitle","getTrendValue","getTrendDirection","startsWith","j","Zl","ql","Jl","displayedProducts","rankLabel","trendLabel","Yl","ShoppingCartIcon","imageUrl","toUpperCase","jl","import_recharts","Ce","ConversionRateContainer","ChartHeader","TitleRow","ChartTitle","FilterDropdown","MetricDisplay","MetricValue","MetricTrend","FormulaDisplay","ChartContainer","TooltipContainer","TooltipLabel","TooltipValue","TooltipDetails","getMonth","getDate","AXIS_MONTH_MAP","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","formatAxisDate","dateStr","parts","start","end","toISOString","calculateDateRangeFromOption","dateRangeOption","today","year","getFullYear","month","startDate","endDate","CHART_MARGIN","AXIS_TICK","LINE_DOT","ACTIVE_DOT","rateTickFormatter","CustomTooltip","active","payload","G","rate","orders","siteVisits","ConversionRateChartComponent","conversionData","conversionFilter","summaryRate","summaryChangePct","onFilterChange","handleFilterChange","yo","newFilter","noDataText","noChangeText","currentRate","trendInfo","latestRate","previousRate","change","percentageChange","formattedChange","formattedData","shortDate","je","ResponsiveContainer","LineChart","CartesianGrid","strokeDasharray","XAxis","dataKey","tick","tickLine","interval","YAxis","tickFormatter","domain","Line","stroke","strokeWidth","dot","activeDot","Ne","SignupsContainer","Legend","LegendItem","LegendColor","LegendLabel","SERIES_COLORS","SignupsChartComponent","signupData","onViewChange","handleViewChange","Co","newView","totalSignups","latestTotal","previousTotal","totalLabel","membersLabel","retailLabel","brandAffiliatesLabel","L","xe","oe","CategoriesContainer","ChartAndLegendContainer","ChartWrapper","DonutCenterOverlay","DonutCenterLabel","DonutCenterValue","DonutCenterTrend","LegendContainer","LegendInfo","LegendName","LegendValue","LegendPercentage","LegendValueWrapper","LegendTrendInline","LegendTrend","TopCategoriesPieChartComponent","sortedCategories","$r","nextSortedCategories","nextTotalRevenue","sum","nextTrendDirection","nextFormattedTrend","totalRevenue","formattedTrend","getTrendGraphIcon","E","Ms","Os","renderCustomLabel","cx","cy","midAngle","innerRadius","outerRadius","percentage","RADIAN","PI","radius","x","cos","y","sin","textAnchor","dominantBaseline","leadingTrim","St","PieChart","Pie","nameKey","paddingAngle","labelLine","Cell","formatter","EMPTY_TOP_PRODUCTS","EMPTY_CONVERSION_DATA","EMPTY_SIGNUP_DATA","EMPTY_CATEGORIES","onProductSortChange","onSignupViewChange","onConversionFilterChange","onCategorySortChange","onProductsTitleClick","onConversionTitleClick","onSignupsTitleClick","onCategoriesToTitleClick","resolvedTopProducts","resolvedConversionData","resolvedSignupData","resolvedCategories","Se","metrics","import_ArrowBack","import_Language","Fe","PageHeaderWrapper","BackButtonWrapper","BackButton","LeftSection","Title","DateRange","MobileDateRange","FilterWrapper","MobileTitleWrapper","MobileTitle","buildDateRangeFilter","keys","options","buildMarketFilter","onBack","filters","renderFilterIcon","iconType","fe","Gs","js","LanguageIcon","Us","ArrowBackIcon","it","TableContainer","Table","TableHeader","TableHeaderCell","sortable","TableBody","TableRow","TableCell","EmptyTableCell","SortIconContainer","isActive","onSort","sortColumn","sortDirection","getRowKey","handleSort","columnKey","handleKeyDown","getAriaSort","Ee","column","scope","od","td","colSpan","row","rowIndex","render","import_ChevronLeft","import_ChevronRight","no","PaginationContainer","PageButton","PageInfo","NavButton","onPageChange","totalItems","handlePrevious","handleNext","action","pageNumbers","from","pages","startItem","endItem","goToPageLabel","Te","ad","ChevronLeftIcon","page","nd","ChevronRightIcon","import_styles","PageContainer","Le","$e","MetricChartCardSection","shadows","MetricSection","palette","text","primary","success","main","secondary","ComparisonText","ChartSection","TableSection","withCard","MobileCardName","MobileCardSubtext","MobileCardDetail","MobileCardStatus","warning","ud","Ie","Pe","ProductSku","MobileCardsContainer","DesktopTableContainer","MobileProductCard","divider","MobileCardHeader","MobileProductRank","MobileProductDetails","MobileProductName","MobileProductSku","MobileMetricsGrid","MobileMetricItem","MobileMetricLabel","MobileMetricValue","MOBILE_VIEWPORT_QUERY","useIsMobileViewport","Td","noSsr","mapProductToRow","sku","padStart","dt","setCurrentPage","setSortColumn","setSortDirection","isMobileView","handleBack","productRows","sortedRows","paginatedRows","K","Dd","MobileOrderCard","He","Ye","MobileOrderHeader","MobileCustomerInfo","MobileCustomerName","MobileOrderDate","MobileOrderId","MobileOrderMetrics","MobileOrdersContainer","ComparisonTextMobile","OrderIdColumnCell","qe","changePercent","getConversionFilterLabel","conversionFilterLabel","filteredOrders","order","customerType","paginatedOrders","$","getChartColor","flexWrap","Ad","zd","Ve","align","verticalAlign","wrapperStyle","customerName","Bd","MobileSignupsContainer","Mt","Wt","MobileSignupCard","SignupTrendChartContainer","ChartWithLegendWrapper","ChartLegendContainer","NameColumnCell","toNumeric","parsed","normalizeSignupDataInput","input","isArray","apiResponse","daily","brandAffiliate","brand_affiliates","brand_affiliate","Ot","normalizedSignupData","point","rawPoint","signupTotal","absoluteChange","first","last","round","hasSignupTrendData","paginatedSignups","P","Yd","Jd","he","connectNulls","jd","signup","_t","SummaryItemRow","SummaryItemInfo","SummaryItemName","SummaryItemSubtext","SummaryItemPercentage","TopSection","Re","muiStyled","Me","SummaryContainer","SummaryItem","ColorDot","dotColor","SummaryInfo","SummaryName","SummaryValue","SummaryPercentage","MobileCategoriesContainer","MobileCategoryCard","SummaryTrendIcon","CategoryNameColumnCell","Ft","N","hp","xp","parseFloat","isNaN","totalRevenueTrendDirection","totalRevenueTrend","paginatedCategories","Lt","translate","qa","DEFAULT_HISTORY_STATE_KEY","EMPTY_ORDERS","EMPTY_SIGNUPS","isRecord","isMysiteDashboardView","readViewFromState","state","stateKey","view","buildStateWithView","buildLocationWithState","pathname","search","hash","initialDateRange","initialMarket","initialProductSort","initialSignupView","initialConversionFilter","initialCategorySort","historyAdapter","historyStateKey","resetToDashboardOnMount","ne","currentView","setCurrentView","hasIntraDashboardHistoryRef","setDateRange","setMarket","setProductSort","setSignupView","setConversionFilter","setCategorySort","resolvedOrders","resolvedSignups","updateView","readCurrentView","writeCurrentView","mode","nextState","nextLocation","replaceState","pushState","listen","nextView","handlePopState","handleOpenFullView","goBack","back","nextDateRange","nextMarket","handleProductSortChange","nextProductSort","handleSignupViewChange","nextSignupView","handleConversionFilterChange","nextFilter","handleCategorySortChange","nextSort","handleProductsTitleClick","handleConversionTitleClick","handleSignupsTitleClick","handleCategoriesTitleClick","Do","PoDashboardContainer","Po","TopChartsRow","StatsCardStack","BottomChartsRow","offersPurchased","trendUp","trendDown","trendNeutral","comparedTo","offerSort","overall","emptyState","topPerformingOffers","statsCard","conversionChart","topOffers","widgetMenu","filterDateRange","filterMarket","backButton","columnName","columnRevenue","columnPercentage","columnTrend","trendZero","TopPerformingOffersPieChartComponent","offers","sortedOffers","ta","nextSortedOffers","offer","U","$t","legendTrendDirection","EMPTY_TOP_OFFERS","dashboardTitle","conversionSummaryRate","conversionSummaryChangePct","onOfferSortChange","onOffersTitleClick","resolvedTopOffers","We","selectedMarket","Pp","re","te","SummaryTrend","TableTrendCell","MobileOffersContainer","MobileOfferCard","MobileOfferHeader","MobileOfferName","MobileOfferMetricsGrid","MobileOfferMetricItem","MobileOfferMetricLabel","MobileOfferMetricValue","MobileOfferTrendValue","It","paginatedOffers","O","columnTrendDirection","Nt","summaryTrendDirection","trendPercent","isProductOfferDashboardView","allProducts","allOffers","conversionFullViewData","conversionFullViewRate","conversionFullViewChangePct","initialOfferSort","ce","setOfferSort","resolvedAllProducts","resolvedAllOffers","handleOfferSortChange","handleOffersTitleClick","Yo","Ro","FilterContainer","Mo","setDate","mockConversionDataStandard","mockConversionDataSubscription","months","floor","firstNames","lastNames","toLocaleDateString","day","types","mockProductOfferStatsPositiveTrend","mockProductOfferStatsNegativeTrend","mockProductOfferStatsNeutralTrend","mockProductOfferStatsZeroOffers"],"mappings":"AAAA,s3sFAAa,IAAIA,GAAGC,OAAOC,MAAM,CAAC,IAAIC,GAAGF,OAAOG,cAAc,CAAC,IAAIC,GAAGJ,OAAOK,wBAAw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,CAC9B,EACA,CACIxT,GAAI,UACJ9P,KAAM,wBACNsjB,QAAS,IACT+f,WAAY,EACZ9uB,MAAO,UACPqP,MAAO,CAAEN,QAAS,OAAQ,CAC9B,EACJ","sourcesContent":["\"use strict\";var rc=Object.create;var qo=Object.defineProperty;var ac=Object.getOwnPropertyDescriptor;var nc=Object.getOwnPropertyNames;var ic=Object.getPrototypeOf,lc=Object.prototype.hasOwnProperty;var ma=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),sc=(e,t)=>{for(var o in t)qo(e,o,{get:t[o],enumerable:!0})},ln=(e,t,o,n)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let i of nc(t))!lc.call(e,i)&&i!==o&&qo(e,i,{get:()=>t[i],enumerable:!(n=ac(t,i))||n.enumerable});return e};var M=(e,t,o)=>(o=e!=null?rc(ic(e)):{},ln(t||!e||!e.__esModule?qo(o,\"default\",{value:e,enumerable:!0}):o,e)),dc=e=>ln(qo({},\"__esModule\",{value:!0}),e);var Vn=ma((Bu,Nn)=>{\"use strict\";var cc=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\";Nn.exports=cc});var En=ma((Eu,Bn)=>{\"use strict\";var uc=Vn();function An(){}function zn(){}zn.resetWarningCache=An;Bn.exports=function(){function e(n,i,s,d,p,w){if(w!==uc){var C=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw C.name=\"Invariant Violation\",C}}e.isRequired=e;function t(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:zn,resetWarningCache:An};return o.PropTypes=o,o}});var Wn=ma((_u,Hn)=>{\"use strict\";Hn.exports=En()();var Hu,Wu});var xu={};sc(xu,{CategoriesFullView:()=>Xr,ConversionRateChart:()=>ao,ConversionRateFullView:()=>To,DATE_RANGE_LABELS:()=>Wa,DAYS_MAP:()=>Ha,DashboardHeader:()=>ho,DataTable:()=>lt,FilterBar:()=>tc,MysiteDashboardWithNavigation:()=>vp,MysiteHero:()=>va,NsCategoryNavigation:()=>er,NsProductCard:()=>Qo,PageHeader:()=>me,Pagination:()=>st,PoDashboardWithNavigation:()=>qp,ProductCarousel:()=>zo,ProductOfferDashboard:()=>oa,ProductOfferDashboardTranslationKeys:()=>z,ProductTabCarousel:()=>ri,ProductsFullView:()=>So,ShoppingDashboard:()=>Ir,ShoppingDashboardTranslationKeys:()=>r,SignupsChart:()=>Ko,SignupsFullView:()=>Zr,StatsCard:()=>Ct,TopCategoriesPieChart:()=>Uo,TopPerformingOffersFullView:()=>ia,TopPerformingOffersPieChart:()=>jo,TopSellingProductsList:()=>ro,TranslationProvider:()=>bp,WidgetMenu:()=>nt,buildDefaultMarketOptions:()=>Ma,calculatePercentage:()=>Cl,calculateTotalPages:()=>Va,formatDateRange:()=>Ka,formatDateRangeLabel:()=>gs,formatDisplayDate:()=>fr,formatISODate:()=>mr,formatShortDate:()=>_a,getDateRangeLabel:()=>gr,getDaysFromDateRange:()=>us,getTranslation:()=>a,getTranslationResolver:()=>Mi,getTrendColor:()=>yl,getTrendIcon:()=>rt,mockCategories:()=>rn,mockConversionData:()=>Oo,mockOrders:()=>da,mockProductOfferStats:()=>so,mockSignupData:()=>on,mockSignupDetails:()=>an,mockStats:()=>tn,mockTopOffers:()=>oc,mockTopProducts:()=>sa,paginateItems:()=>Aa,resolveMarketOptions:()=>Oa,resolveTranslation:()=>Kt,setTranslationResolver:()=>mo,sortByNumericProperty:()=>wl,useTranslation:()=>yp,useTranslationResolver:()=>io});module.exports=dc(xu);var mn=require(\"react\"),hn=require(\"@nuskin/foundation-ui-components\");var Bt=require(\"@nuskin/foundation-theme\"),sn=(0,Bt.styled)(\"div\")`\n width: 200px;\n text-align: left;\n margin-bottom: 5px;\n`,dn=(0,Bt.styled)(\"button\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n width: 240px;\n height: ${e=>e.isMobile?\"410px\":\"513px\"};\n overflow: hidden;\n cursor: pointer;\n border: 1px solid #ededed;\n background: var(--color-primary-n-10-primary-white, #fff);\n`,pn=(0,Bt.styled)(\"div\")`\n width: '240px';\n height: '240px';\n background: ${e=>e.bgColor??\"#f5f5f5\"};\n border-radius: 8px;\n overflow: hidden;\n margin-bottom: 0;\n display: flex;\n align-items: normal;\n justify-content: center;\n position: relative;\n @media (max-width: 560px) {\n width: 200px;\n height: 200px;\n align-items: unset;\n }\n`,cn=(0,Bt.styled)(\"img\")`\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n display: block;\n`,un=(0,Bt.styled)(\"div\")`\n width: 200px;\n margin-top: 16px;\n max-height: 66px;\n text-align: left;\n font-size: 16px;\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n line-height: 22px;\n overflow: hidden;\n color: #666;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n @media (max-width: 560px) {\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n margin-top: 5px;\n max-height: 54px;\n line-height: 18px;\n }\n`,ha=(0,Bt.styled)(\"div\")`\n width: 200px;\n text-align: left;\n margin-bottom: 12px;\n @media (max-width: 560px) {\n margin-bottom: 8px;\n }\n`,gn=(0,Bt.styled)(\"button\")`\n width: 200px;\n height: 40px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n gap: 10px;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0.14px;\n text-transform: none;\n justify-content: flex-start;\n padding-left: 31px;\n overflow: hidden;\n white-space: normal;\n word-break: break-word;\n overflow-wrap: break-word;\n text-overflow: ellipsis;\n margin-top: 8px;\n margin-bottom: 10px;\n -webkit-appearance: none;\n -webkit-tap-highlight-color: transparent;\n\n color: ${e=>e.disabled?\"#999\":\"#fff\"};\n background-color: ${e=>e.disabled?\"#e0e0e0\":!e.isMobile&&e.isHovered?\"#888\":\"#000\"};\n border: ${e=>e.disabled?\"1px solid #ccc\":\"none\"};\n cursor: ${e=>e.disabled?\"not-allowed\":\"pointer\"};\n opacity: ${e=>e.disabled?.6:1};\n transition: ${e=>e.isMobile?\"none\":\"all 0.3s ease\"};\n\n @media (max-width: 560px) {\n margin: 5px 0;\n }\n`,fn=(0,Bt.styled)(\"span\")`\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n display: inline-block;\n background: none;\n transition: all 0.3s ease;\n opacity: ${e=>e.disabled?.5:1};\n`;var xn=require(\"@mui/material\"),Ue=require(\"react/jsx-runtime\"),pc=({productTitle:e,imageDetails:t,className:o,button:n,onCardClick:i,productStatusBadge:s,directSellerBadge:d,mySitePriceComponent:p,testId:w})=>{let[C,u]=(0,mn.useState)(!1),x=(0,xn.useMediaQuery)(\"(max-width: 560px)\"),g=b=>{let f=b.target,c=t?.fallbackImage;c&&f.src!==c&&(f.src=c)};return(0,Ue.jsxs)(dn,{className:o,onClick:i,tabIndex:0,\"data-testid\":\"product-card\",isMobile:x,children:[(0,Ue.jsx)(pn,{bgColor:t?.bgColor,onError:g,children:t?.imageSrc?(0,Ue.jsx)(hn.NsImage,{\"data-testid\":w??\"test-product-image\",className:t.className??\"\",src:t.imageSrc,alt:t.imageAlt,\"aria-label\":t.areaLabel??t.imageAlt,width:\"100%\"}):(0,Ue.jsx)(cn,{alt:\"\"})}),(0,Ue.jsx)(un,{title:e,\"data-testid\":\"product-title\",children:e}),d&&(0,Ue.jsx)(ha,{children:d}),(0,Ue.jsx)(ha,{children:s}),(0,Ue.jsx)(sn,{children:p}),n?.showButton&&(0,Ue.jsxs)(gn,{tabIndex:0,\"aria-roledescription\":\":\",\"aria-label\":n.buttonText||\"ADD TO CART\",\"data-testid\":\"add-to-cart-button\",disabled:n?.disabled??!1,isMobile:x,isHovered:C,onClick:b=>{b.stopPropagation(),n?.disabled||n.onClick?.()},onMouseEnter:()=>{!x&&!n?.disabled&&u(!0)},onMouseLeave:()=>{x||u(!1)},children:[(0,Ue.jsx)(fn,{className:\"cart-icon\",disabled:n?.disabled,children:(0,Ue.jsx)(\"svg\",{width:\"24\",height:\"22\",viewBox:\"0 0 24 22\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:(0,Ue.jsx)(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M0 1.86358C0 1.26109 0.488416 0.772675 1.09091 0.772675H3.48173C4.51054 0.772675 5.39955 1.49136 5.61511 2.49733L5.71309 2.95456H22.9091C23.245 2.95456 23.5622 3.10933 23.7689 3.37411C23.9757 3.63889 24.0489 3.98415 23.9674 4.31005L22.4053 10.5583C21.9197 12.5009 20.1743 13.8636 18.172 13.8636H8.05068L8.28444 14.9546H20.7273C21.3298 14.9546 21.8182 15.443 21.8182 16.0455C21.8182 16.648 21.3298 17.1364 20.7273 17.1364H19.6364H8.18182H7.40252C6.88811 17.1364 6.4436 16.777 6.33582 16.274L3.76449 4.27405L3.48173 2.95449H1.09091C0.488416 2.95449 0 2.46608 0 1.86358ZM8.18182 17.1364C6.97683 17.1364 6 18.1132 6 19.3182C6 20.5232 6.97683 21.5 8.18182 21.5C9.3868 21.5 10.3636 20.5232 10.3636 19.3182C10.3636 18.1132 9.3868 17.1364 8.18182 17.1364ZM19.6364 17.1364C18.4314 17.1364 17.4545 18.1132 17.4545 19.3182C17.4545 20.5232 18.4314 21.5 19.6364 21.5C20.8413 21.5 21.8182 20.5232 21.8182 19.3182C21.8182 18.1132 20.8413 17.1364 19.6364 17.1364ZM7.58317 11.6818H18.172C19.1732 11.6818 20.0459 11.0005 20.2887 10.0292L21.5119 5.13638H6.18062L7.58317 11.6818Z\",fill:n?.disabled?\"#999\":\"#ffffff\"})})}),n.buttonText||\"ADD TO CART\"]})]})},Qo=pc;var Ao=require(\"react\"),Ln=M(require(\"react-slick\")),$n=M(require(\"@mui/material/useMediaQuery\"));var In=require(\"@nuskin/foundation-ui-components\");var ze=require(\"@nuskin/foundation-theme\"),uo=M(require(\"@mui/material/Box\")),bn=require(\"@nuskin/foundation-ui-components\"),yn=(0,ze.styled)(uo.default)`\n padding: 30px 0 60px;\n width: 100%;\n margin: auto;\n margin-top: 50px;\n position: relative;\n\n .slick-list {\n padding-left: 24px;\n padding-right: 24px;\n }\n .slick-slide {\n display: flex;\n justify-content: center;\n padding: 0 12px;\n box-sizing: border-box;\n }\n .slick-prev,\n .slick-next {\n display: none !important;\n }\n\n @media (max-width: 1200px) {\n max-width: 1024px;\n .slick-list {\n padding-left: 12px;\n padding-right: 12px;\n }\n .slick-slide {\n padding: 0 6px;\n }\n }\n @media (max-width: 700px) {\n max-width: 100vw;\n padding: 10px 0 50px;\n .slick-list {\n padding-left: 4px;\n padding-right: 4px;\n }\n .slick-slide {\n padding: 0 2px;\n }\n }\n @media (max-width: 560px) {\n padding: 10px 0 10px;\n margin-top: 25px;\n }\n`,wn=(0,ze.styled)(\"div\")`\n overflow-x: auto;\n display: flex;\n scroll-snap-type: x mandatory;\n -webkit-overflow-scrolling: touch;\n gap: 16px;\n padding: 0 8px 16px;\n width: 100%;\n box-sizing: border-box;\n\n &::-webkit-scrollbar {\n height: 6px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #007bff;\n border-radius: 10px;\n }\n`,Cn=(0,ze.styled)(\"div\")`\n display: flex;\n scroll-snap-align: start;\n justify-content: center;\n gap: 15px;\n`,vn=(0,ze.styled)(uo.default)`\n position: absolute;\n bottom: calc(100% + 1px);\n right: 1px;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n`,kn=(0,ze.styled)(uo.default)`\n display: flex;\n align-items: center;\n margin-left: auto;\n margin-right: ${({$isMobile:e})=>e?0:\"24px\"};\n\n @media (max-width: 560px) {\n margin-left: 0;\n order: 2;\n }\n`,Sn=(0,ze.styled)(uo.default)`\n display: none;\n\n @media (max-width: 560px) {\n color: #666666;\n font-family: Inter;\n font-size: 14px !important;\n font-style: normal;\n font-weight: 600;\n line-height: 18px;\n display: flex;\n align-items: center;\n order: 1;\n }\n`,Tn=(0,ze.styled)(uo.default)`\n display: flex;\n align-items: center;\n opacity: ${({$isDisabled:e})=>e?.3:1};\n pointer-events: ${({$isDisabled:e})=>e?\"none\":\"auto\"};\n transition: opacity 0.3s ease;\n\n .carousal-prev-button,\n .carousal-next-button {\n transition: all 0.3s ease;\n border: 2px solid #000000;\n border-radius: 3px;\n padding: 9px;\n cursor: pointer;\n\n svg {\n transition: all 0.3s ease;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n\n &:hover {\n background-color: #f5f5f5;\n border: 2px solid #ddd;\n\n svg {\n opacity: 0.5;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n }\n }\n\n @media (max-width: 560px) {\n display: none;\n }\n`,Mu=(0,ze.styled)(\"div\")`\n @media (max-width: 560px) {\n overflow-y: hidden;\n scrollbar-width: thin;\n scrollbar-color: #007bff #eee;\n &::-webkit-scrollbar {\n width: 8px;\n }\n &::-webkit-scrollbar-track {\n background: #eee;\n }\n &::-webkit-scrollbar-thumb {\n background-color: red;\n border-radius: 8px;\n border: 2px solid #eee;\n }\n }\n`,Dn=(0,ze.styled)(bn.NsTypography)`\n color: #666666;\n font-family: Inter;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 22px;\n @media (max-width: 560px) {\n margin: 0 3px;\n }\n`,Pn=(0,ze.styled)(\"a\")`\n color: ${({$disabled:e})=>e?\"#999999\":\"#000000\"};\n font-family: Inter, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 22px;\n text-decoration: none;\n border-bottom: 1px solid ${({$disabled:e})=>e?\"#999999\":\"#000000\"};\n padding-bottom: 4px;\n transition: all 0.3s ease;\n cursor: ${({$disabled:e})=>e?\"not-allowed\":\"pointer\"};\n pointer-events: ${({$disabled:e})=>e?\"none\":\"auto\"};\n opacity: ${({$disabled:e})=>e?.5:1};\n\n @media (max-width: 560px) {\n font-size: 14px;\n line-height: 18px;\n }\n\n &:hover {\n color: ${({$disabled:e})=>e?\"#999999\":\"#666666\"};\n border-bottom: 1px solid ${({$disabled:e})=>e?\"#999999\":\"#666666\"};\n cursor: ${({$disabled:e})=>e?\"not-allowed\":\"pointer\"};\n }\n`,Rn=(0,ze.styled)(\"div\")`\n padding-top: 20px;\n font-size: 20px;\n text-align: center;\n`,Mn=(0,ze.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`,On=(0,ze.styled)(\"div\")`\n display: flex;\n align-items: center;\n flex: 1;\n min-width: 0;\n`,Fn=(0,ze.styled)(\"div\")`\n font-family: 'Lora';\n font-weight: 400;\n font-size: 22px;\n margin-left: 16px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 13px;\n`;var ye=require(\"react/jsx-runtime\");function zo({entries:e,renderEntry:t,settings:o={},showControlButtons:n=!0,allEntryLabel:i=\"View All\",allEntryLink:s=\"\",categoryName:d,emptyProductMessage:p=\"No Products Available For The Selected Category\",productsCountLabel:w=\"Products\",isInitialDataLoading:C,history:u}){let x=(0,Ao.useRef)(null),g=(0,$n.default)(\"(max-width: 560px)\"),b=(0,Ao.useCallback)(()=>{x.current?.slickPrev()},[]),f=(0,Ao.useCallback)(()=>{x.current?.slickNext()},[]),c=t??((h,F)=>(0,ye.jsx)(Qo,{productTitle:h.productTitle,imageDetails:h.imageDetails,button:h.button,onCardClick:h.onCardClick,productStatusBadge:h.productStatusBadge,directSellerBadge:h.directSeller,mySitePriceComponent:h.mySitePriceComponent},`${h.productTitle}-${F}`)),v={dots:!0,infinite:!0,speed:500,slidesToShow:Math.min(e?.length??0,4),slidesToScroll:4,swipe:!0,draggable:!0,arrows:!0,responsive:[{breakpoint:1320,settings:{slidesToShow:Math.min(e?.length??0,3),slidesToScroll:3}},{breakpoint:900,settings:{slidesToShow:Math.min(e?.length??0,2),slidesToScroll:2}},{breakpoint:600,settings:{slidesToShow:1,slidesToScroll:1,arrows:!1}}],...o},y=(e?.length??0)>v.slidesToShow,D=()=>e?.length===0&&!C?(0,ye.jsx)(Rn,{children:p}):g?(0,ye.jsx)(wn,{children:(0,ye.jsx)(Cn,{children:e.map((h,F)=>h&&c(h,F))})}):(0,ye.jsx)(Ln.default,{...v,ref:x,children:e.map((h,F)=>h&&c(h,F))});return(0,ye.jsxs)(yn,{children:[n&&(0,ye.jsxs)(vn,{children:[(0,ye.jsxs)(Mn,{children:[(0,ye.jsxs)(On,{children:[(0,ye.jsx)(Sn,{children:(0,ye.jsxs)(Dn,{variant:\"body-m\",children:[e?.length??0,\" \",w]})}),!g&&d&&(0,ye.jsx)(Fn,{children:d})]}),(0,ye.jsx)(kn,{$isMobile:g,children:(0,ye.jsx)(Pn,{$disabled:(e?.length??0)===0,onClick:h=>{h.preventDefault(),(e?.length??0)>0&&u&&u.push(s)},children:i})})]}),!g&&(0,ye.jsx)(Tn,{$isDisabled:!y,children:(0,ye.jsx)(In.NsCarouselControl,{prev:b,next:f,viewAllLabel:\"\",viewAllUrl:\"\"})})]}),D()]})}var Ge=require(\"react\"),ti=require(\"@mui/material\");var Un=M(require(\"react\")),Gn=M(require(\"@mui/material/Tabs\")),jn=M(require(\"@mui/material/Tab\")),xa=M(require(\"@mui/material/Box\")),Xo=M(Wn());var _n=require(\"@nuskin/foundation-theme\"),Kn=_n.styled.div`\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n width: 100%;\n height: 100%;\n background-color: #fff;\n .tabsStyle {\n display: flex;\n padding-top: 8.533px;\n flex-direction: column;\n align-items: flex-start;\n gap: 12.8px;\n border-right: 1px;\n border-color: divider;\n width: 200px;\n & .Mui-selected {\n font-weight: 700;\n font-size: 14px;\n font-family: 'inter', sans-serif;\n font-style: normal;\n font-height: 20px;\n border-radius: 4px;\n }\n & .MuiTabs-indicator {\n left: 0;\n background-color: #5b81a5;\n color: #5b81a5;\n\n @media (max-width: 768px) {\n display: none;\n }\n }\n }\n\n .tabContainer {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n min-width: 100%;\n background-color: #fff;\n @media (max-width: 768px) {\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n }\n\n .tabStyle {\n align-items: flex-start;\n display: flex;\n text-align: left;\n font-size: 14px;\n font-family: 'inter' sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n min-height: 20px;\n padding: 1px;\n padding-left: 10px;\n margin-bottom: 10px;\n cursor: pointer;\n text-transform: none;\n }\n @media (max-width: 768px) {\n flex-direction: row;\n\n .tabsStyle {\n width: 100%;\n border-right: none;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding-top: 0px;\n }\n\n .tabStyle {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 70px;\n padding: 8px 16px;\n text-align: center;\n margin: 4px;\n background-color: #fff;\n cursor: pointer;\n color: black;\n font-family: Inter;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n }\n\n .tabStyle.Mui-selected {\n background-color: #5b81a5;\n color: #ffffff !important;\n font-weight: 700;\n border-radius: 70px;\n }\n }\n .tabPanel {\n padding: 8px;\n text-align: left;\n }\n`;var Yn=require(\"@mui/material\"),Et=require(\"react/jsx-runtime\");function Jn(e){let{children:t,value:o,index:n,...i}=e;return(0,Et.jsx)(\"div\",{role:\"tabpanel\",hidden:o!==n,id:`vertical-tabpanel-${n}`,\"aria-labelledby\":`vertical-tab-${n}`,...i,children:o===n&&(0,Et.jsx)(xa.default,{className:\"tabPanel\",children:t})})}Jn.propTypes={children:Xo.default.node,index:Xo.default.number.isRequired,value:Xo.default.number.isRequired};var er=({itemArray:e,value:t,onChange:o})=>{let[n,i]=Un.useState(0),s=(0,Yn.useMediaQuery)(\"(max-width:768px)\"),d=t??n;return(0,Et.jsx)(Kn,{children:(0,Et.jsxs)(xa.default,{className:\"tabContainer\",children:[(0,Et.jsx)(Gn.default,{orientation:s?\"horizontal\":\"vertical\",variant:\"scrollable\",value:d,onChange:(w,C)=>{o?o(w,C):i(C)},\"aria-label\":\"Vertical tabs example\",className:\"tabsStyle\",children:e.map(w=>(0,Et.jsx)(jn.default,{label:w.label,className:\"tabStyle\"},w.categoryId))}),e.map(w=>(0,Et.jsx)(Jn,{value:d,index:e.findIndex(C=>C.categoryId===w.categoryId),children:w.content},w.categoryId))]})})};var oi=require(\"@nuskin/foundation-ui-components\");var oo=require(\"@nuskin/foundation-theme\"),gc=({isMobile:e,$hasCategories:t})=>e?\"auto\":t?\"800px\":\"auto\",Zn=(0,oo.styled)(\"div\")`\n display: flex;\n flex-direction: ${({isMobile:e})=>e?\"column\":\"row\"};\n align-items: ${({isMobile:e})=>e?\"stretch\":\"flex-start\"};\n width: 100%;\n max-width: 1920px;\n min-height: ${gc};\n margin: 0 auto;\n box-sizing: border-box;\n overflow: visible;\n background: #fff;\n padding: ${({isMobile:e})=>e?\"10px 16px 0px 16px\":\"50px 60px 0px 60px\"};\n\n @media (max-width: 768px) {\n padding: 10px 16px 0px 16px;\n min-height: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n padding: 30px 40px 0px 40px;\n gap: 20px;\n }\n\n transform: translateZ(0);\n will-change: auto;\n`,qn=(0,oo.styled)(\"div\")`\n min-width: ${({isMobile:e})=>e?\"100%\":\"auto\"};\n height: ${({isMobile:e})=>e?\"auto\":\"100%\"};\n flex-shrink: 0;\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n\n overflow-x: auto;\n overflow-y: visible;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: none;\n -ms-overflow-style: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-width: 200px;\n margin-right: 20px;\n }\n`,Qn=(0,oo.styled)(\"div\")`\n flex: 1;\n min-width: 0;\n height: ${({isMobile:e})=>e?\"auto\":\"100%\"};\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n min-height: 300px;\n\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-height: 400px;\n }\n\n contain: layout style paint;\n transform: translateZ(0);\n`,Ju=(0,oo.styled)(\"div\")`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 200px;\n padding: 20px;\n\n @media (max-width: 768px) {\n min-height: 150px;\n padding: 16px;\n }\n`,Xn=(0,oo.styled)(\"div\")`\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 40px 20px;\n color: #666;\n font-size: 16px;\n\n @media (max-width: 768px) {\n padding: 20px 16px;\n font-size: 14px;\n }\n`,ei=(0,oo.styled)(\"div\")`\n padding: 10px;\n display: flex;\n justify-content: center;\n`;var bt=require(\"react/jsx-runtime\"),fc=({allEntryLabel:e,allEntryLink:t,renderEntry:o,settings:n,showControlButtons:i=!0,fetchCategories:s,fetchProducts:d,showCustomCategory:p=!1,emptyProductTabs:w=\"No tabs available\",emptyProductMessage:C,productsCountLabel:u,getCategoryId:x,history:g})=>{let b=(0,ti.useMediaQuery)(\"(max-width:768px)\"),[f,c]=(0,Ge.useState)(!0),[v,y]=(0,Ge.useState)([]),[D,h]=(0,Ge.useState)(!1),[F,V]=(0,Ge.useState)(0),[q,A]=(0,Ge.useState)([]),[H,Q]=(0,Ge.useState)(!1),[I,m]=(0,Ge.useState)(!0),k=(0,Ge.useCallback)(()=>{let l=document.querySelectorAll('[data-testid*=\"spinner\"], .ns-spinner, [class*=\"spinner\"]');m(l.length===0)},[]);(0,Ge.useEffect)(()=>{H&&k()},[H,k]),(0,Ge.useEffect)(()=>{s().then(l=>{y(l),h(!0)})},[s]),(0,Ge.useEffect)(()=>{if(D)if(v.length>0){let l=v[F]?.categoryId;x&&x(l),Q(!0),d(l).then(A).finally(()=>{Q(!1),c(!1)})}else Q(!1)},[v,F,d,D]);let S=v.map(l=>({label:l.label,content:\"\",categoryId:l.categoryId}));return(0,bt.jsxs)(Zn,{isMobile:b,$hasCategories:v.length>0,children:[p&&(S.length>0?(0,bt.jsx)(qn,{isMobile:b,children:(0,bt.jsx)(er,{itemArray:S,value:F,onChange:(l,R)=>V(R)})}):(0,bt.jsx)(Xn,{children:w})),(0,bt.jsx)(Qn,{isMobile:b,children:H?(0,bt.jsx)(ei,{children:I&&(0,bt.jsx)(oi.NsSpinner,{})}):(0,bt.jsx)(zo,{isInitialDataLoading:f,entries:q,allEntryLabel:e,allEntryLink:t,renderEntry:o?l=>o({...l,productStatusBadge:l.productStatusBadge}):void 0,settings:n,showControlButtons:i,categoryName:v[F]?.label,emptyProductMessage:C,productsCountLabel:u,history:g})})]})},ri=fc;var gt=require(\"react\"),pe=require(\"@mui/material\"),Bo=require(\"@nuskin/foundation-ui-components\");var yt=require(\"@nuskin/foundation-theme\"),go=require(\"@mui/material\"),tr=require(\"react/jsx-runtime\"),ba=e=>({fontSize:\"12px\",fontStyle:\"normal\",fontWeight:\"600\",lineHeight:\"16px\",letterSpacing:\"0.12px\",color:e?\"#000000\":\"#FFFFFF\",\"& a\":{color:\"inherit\",textDecoration:\"none\",\"&:hover\":{textDecoration:\"underline\"}}}),ni=e=>({fontSize:\"12px\",fontStyle:\"normal\",fontWeight:\"700\",lineHeight:\"16px\",letterSpacing:\"0.48px\",color:e?\"#000000\":\"#FFFFFF\",textTransform:\"uppercase\",paddingLeft:\"5px\"}),ii=()=>({display:\"flex\",flexDirection:\"row\",gap:\"10px\",alignItems:\"center\"}),ai=e=>({...ba(e),paddingBottom:\"11px\",wordBreak:\"break-all\",overflowWrap:\"break-word\",paddingLeft:\"5px\",\"& a\":{color:\"inherit\",textDecoration:\"none\"},\"@media (max-width: 420px)\":{fontSize:\"11px\",lineHeight:\"15px\",paddingBottom:\"8px\"},\"@media (max-width: 400px)\":{fontSize:\"10px\",lineHeight:\"14px\",paddingBottom:\"6px\"},\"@media (max-width: 375px)\":{fontSize:\"8px\",lineHeight:\"12px\",paddingBottom:\"4px\"}}),mc=e=>({...ni(e),marginBottom:\"11px\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\",\"@media (max-width: 420px)\":{fontSize:\"11px\",lineHeight:\"14px\",marginBottom:\"8px\"},\"@media (max-width: 400px)\":{fontSize:\"10px\",lineHeight:\"12px\",marginBottom:\"5px\"},\"@media (max-width: 375px)\":{fontSize:\"8px\",lineHeight:\"11px\",marginBottom:\"4px\"}}),li=(0,yt.styled)(e=>(0,tr.jsx)(go.Box,{...e}))(({bannerProps:e,isCircularImage:t,hasWhiteBackground:o})=>({backgroundClip:\"border-box\",display:\"flex\",background:e?.backgroundColor??\"#383838\",position:\"relative\",overflow:\"hidden\",width:\"100%\",height:\"auto\",flexDirection:\"row\",alignItems:\"center\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"transform, opacity\",transform:\"translateZ(0)\",backfaceVisibility:\"hidden\",\"&.scrolled\":{top:0,left:0,right:0,boxShadow:\"0 2px 8px rgba(0,0,0,0.2)\",\".content\":{paddingTop:\"0\",justifyContent:\"center\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".body-title\":{fontSize:\"26px\",lineHeight:\"34px\",marginBottom:\"0\",fontStyle:\"normal\",fontWeight:\"400\",fontFamily:e?.headlineFont??\"Lora\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".bg-image\":{width:\"90px\",height:\"90px\",padding:t?\"2px\":\"0px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",objectFit:\"cover\",objectPosition:\"center\"},\".placeholder-image\":{\"& > div\":{width:\"90px\",height:\"90px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"}}},\".content\":{width:\"70%\",height:\"100%\",marginLeft:\"2%\",marginRight:\"auto\",display:\"flex\",flexDirection:\"column\",position:\"relative\",boxSizing:\"border-box\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".bg-image\":{width:\"252px\",height:\"252px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",padding:t?\"3px\":\"0px\",objectFit:\"cover\",objectPosition:\"center\"},\".placeholder-image\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",\"& > div\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"}},\".body-title\":{fontSize:\"32px\",lineHeight:\"38px\",marginBottom:\"8px\",fontWeight:\"400\",color:o?\"#000000\":\"#FFFFFF\",overflow:\"hidden\",whiteSpace:\"nowrap\",textOverflow:\"ellipsis\",fontFamily:e?.headlineFont??\"Lora\",paddingLeft:\"5px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".body-text\":{fontSize:\"16px\",marginBottom:\"12px\",fontStyle:\"normal\",fontWeight:\"400\",lineHeight:\"22px\",color:o?\"#000000\":\"#FFFFFF\",fontFamily:e?.paragraphFont??\"inherit\",display:\"-webkit-box\",WebkitBoxOrient:\"vertical\",overflow:\"hidden\",WebkitLineClamp:3,textOverflow:\"ellipsis\",paddingLeft:\"5px\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\"},\".social-media\":{display:\"flex\",flexDirection:\"column\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\"},\".email-text\":ba(o),\".phone-text\":ba(o),\".social-title-text\":{...ni(o),marginBottom:\"8px\"},\".social-icons\":{...ii(),paddingBottom:\"8px\"}})),si=(0,yt.styled)(e=>(0,tr.jsx)(go.Box,{...e}))(({bannerProps:e,isCircularImage:t,hasWhiteBackground:o})=>({backgroundClip:\"border-box\",display:\"flex\",background:e?.backgroundColor??\"#383838\",position:\"relative\",overflow:\"hidden\",width:\"100%\",flexDirection:\"column\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"transform, opacity\",transform:\"translateZ(0)\",backfaceVisibility:\"hidden\",\"&.scrolled\":{top:0,left:0,right:0,boxShadow:\"0 2px 8px rgba(0,0,0,0.2)\",\".content-mobile\":{paddingTop:\"5px\",width:\"60%\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".body-title-mobile\":{fontSize:\"18px\",lineHeight:\"28px\",marginBottom:\"0\",fontStyle:\"normal\",fontWeight:\"400\",fontFamily:e?.headlineFont??\"Lora\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".bg-image-mobile\":{width:\"75px\",height:\"75px\",padding:t?\"2px\":\"0px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",objectFit:\"cover\",objectPosition:\"center\"},\".placeholder-image-mobile\":{\"& > div\":{width:\"75px !important\",height:\"75px !important\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"}}},\".image-content-mobile\":{display:\"flex\",flexDirection:\"row\",width:\"100%\",justifyContent:\"center\",alignItems:\"center\"},\".content-mobile\":{width:\"55%\",height:\"100%\",paddingTop:\"10px\",paddingRight:\"10px\",marginLeft:\"8px\",marginRight:\"auto\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",position:\"relative\",boxSizing:\"border-box\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",\"@media (max-width: 420px)\":{paddingTop:\"8px\",width:\"100%\"},\"@media (max-width: 400px)\":{paddingTop:\"6px\",width:\"100%\",height:\"100%\"},\"@media (max-width: 375px)\":{paddingTop:\"4px\",width:\"100%\",height:\"100%\"}},\".bg-image-mobile\":{width:\"144px\",height:\"144px\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",objectFit:\"cover\",objectPosition:\"center\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",padding:t?\"2px\":\"0px\",\"@media (max-width: 420px)\":{width:\"120px\",height:\"120px\"},\"@media (max-width: 400px)\":{width:\"112px\",height:\"112px\"},\"@media (max-width: 375px)\":{width:\"90px\",height:\"90px\"}},\".placeholder-image-mobile\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",\"& > div\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",width:\"144px\",height:\"144px\",\"@media (max-width: 420px)\":{width:\"120px\",height:\"120px\"},\"@media (max-width: 400px)\":{width:\"110px !important\",height:\"110px !important\"},\"@media (max-width: 375px)\":{width:\"90px\",height:\"90px\"}}},\".body-title-mobile\":{fontSize:\"22px\",lineHeight:\"28px\",marginBottom:\"13px\",fontWeight:\"400\",color:o?\"#000000\":\"#FFFFFF\",fontStyle:\"normal\",overflow:\"hidden\",whiteSpace:\"nowrap\",textOverflow:\"ellipsis\",fontFamily:e?.headlineFont??\"Lora\",paddingLeft:\"5px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",\"@media (max-width: 420px)\":{fontSize:\"16px\",lineHeight:\"24px\",marginBottom:\"8px\"},\"@media (max-width: 400px)\":{fontSize:\"16px\",lineHeight:\"22px\",marginBottom:\"6px\"},\"@media (max-width: 375px)\":{fontSize:\"14px\",lineHeight:\"20px\",marginBottom:\"4px\"}},\".body-text-mobile\":{fontSize:\"14px\",padding:\"20px 25px 20px 25px\",fontStyle:\"normal\",fontWeight:\"400\",lineHeight:\"20px\",color:\"#252525\",backgroundColor:\"#E0E0E0\",fontFamily:e?.paragraphFont??\"inherit\",transition:\"all 0.25s cubic-bezier(0.4, 0, 0.2, 1)\",opacity:1,transform:\"translateY(0)\"},\".expandable-description-mobile\":{backgroundColor:\"#E0E0E0\",position:\"relative\"},\".description-content-mobile\":{fontSize:\"14px\",padding:\"10px 15px\",fontStyle:\"normal\",fontWeight:\"400\",lineHeight:\"20px\",color:\"#252525\",fontFamily:e?.paragraphFont??\"inherit\",transition:\"max-height 0.3s ease-in-out, opacity 0.3s ease-in-out\",overflow:\"hidden\",position:\"relative\",\"&.collapsed\":{maxHeight:\"50px\",display:\"-webkit-box\",WebkitLineClamp:2,WebkitBoxOrient:\"vertical\",\"&::after\":{content:'\"\"',position:\"absolute\",bottom:0,left:0,right:0,height:\"20px\",background:\"linear-gradient(transparent, rgba(224, 224, 224, 0.8), #E0E0E0)\",pointerEvents:\"none\"}},\"&.expanded\":{maxHeight:\"none\",whiteSpace:\"normal\",display:\"block\",\"&::after\":{display:\"none\"}}},\".email-text-mobile\":ai(o),\".phone-text-mobile\":ai(o),\".social-title-text-mobile\":mc(o),\".social-icons-mobile\":{...ii(),paddingBottom:\"10px\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\",\"& img\":{width:\"24px\",height:\"24px\",\"@media (max-width: 400px)\":{width:\"20px\",height:\"20px\"},\"@media (max-width: 375px)\":{width:\"18px\",height:\"18px\"}},\"@media (max-width: 420px)\":{paddingBottom:\"8px\"},\"@media (max-width: 400px)\":{paddingBottom:\"4px\"},\"@media (max-width: 375px)\":{paddingBottom:\"3px\"}}})),di=(0,yt.styled)(go.Box)({display:\"flex\",gap:\"12px\",marginBottom:\"16px\",paddingLeft:\"5px\",\"&.mobile-badges\":{flexDirection:\"column\",gap:\"8px\",marginBottom:\"12px\"},\"&.tablet-badges\":{flexDirection:\"row\",gap:\"12px\",marginBottom:\"8px\"}}),ya=(0,yt.styled)(e=>(0,tr.jsx)(go.Box,{...e}))(({hasWhiteBackground:e})=>({backgroundColor:\"rgba(255, 255, 255, 0.2)\",backdropFilter:\"blur(10px)\",borderRadius:\"20px\",padding:\"8px 16px\",display:\"flex\",alignItems:\"center\",gap:\"4px\",border:\"1px solid rgba(255, 255, 255, 0.3)\",transition:\"all 0.3s ease\",\"&.mobile-badge\":{padding:\"6px 12px\",borderRadius:\"16px\",fontSize:\"12px\"},\"&.tablet-badge\":{padding:\"8px 16px\",borderRadius:\"20px\",fontSize:\"14px\"},\"&.total-savings-badge\":{backgroundColor:\"#4A6987\",border:\"none\",borderRadius:\"8px\",padding:\"8px 16px\",gap:\"4px\",minHeight:\"32px\",backdropFilter:\"none\",\".badge-value\":{color:\"#FFFFFF\"},\"&:hover\":{backgroundColor:\"#4A6987\",transform:\"none\",boxShadow:\"none\"}},\"&.expiration-badge\":{borderRadius:\"8px\",padding:\"8px 16px\",gap:\"4px\",minHeight:\"32px\"},\"&:hover\":{backgroundColor:\"rgba(255, 255, 255, 0.3)\",transform:\"translateY(-1px)\",boxShadow:\"0 4px 12px rgba(0, 0, 0, 0.1)\"},\".badge-text\":{color:e?\"#000000\":\"#FFFFFF\",fontWeight:\"400\",opacity:.9},\".badge-value\":{color:e?\"#000000\":\"#FFFFFF\",fontWeight:\"600\"}})),pi=(0,yt.styled)(\"button\")({backgroundColor:\"#E0E0E0\",border:\"1px solid #252525\",borderRadius:\"10px\",cursor:\"pointer\",width:\"40px\",height:\"20px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",margin:\"10px auto 5px auto\",transition:\"all 0.2s ease\",\"& .arrow-icon-mobile\":{transition:\"transform 0.3s ease\",\"&.expanded\":{transform:\"rotate(180deg)\"}}}),ci=(0,yt.styled)(go.Box)`\n background: none;\n border: 2px solid transparent;\n cursor: pointer;\n padding: 2px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n transition: all 0.3s ease;\n\n &:hover {\n transform: scale(1.1);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n\n &:focus,\n &:focus-within {\n outline: none;\n border-color: #007bff;\n box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);\n }\n\n &:hover svg {\n fill: #ffffff;\n }\n`,ui=(0,yt.styled)(\"span\")`\n line-height: 0.5;\n`,gi=(0,yt.styled)(\"a\")({fontSize:\"inherit\",fontFamily:\"inherit\",fontWeight:\"inherit\",lineHeight:\"inherit\",letterSpacing:\"inherit\",color:\"inherit\",textDecoration:\"none\",\"&:hover\":{textDecoration:\"underline\"}}),wa=(0,yt.styled)(\"span\")({});var fi=require(\"@mui/material\"),wt=require(\"react/jsx-runtime\"),mi=({width:e,height:t,backgroundColor:o})=>(0,wt.jsx)(fi.Box,{sx:{width:e,height:t,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",backgroundColor:o},\"data-testid\":\"placeholder-image\",children:(0,wt.jsx)(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"128\",height:\"129\",viewBox:\"0 0 128 129\",fill:\"none\",children:(0,wt.jsxs)(\"g\",{id:\"ns_logomark\",children:[(0,wt.jsx)(\"path\",{id:\"Vector\",d:\"M127.495 52.1946C125.663 47.9538 122.999 44.1171 119.661 40.9073C112.565 34.2835 102.562 31.7037 93.1175 34.0622C83.6733 36.4206 76.0882 43.3926 72.991 52.5619C71.4142 56.8414 70.6063 61.3627 70.6039 65.9196C70.6039 85.8227 70.6039 105.737 70.6039 125.662C70.6039 129.001 70.6039 129.001 66.9051 128.834C66.9051 128.2 66.9051 127.499 66.9051 126.831C66.9051 104.323 66.9051 81.8263 66.9051 59.3409C66.3415 45.3064 74.9302 32.5039 88.1888 27.6164C89.79 27.0612 91.4307 26.6259 93.0981 26.314C94.7114 25.98 96.4605 25.8465 98.0738 25.6461C96.0231 16.3291 78.9419 5.60953 65.0889 4.97504C50.3084 4.62252 36.6074 12.6365 29.7509 25.6461C31.331 25.8465 32.8779 25.9466 34.3569 26.2138C48.0999 28.544 58.7086 39.4998 60.5168 53.2298C60.8904 55.7285 61.0812 58.2508 61.0877 60.7769C61.0877 82.7507 61.0877 104.724 61.0877 126.697C61.0877 128.434 60.6842 129.169 58.8016 128.968C56.9183 128.768 57.1204 128.2 57.1204 126.965C57.1204 119.985 57.1204 113.006 57.1204 105.993C57.1204 92.1674 57.1204 78.3423 57.1204 64.5171C57.2385 56.3928 54.2457 48.5271 48.7477 42.5103C42.2429 35.5282 32.6539 32.2371 23.1959 33.7401C13.7379 35.243 5.66194 41.3411 1.67448 49.9906C1.23781 50.8254 0.867444 51.6937 0.262573 52.9293C5.79294 22.3996 32.4752 0.139867 63.7085 0.000656323C94.9411 -0.138555 121.824 21.8824 127.629 52.3616\",fill:\"#252525\"}),(0,wt.jsx)(\"path\",{id:\"Vector_2\",d:\"M86.0995 124.927C86.0995 124.293 86.0995 123.858 86.0995 123.425C86.0995 111.669 86.0995 100.049 86.0995 88.1269C85.8836 82.4231 88.0775 76.89 92.1523 72.8653C97.3131 67.9567 104.984 66.7091 111.452 69.7263C117.892 72.1185 122.166 78.225 122.178 85.0541C122.372 92.1747 119.781 99.0921 114.949 104.356C107.882 113.237 98.6134 120.141 88.05 124.392C87.4217 124.616 86.782 124.805 86.1335 124.96\",fill:\"#252525\"}),(0,wt.jsx)(\"path\",{id:\"Vector_3\",d:\"M41.8183 125.395C37.6149 123.224 33.6477 121.487 29.9828 119.25C21.5405 114.299 14.4778 107.331 9.43828 98.9796C6.53442 94.3985 5.34408 88.9493 6.07591 83.5852C7.056 75.2882 13.8859 68.8841 22.2829 68.3905C31.1231 67.2473 39.3527 73.0751 41.1455 81.7484C41.76 84.263 42.0762 86.8411 42.0868 89.4287C42.0868 100.516 42.0868 111.636 42.0868 122.823C42.0868 123.457 42.0867 124.059 41.8854 125.294\",fill:\"#252525\"}),(0,wt.jsx)(\"path\",{id:\"Vector_4\",d:\"M51.3337 127.431C47.9713 127.431 47.6681 127.198 47.6681 124.326V76.6386C48.1096 67.937 42.9747 59.906 34.8574 56.602C25.8992 52.8557 15.5485 54.8615 8.66523 61.6779C4.28638 66.6086 1.89197 72.9696 1.94049 79.5438C1.95423 80.2444 1.78037 80.9357 1.43588 81.5476C1.06552 79.9446 0.62885 78.2081 0.426687 76.7387C-0.724024 70.4463 0.471163 63.9529 3.78906 58.472C6.09291 54.6111 9.65016 51.6434 13.8762 50.0567C22.8587 46.555 32.9393 47.1785 41.4148 51.7598C47.6592 54.8694 51.5262 61.2882 51.3337 68.2232C51.5019 87.6249 51.3337 107.027 51.3337 126.396C51.3337 126.797 51.3337 127.164 51.3337 127.532\",fill:\"#252525\"}),(0,wt.jsx)(\"path\",{id:\"Vector_5\",d:\"M76.287 127.499V125.094C76.287 107.196 76.4883 89.2963 76.287 71.3966C76.0848 56.9034 84.2554 50.6588 95.7553 48.3545C101.535 47.2005 107.524 47.6393 113.071 49.6235C122.914 53.3319 128.994 63.1725 127.866 73.5672C127.631 76.2831 127.17 78.975 126.487 81.6151C125.916 78.2758 125.68 74.9364 124.772 71.597C122.808 64.3002 117.377 58.4174 110.228 55.8421C103.078 53.2668 95.1132 54.3239 88.8955 58.6734C83.0441 62.6207 79.7011 69.3237 80.086 76.3389C80.086 92.2349 80.086 108.131 80.086 124.026C80.086 127.366 80.086 127.366 76.2198 127.366\",fill:\"#252525\"})]})})});var Ca=require(\"react/jsx-runtime\"),hi=({width:e=16,height:t=16,className:o=\"\"})=>(0,Ca.jsx)(\"svg\",{width:e,height:t,viewBox:\"0 0 24 24\",fill:\"currentColor\",className:o,\"data-testid\":\"arrow-down-icon\",children:(0,Ca.jsx)(\"path\",{d:\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\"})});function or(e){if(typeof window>\"u\")return;let t=window.location.href,o={...e},n=t.includes(\"personal-offer\")?\"postorefront_\":\"mysite_\";o.event=n+e.event;try{window.dataLayer||(console.error(\"GTM dataLayer not available, but event logged\"),window.dataLayer=[]),window.dataLayer.push(o)}catch(i){console.error(\"Failed to track GTM event:\",i)}}var B=require(\"react/jsx-runtime\"),xi=(e,t,o)=>{let n=o.includes(\"mobile\")?\"placeholder-image-mobile\":\"placeholder-image\";return e?.imageSrc?(0,B.jsx)(ui,{tabIndex:0,children:(0,B.jsx)(Bo.NsImage,{className:o,src:e.imageSrc,alt:e.imageAlt})}):(0,B.jsx)(pe.Box,{className:n,children:(0,B.jsx)(mi,{width:o.includes(\"mobile\")?\"144px\":\"246px\",height:o.includes(\"mobile\")?\"144px\":\"246px\",backgroundColor:t?.backgroundColor??\"#5F5F5F\"})})},bi=(e,t,o,n,i)=>{if(!e||!t&&!i)return null;let s=o?\"mobile-badge\":\"tablet-badge\";return(0,B.jsxs)(di,{className:o?\"mobile-badges\":\"tablet-badges\",children:[i&&(0,B.jsx)(ya,{className:`${s} total-savings-badge`,hasWhiteBackground:n,tabIndex:0,children:(0,B.jsx)(wa,{className:\"badge-value\",children:i})}),t&&(0,B.jsx)(ya,{className:`${s} expiration-badge`,hasWhiteBackground:n,tabIndex:0,children:(0,B.jsx)(wa,{className:\"badge-value\",children:t})})]})},hc=(e,t,o,n,i)=>{let{shopTitle:s,socialTitleText:d,email:p,showBadges:w,expirationDate:C,phone:u,totalSavings:x}=e;return(0,B.jsxs)(pe.Box,{className:\"content-mobile\",children:[(0,B.jsx)(pe.Typography,{component:\"h1\",tabIndex:s?.trim()?0:-1,className:\"body-title-mobile\",children:s}),!t&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(pe.Typography,{tabIndex:d?.trim()?0:-1,className:\"social-title-text-mobile\",children:d}),p?.trim()&&rr(\"email\",p,\"email-text-mobile\"),u?.trim()&&rr(\"phone\",u,\"phone-text-mobile\"),(0,B.jsx)(pe.Box,{className:\"social-icons-mobile\",children:o}),bi(w,C??\"\",n,i,x)]})]})},xc=(e,t,o,n,i)=>{let{shopTitle:s,shopDescription:d,socialTitleText:p,email:w,phone:C,showBadges:u,expirationDate:x,totalSavings:g}=e;return(0,B.jsxs)(pe.Box,{className:\"content\",children:[(0,B.jsx)(pe.Typography,{component:\"h1\",tabIndex:s?.trim()?0:-1,className:\"body-title\",children:s}),!t&&(0,B.jsxs)(B.Fragment,{children:[d?.length>480?(0,B.jsx)(pe.Tooltip,{title:d,arrow:!0,children:(0,B.jsx)(pe.Typography,{tabIndex:d?.trim()?0:-1,className:\"body-text\",children:d})}):(0,B.jsx)(pe.Typography,{tabIndex:d?.trim()?0:-1,className:\"body-text\",children:d}),(0,B.jsxs)(pe.Box,{className:\"social-media\",children:[(0,B.jsx)(pe.Typography,{tabIndex:p?.trim()?0:-1,className:\"social-title-text\",children:p}),(0,B.jsxs)(pe.Box,{className:\"social-icons\",children:[o,w?.trim()&&rr(\"email\",w,\"email-text\"),C?.trim()&&rr(\"phone\",C,\"phone-text\")]})]}),bi(u,x??\"\",n,i,g)]})]})},bc=e=>new Promise((t,o)=>{let n=new Image;n.crossOrigin=\"anonymous\",n.src=e,n.onload=()=>{let i=document.createElement(\"canvas\"),s=i.getContext(\"2d\");if(!s)return o(new Error(\"Canvas not supported\"));i.width=n.width,i.height=n.height,s.drawImage(n,0,0);let p=[s.getImageData(0,0,1,1).data,s.getImageData(n.width-1,0,1,1).data,s.getImageData(0,n.height-1,1,1).data,s.getImageData(n.width-1,n.height-1,1,1).data].every(w=>Array.prototype.slice.call(w)[3]<10);t(p)},n.onerror=()=>o(new Error(\"Failed to load image\"))}),yc=e=>{if(!e)return!1;let t=e.replace(\"#\",\"\").toLowerCase();if(!/^[0-9a-f]{3,4}$|^[0-9a-f]{6}$|^[0-9a-f]{8}$/i.test(t))return!1;let o=t;(t.length===3||t.length===4)&&(o=t.split(\"\").map(p=>p+p).join(\"\"));let n=Number.parseInt(o.substring(0,2),16),i=Number.parseInt(o.substring(2,4),16),s=Number.parseInt(o.substring(4,6),16),d=220;return n>=d&&i>=d&&s>=d},wc=(e,t)=>({onClick:()=>{or({event:\"contact_click\",contact_type:e,contact_value:t,click_element:`${e}_link`})},onKeyDown:o=>{(o.key===\"Enter\"||o.key===\" \")&&(o.preventDefault(),or({event:\"contact_click\",contact_type:e,contact_value:t,click_element:`${e}_link`}),globalThis.location.href=`${e===\"email\"?\"mailto\":\"tel\"}:${t}`)}}),rr=(e,t,o)=>{let n=e===\"email\"?\"mailto:\":\"tel:\",i=wc(e,t);return(0,B.jsx)(pe.Typography,{className:o,children:(0,B.jsx)(gi,{href:`${n}${t}`,...i,children:t})})};function va({className:e,shopTitle:t,shopDescription:o,socialTitleText:n,imageDetails:i,email:s,phone:d,bannerProps:p,socialIcons:w,expirationDate:C,showBadges:u=!1,totalSavings:x}){let g=(0,pe.useMediaQuery)(\"(max-width: 560px)\"),[b,f]=(0,gt.useState)(!1),[c,v]=(0,gt.useState)(!1),[y,D]=(0,gt.useState)(!1),[h,F]=(0,gt.useState)(!1),V=()=>{v(!c)};(0,gt.useEffect)(()=>{(async()=>{if(i?.imageSrc){let k=await bc(i.imageSrc);F(k)}else F(!1)})()},[i?.imageSrc]),(0,gt.useEffect)(()=>{D(yc(p?.backgroundColor))},[p?.backgroundColor]),(0,gt.useEffect)(()=>{let m,k=window.scrollY,S=!1,l=!1,R=0,Y=ie=>{let pt=Date.now();if(S!==ie&&!l){if(pt-R<100)return;l=!0,S=ie,R=pt,ie&&v(!1),clearTimeout(m),f(ie),m=setTimeout(()=>{l=!1,ie&&window.scrollY<15&&window.scrollTo({top:g?20:30,behavior:\"smooth\"})},300)}},be=()=>{let ie=window.scrollY;if(l){k=ie;return}if(Math.abs(ie-k)<.5)return;let Xe=ie>k,po=g?15:25,co=g?8:12;Xe&&ie>po&&!S?Y(!0):!Xe&&ie<co&&S&&Y(!1),k=ie},de=()=>{let ie=window.scrollY,Xe=ie>(g?5:10);S=Xe,f(Xe),k=ie,R=Date.now()},_e=null,Vt=0,Qe=()=>{_e||Date.now()-Vt<16||(_e=requestAnimationFrame(()=>{be(),Vt=Date.now(),_e=null}))};return de(),window.addEventListener(\"scroll\",Qe,{passive:!0}),()=>{window.removeEventListener(\"scroll\",Qe),_e&&cancelAnimationFrame(_e),clearTimeout(m)}},[g]);let q=(0,gt.useMemo)(()=>w?.map((m,k)=>(0,B.jsx)(ci,{onClick:l=>{l.preventDefault(),or({event:\"social_click\",social_platform:m.type,social_url:m.url,click_element:\"social_icon\"}),window.open(m.url,\"_blank\")},children:(0,B.jsx)(Bo.NsLink,{href:m.url,target:\"_blank\",children:(0,B.jsx)(Bo.NsImage,{src:`https://www.google.com/s2/favicons?domain=${m?.url}&sz=24`,alt:`${m.type} icon`,width:\"24\",height:\"24\"},m?.type+k)})},m?.type+k)),[w]),A=`${e} ${b?\"scrolled\":\"\"}`,H={shopTitle:t,shopDescription:o,socialTitleText:n,email:s,phone:d,showBadges:u,expirationDate:C,totalSavings:x},Q=()=>window.innerWidth<=380?50:window.innerWidth<=415?56:window.innerWidth<=460?62:80,I=g&&o&&o.length>Q();return g?(0,B.jsxs)(si,{className:A,\"data-testid\":\"my-site-shop-header\",bannerProps:p,isCircularImage:h,hasWhiteBackground:y,children:[(0,B.jsxs)(pe.Box,{className:\"image-content-mobile\",children:[xi(i,p??{},\"bg-image-mobile\"),hc(H,b,q,g,y)]}),!b&&(0,B.jsxs)(pe.Box,{className:\"expandable-description-mobile\",children:[(0,B.jsx)(pe.Typography,{className:`description-content-mobile ${c||!I?\"expanded\":\"collapsed\"}`,children:o}),I&&(0,B.jsx)(pi,{onClick:V,children:(0,B.jsx)(hi,{width:16,height:16,className:`arrow-icon-mobile ${c?\"expanded\":\"\"}`})})]})]}):(0,B.jsxs)(li,{className:A,\"data-testid\":\"my-site-shop-header\",bannerProps:p,isCircularImage:h,hasWhiteBackground:y,children:[xi(i,p??{},\"bg-image\"),xc(H,b,q,g,y)]})}var fo=require(\"@nuskin/foundation-theme\"),ka=(0,fo.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 24px;\n }\n\n @media (min-width: 1080px) {\n padding: 32px;\n }\n`,yi=(0,fo.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`,wi=(0,fo.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n gap: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`,Sa=(0,fo.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: repeat(2, 1fr);\n gap: 24px;\n }\n`,Ci=(0,fo.styled)(\"div\")`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;var Fi=M(require(\"@mui/icons-material/CalendarToday\")),Li=M(require(\"@mui/icons-material/Public\")),$i=require(\"@nuskin/foundation-ui-components\");var Be=require(\"@nuskin/foundation-theme\"),{getGenomeColor:ft}=Be.ColorUtils,vi=(0,Be.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>ft(e,\"N20\")};\n border-radius: 12px;\n min-height: 64px;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 24px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px 32px;\n }\n`,ki=(0,Be.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: baseline;\n gap: 12px;\n flex-wrap: wrap;\n`,Si=(0,Be.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({theme:e})=>ft(e,\"N100\")};\n margin: 0;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n\n @media (min-width: 1080px) {\n font-size: 16px;\n }\n`,Ti=(0,Be.styled)(\"div\")`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({theme:e})=>ft(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`,Di=(0,Be.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: center;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n width: auto;\n }\n`,Ta=(0,Be.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n position: relative;\n`,Da=(0,Be.styled)(\"label\")`\n font-size: 14px;\n font-weight: 500;\n line-height: 1.4;\n color: ${({theme:e})=>ft(e,\"N80\")};\n white-space: nowrap;\n display: none;\n\n @media (min-width: 1080px) {\n display: block;\n }\n`,Pa=(0,Be.styled)(\"select\")`\n display: flex;\n align-items: center;\n gap: 12px;\n height: 40px;\n padding: 8px 12px;\n background-color: transparent;\n border: none;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ${({theme:e})=>ft(e,\"N70\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n appearance: none;\n background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3e%3cpath d=\"M5.625 7.3125L9 10.6875L12.375 7.3125\" stroke=\"%235f5f5f\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/%3e%3c/svg%3e');\n background-repeat: no-repeat;\n background-position: right 8px center;\n padding-right: 32px;\n min-width: auto;\n\n &:hover {\n background-color: ${({theme:e})=>ft(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>ft(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>ft(e,\"A20\")};\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n @media (min-width: 768px) {\n min-width: 160px;\n }\n\n @media (min-width: 1080px) {\n background-color: ${({theme:e})=>ft(e,\"N10\")};\n border: 1px solid ${({theme:e})=>ft(e,\"N40\")};\n border-radius: 8px;\n min-width: 180px;\n }\n`,Ra=(0,Be.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: ${({theme:e})=>ft(e,\"N70\")};\n\n svg {\n width: 16px;\n height: 16px;\n }\n`,Pi=(0,Be.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n overflow: hidden;\n\n svg,\n img,\n > * {\n width: 28px !important;\n height: 28px !important;\n max-width: 28px;\n max-height: 28px;\n }\n`,Ri=(0,Be.styled)(\"div\")`\n display: flex;\n flex-wrap: wrap;\n gap: 16px;\n align-items: center;\n width: 100%;\n\n @media (min-width: 768px) {\n width: auto;\n }\n`,Cg=(0,Be.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n`;var ar;function mo(e){ar=e}function Mi(){return ar}function Kt(e){if(!ar)return e.fallback;let t;try{t=ar(e.key,e.fallback)}catch{t=void 0}return typeof t==\"string\"&&t.length>0?t:e.fallback}var r={title:{key:\"shoppingDashboard.title\",fallback:\"Shop Performance\"},error:{key:\"shoppingDashboard.error\",fallback:\"Error loading dashboard\"},stats:{revenue:{key:\"shoppingDashboard.stats.revenue\",fallback:\"Total Revenue\"},volume:{key:\"shoppingDashboard.stats.volume\",fallback:\"Volume\"},visits:{key:\"shoppingDashboard.stats.visits\",fallback:\"Site Visits\"},subtitle:{dcSv:{key:\"shoppingDashboard.stats.subtitle.dcSv\",fallback:\"DC-SV\"},conversionRate:{key:\"shoppingDashboard.stats.subtitle.conversionRate\",fallback:\"Conversion Rate\"}},trend:{increased:{key:\"shoppingDashboard.stats.trend.increased\",fallback:\"increased\"},decreased:{key:\"shoppingDashboard.stats.trend.decreased\",fallback:\"decreased\"},unchanged:{key:\"shoppingDashboard.stats.trend.unchanged\",fallback:\"unchanged\"}},details:{key:\"shoppingDashboard.stats.details\",fallback:\"details\"}},filter:{dateRange:{label:{key:\"shoppingDashboard.filter.dateRange.label\",fallback:\"Date Range\"},last7days:{key:\"shoppingDashboard.filter.dateRange.last7days\",fallback:\"Last 7 Days\"},last30days:{key:\"shoppingDashboard.filter.dateRange.last30days\",fallback:\"Last 30 Days\"},last90days:{key:\"shoppingDashboard.filter.dateRange.last90days\",fallback:\"Last 90 Days\"},thisMonth:{key:\"shoppingDashboard.filter.dateRange.thisMonth\",fallback:\"This Month\"}},dateRangeLabel:{key:\"shoppingDashboard.filter.dateRangeLabel\",fallback:\"Date Range\"},market:{label:{key:\"shoppingDashboard.filter.market.label\",fallback:\"Market\"},all:{key:\"shoppingDashboard.filter.market.all\",fallback:\"All Markets\"}},marketLabel:{key:\"shoppingDashboard.filter.marketLabel\",fallback:\"Market\"},productSort:{label:{key:\"shoppingDashboard.filter.productSort.label\",fallback:\"Sort By\"},units:{key:\"shoppingDashboard.filter.productSort.units\",fallback:\"Units\"},revenue:{key:\"shoppingDashboard.filter.productSort.revenue\",fallback:\"Revenue\"},volume:{key:\"shoppingDashboard.filter.productSort.volume\",fallback:\"Volume\"},byUnits:{key:\"shoppingDashboard.filter.productSort.byUnits\",fallback:\"By: Units\"},byRevenue:{key:\"shoppingDashboard.filter.productSort.byRevenue\",fallback:\"By: Revenue\"},byVolume:{key:\"shoppingDashboard.filter.productSort.byVolume\",fallback:\"By: Volume\"}},signupView:{label:{key:\"shoppingDashboard.filter.signupView.label\",fallback:\"Show\"},all:{key:\"shoppingDashboard.filter.signupView.all\",fallback:\"All\"},members:{key:\"shoppingDashboard.filter.signupView.members\",fallback:\"Members\"},retail:{key:\"shoppingDashboard.filter.signupView.retail\",fallback:\"Retail\"},brandAffiliates:{key:\"shoppingDashboard.filter.signupView.brandAffiliates\",fallback:\"Brand Affiliates\"},showAll:{key:\"shoppingDashboard.filter.signupView.showAll\",fallback:\"Show: All\"},showMembers:{key:\"shoppingDashboard.filter.signupView.showMembers\",fallback:\"Show: Members\"},showRetail:{key:\"shoppingDashboard.filter.signupView.showRetail\",fallback:\"Show: Retail\"},showBrandAffiliates:{key:\"shoppingDashboard.filter.signupView.showBrandAffiliates\",fallback:\"Show: Brand Affiliates\"}},conversionType:{all:{key:\"shoppingDashboard.filter.conversionType.all\",fallback:\"All\"},standard:{key:\"shoppingDashboard.filter.conversionType.standard\",fallback:\"Standard\"},subscription:{key:\"shoppingDashboard.filter.conversionType.subscription\",fallback:\"Subscription\"}},categorySort:{byRevenue:{key:\"shoppingDashboard.filter.categorySort.byRevenue\",fallback:\"By: Revenue\"},byTrend:{key:\"shoppingDashboard.filter.categorySort.byTrend\",fallback:\"By: Trend\"}}},widget:{topProducts:{title:{key:\"shoppingDashboard.widget.topProducts.title\",fallback:\"Top Selling Products\"},viewAll:{key:\"shoppingDashboard.widget.topProducts.viewAll\",fallback:\"View All Products\"},units:{key:\"shoppingDashboard.widget.topProducts.units\",fallback:\"Units\"},revenue:{key:\"shoppingDashboard.widget.topProducts.revenue\",fallback:\"Revenue\"},loading:{key:\"shoppingDashboard.widget.topProducts.loading\",fallback:\"Loading products...\"},empty:{key:\"shoppingDashboard.widget.topProducts.empty\",fallback:\"No products available\"},ariaLabel:{key:\"shoppingDashboard.widget.topProducts.ariaLabel\",fallback:\"Top Selling Products widget\"},titleAriaLabel:{key:\"shoppingDashboard.widget.topProducts.titleAriaLabel\",fallback:\"Click to view full top products details page\"},sortAriaLabel:{key:\"shoppingDashboard.widget.topProducts.sortAriaLabel\",fallback:\"Sort products by\"},noImageAriaLabel:{key:\"shoppingDashboard.widget.topProducts.noImageAriaLabel\",fallback:\"No image available\"},unitsSuffix:{key:\"shoppingDashboard.widget.topProducts.unitsSuffix\",fallback:\"units\"},revenueSuffix:{key:\"shoppingDashboard.widget.topProducts.revenueSuffix\",fallback:\"revenue\"},dcSvSuffix:{key:\"shoppingDashboard.widget.topProducts.dcSvSuffix\",fallback:\"DC-SV\"},rank:{key:\"shoppingDashboard.widget.topProducts.rank\",fallback:\"Rank\"},trend:{key:\"shoppingDashboard.widget.topProducts.trend\",fallback:\"Trend\"}},conversionRate:{title:{key:\"shoppingDashboard.widget.conversionRate.title\",fallback:\"Conversion Rate\"},formula:{key:\"shoppingDashboard.widget.conversionRate.formula\",fallback:\"Orders \\xF7 Site visits\"},comparison:{key:\"shoppingDashboard.widget.conversionRate.comparison\",fallback:\"compared to this time last month\"},chartAriaLabel:{key:\"shoppingDashboard.widget.conversionRate.chartAriaLabel\",fallback:\"Conversion Rate chart showing daily rates\"},titleAriaLabel:{key:\"shoppingDashboard.widget.conversionRate.titleAriaLabel\",fallback:\"Click to view full conversion rate details page\"},filterAriaLabel:{key:\"shoppingDashboard.widget.conversionRate.filterAriaLabel\",fallback:\"Filter conversion rate by customer type\"},noData:{key:\"shoppingDashboard.widget.conversionRate.noData\",fallback:\"No data\"},noChange:{key:\"shoppingDashboard.widget.conversionRate.noChange\",fallback:\"No change\"},tooltipOrders:{key:\"shoppingDashboard.widget.conversionRate.tooltipOrders\",fallback:\"orders\"},tooltipVisits:{key:\"shoppingDashboard.widget.conversionRate.tooltipVisits\",fallback:\"visits\"},ordersPerSiteVisits:{key:\"shoppingDashboard.widget.conversionRate.ordersPerSiteVisits\",fallback:\"Orders / Site Visits\"}},signups:{title:{key:\"shoppingDashboard.widget.signups.title\",fallback:\"Sign-ups\"},total:{key:\"shoppingDashboard.widget.signups.total\",fallback:\"Total\"},members:{key:\"shoppingDashboard.widget.signups.members\",fallback:\"Members\"},retail:{key:\"shoppingDashboard.widget.signups.retail\",fallback:\"Retail\"},brandAffiliates:{key:\"shoppingDashboard.widget.signups.brandAffiliates\",fallback:\"Brand Affiliates\"},chartAriaLabel:{key:\"shoppingDashboard.widget.signups.chartAriaLabel\",fallback:\"Signups multi-line chart showing Total, Members, Retail, and Brand Affiliates\"},titleAriaLabel:{key:\"shoppingDashboard.widget.signups.titleAriaLabel\",fallback:\"Click to view full signups details page\"},filterAriaLabel:{key:\"shoppingDashboard.widget.signups.filterAriaLabel\",fallback:\"Filter signups view\"},noData:{key:\"shoppingDashboard.widget.signups.noData\",fallback:\"No data\"},noChange:{key:\"shoppingDashboard.widget.signups.noChange\",fallback:\"No change\"},totalSignupsInPeriod:{key:\"shoppingDashboard.widget.signups.totalSignupsInPeriod\",fallback:\"Total sign-ups in period\"},noTrendData:{key:\"shoppingDashboard.widget.signups.noTrendData\",fallback:\"No sign-up trend data available.\"}},topCategories:{title:{key:\"shoppingDashboard.widget.topCategories.title\",fallback:\"Top Categories\"},revenue:{key:\"shoppingDashboard.widget.topCategories.revenue\",fallback:\"Revenue\"},units:{key:\"shoppingDashboard.widget.topCategories.units\",fallback:\"Units\"},empty:{key:\"shoppingDashboard.widget.topCategories.empty\",fallback:\"No category data available\"},chartAriaLabel:{key:\"shoppingDashboard.widget.topCategories.chartAriaLabel\",fallback:\"Top Categories donut chart showing revenue distribution by category\"},titleAriaLabel:{key:\"shoppingDashboard.widget.topCategories.titleAriaLabel\",fallback:\"Click to view full categories details page\"},sortAriaLabel:{key:\"shoppingDashboard.widget.topCategories.sortAriaLabel\",fallback:\"Sort categories by\"}},menu:{ariaLabel:{key:\"shoppingDashboard.widget.menu.ariaLabel\",fallback:\"widget options\"},fullView:{key:\"shoppingDashboard.widget.menu.fullView\",fallback:\"Full View\"}}},navigation:{backToDashboard:{key:\"shoppingDashboard.navigation.backToDashboard\",fallback:\"Back to Dashboard\"},backAriaLabel:{key:\"shoppingDashboard.navigation.backAriaLabel\",fallback:\"Back to dashboard\"}},ariaLabel:{dashboard:{key:\"shoppingDashboard.ariaLabel.dashboard\",fallback:\"Shopping Dashboard\"},statsRow:{key:\"shoppingDashboard.ariaLabel.statsRow\",fallback:\"Key performance metrics\"},dashboardFilters:{key:\"shoppingDashboard.ariaLabel.dashboardFilters\",fallback:\"Dashboard filters\"},loadingDashboard:{key:\"shoppingDashboard.ariaLabel.loadingDashboard\",fallback:\"Loading dashboard data\"},dateRangeFilter:{key:\"shoppingDashboard.ariaLabel.dateRangeFilter\",fallback:\"Date range filter, currently selected:\"},marketFilter:{key:\"shoppingDashboard.ariaLabel.marketFilter\",fallback:\"Market filter, currently selected:\"},filterSuffix:{key:\"shoppingDashboard.ariaLabel.filterSuffix\",fallback:\"filter\"}},fullView:{signups:{columns:{id:{key:\"shoppingDashboard.fullView.signups.columns.id\",fallback:\"ID\"},name:{key:\"shoppingDashboard.fullView.signups.columns.name\",fallback:\"Name\"},date:{key:\"shoppingDashboard.fullView.signups.columns.date\",fallback:\"Date\"},type:{key:\"shoppingDashboard.fullView.signups.columns.type\",fallback:\"Type\"},email:{key:\"shoppingDashboard.fullView.signups.columns.email\",fallback:\"Email\"},status:{key:\"shoppingDashboard.fullView.signups.columns.status\",fallback:\"Status\"}},detailsTitle:{key:\"shoppingDashboard.fullView.signups.detailsTitle\",fallback:\"Signup Details\"}},conversionRate:{columns:{orderId:{key:\"shoppingDashboard.fullView.conversionRate.columns.orderId\",fallback:\"Order ID\"},date:{key:\"shoppingDashboard.fullView.conversionRate.columns.date\",fallback:\"Date\"},customer:{key:\"shoppingDashboard.fullView.conversionRate.columns.customer\",fallback:\"Customer\"},type:{key:\"shoppingDashboard.fullView.conversionRate.columns.type\",fallback:\"Type\"},items:{key:\"shoppingDashboard.fullView.conversionRate.columns.items\",fallback:\"Items\"},total:{key:\"shoppingDashboard.fullView.conversionRate.columns.total\",fallback:\"Order Total\"},bv:{key:\"shoppingDashboard.fullView.conversionRate.columns.bv\",fallback:\"BV\"},orderTotal:{key:\"shoppingDashboard.fullView.conversionRate.columns.orderTotal\",fallback:\"Order Total\"},totalSv:{key:\"shoppingDashboard.fullView.conversionRate.columns.totalSv\",fallback:\"Total SV\"}},orderDetailsTitle:{key:\"shoppingDashboard.fullView.conversionRate.orderDetailsTitle\",fallback:\"Order Details\"},notAvailable:{key:\"shoppingDashboard.fullView.conversionRate.notAvailable\",fallback:\"N/A\"}},products:{columns:{rank:{key:\"shoppingDashboard.fullView.products.columns.rank\",fallback:\"#\"},product:{key:\"shoppingDashboard.fullView.products.columns.product\",fallback:\"Product\"},unitsSold:{key:\"shoppingDashboard.fullView.products.columns.unitsSold\",fallback:\"Units Sold\"},revenue:{key:\"shoppingDashboard.fullView.products.columns.revenue\",fallback:\"Revenue\"},volume:{key:\"shoppingDashboard.fullView.products.columns.volume\",fallback:\"Volume (DC-SV)\"}},skuPrefix:{key:\"shoppingDashboard.fullView.products.skuPrefix\",fallback:\"SKU\"},noProducts:{key:\"shoppingDashboard.fullView.products.noProducts\",fallback:\"No products available.\"}},categories:{columns:{category:{key:\"shoppingDashboard.fullView.categories.columns.category\",fallback:\"Category\"},revenue:{key:\"shoppingDashboard.fullView.categories.columns.revenue\",fallback:\"Revenue\"},percentOfTotal:{key:\"shoppingDashboard.fullView.categories.columns.percentOfTotal\",fallback:\"% of Total\"},trend:{key:\"shoppingDashboard.fullView.categories.columns.trend\",fallback:\"Trend\"}},allCategoriesTitle:{key:\"shoppingDashboard.fullView.categories.allCategoriesTitle\",fallback:\"All Categories\"},noCategoryData:{key:\"shoppingDashboard.fullView.categories.noCategoryData\",fallback:\"No category data available.\"}}},dataTable:{noDataAvailable:{key:\"shoppingDashboard.dataTable.noDataAvailable\",fallback:\"No data available\"},sortableColumn:{key:\"shoppingDashboard.dataTable.sortableColumn\",fallback:\", sortable column\"}},pagination:{previousPage:{key:\"shoppingDashboard.pagination.previousPage\",fallback:\"Previous page\"},nextPage:{key:\"shoppingDashboard.pagination.nextPage\",fallback:\"Next page\"},goToPage:{key:\"shoppingDashboard.pagination.goToPage\",fallback:\"Go to page\"},of:{key:\"shoppingDashboard.pagination.of\",fallback:\"of\"}},defaults:{zeroTrend:{key:\"shoppingDashboard.defaults.zeroTrend\",fallback:\"+0%\"},noValue:{key:\"shoppingDashboard.defaults.noValue\",fallback:\"--\"}}};function a(e){return Kt(e)}var Oi=require(\"react\");function Ma(){return[{value:\"all\",label:a(r.filter.market.all)}]}function Oa(e){return e&&e.length>0?e:Ma()}function ot(e){return(0,Oi.useMemo)(()=>Oa(e),[e])}var ae=require(\"react/jsx-runtime\"),ho=({shopTitle:e,dateRange:t,market:o,dateRangeLabel:n,isLoading:i=!1,stats:s,markets:d,onDateRangeChange:p,onMarketChange:w})=>{let C=ot(d),u=f=>{let c=f.target.value;p?.(c)},x=f=>{let c=f.target.value;w?.(c)},g=f=>{f.key===\"Escape\"&&f.target.blur()},b=()=>n||(s?.dateRange?s.dateRange.label:a(r.filter.dateRange.last30days));return(0,ae.jsxs)(vi,{as:\"header\",\"data-testid\":\"dashboard-header\",children:[(0,ae.jsxs)(ki,{children:[(0,ae.jsx)(Si,{\"data-testid\":\"dashboard-shop-title\",children:e??s?.shopTitle??a(r.title)}),(0,ae.jsx)(Ti,{\"aria-live\":\"polite\",\"data-testid\":\"dashboard-date-range-label\",children:b()})]}),(0,ae.jsx)(Di,{\"aria-label\":a(r.ariaLabel.dashboardFilters),\"data-testid\":\"dashboard-filters-section\",children:(0,ae.jsxs)(Ri,{children:[i&&(0,ae.jsx)(Pi,{as:\"output\",\"aria-live\":\"polite\",\"aria-label\":a(r.ariaLabel.loadingDashboard),\"data-testid\":\"dashboard-loading-indicator\",children:(0,ae.jsx)($i.NsSpinner,{})}),(0,ae.jsxs)(Ta,{children:[(0,ae.jsx)(Da,{htmlFor:\"filter-date-range\",children:a(r.filter.dateRangeLabel)}),(0,ae.jsx)(Ra,{\"aria-hidden\":\"true\",children:(0,ae.jsx)(Fi.default,{})}),(0,ae.jsxs)(Pa,{id:\"filter-date-range\",\"data-testid\":\"filter-date-range\",value:t,onChange:u,onKeyDown:g,disabled:i,\"aria-label\":`${a(r.ariaLabel.dateRangeFilter)} ${a(r.filter.dateRange[t])}`,children:[(0,ae.jsx)(\"option\",{value:\"last7days\",children:a(r.filter.dateRange.last7days)}),(0,ae.jsx)(\"option\",{value:\"last30days\",children:a(r.filter.dateRange.last30days)}),(0,ae.jsx)(\"option\",{value:\"last90days\",children:a(r.filter.dateRange.last90days)}),(0,ae.jsx)(\"option\",{value:\"thisMonth\",children:a(r.filter.dateRange.thisMonth)})]})]}),(0,ae.jsxs)(Ta,{children:[(0,ae.jsx)(Da,{htmlFor:\"filter-market\",children:a(r.filter.marketLabel)}),(0,ae.jsx)(Ra,{\"aria-hidden\":\"true\",children:(0,ae.jsx)(Li.default,{})}),(0,ae.jsx)(Pa,{id:\"filter-market\",\"data-testid\":\"filter-market\",value:o,onChange:x,onKeyDown:g,disabled:i,\"aria-label\":`${a(r.ariaLabel.marketFilter)} ${C.find(f=>f.value===o)?.label??String(o)}`,children:C.map(f=>(0,ae.jsx)(\"option\",{value:f.value,children:f.label},f.value))})]})]})})]})};var ul=M(require(\"react\")),gl=M(require(\"@mui/icons-material/ShowChart\")),fl=M(require(\"@mui/icons-material/TrendingUp\")),ml=M(require(\"@mui/icons-material/TrendingDown\"));var we=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Ht}=we.ColorUtils,nr=(0,we.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n box-sizing: border-box;\n gap: ${({$layout:e})=>e===\"split\"?\"8px\":\"0\"};\n padding: ${({$layout:e})=>e===\"split\"?\"16px\":\"12px\"};\n background-color: ${({theme:e})=>Ht(e,\"N20\")};\n border: 1px solid ${({theme:e})=>Ht(e,\"N30\")};\n border-radius: 8px;\n min-height: ${({$layout:e})=>e===\"split\"?\"127px\":\"120px\"};\n transition: box-shadow 0.2s ease;\n\n &:hover {\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);\n }\n\n @media (min-width: 768px) {\n padding: ${({$layout:e})=>e===\"split\"?\"24px\":\"20px\"};\n min-height: ${({$layout:e})=>e===\"split\"?\"127px\":\"140px\"};\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n min-height: ${({$layout:e})=>e===\"split\"?\"127px\":\"160px\"};\n }\n`,Ii=(0,we.styled)(\"div\")`\n width: 100%;\n font-size: 16px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>Ht(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`,Ni=(0,we.styled)(\"div\")`\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n`,Vi=(0,we.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;\n gap: 2px;\n`,Ai=(0,we.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n flex-shrink: 0;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#9b131a\":Ht(e,\"N70\")};\n\n svg {\n width: 24px;\n height: 24px;\n }\n`,zi=(0,we.styled)(\"div\")`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n letter-spacing: 0.12px;\n text-align: right;\n color: ${({theme:e})=>Ht(e,\"N70\")};\n`,Bi=(0,we.styled)(\"div\")`\n font-size: 20px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>Ht(e,\"N100\")};\n margin-bottom: 4px;\n text-transform: capitalize;\n\n @media (min-width: 768px) {\n font-size: 20px;\n margin-bottom: 6px;\n }\n\n @media (min-width: 1080px) {\n font-size: 20px;\n }\n`,Ei=(0,we.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n margin-top: 8px;\n width: 100%;\n`,Fa=(0,we.styled)(\"div\")`\n font-size: 24px;\n font-weight: 700;\n line-height: 1.2;\n color: ${({theme:e})=>Ht(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 28px;\n }\n\n @media (min-width: 1080px) {\n font-size: 32px;\n }\n`,Hi=(0,we.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n`,Wi=(0,we.styled)(\"div\")`\n font-size: 16px;\n font-weight: 400;\n line-height: normal;\n color: ${({theme:e})=>Ht(e,\"N70\")};\n padding-bottom: 2px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`,_i=(0,we.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n flex-shrink: 0;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#22C55E\":t===\"down\"?\"#DC2626\":Ht(e,\"N70\")};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 14px;\n\n svg {\n width: 18px;\n height: 18px;\n }\n }\n`,Lg=(0,we.styled)(\"span\")`\n display: flex;\n align-items: center;\n justify-content: center;\n`,La=(0,we.styled)(\"span\")`\n white-space: nowrap;\n`,Ki=(0,we.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;var ee=M(require(\"@mui/material/Skeleton\"));var J=require(\"@nuskin/foundation-theme\"),xo=M(require(\"@mui/material/Skeleton\")),ir=(0,J.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,lr=(0,J.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 12px;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,Ui=(0,J.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 0;\n\n @media (min-width: 768px) {\n gap: 14px;\n padding: 14px 0;\n }\n`,Gi=(0,J.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 12px;\n border-radius: 8px;\n min-height: 120px;\n\n @media (min-width: 600px) {\n padding: 20px;\n min-height: 140px;\n }\n @media (min-width: 900px) {\n padding: 24px;\n min-height: 160px;\n }\n`,ji=(0,J.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`,Yi=(0,J.styled)(\"div\")`\n margin-top: 8px;\n`,Ji=(0,J.styled)(xo.default)`\n margin-top: 4px;\n`,Zi=(0,J.styled)(\"div\")`\n flex: 1;\n min-width: 0;\n`,qi=(0,J.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n`,Qi=(0,J.styled)(\"div\")`\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin-bottom: 16px;\n`,Xi=(0,J.styled)(\"div\")`\n padding-top: 4px;\n`,el=(0,J.styled)(xo.default)`\n border-radius: 8px;\n height: 220px;\n\n @media (min-width: 600px) {\n height: 280px;\n }\n @media (min-width: 900px) {\n height: 340px;\n }\n`,tl=(0,J.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media (min-width: 600px) {\n flex-direction: row;\n gap: 24px;\n }\n`,ol=(0,J.styled)(xo.default)`\n width: 100%;\n height: 200px;\n border-radius: 8px;\n flex-shrink: 0;\n\n @media (min-width: 600px) {\n width: 200px;\n border-radius: 50%;\n }\n`,rl=(0,J.styled)(\"div\")`\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n`,al=(0,J.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px;\n`,nl=(0,J.styled)(\"div\")`\n flex: 1;\n`,Cc=(0,J.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n @media (min-width: 600px) {\n gap: 32px;\n }\n @media (min-width: 900px) {\n gap: 40px;\n }\n`,vc=(0,J.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n`,kc=(0,J.styled)(\"div\")`\n display: flex;\n gap: 16px;\n`,Sc=(0,J.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 600px) {\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n }\n @media (min-width: 900px) {\n gap: 24px;\n }\n`,Tc=(0,J.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 900px) {\n grid-template-columns: repeat(2, 1fr);\n gap: 24px;\n }\n`,$a=(0,J.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 24px;\n`,il=(0,J.styled)(\"div\")`\n padding: 24px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 24px;\n`,ll=(0,J.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 16px 0;\n gap: 8px;\n`,sl=(0,J.styled)(xo.default)`\n border-radius: 8px;\n height: 260px;\n\n @media (min-width: 600px) {\n height: 320px;\n }\n @media (min-width: 900px) {\n height: 400px;\n }\n`,Ia=(0,J.styled)(\"div\")`\n padding: 20px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n`,sr=(0,J.styled)(xo.default)`\n border-radius: 4px;\n`,dl=(0,J.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 600px) {\n grid-template-columns: repeat(3, 1fr);\n }\n`;var T=require(\"react/jsx-runtime\"),Eo=()=>(0,T.jsxs)(Gi,{\"data-testid\":\"skeleton-stats-card\",children:[(0,T.jsxs)(ji,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:80,height:18}),(0,T.jsx)(ee.default,{variant:\"text\",width:48,height:16})]}),(0,T.jsxs)(Yi,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:120,height:36}),(0,T.jsx)(Ji,{variant:\"text\",width:100,height:16})]})]}),Dc=()=>(0,T.jsxs)(Ui,{children:[(0,T.jsx)(ee.default,{variant:\"rounded\",width:28,height:28}),(0,T.jsx)(ee.default,{variant:\"rounded\",width:50,height:50}),(0,T.jsxs)(Zi,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:\"70%\",height:18}),(0,T.jsx)(ee.default,{variant:\"text\",width:\"50%\",height:14})]}),(0,T.jsxs)(qi,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:80,height:18}),(0,T.jsx)(ee.default,{variant:\"text\",width:48,height:14})]})]}),pl=()=>(0,T.jsxs)(ir,{\"data-testid\":\"skeleton-products-list\",children:[(0,T.jsxs)(lr,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:160,height:22}),(0,T.jsx)(ee.default,{variant:\"rounded\",width:100,height:32})]}),[\"product-1\",\"product-2\",\"product-3\",\"product-4\",\"product-5\"].map(e=>(0,T.jsx)(Dc,{},e))]}),dr=()=>(0,T.jsxs)(ir,{\"data-testid\":\"skeleton-chart-widget\",children:[(0,T.jsxs)(lr,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:140,height:22}),(0,T.jsx)(ee.default,{variant:\"rounded\",width:110,height:32})]}),(0,T.jsxs)(Qi,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:100,height:36}),(0,T.jsxs)(Xi,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:60,height:18}),(0,T.jsx)(ee.default,{variant:\"text\",width:140,height:14})]})]}),(0,T.jsx)(el,{variant:\"rounded\",width:\"100%\"})]}),Pc=()=>(0,T.jsxs)(al,{children:[(0,T.jsx)(ee.default,{variant:\"circular\",width:12,height:12}),(0,T.jsxs)(nl,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:\"60%\",height:16}),(0,T.jsx)(ee.default,{variant:\"text\",width:\"40%\",height:14})]}),(0,T.jsx)(ee.default,{variant:\"text\",width:36,height:18})]}),pr=()=>(0,T.jsxs)(ir,{\"data-testid\":\"skeleton-categories-pie\",children:[(0,T.jsxs)(lr,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:140,height:22}),(0,T.jsx)(ee.default,{variant:\"rounded\",width:100,height:32})]}),(0,T.jsxs)(tl,{children:[(0,T.jsx)(ol,{variant:\"circular\"}),(0,T.jsx)(rl,{children:[\"legend-1\",\"legend-2\",\"legend-3\",\"legend-4\",\"legend-5\"].map(e=>(0,T.jsx)(Pc,{},e))})]})]});var Ut=()=>(0,T.jsxs)($a,{\"data-testid\":\"skeleton-fullview-chart\",children:[(0,T.jsxs)(il,{children:[(0,T.jsxs)(ll,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:140,height:52}),(0,T.jsx)(ee.default,{variant:\"text\",width:80,height:24}),(0,T.jsx)(ee.default,{variant:\"text\",width:160,height:16})]}),(0,T.jsx)(sl,{variant:\"rounded\",width:\"100%\"})]}),(0,T.jsxs)(Ia,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:200,height:24}),[\"table-row-1\",\"table-row-2\",\"table-row-3\",\"table-row-4\",\"table-row-5\"].map(e=>(0,T.jsx)(sr,{variant:\"rounded\",width:\"100%\",height:44},e))]})]}),cl=()=>(0,T.jsxs)($a,{\"data-testid\":\"skeleton-fullview-table\",children:[(0,T.jsxs)(dl,{children:[(0,T.jsx)(Eo,{}),(0,T.jsx)(Eo,{}),(0,T.jsx)(Eo,{})]}),(0,T.jsxs)(Ia,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:200,height:24}),(0,T.jsx)(sr,{variant:\"rounded\",width:\"100%\",height:40}),[\"summary-row-1\",\"summary-row-2\",\"summary-row-3\",\"summary-row-4\",\"summary-row-5\",\"summary-row-6\",\"summary-row-7\",\"summary-row-8\"].map(e=>(0,T.jsx)(sr,{variant:\"rounded\",width:\"100%\",height:44},e))]})]});var le=require(\"react/jsx-runtime\"),Rc=({title:e,value:t,subtitle:o,caption:n,layout:i=\"default\",trendDirection:s=\"neutral\",trendValue:d,testId:p,isLoading:w=!1})=>{if(w)return(0,le.jsx)(nr,{$layout:i,\"data-testid\":p,children:(0,le.jsx)(Eo,{})});let C=()=>{let x=a(r.stats.trend.unchanged);return s===\"up\"?x=a(r.stats.trend.increased):s===\"down\"&&(x=a(r.stats.trend.decreased)),`${e} ${x} ${d??\"\"}`},u=x=>s===\"up\"?(0,le.jsx)(fl.default,{sx:{fontSize:x},\"aria-hidden\":\"true\"}):s===\"down\"?(0,le.jsx)(ml.default,{sx:{fontSize:x},\"aria-hidden\":\"true\"}):(0,le.jsx)(gl.default,{sx:{fontSize:x},\"aria-hidden\":\"true\"});return i===\"split\"?(0,le.jsxs)(nr,{as:\"article\",$layout:\"split\",\"aria-label\":`${e}: ${t}`,\"data-testid\":p,children:[(0,le.jsx)(Ii,{id:`stats-title-${p}`,children:e}),(0,le.jsxs)(Ni,{children:[(0,le.jsx)(Fa,{\"aria-describedby\":`stats-title-${p}`,\"data-testid\":`stats-value-${p}`,children:t}),(d??n)&&(0,le.jsxs)(Vi,{children:[d&&(0,le.jsxs)(Ai,{as:\"output\",direction:s,\"aria-live\":\"polite\",\"aria-label\":C(),\"data-testid\":`stats-trend-${p}`,children:[u(\"18px\"),(0,le.jsx)(La,{children:d})]}),n&&(0,le.jsx)(zi,{\"data-testid\":`stats-caption-${p}`,children:n})]})]})]}):(0,le.jsxs)(nr,{as:\"article\",\"aria-label\":`${e}: ${t}`,\"data-testid\":p,children:[(0,le.jsx)(Ki,{children:(0,le.jsx)(Bi,{id:`stats-title-${p}`,children:e})}),(0,le.jsxs)(Ei,{children:[(0,le.jsxs)(Hi,{children:[(0,le.jsx)(Fa,{\"aria-describedby\":`stats-title-${p}`,\"data-testid\":`stats-value-${p}`,children:t}),o&&(0,le.jsx)(Wi,{\"aria-label\":`${e} ${a(r.stats.details)}: ${o}`,\"data-testid\":`stats-subtitle-${p}`,children:o})]}),d&&(0,le.jsxs)(_i,{as:\"output\",direction:s,\"aria-live\":\"polite\",\"aria-label\":C(),\"data-testid\":`stats-trend-${p}`,children:[u(\"16px\"),(0,le.jsx)(La,{children:d})]})]})]})},Ct=ul.default.memo(Rc);Ct.displayName=\"StatsCard\";var jl=M(require(\"react\")),Yl=M(require(\"@mui/icons-material/ShoppingCart\")),Jl=M(require(\"@mui/icons-material/ShowChart\")),Zl=M(require(\"@mui/icons-material/TrendingUp\")),ql=M(require(\"@mui/icons-material/TrendingDown\"));var hl=M(require(\"@mui/icons-material/ArrowUpward\")),xl=M(require(\"@mui/icons-material/ArrowDownward\")),bl=M(require(\"@mui/icons-material/Remove\"));var cr=require(\"react/jsx-runtime\");function vt(e){if(!e)return null;let t=e.replace(\"%\",\"\").trim(),o=Number(t);return Number.isFinite(o)?o:null}function Gt(e){let t=vt(e);return t===null?\"neutral\":t>0?\"up\":t<0?\"down\":\"neutral\"}function jt(e,t,o){let{weightedSum:n,weight:i}=e.reduce((p,w)=>{let C=vt(o(w));return C===null?p:{weightedSum:p.weightedSum+C*t(w),weight:p.weight+t(w)}},{weightedSum:0,weight:0}),s=i>0?n/i:0,d=\"neutral\";return s>0?d=\"up\":s<0&&(d=\"down\"),{direction:d,formatted:`${s>0?\"+\":\"\"}${s.toFixed(1)}%`}}function bo(e){return e===\"up\"?a(r.stats.trend.increased):e===\"down\"?a(r.stats.trend.decreased):a(r.stats.trend.unchanged)}function rt(e){switch(e){case\"up\":return(0,cr.jsx)(hl.default,{});case\"down\":return(0,cr.jsx)(xl.default,{});case\"neutral\":default:return(0,cr.jsx)(bl.default,{})}}function yl(e){switch(e){case\"up\":return\"#4caf50\";case\"down\":return\"#f44336\";case\"neutral\":default:return\"#757575\"}}var Na=require(\"react\");function Va(e,t){return Math.ceil(e.length/t)}function Aa(e,t,o){let n=(t-1)*o,i=n+o;return e.slice(n,i)}function wl(e,t,o=\"desc\"){return[...e].sort((n,i)=>{let s=n[t],d=i[t];return o===\"asc\"?s-d:d-s})}function Cl(e,t,o=1){return t===0?\"0.0\":(e/t*100).toFixed(o)}function kt(e,t,o){let n=(0,Na.useMemo)(()=>Va(e,o),[e,o]),i=(0,Na.useMemo)(()=>Aa(e,t,o),[e,t,o]);return{totalPages:n,pageItems:i}}function Z(e,t,o=\"en-US\",n){let i=Number.isFinite(e)?e:0;if(t)try{return new Intl.NumberFormat(o,{style:\"currency\",currency:t,...n!==void 0?{minimumFractionDigits:n,maximumFractionDigits:n}:{minimumFractionDigits:0,maximumFractionDigits:2}}).format(i)}catch{}return n!==void 0?`$${i.toFixed(n)}`:`$${i.toLocaleString()}`}var ue=require(\"@nuskin/foundation-theme\"),{getGenomeColor:se}=ue.ColorUtils,ur=(0,ue.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>se(e,\"N20\")};\n border: 1px solid ${({theme:e})=>se(e,\"N30\")};\n border-radius: 12px;\n min-height: 320px;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n\n @media (min-width: 768px) {\n padding: 20px;\n min-height: 400px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,za=(0,ue.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,vl=(0,ue.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Ba=(0,ue.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>se(e,\"N100\")};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({theme:e})=>se(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,kl=(0,ue.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>se(e,\"N20\")};\n border: 1px solid ${({theme:e})=>se(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>se(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>se(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>se(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>se(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,Sl=(0,ue.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 12px;\n width: 100%;\n overflow: hidden;\n list-style: none;\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n gap: 14px;\n }\n`,Tl=(0,ue.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n background-color: ${({theme:e})=>se(e,\"N20\")};\n border-radius: 8px;\n transition:\n background-color 0.2s ease,\n box-shadow 0.2s ease;\n cursor: pointer;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n list-style: none;\n\n &:not(:last-child) {\n border-bottom: 1px solid ${({theme:e})=>se(e,\"N40\")};\n }\n\n &:hover {\n background-color: ${({theme:e})=>se(e,\"N30\")};\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06);\n }\n\n @media (min-width: 768px) {\n padding: 14px;\n gap: 14px;\n }\n`,Dl=(0,ue.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 24px;\n height: 24px;\n background-color: ${({theme:e})=>se(e,\"A10\")};\n color: ${({theme:e})=>se(e,\"A80\")};\n border-radius: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n vertical-align: middle;\n\n @media (min-width: 768px) {\n min-width: 28px;\n height: 28px;\n font-size: 16px;\n }\n`,Pl=(0,ue.styled)(\"img\")`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n object-fit: cover;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 50px;\n height: 50px;\n }\n`,Rl=(0,ue.styled)(\"div\")`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n background-color: ${({theme:e})=>se(e,\"N40\")};\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({theme:e})=>se(e,\"N70\")};\n font-size: 10px;\n font-weight: 500;\n\n @media (min-width: 768px) {\n width: 50px;\n height: 50px;\n font-size: 11px;\n }\n`,Ml=(0,ue.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex-grow: 1;\n min-width: 0;\n`,Ol=(0,ue.styled)(\"div\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({theme:e})=>se(e,\"N100\")};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 18ch;\n\n @media (min-width: 768px) {\n font-size: 16px;\n max-width: none;\n }\n`,Fl=(0,ue.styled)(\"div\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 11px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>se(e,\"N70\")};\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`,Ll=(0,ue.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n flex-shrink: 0;\n`,$l=(0,ue.styled)(\"div\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.2;\n color: ${({theme:e})=>se(e,\"N100\")};\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`,Il=(0,ue.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 11px;\n font-weight: 500;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#22C55E\":t===\"down\"?\"#DC2626\":se(e,\"N70\")};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 12px;\n\n svg {\n width: 16px;\n height: 16px;\n }\n }\n`,Nl=(0,ue.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n text-align: center;\n color: ${({theme:e})=>se(e,\"N70\")};\n\n svg {\n width: 48px;\n height: 48px;\n color: ${({theme:e})=>se(e,\"N50\")};\n }\n`,Vl=(0,ue.styled)(\"div\")`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>se(e,\"N70\")};\n`;var El=require(\"react\"),Hl=M(require(\"@mui/material/Menu\")),Wl=M(require(\"@mui/material/MenuItem\")),_l=M(require(\"@mui/material/ListItemIcon\")),Kl=M(require(\"@mui/material/ListItemText\")),Ul=M(require(\"@mui/icons-material/MoreVert\")),Gl=M(require(\"@mui/icons-material/Visibility\"));var Al=M(require(\"@mui/material/IconButton\")),zl=require(\"@nuskin/foundation-theme\"),Bl=(0,zl.styled)(Al.default)(()=>({padding:\"4px\",color:\"#252525\",\"&:hover\":{backgroundColor:\"rgba(37, 37, 37, 0.08)\"}}));var at=require(\"react/jsx-runtime\"),nt=({widgetId:e,onFullView:t})=>{let[o,n]=(0,El.useState)(null),i=!!o,s=`widget-menu-button-${e}`,d=`widget-menu-${e}`,p=u=>{n(u.currentTarget)},w=()=>{n(null)},C=()=>{w(),t&&t()};return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(Bl,{id:s,\"data-testid\":`widget-menu-button-${e}`,\"aria-label\":a(r.widget.menu.ariaLabel),\"aria-controls\":i?d:void 0,\"aria-haspopup\":\"true\",\"aria-expanded\":i?\"true\":void 0,onClick:p,size:\"small\",children:(0,at.jsx)(Ul.default,{fontSize:\"small\"})}),(0,at.jsx)(Hl.default,{id:d,\"data-testid\":`widget-menu-${e}`,anchorEl:o,open:i,onClose:w,MenuListProps:{\"aria-labelledby\":s},anchorOrigin:{vertical:\"bottom\",horizontal:\"right\"},transformOrigin:{vertical:\"top\",horizontal:\"right\"},children:(0,at.jsxs)(Wl.default,{onClick:C,\"data-testid\":\"widget-menu-item-fullview\",children:[(0,at.jsx)(_l.default,{children:(0,at.jsx)(Gl.default,{fontSize:\"small\"})}),(0,at.jsx)(Kl.default,{children:a(r.widget.menu.fullView)})]})})]})};var j=require(\"react/jsx-runtime\"),Mc=({products:e,productSort:t,isLoading:o=!1,maxProducts:n=5,onSortChange:i,onTitleClick:s})=>{let d=c=>{let v=c.target.value;i?.(v)},p=(c,v)=>{switch(v){case\"units\":return`${c.unitsSold.toLocaleString()} ${a(r.widget.topProducts.unitsSuffix)}`;case\"revenue\":return Z(c.revenue,c.currencyCode);case\"volume\":return`${c.volume.toLocaleString()} ${a(r.widget.topProducts.dcSvSuffix)}`;default:return`${c.unitsSold.toLocaleString()} ${a(r.widget.topProducts.unitsSuffix)}`}},w=(c,v)=>{switch(v){case\"units\":return`${Z(c.revenue,c.currencyCode)} ${a(r.widget.topProducts.revenueSuffix)}`;case\"revenue\":return`${c.unitsSold.toLocaleString()} ${a(r.widget.topProducts.unitsSuffix)}`;case\"volume\":return`${Z(c.revenue,c.currencyCode)} ${a(r.widget.topProducts.revenueSuffix)}`;default:return`${Z(c.revenue,c.currencyCode)} ${a(r.widget.topProducts.revenueSuffix)}`}},C=(c,v)=>{let y=c.trend;if(!y)return\"\";switch(v){case\"units\":return y.units??\"\";case\"revenue\":return y.revenue??\"\";case\"volume\":return y.volume??\"\";default:return y.units??\"\"}},u=(c,v)=>{let y=C(c,v);return y?y.startsWith(\"+\")?\"up\":y.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\"},x=c=>c===\"up\"?(0,j.jsx)(Zl.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):c===\"down\"?(0,j.jsx)(ql.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):(0,j.jsx)(Jl.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}),g=e.slice(0,n),b=a(r.widget.topProducts.rank),f=a(r.widget.topProducts.trend);return o&&e.length===0?(0,j.jsx)(ur,{\"data-testid\":\"widget-top-products\",children:(0,j.jsx)(pl,{})}):e.length===0?(0,j.jsxs)(ur,{\"data-testid\":\"widget-top-products\",children:[(0,j.jsx)(za,{children:(0,j.jsx)(Ba,{children:a(r.widget.topProducts.title)})}),(0,j.jsxs)(Nl,{\"data-testid\":\"products-empty-state\",children:[(0,j.jsx)(Yl.default,{}),(0,j.jsx)(Vl,{children:a(r.widget.topProducts.empty)})]})]}):(0,j.jsxs)(ur,{as:\"section\",\"data-testid\":\"widget-top-products\",\"aria-label\":a(r.widget.topProducts.ariaLabel),children:[(0,j.jsxs)(za,{children:[(0,j.jsx)(Ba,{as:\"button\",onClick:s,\"aria-label\":a(r.widget.topProducts.titleAriaLabel),\"data-testid\":\"widget-title-top-products\",children:a(r.widget.topProducts.title)}),(0,j.jsxs)(vl,{children:[(0,j.jsxs)(kl,{id:\"product-sort\",\"data-testid\":\"product-sort-dropdown\",value:t,onChange:d,disabled:o,\"aria-label\":a(r.widget.topProducts.sortAriaLabel),children:[(0,j.jsx)(\"option\",{value:\"units\",children:a(r.filter.productSort.byUnits)}),(0,j.jsx)(\"option\",{value:\"revenue\",children:a(r.filter.productSort.byRevenue)}),(0,j.jsx)(\"option\",{value:\"volume\",children:a(r.filter.productSort.byVolume)})]}),(0,j.jsx)(nt,{widgetId:\"top-products\",onFullView:s})]})]}),(0,j.jsx)(Sl,{as:\"ul\",\"data-testid\":\"products-list\",children:g.map((c,v)=>{let y=u(c,t),D=C(c,t);return(0,j.jsxs)(Tl,{as:\"li\",\"data-testid\":`product-item-${v}`,\"aria-label\":`${b} ${c.rank}: ${c.name}, ${p(c,t)}`,children:[(0,j.jsx)(Dl,{\"aria-label\":`${b} ${c.rank}`,children:c.rank}),c.imageUrl?(0,j.jsx)(Pl,{src:c.imageUrl,alt:c.name,loading:\"lazy\",onError:h=>{h.currentTarget.hidden=!0}}):(0,j.jsx)(Rl,{\"aria-label\":a(r.widget.topProducts.noImageAriaLabel),children:c.name.substring(0,2).toUpperCase()}),(0,j.jsxs)(Ml,{children:[(0,j.jsx)(Ol,{title:c.name,children:c.name}),(0,j.jsx)(Fl,{children:w(c,t)})]}),(0,j.jsxs)(Ll,{children:[(0,j.jsx)($l,{children:p(c,t)}),D&&(0,j.jsxs)(Il,{as:\"output\",direction:y,\"aria-live\":\"polite\",\"aria-label\":`${f}: ${bo(y)} ${D}`,children:[x(y),(0,j.jsx)(\"span\",{children:D})]})]})]},c.id)})})]})},ro=jl.default.memo(Mc);ro.displayName=\"TopSellingProductsList\";var yo=M(require(\"react\")),je=require(\"recharts\");var Ce=require(\"@nuskin/foundation-theme\"),{getGenomeColor:ge}=Ce.ColorUtils,Ea=(0,Ce.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>ge(e,\"N20\")};\n border: 1px solid ${({theme:e})=>ge(e,\"N30\")};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,Ql=(0,Ce.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin-bottom: 16px;\n padding-bottom: 0;\n border-bottom: none;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,Xl=(0,Ce.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`,es=(0,Ce.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,ts=(0,Ce.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>ge(e,\"N100\")};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({theme:e})=>ge(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,os=(0,Ce.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>ge(e,\"N20\")};\n border: 1px solid ${({theme:e})=>ge(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>ge(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>ge(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>ge(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>ge(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,rs=(0,Ce.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n margin-bottom: 8px;\n`,as=(0,Ce.styled)(\"div\")`\n font-size: 32px;\n font-weight: 700;\n line-height: 1;\n color: ${({theme:e})=>ge(e,\"N100\")};\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n font-size: 36px;\n }\n`,ns=(0,Ce.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n margin: 0;\n padding: 0;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 3px;\n font-size: 13px;\n line-height: 1;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#DC2626\":ge(e,\"N70\")};\n\n svg {\n width: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n\n .change-value {\n font-weight: 600;\n }\n\n .change-percent {\n font-weight: 400;\n }\n }\n\n .comparison-text {\n font-size: 11px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>ge(e,\"N70\")};\n letter-spacing: 0.1px;\n margin: 0;\n padding: 0;\n }\n`,is=(0,Ce.styled)(\"div\")`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n color: ${({theme:e})=>ge(e,\"N100\")};\n margin-bottom: 16px;\n margin-top: 0;\n letter-spacing: 0.12px;\n`,ls=(0,Ce.styled)(\"div\")`\n width: 100%;\n height: 220px;\n margin-top: 0;\n\n @media (min-width: 768px) {\n height: 280px;\n }\n\n @media (min-width: 1080px) {\n height: 340px;\n }\n\n .recharts-cartesian-grid-horizontal line,\n .recharts-cartesian-grid-vertical line {\n stroke: ${({theme:e})=>ge(e,\"N40\")};\n stroke-width: 1px;\n }\n\n .recharts-text {\n fill: ${({theme:e})=>ge(e,\"N70\")};\n font-size: 10px;\n }\n\n .recharts-tooltip-wrapper {\n z-index: 100;\n }\n`,ss=(0,Ce.styled)(\"div\")`\n background-color: ${({theme:e})=>ge(e,\"N100\")};\n border: 1px solid ${({theme:e})=>ge(e,\"N40\")};\n border-radius: 6px;\n padding: 8px 12px;\n box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);\n`,ds=(0,Ce.styled)(\"div\")`\n font-size: 11px;\n font-weight: 600;\n color: ${({theme:e})=>ge(e,\"N10\")};\n margin-bottom: 4px;\n`,ps=(0,Ce.styled)(\"div\")`\n font-size: 13px;\n font-weight: 700;\n color: ${({theme:e})=>ge(e,\"A10\")};\n`,cs=(0,Ce.styled)(\"div\")`\n font-size: 10px;\n font-weight: 400;\n color: ${({theme:e})=>ge(e,\"N30\")};\n margin-top: 2px;\n`;var Ha={last7days:7,last30days:30,last90days:90,thisMonth:31},Wa={last7days:\"Last 7 Days\",last30days:\"Last 30 Days\",last90days:\"Last 90 Days\",thisMonth:\"This Month\"};function us(e){return Ha[e]??30}function gr(e){return Wa[e]??\"Last 30 Days\"}function gs(e){return gr(e)}function _a(e){return`${[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"][e.getMonth()]} ${e.getDate()}`}var Oc={Jan:\"1\",Feb:\"2\",Mar:\"3\",Apr:\"4\",May:\"5\",Jun:\"6\",Jul:\"7\",Aug:\"8\",Sep:\"9\",Oct:\"10\",Nov:\"11\",Dec:\"12\"};function hr(e){let t=e.split(\" \");return t.length!==2?e:`${Oc[t[0]]||t[0]}/${t[1]}`}function fr(e){let t=new Date(e);return _a(t)}function Ka(e,t){return`${fr(e)} - ${fr(t)}`}function mr(e){return e.toISOString().split(\"T\")[0]}function ve(e){let t=new Date,o=t.getFullYear(),n=t.getMonth(),i=t.getDate(),s,d=new Date(o,n,i);switch(e){case\"last7days\":s=new Date(o,n,i-7);break;case\"last30days\":s=new Date(o,n,i-30);break;case\"last90days\":s=new Date(o,n,i-90);break;case\"thisMonth\":s=new Date(o,n,1),d=new Date(o,n+1,0);break;default:return\"N/A\"}return Ka(mr(s),mr(d))}var G=require(\"react/jsx-runtime\"),Fc={top:5,right:10,left:-10,bottom:5},fs={fontSize:10},Lc={r:3,fill:\"#3B82F6\"},$c={r:5},Ic=e=>`${e}%`,Nc=({active:e,payload:t})=>{if(!e||!t?.length)return null;let o=t[0].payload;return(0,G.jsxs)(ss,{children:[(0,G.jsx)(ds,{children:o.date}),(0,G.jsxs)(ps,{children:[(o.rate??0).toFixed(2),\"%\"]}),(0,G.jsxs)(cs,{children:[o.orders??0,\" \",a(r.widget.conversionRate.tooltipOrders),\" /\",\" \",(o.siteVisits??0).toLocaleString(),\" \",a(r.widget.conversionRate.tooltipVisits)]})]})},Vc=({conversionData:e,conversionFilter:t,isLoading:o=!1,title:n,summaryRate:i,summaryChangePct:s,onFilterChange:d,onTitleClick:p})=>{let w=yo.default.useCallback(c=>{let v=c.target.value;d?.(v)},[d]),C=a(r.widget.conversionRate.noData),u=a(r.widget.conversionRate.noChange),x=yo.default.useMemo(()=>typeof i==\"number\"&&Number.isFinite(i)?i:e.at(-1)?.rate??0,[i,e]),g=yo.default.useMemo(()=>{if(s!==void 0){if(s===null||Math.abs(s)<.1)return{direction:\"neutral\",value:u};let V=s>0?\"up\":\"down\",q=`${s>0?\"+\":\"\"}${s.toFixed(2)}%`;return{direction:V,value:q}}if(e.length<2)return{direction:\"neutral\",value:C};let c=e.at(-1)?.rate??0,v=e[0].rate;if(v===0)return{direction:\"neutral\",value:u};let y=c-v,D=y/v*100;if(Math.abs(D)<.1)return{direction:\"neutral\",value:u};let h=y>0?\"up\":\"down\",F=`${y>0?\"+\":\"\"}${y.toFixed(2)}%`;return{direction:h,value:F}},[s,e,u,C]),b=yo.default.useMemo(()=>e.map(c=>({...c,shortDate:hr(c.date)})),[e]);if(o&&e.length===0)return(0,G.jsx)(Ea,{\"data-testid\":\"widget-conversion-rate\",children:(0,G.jsx)(dr,{})});let f=a(r.widget.conversionRate.chartAriaLabel);return(0,G.jsxs)(Ea,{as:\"section\",\"data-testid\":\"widget-conversion-rate\",\"aria-label\":f,children:[(0,G.jsx)(Ql,{children:(0,G.jsxs)(Xl,{children:[(0,G.jsx)(ts,{as:\"button\",onClick:p,\"aria-label\":a(r.widget.conversionRate.titleAriaLabel),\"data-testid\":\"widget-title-conversion-rate\",children:n??a(r.widget.conversionRate.title)}),(0,G.jsxs)(es,{children:[(0,G.jsxs)(os,{id:\"conversion-filter\",\"data-testid\":\"conversion-filter-dropdown\",value:t,onChange:w,disabled:o,\"aria-label\":a(r.widget.conversionRate.filterAriaLabel),children:[(0,G.jsx)(\"option\",{value:\"all\",children:a(r.filter.conversionType.all)}),(0,G.jsx)(\"option\",{value:\"standard\",children:a(r.filter.conversionType.standard)}),(0,G.jsx)(\"option\",{value:\"subscription\",children:a(r.filter.conversionType.subscription)})]}),(0,G.jsx)(nt,{widgetId:\"conversion-rate\",onFullView:p})]})]})}),(0,G.jsxs)(rs,{children:[(0,G.jsxs)(as,{\"aria-label\":`${a(r.widget.conversionRate.title)}: ${x.toFixed(2)}%`,\"data-testid\":\"conversion-metric-value\",children:[x.toFixed(2),\"%\"]}),g.value!==C&&(0,G.jsxs)(ns,{as:\"output\",direction:g.direction,\"aria-live\":\"polite\",\"aria-label\":`${bo(g.direction)} ${g.value}`,\"data-testid\":\"conversion-metric-trend\",children:[(0,G.jsxs)(\"div\",{className:\"trend-line\",children:[(0,G.jsx)(\"span\",{\"aria-hidden\":\"true\",children:rt(g.direction)}),(0,G.jsx)(\"span\",{className:\"change-value\",children:g.value.replace(\"%\",\"\")}),(0,G.jsx)(\"span\",{className:\"change-percent\",children:\"%\"})]}),(0,G.jsx)(\"div\",{className:\"comparison-text\",children:a(r.widget.conversionRate.comparison)})]})]}),(0,G.jsx)(is,{\"data-testid\":\"conversion-formula\",children:a(r.widget.conversionRate.formula)}),(0,G.jsx)(ls,{\"data-testid\":\"conversion-chart\",children:(0,G.jsx)(je.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:200,children:(0,G.jsxs)(je.LineChart,{data:b,margin:Fc,children:[(0,G.jsx)(je.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,G.jsx)(je.XAxis,{dataKey:\"shortDate\",tick:fs,tickLine:!1,interval:\"preserveStartEnd\"}),(0,G.jsx)(je.YAxis,{tick:fs,tickLine:!1,tickFormatter:Ic,domain:[\"dataMin - 0.5\",\"dataMax + 0.5\"]}),(0,G.jsx)(je.Tooltip,{content:Nc}),(0,G.jsx)(je.Line,{type:\"monotone\",dataKey:\"rate\",stroke:\"#3B82F6\",strokeWidth:2,dot:Lc,activeDot:$c})]})})})]})},ao=yo.default.memo(Vc);ao.displayName=\"ConversionRateChart\";var Co=M(require(\"react\")),xe=require(\"recharts\");var Ne=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Oe}=Ne.ColorUtils,Ua=(0,Ne.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>Oe(e,\"N20\")};\n border: 1px solid ${({theme:e})=>Oe(e,\"N30\")};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,ms=(0,Ne.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,hs=(0,Ne.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,xs=(0,Ne.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>Oe(e,\"N100\")};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({theme:e})=>Oe(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,bs=(0,Ne.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>Oe(e,\"N20\")};\n border: 1px solid ${({theme:e})=>Oe(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>Oe(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Oe(e,\"N30\")};\n }\n &:focus {\n border-color: ${({theme:e})=>Oe(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>Oe(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,ys=(0,Ne.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`,ws=(0,Ne.styled)(\"div\")`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({theme:e})=>Oe(e,\"N100\")};\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`,Cs=(0,Ne.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#DC2626\":Oe(e,\"N70\")};\n\n svg {\n width: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>Oe(e,\"N70\")};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\n }\n`,vs=(0,Ne.styled)(\"div\")`\n width: 100%;\n height: 220px;\n margin-top: 16px;\n\n @media (min-width: 768px) {\n height: 280px;\n }\n @media (min-width: 1080px) {\n height: 340px;\n }\n\n .recharts-cartesian-grid-horizontal line,\n .recharts-cartesian-grid-vertical line {\n stroke: ${({theme:e})=>Oe(e,\"N40\")};\n stroke-width: 1px;\n }\n .recharts-text {\n fill: ${({theme:e})=>Oe(e,\"N70\")};\n font-size: 10px;\n }\n`,ks=(0,Ne.styled)(\"div\")`\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 16px;\n margin-top: 16px;\n padding-top: 0;\n`,Ho=(0,Ne.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Oe(e,\"N30\")};\n }\n`,Wo=(0,Ne.styled)(\"div\")`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({color:e})=>e};\n flex-shrink: 0;\n`,_o=(0,Ne.styled)(\"span\")`\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>Oe(e,\"N70\")};\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;var L=require(\"react/jsx-runtime\"),mt={total:\"#3B82F6\",members:\"#7B92A8\",retail:\"#A3B5C7\",brandAffiliates:\"#CBD6E0\"},Ac={top:5,right:10,left:-10,bottom:5},Ss={fontSize:10},wo={r:2},zc=({signupData:e,signupView:t,isLoading:o=!1,title:n,onViewChange:i,onTitleClick:s})=>{let d=Co.default.useCallback(v=>{let y=v.target.value;i?.(y)},[i]),p=a(r.widget.signups.noData),w=a(r.widget.signups.noChange),C=Co.default.useMemo(()=>e.length===0?0:e[e.length-1].total,[e]),u=Co.default.useMemo(()=>{if(e.length<2)return{direction:\"neutral\",value:p};let v=e[e.length-1].total,y=e[0].total,D=v-y,h=D/y*100;if(Math.abs(h)<.1)return{direction:\"neutral\",value:w};let F=D>0?\"up\":\"down\",V=`${D>0?\"+\":\"\"}${D} (${h.toFixed(1)}%)`;return{direction:F,value:V}},[w,p,e]),x=Co.default.useMemo(()=>e.map(v=>({...v,shortDate:hr(v.date)})),[e]),g=a(r.widget.signups.total),b=a(r.widget.signups.members),f=a(r.widget.signups.retail),c=a(r.widget.signups.brandAffiliates);return o&&e.length===0?(0,L.jsx)(Ua,{\"data-testid\":\"widget-signups\",children:(0,L.jsx)(dr,{})}):(0,L.jsxs)(Ua,{as:\"section\",\"data-testid\":\"widget-signups\",\"aria-label\":a(r.widget.signups.chartAriaLabel),children:[(0,L.jsxs)(ms,{children:[(0,L.jsx)(xs,{as:\"button\",onClick:s,\"aria-label\":a(r.widget.signups.titleAriaLabel),\"data-testid\":\"widget-title-signups\",children:n??a(r.widget.signups.title)}),(0,L.jsxs)(hs,{children:[(0,L.jsxs)(bs,{id:\"signup-view\",\"data-testid\":\"signup-view-dropdown\",value:t,onChange:d,disabled:o,\"aria-label\":a(r.widget.signups.filterAriaLabel),children:[(0,L.jsx)(\"option\",{value:\"all\",children:a(r.filter.signupView.showAll)}),(0,L.jsx)(\"option\",{value:\"members\",children:a(r.filter.signupView.showMembers)}),(0,L.jsx)(\"option\",{value:\"retail\",children:a(r.filter.signupView.showRetail)}),(0,L.jsx)(\"option\",{value:\"brandAffiliates\",children:a(r.filter.signupView.showBrandAffiliates)})]}),(0,L.jsx)(nt,{widgetId:\"signups\",onFullView:s})]})]}),(0,L.jsxs)(ys,{\"data-testid\":\"signups-metric-display\",children:[(0,L.jsx)(ws,{\"data-testid\":\"signups-metric-value\",\"aria-label\":`${g}: ${C.toLocaleString()}`,children:C.toLocaleString()}),u.value!==p&&(0,L.jsxs)(Cs,{as:\"output\",\"data-testid\":\"signups-metric-trend\",direction:u.direction,\"aria-live\":\"polite\",\"aria-label\":`${bo(u.direction)} ${u.value}`,children:[(0,L.jsxs)(\"div\",{className:\"trend-line\",children:[(0,L.jsx)(\"span\",{\"aria-hidden\":\"true\",children:rt(u.direction)}),(0,L.jsx)(\"span\",{className:\"change-value\",children:u.value.split(\" \")[0]}),(0,L.jsx)(\"span\",{className:\"change-percent\",children:u.value.split(\" \")[1]})]}),(0,L.jsx)(\"div\",{className:\"comparison-text\",children:a(r.widget.conversionRate.comparison)})]})]}),(0,L.jsx)(vs,{\"data-testid\":\"signups-chart\",children:(0,L.jsx)(xe.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:200,children:(0,L.jsxs)(xe.LineChart,{data:x,margin:Ac,children:[(0,L.jsx)(xe.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,L.jsx)(xe.XAxis,{dataKey:\"shortDate\",tick:Ss,tickLine:!1,interval:\"preserveStartEnd\"}),(0,L.jsx)(xe.YAxis,{tick:Ss,tickLine:!1}),(0,L.jsx)(xe.Tooltip,{}),(t===\"all\"||t===\"members\")&&(0,L.jsx)(xe.Line,{type:\"monotone\",dataKey:t===\"all\"?\"total\":\"members\",stroke:t===\"all\"?mt.total:mt.members,strokeWidth:2,dot:wo,name:t===\"all\"?g:b}),t===\"all\"&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(xe.Line,{type:\"monotone\",dataKey:\"members\",stroke:mt.members,strokeWidth:2,dot:wo,name:b}),(0,L.jsx)(xe.Line,{type:\"monotone\",dataKey:\"retail\",stroke:mt.retail,strokeWidth:2,dot:wo,name:f}),(0,L.jsx)(xe.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:mt.brandAffiliates,strokeWidth:2,dot:wo,name:c})]}),t===\"retail\"&&(0,L.jsx)(xe.Line,{type:\"monotone\",dataKey:\"retail\",stroke:mt.retail,strokeWidth:2,dot:wo,name:f}),t===\"brandAffiliates\"&&(0,L.jsx)(xe.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:mt.brandAffiliates,strokeWidth:2,dot:wo,name:c})]})})}),t===\"all\"&&(0,L.jsxs)(ks,{\"data-testid\":\"signups-legend\",children:[(0,L.jsxs)(Ho,{\"data-testid\":\"legend-total\",children:[(0,L.jsx)(Wo,{color:mt.total}),(0,L.jsx)(_o,{children:g})]}),(0,L.jsxs)(Ho,{\"data-testid\":\"legend-members\",children:[(0,L.jsx)(Wo,{color:mt.members}),(0,L.jsx)(_o,{children:b})]}),(0,L.jsxs)(Ho,{\"data-testid\":\"legend-retail\",children:[(0,L.jsx)(Wo,{color:mt.retail}),(0,L.jsx)(_o,{children:f})]}),(0,L.jsxs)(Ho,{\"data-testid\":\"legend-brandAffiliates\",children:[(0,L.jsx)(Wo,{color:mt.brandAffiliates}),(0,L.jsx)(_o,{children:c})]})]})]})},Ko=Co.default.memo(zc);Ko.displayName=\"SignupsChart\";var $r=M(require(\"react\")),St=require(\"recharts\"),Ms=M(require(\"@mui/icons-material/TrendingUp\")),Os=M(require(\"@mui/icons-material/TrendingDown\"));var oe=require(\"@nuskin/foundation-theme\"),{getGenomeColor:ke}=oe.ColorUtils,Yt=(0,oe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>ke(e,\"N20\")};\n border: 1px solid ${({theme:e})=>ke(e,\"N30\")};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,vo=(0,oe.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,xr=(0,oe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,ko=(0,oe.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>ke(e,\"N100\")};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({theme:e})=>ke(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,br=(0,oe.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>ke(e,\"N20\")};\n border: 1px solid ${({theme:e})=>ke(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>ke(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>ke(e,\"N30\")};\n }\n &:focus {\n border-color: ${({theme:e})=>ke(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>ke(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,yr=(0,oe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 20px;\n align-items: center;\n justify-content: center;\n flex: 1;\n\n @media (min-width: 768px) {\n flex-direction: row;\n gap: 24px;\n align-items: center;\n justify-content: center;\n }\n`,wr=(0,oe.styled)(\"div\")`\n position: relative;\n width: 100%;\n height: 220px;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 260px;\n height: 260px;\n flex: 0 0 auto;\n }\n\n @media (min-width: 1080px) {\n width: 280px;\n height: 280px;\n flex: 0 0 auto;\n }\n\n /* Style recharts pie labels (percentages inside segments) */\n svg text {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n text[class*='recharts'] {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n`,Cr=(0,oe.styled)(\"div\")`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 96px;\n`,vr=(0,oe.styled)(\"div\")`\n font-size: 10px;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>ke(e,\"N70\")};\n`,kr=(0,oe.styled)(\"div\")`\n margin-top: 2px;\n font-size: 16px;\n line-height: 1.2;\n font-weight: 700;\n color: ${({theme:e})=>ke(e,\"N100\")};\n`,Sr=(0,oe.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 3px;\n margin-top: 4px;\n font-size: 12px;\n line-height: 1.2;\n font-weight: 600;\n color: ${({direction:e,theme:t})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":ke(t,\"N70\")};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`,Tr=(0,oe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex: 0 1 auto;\n\n @media (min-width: 768px) {\n gap: 10px;\n }\n`,Dr=(0,oe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 0;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n @media (min-width: 768px) {\n gap: 10px;\n padding: 6px 0;\n }\n\n &:hover {\n background-color: ${({theme:e})=>ke(e,\"N30\")};\n }\n`,Pr=(0,oe.styled)(\"div\")`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({color:e})=>e};\n flex-shrink: 0;\n`,Rr=(0,oe.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n gap: 4px;\n flex: 1;\n min-width: 0;\n align-items: center;\n`,Mr=(0,oe.styled)(\"div\")`\n font-size: 13px;\n font-weight: 600;\n color: ${({theme:e})=>ke(e,\"N100\")};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n font-size: 14px;\n }\n`,Or=(0,oe.styled)(\"div\")`\n font-size: 12px;\n font-weight: 500;\n color: ${({theme:e})=>ke(e,\"N100\")};\n flex-shrink: 0;\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,Ts=(0,oe.styled)(\"div\")`\n display: none;\n`,Ds=(0,oe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 4px;\n flex: 1;\n min-width: 0;\n`,Ps=(0,oe.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({direction:e})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":\"#757575\"};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`,Rs=(0,oe.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({direction:e})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":\"#757575\"};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,Fr=(0,oe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n text-align: center;\n color: ${({theme:e})=>ke(e,\"N70\")};\n`,Lr=(0,oe.styled)(\"div\")`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>ke(e,\"N70\")};\n`;var E=require(\"react/jsx-runtime\"),Bc=({categories:e,categorySort:t,isLoading:o=!1,title:n,onSortChange:i,onTitleClick:s})=>{let d=$r.default.useCallback(f=>{let c=f.target.value;i?.(c)},[i]),{sortedCategories:p,totalRevenue:w,trendDirection:C,formattedTrend:u}=$r.default.useMemo(()=>{let f=[...e].sort((D,h)=>t===\"revenue\"?h.revenue-D.revenue:(vt(h.trend?.revenue)??-1/0)-(vt(D.trend?.revenue)??-1/0)),c=f.reduce((D,h)=>D+h.revenue,0),{direction:v,formatted:y}=jt(f,D=>D.revenue,D=>D.trend?.revenue);return{sortedCategories:f,totalRevenue:c,trendDirection:v,formattedTrend:y}},[e,t]),x=f=>f===\"up\"?(0,E.jsx)(Ms.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):f===\"down\"?(0,E.jsx)(Os.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):null,g=f=>{let{cx:c,cy:v,midAngle:y,innerRadius:D,outerRadius:h,percentage:F}=f,V=Math.PI/180,q=D+(h-D)/2,A=c+q*Math.cos(-y*V),H=v+q*Math.sin(-y*V);return(0,E.jsx)(\"text\",{x:A,y:H,fill:\"white\",textAnchor:\"middle\",dominantBaseline:\"central\",fontSize:\"10\",fontWeight:\"600\",fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",letterSpacing:\"0.2\",style:{lineHeight:\"12px\",leadingTrim:\"none\"},children:`${F}%`})},b=p[0]?.currencyCode;return o&&e.length===0?(0,E.jsx)(Yt,{\"data-testid\":\"widget-top-categories\",children:(0,E.jsx)(pr,{})}):e.length===0?(0,E.jsxs)(Yt,{\"data-testid\":\"widget-top-categories\",children:[(0,E.jsx)(vo,{children:(0,E.jsx)(ko,{children:n??a(r.widget.topCategories.title)})}),(0,E.jsx)(Fr,{\"data-testid\":\"categories-empty-state\",children:(0,E.jsx)(Lr,{children:a(r.widget.topCategories.empty)})})]}):(0,E.jsxs)(Yt,{as:\"section\",\"data-testid\":\"widget-top-categories\",\"aria-label\":a(r.widget.topCategories.chartAriaLabel),children:[(0,E.jsxs)(vo,{children:[(0,E.jsx)(ko,{as:\"button\",onClick:s,\"aria-label\":a(r.widget.topCategories.titleAriaLabel),\"data-testid\":\"widget-title-top-categories\",children:n??a(r.widget.topCategories.title)}),(0,E.jsxs)(xr,{children:[(0,E.jsxs)(br,{id:\"category-sort\",\"data-testid\":\"category-sort-dropdown\",value:t,onChange:d,disabled:o,\"aria-label\":a(r.widget.topCategories.sortAriaLabel),children:[(0,E.jsx)(\"option\",{value:\"revenue\",children:a(r.filter.categorySort.byRevenue)}),(0,E.jsx)(\"option\",{value:\"trend\",children:a(r.filter.categorySort.byTrend)})]}),(0,E.jsx)(nt,{widgetId:\"top-categories\",onFullView:s})]})]}),(0,E.jsxs)(yr,{children:[(0,E.jsxs)(wr,{\"data-testid\":\"categories-chart\",children:[(0,E.jsx)(St.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,E.jsxs)(St.PieChart,{children:[(0,E.jsx)(St.Pie,{data:p,cx:\"50%\",cy:\"50%\",innerRadius:\"55%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,label:g,labelLine:!1,children:p.map(f=>(0,E.jsx)(St.Cell,{fill:f.color},`cell-${f.id}`))}),(0,E.jsx)(St.Tooltip,{formatter:f=>Z(f,b)})]})}),(0,E.jsxs)(Cr,{\"data-testid\":\"categories-donut-center\",children:[(0,E.jsx)(vr,{children:a(r.stats.revenue)}),(0,E.jsx)(kr,{children:Z(w,b)}),(0,E.jsxs)(Sr,{direction:C,children:[x(C),(0,E.jsx)(\"span\",{children:u})]})]})]}),(0,E.jsx)(Tr,{\"data-testid\":\"categories-legend-container\",children:p.map((f,c)=>(0,E.jsxs)(Dr,{\"data-testid\":`category-legend-${c}`,children:[(0,E.jsx)(Pr,{color:f.color}),(0,E.jsxs)(Rr,{children:[(0,E.jsx)(Mr,{children:f.name}),(0,E.jsxs)(Ds,{children:[(0,E.jsxs)(Or,{children:[Z(f.revenue,f.currencyCode),\" (\",f.percentage,\"%)\"]}),f.trend?.revenue?(0,E.jsx)(Ps,{direction:Gt(f.trend?.revenue),\"data-testid\":`category-legend-trend-${c}`,\"aria-label\":f.trend.revenue,children:x(Gt(f.trend?.revenue))}):null]})]})]},f.id))})]})]})},Uo=$r.default.memo(Bc);Uo.displayName=\"TopCategoriesPieChart\";var Se=require(\"react/jsx-runtime\"),Ec=[],Hc=[],Wc=[],_c=[],Ir=({stats:e,topProducts:t,conversionData:o,signupData:n,categories:i,isLoading:s=!1,error:d,shopTitle:p,className:w,dateRange:C=\"last30days\",market:u=\"all\",productSort:x=\"units\",signupView:g=\"all\",conversionFilter:b=\"all\",categorySort:f=\"revenue\",markets:c,onDateRangeChange:v,onMarketChange:y,onProductSortChange:D,onSignupViewChange:h,onConversionFilterChange:F,onCategorySortChange:V,onProductsTitleClick:q,onConversionTitleClick:A,onSignupsTitleClick:H,onCategoriesToTitleClick:Q})=>{let I=t??Ec,m=o??Hc,k=n??Wc,S=i??_c;if(d)return(0,Se.jsx)(ka,{as:\"main\",className:w,\"aria-label\":a(r.ariaLabel.dashboard),children:(0,Se.jsxs)(Ci,{\"data-testid\":\"dashboard-error\",role:\"alert\",\"aria-live\":\"assertive\",children:[(0,Se.jsxs)(\"strong\",{children:[a(r.error),\":\"]}),\" \",d]})});let l=R=>R?R.startsWith(\"+\")?\"up\":R.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\";return(0,Se.jsxs)(ka,{as:\"main\",className:w,\"data-testid\":\"shopping-dashboard\",\"aria-label\":a(r.ariaLabel.dashboard),\"aria-busy\":s,children:[(0,Se.jsx)(ho,{shopTitle:p,dateRange:C,market:u,isLoading:s,stats:e,markets:c,onDateRangeChange:v,onMarketChange:y}),(0,Se.jsxs)(yi,{as:\"section\",\"data-testid\":\"stats-row\",\"aria-label\":a(r.ariaLabel.statsRow),children:[(0,Se.jsx)(Ct,{title:a(r.stats.revenue),value:e?.metrics?.revenue??\"$0\",trendDirection:l(e?.trend?.revenue),trendValue:e?.trend?.revenue,testId:\"stats-card-revenue\",isLoading:s}),(0,Se.jsx)(Ct,{title:a(r.stats.volume),value:e?.metrics?.volume??\"0\",subtitle:a(r.stats.subtitle.dcSv),trendDirection:l(e?.trend?.volume),trendValue:e?.trend?.volume,testId:\"stats-card-volume\",isLoading:s}),(0,Se.jsx)(Ct,{title:a(r.stats.visits),value:e?.metrics?.siteVisits??\"0\",subtitle:`${e?.metrics?.conversionRate??\"0%\"} ${a(r.stats.subtitle.conversionRate)}`,trendDirection:l(e?.trend?.siteVisits),trendValue:e?.trend?.siteVisits,testId:\"stats-card-visits\",isLoading:s})]}),(0,Se.jsxs)(wi,{\"data-testid\":\"widget-container\",children:[(0,Se.jsxs)(Sa,{\"data-testid\":\"widget-row-1\",children:[(0,Se.jsx)(ro,{products:I,productSort:x,isLoading:s,maxProducts:5,onSortChange:D,onTitleClick:q}),(0,Se.jsx)(Ko,{signupData:k,signupView:g,isLoading:s,onViewChange:h,onTitleClick:H})]}),(0,Se.jsxs)(Sa,{\"data-testid\":\"widget-row-2\",children:[(0,Se.jsx)(ao,{conversionData:m,conversionFilter:b,isLoading:s,onFilterChange:F,onTitleClick:A}),(0,Se.jsx)(Uo,{categories:S,categorySort:f,isLoading:s,onSortChange:V,onTitleClick:Q})]})]})]})};var ne=M(require(\"react\"));var dt=M(require(\"react\"));var Us=M(require(\"@mui/icons-material/ArrowBack\")),Gs=M(require(\"@mui/icons-material/CalendarToday\")),js=M(require(\"@mui/icons-material/Language\"));var Fe=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Ze}=Fe.ColorUtils,Fs=(0,Fe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n`,Ls=(0,Fe.styled)(\"div\")`\n display: flex;\n align-items: center;\n`,$s=(0,Fe.styled)(\"button\")`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0;\n border: none;\n background-color: transparent;\n color: ${({theme:e})=>Ze(e,\"N70\")};\n cursor: pointer;\n transition: color 0.2s ease;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n\n &:hover {\n color: ${({theme:e})=>Ze(e,\"N100\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>Ze(e,\"A70\")};\n outline-offset: 2px;\n border-radius: 4px;\n }\n\n svg {\n font-size: 16px;\n }\n\n span {\n line-height: 1;\n }\n`,Is=(0,Fe.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 16px;\n border-bottom: 1px solid ${({theme:e})=>Ze(e,\"N30\")};\n gap: 24px;\n\n @media (max-width: 767px) {\n align-items: flex-end;\n gap: 16px;\n }\n`,Ns=(0,Fe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 16px;\n flex: 1;\n\n @media (max-width: 767px) {\n display: none;\n }\n`,Vs=(0,Fe.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({theme:e})=>Ze(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`,As=(0,Fe.styled)(\"p\")`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({theme:e})=>Ze(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n`,zs=(0,Fe.styled)(\"p\")`\n display: none;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({theme:e})=>Ze(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n flex-shrink: 0;\n }\n`,Bs=(0,Fe.styled)(\"div\")`\n display: flex;\n gap: 24px;\n align-items: center;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n`,Es=(0,Fe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Hs=(0,Fe.styled)(\"span\")`\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({theme:e})=>Ze(e,\"N70\")};\n\n svg {\n font-size: 16px;\n }\n`,Ws=(0,Fe.styled)(\"select\")`\n min-width: 120px;\n height: 32px;\n padding: 6px 8px;\n padding-right: 24px;\n background-color: transparent;\n border: none;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ${({theme:e})=>Ze(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: background-color 0.2s ease;\n appearance: none;\n background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><path fill=\"%23667085\" d=\"M6 8L2 4h8L6 8z\"/></svg>');\n background-repeat: no-repeat;\n background-position: right 4px center;\n\n &:hover {\n background-color: ${({theme:e})=>Ze(e,\"N20\")};\n border-radius: 4px;\n }\n\n &:focus {\n background-color: ${({theme:e})=>Ze(e,\"N20\")};\n border-radius: 4px;\n outline: 2px solid ${({theme:e})=>Ze(e,\"A70\")};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n @media (max-width: 767px) {\n min-width: auto;\n width: auto;\n flex: none;\n padding-right: 24px;\n background-position: right 8px center;\n }\n`,_s=(0,Fe.styled)(\"div\")`\n display: none;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`,Ks=(0,Fe.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({theme:e})=>Ze(e,\"N100\")};\n margin: 0;\n`;var fe=require(\"react/jsx-runtime\");function Tt(e,t){return{key:\"dateRange\",label:a(t.filter.dateRange.label),value:e,icon:\"calendar\",options:[{value:\"last7days\",label:a(t.filter.dateRange.last7days)},{value:\"last30days\",label:a(t.filter.dateRange.last30days)},{value:\"last90days\",label:a(t.filter.dateRange.last90days)},{value:\"thisMonth\",label:a(t.filter.dateRange.thisMonth)}]}}function Dt(e,t,o){return{key:\"market\",label:a(o.filter.market.label),value:e,icon:\"globe\",options:t.map(n=>({value:n.value,label:n.label}))}}var me=({title:e,dateRange:t,onBack:o,filters:n,onFilterChange:i})=>{let s=d=>d?(0,fe.jsxs)(Hs,{children:[d===\"calendar\"&&(0,fe.jsx)(Gs.default,{}),d===\"globe\"&&(0,fe.jsx)(js.default,{})]}):null;return(0,fe.jsxs)(Fs,{\"data-testid\":\"page-header\",children:[(0,fe.jsx)(Ls,{children:(0,fe.jsxs)($s,{onClick:o,\"aria-label\":a(r.navigation.backAriaLabel),\"data-testid\":\"page-back-button\",type:\"button\",children:[(0,fe.jsx)(Us.default,{}),(0,fe.jsx)(\"span\",{children:a(r.navigation.backToDashboard)})]})}),(0,fe.jsx)(_s,{children:(0,fe.jsx)(Ks,{children:e})}),(0,fe.jsxs)(Is,{children:[(0,fe.jsxs)(Ns,{children:[(0,fe.jsx)(Vs,{\"data-testid\":\"page-header-title\",children:e}),(0,fe.jsx)(As,{\"data-testid\":\"page-header-date-range\",children:t})]}),n&&n.length>0&&i&&(0,fe.jsx)(Bs,{\"data-testid\":\"page-header-filters\",children:n.map(d=>(0,fe.jsxs)(Es,{children:[s(d.icon),(0,fe.jsx)(Ws,{id:`filter-${d.key}`,value:d.value,onChange:p=>i(d.key,p.target.value),disabled:d.disabled,\"aria-label\":`${d.label} ${a(r.ariaLabel.filterSuffix)}`,\"data-testid\":`filter-dropdown-${d.key}`,children:d.options.map(p=>(0,fe.jsx)(\"option\",{value:p.value,children:d.label&&d.key===\"customerType\"?`${d.label} ${p.label}`:p.label},p.value))})]},d.key))}),(0,fe.jsx)(zs,{children:t})]})]})};var td=M(require(\"@mui/icons-material/ArrowUpward\")),od=M(require(\"@mui/icons-material/ArrowDownward\"));var it=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Pt}=it.ColorUtils,Ys=(0,it.styled)(\"div\")`\n width: 100%;\n overflow-x: auto;\n border-radius: 8px;\n border: 1px solid ${({theme:e})=>Pt(e,\"N30\")};\n`,Js=(0,it.styled)(\"table\")`\n width: 100%;\n border-collapse: collapse;\n`,Zs=(0,it.styled)(\"thead\")`\n background-color: ${({theme:e})=>Pt(e,\"N20\")};\n border-bottom: 2px solid ${({theme:e})=>Pt(e,\"N40\")};\n`,qs=(0,it.styled)(\"th\")`\n padding: 12px 16px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n background-color: ${({theme:e})=>Pt(e,\"N20\")};\n color: ${({theme:e})=>Pt(e,\"N70\")};\n text-align: left;\n cursor: ${({sortable:e})=>e?\"pointer\":\"default\"};\n user-select: none;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Pt(e,\"N20\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>Pt(e,\"A70\")};\n outline-offset: -2px;\n }\n`,Qs=(0,it.styled)(\"tbody\")``,Ga=(0,it.styled)(\"tr\")`\n border-bottom: 1px solid ${({theme:e})=>Pt(e,\"N30\")};\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Pt(e,\"N20\")};\n }\n\n &:last-child {\n border-bottom: none;\n }\n`,ja=(0,it.styled)(\"td\")`\n padding: 12px 16px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({theme:e})=>Pt(e,\"N70\")};\n text-align: left;\n`,Xs=(0,it.styled)(ja)`\n text-align: center;\n`,ed=(0,it.styled)(\"span\")`\n display: inline-flex;\n margin-left: 6px;\n opacity: ${({isActive:e})=>e?1:.4};\n transition: opacity 0.2s ease;\n\n svg {\n font-size: 16px;\n }\n`;var Ee=require(\"react/jsx-runtime\"),lt=({columns:e,data:t,sortable:o=!1,onSort:n,sortColumn:i,sortDirection:s=\"asc\",getRowKey:d})=>{let p=u=>{if(!o||!n)return;n(u,i===u&&s===\"asc\"?\"desc\":\"asc\")},w=(u,x)=>{(u.key===\"Enter\"||u.key===\" \")&&(u.preventDefault(),p(x))},C=u=>{if(i===u)return s===\"asc\"?\"ascending\":\"descending\"};return(0,Ee.jsx)(Ys,{\"data-testid\":\"data-table\",children:(0,Ee.jsxs)(Js,{children:[(0,Ee.jsx)(Zs,{children:(0,Ee.jsx)(\"tr\",{children:e.map(u=>(0,Ee.jsxs)(qs,{scope:\"col\",sortable:o&&u.sortable,onClick:()=>u.sortable&&p(u.key),onKeyDown:x=>u.sortable&&w(x,u.key),tabIndex:o&&u.sortable?0:-1,\"aria-sort\":C(u.key),\"aria-label\":`${u.label}${u.sortable?a(r.dataTable.sortableColumn):\"\"}`,\"data-testid\":`table-header-${u.key}`,children:[u.label,o&&u.sortable&&(0,Ee.jsx)(ed,{isActive:i===u.key,children:i===u.key&&s===\"desc\"?(0,Ee.jsx)(od.default,{}):(0,Ee.jsx)(td.default,{})})]},u.key))})}),(0,Ee.jsx)(Qs,{children:t.length===0?(0,Ee.jsx)(Ga,{\"data-testid\":\"table-empty-row\",children:(0,Ee.jsx)(Xs,{colSpan:e.length,children:a(r.dataTable.noDataAvailable)})}):t.map((u,x)=>(0,Ee.jsx)(Ga,{\"data-testid\":`table-row-${x}`,children:e.map(g=>(0,Ee.jsx)(ja,{\"data-testid\":`table-cell-${g.key}`,children:g.render?g.render(u[g.key],u):u[g.key]},g.key))},d?d(u,x):x))})]})})};var ad=M(require(\"@mui/icons-material/ChevronLeft\")),nd=M(require(\"@mui/icons-material/ChevronRight\"));var no=require(\"@nuskin/foundation-theme\"),{getGenomeColor:ht}=no.ColorUtils,rd=(0,no.styled)(\"div\")`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n margin-top: 24px;\n`,Nr=(0,no.styled)(\"button\")`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({theme:e,isActive:t})=>t?ht(e,\"A80\"):ht(e,\"N20\")};\n color: ${({theme:e,isActive:t})=>t?\"#ffffff\":ht(e,\"N100\")};\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: ${({theme:e,isActive:t})=>t?ht(e,\"A70\"):ht(e,\"N30\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>ht(e,\"A70\")};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n`,Vr=(0,no.styled)(\"span\")`\n font-size: 14px;\n font-weight: 400;\n color: ${({theme:e})=>ht(e,\"N70\")};\n margin: 0 8px;\n`,Ya=(0,no.styled)(\"button\")`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({theme:e})=>ht(e,\"N20\")};\n color: ${({theme:e})=>ht(e,\"N100\")};\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background-color 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: ${({theme:e})=>ht(e,\"N30\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>ht(e,\"A70\")};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n\n svg {\n font-size: 18px;\n }\n`;var Te=require(\"react/jsx-runtime\"),st=({currentPage:e,totalPages:t,onPageChange:o,itemsPerPage:n,totalItems:i})=>{let s=()=>{e>1&&o(e-1)},d=()=>{e<t&&o(e+1)},p=(b,f)=>{(b.key===\"Enter\"||b.key===\" \")&&(b.preventDefault(),f())},C=(()=>{if(t<=7)return Array.from({length:t},(f,c)=>c+1);let b=[];return e<=4?b.push(1,2,3,4,5):e>=t-3?b.push(t-4,t-3,t-2,t-1,t):b.push(e-1,e,e+1),b})(),u=n?(e-1)*n+1:null,x=n?Math.min(e*n,i??1/0):null,g=a(r.pagination.goToPage);return(0,Te.jsxs)(rd,{\"data-testid\":\"pagination\",children:[(0,Te.jsx)(Ya,{onClick:s,onKeyDown:b=>p(b,s),disabled:e===1,\"aria-label\":a(r.pagination.previousPage),\"data-testid\":\"pagination-previous\",type:\"button\",children:(0,Te.jsx)(ad.default,{})}),t>7&&e>4&&(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)(Nr,{onClick:()=>o(1),isActive:!1,\"aria-label\":`${g} 1`,\"data-testid\":\"pagination-page-1\",type:\"button\",children:\"1\"}),(0,Te.jsx)(Vr,{children:\"...\"})]}),C.map(b=>(0,Te.jsx)(Nr,{onClick:()=>o(b),isActive:e===b,\"aria-label\":`${g} ${b}`,\"aria-current\":e===b?\"page\":void 0,\"data-testid\":`pagination-page-${b}`,type:\"button\",children:b},b)),t>7&&e<t-3&&(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)(Vr,{children:\"...\"}),(0,Te.jsx)(Nr,{onClick:()=>o(t),isActive:!1,\"aria-label\":`${g} ${t}`,\"data-testid\":`pagination-page-${t}`,type:\"button\",children:t})]}),(0,Te.jsx)(Ya,{onClick:d,onKeyDown:b=>p(b,d),disabled:e===t,\"aria-label\":a(r.pagination.nextPage),\"data-testid\":\"pagination-next\",type:\"button\",children:(0,Te.jsx)(nd.default,{})}),n&&i&&(0,Te.jsxs)(Vr,{as:\"output\",\"aria-live\":\"polite\",\"data-testid\":\"pagination-page-info\",children:[u,\"-\",x,\" \",a(r.pagination.of),\" \",i]})]})};var Le=require(\"@mui/material/styles\"),$e=require(\"@mui/material\"),id=require(\"@nuskin/foundation-theme\"),{getGenomeColor:ld}=id.ColorUtils,De=(0,Le.styled)($e.Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n box-sizing: border-box;\n\n @media (max-width: 767px) {\n gap: 16px;\n }\n`,Ar=(0,Le.styled)($e.Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 24px;\n background-color: ${({theme:e})=>ld(e,\"N20\")};\n border-radius: 8px;\n box-shadow: ${({theme:e})=>e.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n gap: 16px;\n }\n`,zr=(0,Le.styled)($e.Box)`\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 16px 0;\n gap: 10px;\n flex-wrap: nowrap;\n width: 100%;\n\n @media (max-width: 767px) {\n padding: 8px 0;\n flex-wrap: nowrap;\n align-items: center;\n }\n`,Br=(0,Le.styled)($e.Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 32px;\n font-weight: 700;\n line-height: 1;\n letter-spacing: 0em;\n color: ${({theme:e})=>e.palette.text.primary};\n margin: 0;\n padding: 0;\n\n @media (max-width: 767px) {\n font-size: 28px;\n line-height: 1;\n }\n`,Er=(0,Le.styled)($e.Box)`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 13px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.01em;\n color: ${({theme:e,direction:t})=>t===\"up\"?e.palette.success.main:t===\"down\"?e.palette.error.main:e.palette.text.secondary};\n flex-wrap: nowrap;\n white-space: nowrap;\n\n svg {\n font-size: 13px;\n flex-shrink: 0;\n width: 13px;\n height: 13px;\n }\n\n span {\n display: inline;\n line-height: 1;\n }\n\n @media (max-width: 767px) {\n font-size: 13px;\n line-height: 1;\n flex-wrap: nowrap;\n\n svg {\n font-size: 13px;\n width: 13px;\n height: 13px;\n }\n }\n`,Qf=(0,Le.styled)($e.Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n\n @media (max-width: 767px) {\n font-size: 12px;\n line-height: 1.3;\n }\n`,Hr=(0,Le.styled)($e.Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 0;\n\n @media (max-width: 767px) {\n gap: 8px;\n }\n`,Jt=(0,Le.styled)(\"h2\")`\n margin: 0;\n font-size: 1.25rem;\n font-weight: 600;\n color: ${({theme:e})=>e.palette.text.primary};\n\n @media (max-width: 767px) {\n font-size: 1.125rem;\n }\n`,Wr=(0,Le.styled)($e.Box)`\n width: 100%;\n height: 450px;\n margin-bottom: 20px;\n\n @media (max-width: 767px) {\n height: 250px;\n margin-bottom: 16px;\n }\n`,Zt=(0,Le.styled)($e.Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n ${({withCard:e=!0,theme:t})=>e&&`\n padding: 20px;\n background-color: ${ld(t,\"N20\")};\n border-radius: 8px;\n box-shadow: ${t.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n }\n `}\n`,Xf=(0,Le.styled)($e.Box)`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 400px;\n`,qt=(0,Le.styled)($e.Typography)`\n text-align: center;\n color: ${({theme:e})=>e.palette.text.secondary};\n font-size: 1rem;\n padding: 40px 20px;\n\n @media (max-width: 767px) {\n font-size: 0.875rem;\n padding: 32px 16px;\n }\n`,sd=(0,Le.styled)($e.Typography)`\n font-weight: 600;\n font-size: 14px;\n`,dd=(0,Le.styled)($e.Typography)`\n font-size: 13px;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,pd=(0,Le.styled)($e.Typography)`\n font-size: 13px;\n`,cd=(0,Le.styled)($e.Typography)`\n font-size: 13px;\n color: ${({theme:e,status:t})=>t===\"Active\"?e.palette.success.main:e.palette.warning.main};\n`;var Ie=require(\"@mui/material/styles\"),Pe=require(\"@mui/material\"),ud=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Ja}=ud.ColorUtils,gd=(0,Ie.styled)(Pe.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n`,fd=(0,Ie.styled)(Pe.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.primary};\n`,md=(0,Ie.styled)(Pe.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,_r=(0,Ie.styled)(Pe.Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({theme:e})=>Ja(e,\"N70\")};\n`,hd=(0,Ie.styled)(Pe.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,xd=(0,Ie.styled)(Pe.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,bd=(0,Ie.styled)(Pe.Box)`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>Ja(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`,yd=(0,Ie.styled)(Pe.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n`,wd=(0,Ie.styled)(Pe.Typography)`\n font-size: 1rem;\n font-weight: 700;\n color: ${({theme:e})=>e.palette.primary.main};\n min-width: 24px;\n`,Cd=(0,Ie.styled)(Pe.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`,vd=(0,Ie.styled)(Pe.Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n`,kd=(0,Ie.styled)(Pe.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Sd=(0,Ie.styled)(Pe.Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({theme:e})=>e.palette.divider};\n`,Kr=(0,Ie.styled)(Pe.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`,Ur=(0,Ie.styled)(Pe.Typography)`\n font-size: 0.625rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n text-transform: uppercase;\n`,Gr=(0,Ie.styled)(Pe.Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({theme:e})=>Ja(e,\"N70\")};\n`;var Td=M(require(\"@mui/material/useMediaQuery\")),Kc=\"(max-width:767px)\";function Rt(){return(0,Td.default)(Kc,{noSsr:!0})}var K=require(\"react/jsx-runtime\");function Uc(e){return{rank:e.rank,name:e.name,sku:`${a(r.fullView.products.skuPrefix)}-${e.id.replace(\"prod-\",\"\").padStart(3,\"0\")}`,units:e.unitsSold,revenue:e.revenue,volume:e.volume}}var So=({products:e,dateRange:t,market:o,productSort:n,markets:i,isLoading:s=!1,onBack:d,onDateRangeChange:p,onMarketChange:w,onProductSortChange:C})=>{let[u,x]=(0,dt.useState)(1),[g,b]=(0,dt.useState)(n===\"revenue\"?\"revenue\":\"units\"),[f,c]=(0,dt.useState)(\"desc\"),v=10,y=Rt(),D=dt.default.useCallback(()=>d?.(),[d]),h=ot(i),F=dt.default.useMemo(()=>[Tt(t,r),Dt(o,h,r),{key:\"sort\",label:a(r.filter.productSort.label),value:n,options:[{value:\"units\",label:a(r.filter.productSort.units)},{value:\"revenue\",label:a(r.filter.productSort.revenue)},{value:\"volume\",label:a(r.filter.productSort.volume)}]}],[t,o,h,n]),V=dt.default.useCallback((S,l)=>{S===\"dateRange\"?p?.(l):S===\"market\"?w?.(l):S===\"sort\"&&(C?.(l),x(1))},[p,w,C]),q=dt.default.useCallback((S,l)=>{b(S),c(l),x(1)},[]),A=dt.default.useMemo(()=>e.map(Uc),[e]),H=dt.default.useMemo(()=>[...A].sort((S,l)=>{let R=S[g],Y=l[g];return f===\"asc\"?R-Y:Y-R}),[A,g,f]),{totalPages:Q,pageItems:I}=kt(H,u,v),m=e[0]?.currencyCode,k=dt.default.useMemo(()=>[{key:\"rank\",label:a(r.fullView.products.columns.rank),sortable:!0},{key:\"name\",label:a(r.fullView.products.columns.product),sortable:!0,render:(S,l)=>(0,K.jsxs)(gd,{children:[(0,K.jsx)(fd,{children:l.name}),(0,K.jsx)(md,{children:l.sku})]})},{key:\"units\",label:a(r.fullView.products.columns.unitsSold),sortable:!0,render:S=>(0,K.jsx)(_r,{children:Number(S).toLocaleString()})},{key:\"revenue\",label:a(r.fullView.products.columns.revenue),sortable:!0,render:S=>(0,K.jsx)(_r,{children:Z(Number(S),m)})},{key:\"volume\",label:a(r.fullView.products.columns.volume),sortable:!0,render:S=>(0,K.jsx)(_r,{children:Number(S).toLocaleString()})}],[m]);return s?(0,K.jsxs)(De,{\"data-testid\":\"products-full-view\",children:[(0,K.jsx)(me,{title:a(r.widget.topProducts.title),dateRange:ve(t),onBack:D,filters:F,onFilterChange:V}),(0,K.jsx)(cl,{})]}):e.length===0?(0,K.jsxs)(De,{\"data-testid\":\"products-full-view\",children:[(0,K.jsx)(me,{title:a(r.widget.topProducts.title),dateRange:ve(t),onBack:D,filters:F,onFilterChange:V}),(0,K.jsx)(qt,{\"data-testid\":\"products-fullview-empty\",children:a(r.fullView.products.noProducts)})]}):(0,K.jsxs)(De,{\"data-testid\":\"products-full-view\",children:[(0,K.jsx)(me,{title:a(r.widget.topProducts.title),dateRange:ve(t),onBack:D,filters:F,onFilterChange:V}),y?(0,K.jsx)(hd,{\"data-testid\":\"products-fullview-mobile-cards\",children:I.map(S=>(0,K.jsxs)(bd,{children:[(0,K.jsxs)(yd,{children:[(0,K.jsxs)(wd,{children:[\"#\",S.rank]}),(0,K.jsxs)(Cd,{children:[(0,K.jsx)(vd,{children:S.name}),(0,K.jsx)(kd,{children:S.sku})]})]}),(0,K.jsxs)(Sd,{children:[(0,K.jsxs)(Kr,{children:[(0,K.jsx)(Ur,{children:a(r.widget.topProducts.units)}),(0,K.jsx)(Gr,{children:S.units.toLocaleString()})]}),(0,K.jsxs)(Kr,{children:[(0,K.jsx)(Ur,{children:a(r.widget.topProducts.revenue)}),(0,K.jsx)(Gr,{children:Z(S.revenue,m)})]}),(0,K.jsxs)(Kr,{children:[(0,K.jsx)(Ur,{children:a(r.filter.productSort.volume)}),(0,K.jsx)(Gr,{children:S.volume.toLocaleString()})]})]})]},S.rank))}):(0,K.jsx)(xd,{\"data-testid\":\"products-fullview-desktop-table\",children:(0,K.jsx)(lt,{columns:k,data:I,sortable:!0,onSort:q,sortColumn:g,sortDirection:f,getRowKey:S=>S.rank})}),Q>1&&(0,K.jsx)(st,{currentPage:u,totalPages:Q,onPageChange:x,itemsPerPage:v,totalItems:H.length})]})};var qe=M(require(\"react\")),Ve=require(\"recharts\"),Ad=M(require(\"@mui/icons-material/ArrowUpward\")),zd=M(require(\"@mui/icons-material/ArrowDownward\"));var He=require(\"@mui/material/styles\"),Ye=require(\"@mui/material\"),Dd=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Gc}=Dd.ColorUtils,Pd=(0,He.styled)(Ye.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>Gc(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n }\n`,Rd=(0,He.styled)(Ye.Box)`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`,Md=(0,He.styled)(Ye.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n`,Od=(0,He.styled)(Ye.Typography)`\n font-size: 1rem;\n font-weight: 600;\n`,Fd=(0,He.styled)(Ye.Typography)`\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Ld=(0,He.styled)(\"a\")`\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.primary.main};\n text-decoration: none;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n`,$d=(0,He.styled)(Ye.Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 16px;\n padding-top: 12px;\n border-top: 1px solid ${({theme:e})=>e.palette.divider};\n`,jr=(0,He.styled)(Ye.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n text-align: center;\n`,Yr=(0,He.styled)(Ye.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Jr=(0,He.styled)(Ye.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`,Id=(0,He.styled)(Ye.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,Nd=(0,He.styled)(Ye.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,mm=(0,He.styled)(Ye.Typography)`\n margin-top: 4px;\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n @media (max-width: 767px) {\n font-size: 0.75rem;\n }\n`,Vd=(0,He.styled)(\"span\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;var $=require(\"react/jsx-runtime\"),To=({conversionData:e,orders:t,summaryRate:o,summaryChangePct:n,dateRange:i,market:s,conversionFilter:d,markets:p,isLoading:w=!1,onBack:C,onDateRangeChange:u,onMarketChange:x,onConversionFilterChange:g})=>{let[b,f]=(0,qe.useState)(1),c=10,v=Rt(),y=qe.default.useCallback(()=>C?.(),[C]),D=ot(p),h=qe.default.useMemo(()=>typeof o==\"number\"&&Number.isFinite(o)?o:e.at(-1)?.rate??0,[o,e]),F=qe.default.useMemo(()=>{if(n!==void 0){if(n===null)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let de=\"neutral\";return n>0?de=\"up\":n<0&&(de=\"down\"),{direction:de,value:`${n>=0?\"+\":\"\"}${n.toFixed(1)}%`}}if(e.length<2)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let l=e.at(-1)?.rate??0,R=e[0].rate;if(R===0)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let Y=(l-R)/R*100;if(Math.abs(Y)<.1)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let be=\"neutral\";return Y>0?be=\"up\":Y<0&&(be=\"down\"),{direction:be,value:`${Y>=0?\"+\":\"\"}${Y.toFixed(1)}%`}},[n,e]),V=qe.default.useCallback(l=>l===\"standard\"?a(r.filter.conversionType.standard):l===\"subscription\"?a(r.filter.conversionType.subscription):a(r.filter.conversionType.all),[]),q=qe.default.useMemo(()=>V(d),[d,V]),A=qe.default.useMemo(()=>[Tt(i,r),Dt(s,D,r),{key:\"customerType\",label:a(r.filter.signupView.label),value:d,options:[{value:\"all\",label:a(r.filter.conversionType.all)},{value:\"standard\",label:a(r.filter.conversionType.standard)},{value:\"subscription\",label:a(r.filter.conversionType.subscription)}]}],[d,i,s,D]),H=qe.default.useCallback((l,R)=>{l===\"dateRange\"?u?.(R):l===\"market\"?x?.(R):l===\"customerType\"&&(g?.(R),f(1))},[g,u,x]),Q=qe.default.useMemo(()=>d===\"all\"?t:t.filter(l=>l.customerType.toLowerCase()===d),[t,d]),{totalPages:I,pageItems:m}=kt(Q,b,c),k=qe.default.useMemo(()=>[{key:\"orderId\",label:a(r.fullView.conversionRate.columns.orderId),sortable:!0,render:l=>(0,$.jsx)(Vd,{children:l})},{key:\"date\",label:a(r.fullView.conversionRate.columns.date),sortable:!0},{key:\"customerName\",label:a(r.fullView.conversionRate.columns.customer),sortable:!0},{key:\"customerType\",label:a(r.fullView.conversionRate.columns.type),sortable:!0},{key:\"items\",label:a(r.fullView.conversionRate.columns.items),sortable:!0},{key:\"total\",label:a(r.fullView.conversionRate.columns.total),sortable:!0,render:(l,R)=>Z(Number(l),R.currencyCode,void 0,2)},{key:\"bv\",label:a(r.fullView.conversionRate.columns.bv),sortable:!0}],[]),S=qe.default.useCallback(()=>d===\"standard\"?\"#2e7d32\":d===\"subscription\"?\"#ed6c02\":\"#1976d2\",[d]);return w?(0,$.jsxs)(De,{\"data-testid\":\"conversion-rate-full-view\",children:[(0,$.jsx)(me,{title:a(r.widget.conversionRate.title),dateRange:ve(i),onBack:y,filters:A,onFilterChange:H}),(0,$.jsx)(Ut,{})]}):(0,$.jsxs)(De,{\"data-testid\":\"conversion-rate-full-view\",children:[(0,$.jsx)(me,{title:a(r.widget.conversionRate.title),dateRange:ve(i),onBack:y,filters:A,onFilterChange:H}),(0,$.jsxs)(Ar,{\"data-testid\":\"conversion-fullview-metric-chart\",children:[(0,$.jsx)(zr,{children:(0,$.jsxs)(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"0px\",flexWrap:\"wrap\"},children:[(0,$.jsxs)(Br,{\"data-testid\":\"conversion-rate-value\",style:{marginRight:\"6px\"},children:[h.toFixed(1),\"%\"]}),(0,$.jsxs)(Er,{direction:F.direction,\"data-testid\":\"conversion-rate-trend\",children:[F.direction===\"up\"&&(0,$.jsx)(Ad.default,{}),F.direction===\"down\"&&(0,$.jsx)(zd.default,{}),(0,$.jsx)(\"span\",{style:{fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",fontWeight:600,fontSize:\"14px\",lineHeight:\"20px\",letterSpacing:\"0em\"},children:F.value}),(0,$.jsx)(\"span\",{style:{marginLeft:\"2px\",fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",fontWeight:400,fontSize:\"12px\",lineHeight:\"16px\",letterSpacing:\"0.01em\",color:\"#5F5F5F\"},children:\"compared to this time last month\"})]})]})}),(0,$.jsx)(Hr,{children:(0,$.jsx)(Wr,{\"data-testid\":\"conversion-fullview-chart\",children:(0,$.jsx)(Ve.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,$.jsxs)(Ve.LineChart,{data:e,margin:{top:10,right:120,left:0,bottom:60},children:[(0,$.jsx)(Ve.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,$.jsx)(Ve.XAxis,{dataKey:\"date\"}),(0,$.jsx)(Ve.YAxis,{tickFormatter:l=>`${l}%`,domain:[0,\"auto\"]}),(0,$.jsx)(Ve.Tooltip,{formatter:l=>typeof l==\"number\"?`${l.toFixed(2)}%`:typeof l==\"string\"?l:a(r.fullView.conversionRate.notAvailable)}),(0,$.jsx)(Ve.Legend,{layout:\"vertical\",align:\"right\",verticalAlign:\"bottom\",wrapperStyle:{paddingRight:\"40px\",paddingBottom:\"40px\",paddingLeft:\"20px\",paddingTop:\"20px\",fontSize:\"14px\",fontWeight:500,display:\"flex\",justifyContent:\"flex-end\"}}),(0,$.jsx)(Ve.Line,{type:\"monotone\",dataKey:\"rate\",stroke:S(),strokeWidth:2,name:`${a(r.widget.conversionRate.title)} (${q})`,dot:!1})]})})})})]}),(0,$.jsxs)(Zt,{\"data-testid\":\"conversion-fullview-table-section\",children:[(0,$.jsxs)(Jt,{\"data-testid\":\"conversion-fullview-table-title\",children:[a(r.fullView.conversionRate.orderDetailsTitle),\" (\",Q.length,\")\"]}),v?(0,$.jsx)(Id,{\"data-testid\":\"conversion-fullview-mobile-orders\",children:m.map(l=>(0,$.jsxs)(Pd,{children:[(0,$.jsxs)(Rd,{children:[(0,$.jsxs)(Md,{children:[(0,$.jsx)(Od,{children:l.customerName}),(0,$.jsx)(Fd,{children:l.date})]}),(0,$.jsx)(Ld,{children:l.orderId})]}),(0,$.jsxs)($d,{children:[(0,$.jsxs)(jr,{children:[(0,$.jsx)(Yr,{children:a(r.fullView.conversionRate.columns.items)}),(0,$.jsx)(Jr,{children:l.items})]}),(0,$.jsxs)(jr,{children:[(0,$.jsx)(Yr,{children:a(r.fullView.conversionRate.columns.orderTotal)}),(0,$.jsxs)(Jr,{children:[\"$\",l.total.toFixed(2)]})]}),(0,$.jsxs)(jr,{children:[(0,$.jsx)(Yr,{children:a(r.fullView.conversionRate.columns.totalSv)}),(0,$.jsx)(Jr,{children:l.bv})]})]})]},l.orderId))}):(0,$.jsx)(Nd,{\"data-testid\":\"conversion-fullview-desktop-table\",children:(0,$.jsx)(lt,{columns:k,data:m,getRowKey:l=>l.orderId})}),I>1&&(0,$.jsx)(st,{currentPage:b,totalPages:I,onPageChange:f,itemsPerPage:c,totalItems:Q.length})]})]})};var Ot=M(require(\"react\")),jd=require(\"@mui/material\"),he=require(\"recharts\"),Yd=M(require(\"@mui/icons-material/TrendingUp\")),Jd=M(require(\"@mui/icons-material/TrendingDown\"));var Mt=require(\"@mui/material/styles\"),Wt=require(\"@mui/material\"),Bd=require(\"@nuskin/foundation-theme\");var{getGenomeColor:jc}=Bd.ColorUtils,Ed=(0,Mt.styled)(Wt.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,Hd=(0,Mt.styled)(Wt.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,Wd=(0,Mt.styled)(Wt.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 16px;\n background-color: ${({theme:e})=>jc(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n }\n`,_d=(0,Mt.styled)(Wr)`\n min-height: 320px;\n\n @media (max-width: 767px) {\n min-height: 260px;\n height: 260px;\n }\n`,Kd=(0,Mt.styled)(Wt.Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n`,Ud=(0,Mt.styled)(Wt.Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`,Go=(0,Mt.styled)(Wt.Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n }\n`,Qt=(0,Mt.styled)(Wt.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({theme:e})=>e.palette.text.secondary};\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\n }\n`,Gd=(0,Mt.styled)(\"span\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;var P=require(\"react/jsx-runtime\"),Je={total:\"#3B82F6\",members:\"#7B92A8\",retail:\"#A3B5C7\",brandAffiliates:\"#5F7388\"};function Xt(e){if(typeof e==\"number\")return Number.isFinite(e)?e:0;if(typeof e==\"string\"){let t=Number(e.replace(/,/g,\"\"));return Number.isFinite(t)?t:0}return 0}function Yc(e){if(Array.isArray(e))return e;let t=e;return Array.isArray(t.daily)?t.daily.map(o=>({date:String(o.date??\"\"),total:Xt(o.total),members:Xt(o.members),retail:Xt(o.retail),brandAffiliates:Xt(o.brandAffiliates??o.brandAffiliate??o.brand_affiliates??o.brand_affiliate)})):[]}var Zr=({signupData:e,signups:t,dateRange:o,market:n,signupView:i,markets:s,isLoading:d=!1,onBack:p,onDateRangeChange:w,onMarketChange:C,onSignupViewChange:u})=>{let[x,g]=(0,Ot.useState)(1),b=10,f=Rt(),c=Ot.default.useCallback(()=>p?.(),[p]),v=ot(s),y=Ot.default.useMemo(()=>Yc(e).map(m=>{let k=m,S=Xt(k.members),l=Xt(k.retail),R=Xt(k.brandAffiliates??k.brandAffiliate??k.brand_affiliates??k.brand_affiliate),Y=Xt(k.total??k.all??k.signupTotal??k.value);return{...m,total:Y>0?Y:S+l+R,members:S,retail:l,brandAffiliates:R}}),[e]),D=Ot.default.useMemo(()=>y.length===0?0:y[y.length-1].total,[y]),h=Ot.default.useMemo(()=>{if(y.length<2)return{direction:\"neutral\",absoluteChange:0,percentageChange:a(r.defaults.zeroTrend)};let I=y[0].total,m=y[y.length-1].total;if(I<=0)return{direction:\"neutral\",absoluteChange:0,percentageChange:a(r.defaults.zeroTrend)};let k=m-I,S=k/I*100,l=\"neutral\";return S>0?l=\"up\":S<0&&(l=\"down\"),{direction:l,absoluteChange:Math.round(k),percentageChange:`${S>=0?\"+\":\"\"}${S.toFixed(1)}%`}},[y,r]),F=y.length>0,V=Ot.default.useMemo(()=>[Tt(o,r),Dt(n,v,r),{key:\"signupView\",label:a(r.filter.signupView.label),value:i,options:[{value:\"all\",label:a(r.filter.signupView.all)},{value:\"members\",label:a(r.filter.signupView.members)},{value:\"retail\",label:a(r.filter.signupView.retail)},{value:\"brandAffiliates\",label:a(r.filter.signupView.brandAffiliates)}]}],[o,n,v,i]),q=Ot.default.useCallback((I,m)=>{I===\"dateRange\"?w?.(m):I===\"market\"?C?.(m):I===\"signupView\"&&(u?.(m),g(1))},[w,C,u]),{totalPages:A,pageItems:H}=kt(t,x,b),Q=Ot.default.useMemo(()=>[{key:\"id\",label:a(r.fullView.signups.columns.id),sortable:!0},{key:\"name\",label:a(r.fullView.signups.columns.name),sortable:!0,render:I=>(0,P.jsx)(Gd,{children:I})},{key:\"date\",label:a(r.fullView.signups.columns.date),sortable:!0},{key:\"type\",label:a(r.fullView.signups.columns.type),sortable:!0},{key:\"email\",label:a(r.fullView.signups.columns.email),sortable:!0},{key:\"status\",label:a(r.fullView.signups.columns.status),sortable:!0}],[]);return d?(0,P.jsxs)(De,{\"data-testid\":\"signups-full-view\",children:[(0,P.jsx)(me,{title:a(r.widget.signups.title),dateRange:ve(o),onBack:c,filters:V,onFilterChange:q}),(0,P.jsx)(Ut,{})]}):(0,P.jsxs)(De,{\"data-testid\":\"signups-full-view\",children:[(0,P.jsx)(me,{title:a(r.widget.signups.title),dateRange:ve(o),onBack:c,filters:V,onFilterChange:q}),(0,P.jsxs)(Ar,{\"data-testid\":\"signups-fullview-metric-chart\",children:[(0,P.jsxs)(zr,{children:[(0,P.jsx)(Br,{\"data-testid\":\"signups-total\",children:D.toLocaleString()}),(0,P.jsxs)(Er,{direction:h.direction,children:[h.direction===\"up\"&&(0,P.jsx)(Yd.default,{}),h.direction===\"down\"&&(0,P.jsx)(Jd.default,{}),h.direction!==\"neutral\"&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(\"span\",{style:{fontWeight:600,lineHeight:1},children:[h.absoluteChange>0?\"+\":\"\",h.absoluteChange]}),(0,P.jsx)(\"span\",{style:{fontWeight:400,lineHeight:1},children:h.percentageChange})]}),h.direction===\"neutral\"&&(0,P.jsx)(\"span\",{children:h.percentageChange})]}),(0,P.jsx)(Kd,{children:a(r.widget.conversionRate.comparison)})]}),(0,P.jsx)(Hr,{children:F?(0,P.jsxs)(Ud,{children:[(0,P.jsx)(_d,{\"data-testid\":\"signups-fullview-chart\",children:(0,P.jsx)(he.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:240,children:(0,P.jsxs)(he.LineChart,{data:y,children:[(0,P.jsx)(he.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,P.jsx)(he.XAxis,{dataKey:\"date\"}),(0,P.jsx)(he.YAxis,{}),(0,P.jsx)(he.Tooltip,{}),i===\"all\"&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"total\",stroke:Je.total,strokeWidth:2,name:a(r.widget.signups.total),dot:{r:2},connectNulls:!0}),(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"members\",stroke:Je.members,strokeWidth:2,name:a(r.widget.signups.members),dot:{r:2},connectNulls:!0}),(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"retail\",stroke:Je.retail,strokeWidth:2,name:a(r.widget.signups.retail),dot:{r:2},connectNulls:!0}),(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:Je.brandAffiliates,strokeWidth:2,name:a(r.widget.signups.brandAffiliates),dot:{r:2},connectNulls:!0})]}),i===\"members\"&&(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"members\",stroke:Je.members,strokeWidth:2,name:a(r.widget.signups.members),dot:{r:2},connectNulls:!0}),i===\"retail\"&&(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"retail\",stroke:Je.retail,strokeWidth:2,name:a(r.widget.signups.retail),dot:{r:2},connectNulls:!0}),i===\"brandAffiliates\"&&(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:Je.brandAffiliates,strokeWidth:2,name:a(r.widget.signups.brandAffiliates),dot:{r:2},connectNulls:!0})]})})}),(0,P.jsxs)(jd.Box,{children:[i===\"all\"&&(0,P.jsxs)(Go,{children:[(0,P.jsx)(Qt,{style:{color:Je.total},children:a(r.widget.signups.total)}),(0,P.jsx)(Qt,{style:{color:Je.members},children:a(r.widget.signups.members)}),(0,P.jsx)(Qt,{style:{color:Je.retail},children:a(r.widget.signups.retail)}),(0,P.jsx)(Qt,{style:{color:Je.brandAffiliates},children:a(r.widget.signups.brandAffiliates)})]}),i===\"members\"&&(0,P.jsx)(Go,{children:(0,P.jsx)(Qt,{style:{color:Je.members},children:a(r.widget.signups.members)})}),i===\"retail\"&&(0,P.jsx)(Go,{children:(0,P.jsx)(Qt,{style:{color:Je.retail},children:a(r.widget.signups.retail)})}),i===\"brandAffiliates\"&&(0,P.jsx)(Go,{children:(0,P.jsx)(Qt,{style:{color:Je.brandAffiliates},children:a(r.widget.signups.brandAffiliates)})})]})]}):(0,P.jsx)(qt,{\"data-testid\":\"signups-fullview-chart-empty\",children:a(r.widget.signups.noTrendData)})})]}),(0,P.jsxs)(Zt,{\"data-testid\":\"signups-fullview-table-section\",children:[(0,P.jsx)(Jt,{\"data-testid\":\"signups-fullview-table-title\",children:`${a(r.fullView.signups.detailsTitle)} (${t.length})`}),f?(0,P.jsx)(Ed,{\"data-testid\":\"signups-fullview-mobile-cards\",children:H.map(I=>(0,P.jsxs)(Wd,{children:[(0,P.jsx)(sd,{children:I.name}),(0,P.jsxs)(dd,{children:[I.date,\" - \",I.type]}),(0,P.jsx)(pd,{children:I.email}),(0,P.jsx)(cd,{status:I.status,children:I.status})]},I.id))}):(0,P.jsx)(Hd,{\"data-testid\":\"signups-fullview-desktop-table\",children:(0,P.jsx)(lt,{columns:Q,data:H,getRowKey:I=>I.id})}),A>1&&(0,P.jsx)(st,{currentPage:x,totalPages:A,onPageChange:g,itemsPerPage:b,totalItems:t.length})]})]})};var Ft=M(require(\"react\")),Lt=require(\"recharts\"),hp=M(require(\"@mui/icons-material/TrendingUp\")),xp=M(require(\"@mui/icons-material/TrendingDown\"));var _t=require(\"@nuskin/foundation-theme\"),Re=require(\"@mui/material/styles\"),Me=require(\"@mui/material\"),{getGenomeColor:Za}=_t.ColorUtils,qr=(0,_t.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Zd=(0,_t.styled)(\"div\")`\n flex: 1;\n`,qd=(0,_t.styled)(\"span\")`\n font-weight: 600;\n`,Qd=(0,_t.styled)(\"span\")`\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Xd=(0,_t.styled)(\"span\")`\n font-weight: 600;\n`,ep=(0,Re.styled)(Me.Box)`\n display: flex;\n gap: 32px;\n padding: 24px;\n background-color: ${({theme:e})=>Za(e,\"N20\")};\n border-radius: 8px;\n box-shadow: ${({theme:e})=>e.shadows[1]};\n align-items: center;\n justify-content: center;\n width: 100%;\n box-sizing: border-box;\n margin: 0 auto;\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n align-items: flex-start;\n justify-content: flex-start;\n }\n`,tp=(0,Re.styled)(Me.Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`,op=(0,Re.styled)(Me.Box)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 120px;\n`,rp=(0,Re.styled)(Me.Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,ap=(0,Re.styled)(Me.Typography)`\n margin-top: 2px;\n font-size: 1.25rem;\n line-height: 1.2;\n font-weight: 700;\n color: ${({theme:e})=>e.palette.text.primary};\n`,np=(0,Re.styled)(Me.Typography)`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n margin-top: 2px;\n font-size: 0.875rem;\n line-height: 1.2;\n font-weight: 600;\n color: ${({direction:e,theme:t})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":t.palette.text.secondary};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,ip=(0,Re.styled)(Me.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n flex: 0;\n`,lp=(0,Re.styled)(Me.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n white-space: nowrap;\n min-width: 0;\n\n &:hover {\n background-color: ${({theme:e})=>Za(e,\"N30\")};\n }\n`,Qr=(0,Re.styled)(Me.Box)`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({dotColor:e})=>e};\n flex-shrink: 0;\n`,_m=(0,Re.styled)(Me.Box)`\n display: none;\n`,sp=(0,Re.styled)(Me.Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.primary};\n flex-shrink: 0;\n min-width: 0;\n text-overflow: ellipsis;\n overflow: hidden;\n`,dp=(0,Re.styled)(Me.Typography)`\n font-size: 0.75rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n flex-shrink: 0;\n white-space: nowrap;\n`,pp=(0,Re.styled)(Me.Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n flex-shrink: 0;\n color: ${({theme:e})=>e.palette.text.primary};\n`,cp=(0,Re.styled)(Me.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,up=(0,Re.styled)(Me.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,gp=(0,Re.styled)(Me.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>Za(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`,fp=(0,Re.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({direction:e})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":\"#757575\"};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`,mp=(0,_t.styled)(\"span\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;var N=require(\"react/jsx-runtime\"),Xr=({categories:e,dateRange:t,market:o,categorySort:n,markets:i,isLoading:s=!1,onBack:d,onDateRangeChange:p,onMarketChange:w,onCategorySortChange:C})=>{let[u,x]=(0,Ft.useState)(1),g=10,b=Rt(),f=Ft.default.useCallback(()=>d?.(),[d]),c=ot(i),v=Ft.default.useMemo(()=>[Tt(t,r),Dt(o,c,r),{key:\"sort\",label:a(r.filter.productSort.label),value:n,options:[{value:\"revenue\",label:a(r.filter.categorySort.byRevenue)},{value:\"trend\",label:a(r.filter.categorySort.byTrend)}]}],[n,t,o,c]),y=Ft.default.useCallback((l,R)=>{l===\"dateRange\"?p?.(R):l===\"market\"?w?.(R):l===\"sort\"&&(C?.(R),x(1))},[C,p,w]),D=l=>{let{cx:R,cy:Y,midAngle:be,innerRadius:de,outerRadius:_e,percentage:Vt}=l,Qe=Math.PI/180,ie=de+(_e-de)*.45,pt=R+ie*Math.cos(-be*Qe),Xe=Y+ie*Math.sin(-be*Qe);return(0,N.jsx)(\"text\",{x:pt,y:Xe,fill:\"white\",textAnchor:\"middle\",dominantBaseline:\"middle\",fontSize:\"12\",fontWeight:\"700\",fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",letterSpacing:\"0\",style:{lineHeight:\"14px\",pointerEvents:\"none\"},children:`${Vt}%`})},h=l=>l===\"up\"?(0,N.jsx)(hp.default,{sx:{fontSize:\"16px\"},\"aria-hidden\":\"true\"}):l===\"down\"?(0,N.jsx)(xp.default,{sx:{fontSize:\"16px\"},\"aria-hidden\":\"true\"}):null,F=l=>{if(!l)return\"neutral\";let R=Number.parseFloat(l);return Number.isNaN(R)?\"neutral\":R>0?\"up\":R<0?\"down\":\"neutral\"},V=Ft.default.useMemo(()=>[...e].sort((l,R)=>n===\"revenue\"?R.revenue-l.revenue:(vt(R.trend?.revenue)??-1/0)-(vt(l.trend?.revenue)??-1/0)),[e,n]),{totalRevenue:q,totalRevenueTrendDirection:A,totalRevenueTrend:H}=Ft.default.useMemo(()=>{let l=V.reduce((be,de)=>be+de.revenue,0),{direction:R,formatted:Y}=jt(V,be=>be.revenue,be=>be.trend?.revenue);return{totalRevenue:l,totalRevenueTrendDirection:R,totalRevenueTrend:Y}},[V]),Q=Ft.default.useMemo(()=>V.slice(0,5),[V]),{totalPages:I,pageItems:m}=kt(V,u,g),k=Ft.default.useMemo(()=>[{key:\"name\",label:a(r.fullView.categories.columns.category),sortable:!0,render:(l,R)=>(0,N.jsxs)(qr,{children:[(0,N.jsx)(Qr,{dotColor:R.color}),(0,N.jsx)(mp,{children:R.name})]})},{key:\"revenue\",label:a(r.fullView.categories.columns.revenue),sortable:!0,render:(l,R)=>Z(Number(l),R.currencyCode)},{key:\"percentage\",label:a(r.fullView.categories.columns.percentOfTotal),sortable:!0,render:l=>`${Number(l)}%`},{key:\"trend\",label:a(r.fullView.categories.columns.trend),render:(l,R)=>R.trend?.revenue??a(r.defaults.noValue)}],[]),S=V[0]?.currencyCode;return s?(0,N.jsxs)(De,{\"data-testid\":\"categories-full-view\",children:[(0,N.jsx)(me,{title:a(r.widget.topCategories.title),dateRange:ve(t),onBack:f,filters:v,onFilterChange:y}),(0,N.jsx)(Ut,{})]}):e.length===0?(0,N.jsxs)(De,{\"data-testid\":\"categories-full-view\",children:[(0,N.jsx)(me,{title:a(r.widget.topCategories.title),dateRange:ve(t),onBack:f,filters:v,onFilterChange:y}),(0,N.jsx)(qt,{\"data-testid\":\"categories-fullview-empty\",children:a(r.fullView.categories.noCategoryData)})]}):(0,N.jsxs)(De,{\"data-testid\":\"categories-full-view\",children:[(0,N.jsx)(me,{title:a(r.widget.topCategories.title),dateRange:ve(t),onBack:f,filters:v,onFilterChange:y}),(0,N.jsxs)(ep,{\"data-testid\":\"categories-fullview-top-section\",children:[(0,N.jsxs)(tp,{\"data-testid\":\"categories-fullview-chart\",children:[(0,N.jsx)(Lt.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,N.jsxs)(Lt.PieChart,{children:[(0,N.jsx)(Lt.Pie,{data:V,cx:\"50%\",cy:\"50%\",innerRadius:\"50%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,label:D,labelLine:!1,children:V.map(l=>(0,N.jsx)(Lt.Cell,{fill:l.color},`cell-${l.id}`))}),(0,N.jsx)(Lt.Tooltip,{formatter:l=>Z(l,S)})]})}),(0,N.jsxs)(op,{\"data-testid\":\"categories-fullview-donut-center\",children:[(0,N.jsx)(rp,{children:a(r.stats.revenue)}),(0,N.jsx)(ap,{children:Z(q,S)}),(0,N.jsxs)(np,{direction:A,children:[h(A),(0,N.jsx)(\"span\",{children:H})]})]})]}),(0,N.jsx)(ip,{\"data-testid\":\"categories-fullview-summary\",children:Q.map(l=>(0,N.jsxs)(lp,{children:[(0,N.jsx)(Qr,{dotColor:l.color}),(0,N.jsx)(sp,{children:l.name}),(0,N.jsx)(dp,{children:Z(l.revenue,l.currencyCode)}),(0,N.jsxs)(pp,{children:[\"(\",l.percentage,\"%)\"]}),l.trend?.revenue?(0,N.jsx)(fp,{direction:F(l.trend.revenue),children:h(F(l.trend.revenue))}):null]},l.id))})]}),(0,N.jsxs)(Zt,{\"data-testid\":\"categories-fullview-table-section\",children:[(0,N.jsxs)(Jt,{\"data-testid\":\"categories-fullview-table-title\",children:[a(r.fullView.categories.allCategoriesTitle),\" (\",V.length,\")\"]}),b?(0,N.jsx)(up,{children:m.map(l=>(0,N.jsxs)(gp,{children:[(0,N.jsx)(Qr,{dotColor:l.color}),(0,N.jsxs)(Zd,{children:[(0,N.jsx)(qd,{children:l.name}),(0,N.jsx)(Qd,{children:Z(l.revenue,l.currencyCode)})]}),(0,N.jsxs)(Xd,{children:[l.percentage,\"%\"]})]},l.id))}):(0,N.jsx)(cp,{children:(0,N.jsx)(lt,{columns:k,data:m,sortable:!0,getRowKey:l=>l.id})}),I>1&&(0,N.jsx)(st,{currentPage:u,totalPages:I,onPageChange:x,itemsPerPage:g,totalItems:V.length})]})]})};var qa=M(require(\"react\"));function io(e){mo(e),qa.default.useEffect(()=>(mo(e),()=>{mo(void 0)}),[e])}var bp=({translate:e,children:t})=>(io(e),t??null);function yp(){return qa.default.useCallback(e=>Kt(e),[])}var Do=require(\"react/jsx-runtime\"),Jc=\"shoppingDashboardView\",Zc=[],qc=[],Qc=[],Xc=[],eu=[],tu=[];function Cp(e){return typeof e==\"object\"&&e!==null}function ou(e){return e===\"dashboard\"||e===\"products\"||e===\"conversion-rate\"||e===\"signups\"||e===\"categories\"}function ea(e,t){if(!Cp(e))return\"dashboard\";let o=e[t];return ou(o)?o:\"dashboard\"}function wp(e,t,o){return{...Cp(e)?e:{},[t]:o}}function ru(e,t){return{pathname:e?.pathname,search:e?.search,hash:e?.hash,state:t}}var vp=({stats:e,topProducts:t,conversionData:o,signupData:n,categories:i,orders:s,signups:d,isLoading:p=!1,error:w,shopTitle:C,className:u,translate:x,initialDateRange:g=\"last30days\",initialMarket:b=\"all\",initialProductSort:f=\"units\",initialSignupView:c=\"all\",initialConversionFilter:v=\"all\",initialCategorySort:y=\"revenue\",markets:D,historyAdapter:h,historyStateKey:F=Jc,resetToDashboardOnMount:V=!0,onDateRangeChange:q,onMarketChange:A,onProductSortChange:H,onSignupViewChange:Q,onConversionFilterChange:I,onCategorySortChange:m,onViewChange:k})=>{io(x);let[S,l]=ne.default.useState(\"dashboard\"),R=ne.default.useRef(!1),[Y,be]=ne.default.useState(g),[de,_e]=ne.default.useState(b),[Vt,Qe]=ne.default.useState(f),[ie,pt]=ne.default.useState(c),[Xe,po]=ne.default.useState(v),[co,Jo]=ne.default.useState(y),Zo=t??Zc,Fo=o??qc,Lo=n??Qc,$o=i??Xc,pa=s??eu,ca=d??tu,ct=ne.default.useCallback(_=>{l(_),k?.(_)},[k]),et=ne.default.useCallback(()=>h?ea(h.location?.state,F):typeof window>\"u\"?\"dashboard\":ea(window.history.state,F),[h,F]),At=ne.default.useCallback((_,Ke)=>{if(h){let to=wp(h.location?.state,F,_),nn=ru(h.location,to);if(Ke===\"replace\"){h.replace(nn);return}h.push(nn);return}if(typeof window>\"u\")return;let tt=wp(window.history.state,F,_);if(Ke===\"replace\"){window.history.replaceState(tt,\"\");return}window.history.pushState(tt,\"\")},[h,F]);ne.default.useEffect(()=>{if(V?(At(\"dashboard\",\"replace\"),R.current=!1,ct(\"dashboard\")):ct(et()),h)return h.listen((Ke,tt)=>{if(tt===\"POP\"){let to=ea(Ke.state,F);R.current=to!==\"dashboard\",ct(to)}});let _=Ke=>{let tt=ea(Ke.state,F);R.current=tt!==\"dashboard\",ct(tt)};return window.addEventListener(\"popstate\",_),()=>{window.removeEventListener(\"popstate\",_)}},[h,F,et,V,ct,At]);let Ae=ne.default.useCallback(_=>{R.current=!0,At(_,\"push\"),ct(_)},[ct,At]),ut=ne.default.useCallback(()=>{if(S!==\"dashboard\"&&R.current){if(h){h.goBack();return}typeof window<\"u\"&&window.history.back();return}R.current=!1,At(\"dashboard\",\"replace\"),ct(\"dashboard\")},[S,h,ct,At]),zt=ne.default.useCallback(_=>{be(_),q?.(_)},[q]),xt=ne.default.useCallback(_=>{_e(_),A?.(_)},[A]),eo=ne.default.useCallback(_=>{Qe(_),H?.(_)},[H]),Io=ne.default.useCallback(_=>{pt(_),Q?.(_)},[Q]),No=ne.default.useCallback(_=>{po(_),I?.(_)},[I]),Vo=ne.default.useCallback(_=>{Jo(_),m?.(_)},[m]),ua=ne.default.useCallback(()=>{Ae(\"products\")},[Ae]),ga=ne.default.useCallback(()=>{Ae(\"conversion-rate\")},[Ae]),fa=ne.default.useCallback(()=>{Ae(\"signups\")},[Ae]),X=ne.default.useCallback(()=>{Ae(\"categories\")},[Ae]);return S===\"products\"?(0,Do.jsx)(So,{products:Zo,dateRange:Y,market:de,productSort:Vt,markets:D,isLoading:p,onBack:ut,onDateRangeChange:zt,onMarketChange:xt,onProductSortChange:eo}):S===\"conversion-rate\"?(0,Do.jsx)(To,{conversionData:Fo,orders:pa,dateRange:Y,market:de,conversionFilter:Xe,markets:D,isLoading:p,onBack:ut,onDateRangeChange:zt,onMarketChange:xt,onConversionFilterChange:No}):S===\"signups\"?(0,Do.jsx)(Zr,{signupData:Lo,signups:ca,dateRange:Y,market:de,signupView:ie,markets:D,isLoading:p,onBack:ut,onDateRangeChange:zt,onMarketChange:xt,onSignupViewChange:Io}):S===\"categories\"?(0,Do.jsx)(Xr,{categories:$o,dateRange:Y,market:de,categorySort:co,markets:D,isLoading:p,onBack:ut,onDateRangeChange:zt,onMarketChange:xt,onCategorySortChange:Vo}):(0,Do.jsx)(Ir,{stats:e,topProducts:Zo,conversionData:Fo,signupData:Lo,categories:$o,isLoading:p,error:w,shopTitle:C,className:u,dateRange:Y,market:de,productSort:Vt,signupView:ie,conversionFilter:Xe,categorySort:co,markets:D,onDateRangeChange:zt,onMarketChange:xt,onProductSortChange:eo,onSignupViewChange:Io,onConversionFilterChange:No,onCategorySortChange:Vo,onProductsTitleClick:ua,onConversionTitleClick:ga,onSignupsTitleClick:fa,onCategoriesToTitleClick:X})};var Po=require(\"@nuskin/foundation-theme\"),Qa=(0,Po.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n gap: 24px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`,kp=(0,Po.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n }\n`,Sp=(0,Po.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n gap: 24px;\n justify-content: flex-start;\n }\n`,Tp=(0,Po.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n }\n`,Dp=(0,Po.styled)(\"div\")`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;var ta=M(require(\"react\")),$t=require(\"recharts\");var z={title:{key:\"productOfferDashboard.title\",fallback:\"Performance Overview\"},error:{key:\"productOfferDashboard.error\",fallback:\"Failed to load dashboard data. Please try again.\"},stats:{revenue:{key:\"productOfferDashboard.stats.revenue\",fallback:\"Total Revenue\"},offersPurchased:{key:\"productOfferDashboard.stats.offersPurchased\",fallback:\"Offers Purchased\"},conversionRate:{key:\"productOfferDashboard.stats.conversionRate\",fallback:\"Conversion Rate\"},trendUp:{key:\"productOfferDashboard.stats.trendUp\",fallback:\"Trending up\"},trendDown:{key:\"productOfferDashboard.stats.trendDown\",fallback:\"Trending down\"},trendNeutral:{key:\"productOfferDashboard.stats.trendNeutral\",fallback:\"No change\"},comparedTo:{key:\"productOfferDashboard.stats.comparedTo\",fallback:\"compared to this time last month\"}},filter:{dateRange:{label:{key:\"productOfferDashboard.filter.dateRange.label\",fallback:\"Date Range\"},last7days:{key:\"productOfferDashboard.filter.dateRange.last7days\",fallback:\"Last 7 Days\"},last30days:{key:\"productOfferDashboard.filter.dateRange.last30days\",fallback:\"Last 30 Days\"},last90days:{key:\"productOfferDashboard.filter.dateRange.last90days\",fallback:\"Last 90 Days\"},thisMonth:{key:\"productOfferDashboard.filter.dateRange.thisMonth\",fallback:\"This Month\"}},market:{label:{key:\"productOfferDashboard.filter.market.label\",fallback:\"Market\"},all:{key:\"productOfferDashboard.filter.market.all\",fallback:\"All Markets\"}},offerSort:{byRevenue:{key:\"productOfferDashboard.filter.offerSort.byRevenue\",fallback:\"Revenue\"},byUnits:{key:\"productOfferDashboard.filter.offerSort.byUnits\",fallback:\"Units\"}},productSort:{byUnits:{key:\"productOfferDashboard.filter.productSort.byUnits\",fallback:\"Units\"},byRevenue:{key:\"productOfferDashboard.filter.productSort.byRevenue\",fallback:\"Revenue\"},byVolume:{key:\"productOfferDashboard.filter.productSort.byVolume\",fallback:\"Volume\"}},conversionFilter:{overall:{key:\"productOfferDashboard.filter.conversionFilter.overall\",fallback:\"Overall\"}}},widget:{topProducts:{title:{key:\"productOfferDashboard.widget.topProducts.title\",fallback:\"Top Selling Products\"},emptyState:{key:\"productOfferDashboard.widget.topProducts.emptyState\",fallback:\"No products data available\"}},conversionRate:{title:{key:\"productOfferDashboard.widget.conversionRate.title\",fallback:\"Conversion Rate\"},subtitle:{key:\"productOfferDashboard.widget.conversionRate.subtitle\",fallback:\"Orders \\xF7 Site visits\"}},topPerformingOffers:{title:{key:\"productOfferDashboard.widget.topPerformingOffers.title\",fallback:\"Top Performing Offers\"},totalRevenue:{key:\"productOfferDashboard.widget.topPerformingOffers.totalRevenue\",fallback:\"Total revenue\"},emptyState:{key:\"productOfferDashboard.widget.topPerformingOffers.emptyState\",fallback:\"No offers data available\"}},menu:{fullView:{key:\"productOfferDashboard.widget.menu.fullView\",fallback:\"Full View\"}}},navigation:{back:{key:\"productOfferDashboard.navigation.back\",fallback:\"Back to Dashboard\"}},ariaLabel:{dashboard:{key:\"productOfferDashboard.ariaLabel.dashboard\",fallback:\"Product Offer Performance Dashboard\"},statsCard:{key:\"productOfferDashboard.ariaLabel.statsCard\",fallback:\"Performance metric\"},conversionChart:{key:\"productOfferDashboard.ariaLabel.conversionChart\",fallback:\"Conversion rate chart\"},topProducts:{key:\"productOfferDashboard.ariaLabel.topProducts\",fallback:\"Top selling products\"},topOffers:{key:\"productOfferDashboard.ariaLabel.topOffers\",fallback:\"Top performing offers chart\"},widgetMenu:{key:\"productOfferDashboard.ariaLabel.widgetMenu\",fallback:\"Widget options menu\"},filterDateRange:{key:\"productOfferDashboard.ariaLabel.filterDateRange\",fallback:\"Filter by date range\"},filterMarket:{key:\"productOfferDashboard.ariaLabel.filterMarket\",fallback:\"Filter by market\"},backButton:{key:\"productOfferDashboard.ariaLabel.backButton\",fallback:\"Back to dashboard overview\"}},fullView:{topOffers:{title:{key:\"productOfferDashboard.fullView.topOffers.title\",fallback:\"Top Performing Offers\"},columnName:{key:\"productOfferDashboard.fullView.topOffers.columnName\",fallback:\"Offer Name\"},columnRevenue:{key:\"productOfferDashboard.fullView.topOffers.columnRevenue\",fallback:\"Revenue\"},columnPercentage:{key:\"productOfferDashboard.fullView.topOffers.columnPercentage\",fallback:\"Share\"},columnTrend:{key:\"productOfferDashboard.fullView.topOffers.columnTrend\",fallback:\"Trend\"}}},defaults:{trendZero:{key:\"productOfferDashboard.defaults.trendZero\",fallback:\"+0%\"},noData:{key:\"productOfferDashboard.defaults.noData\",fallback:\"--\"}}};function W(e){return Kt(e)}var U=require(\"react/jsx-runtime\"),au=({offers:e,offerSort:t,isLoading:o=!1,title:n,onSortChange:i,onTitleClick:s})=>{let d=ta.default.useCallback(g=>{let b=g.target.value;i?.(b)},[i]),{sortedOffers:p,totalRevenue:w,trendDirection:C,formattedTrend:u}=ta.default.useMemo(()=>{let g=[...e].sort((v,y)=>t===\"revenue\"?y.revenue-v.revenue:y.percentage-v.percentage),b=g.reduce((v,y)=>v+y.revenue,0),{direction:f,formatted:c}=jt(g,v=>v.revenue,v=>v.trend?.revenue);return{sortedOffers:g,totalRevenue:b,trendDirection:f,formattedTrend:c}},[e,t]),x=p[0]?.currencyCode;return o&&e.length===0?(0,U.jsx)(Yt,{\"data-testid\":\"widget-top-offers\",children:(0,U.jsx)(pr,{})}):e.length===0?(0,U.jsxs)(Yt,{\"data-testid\":\"widget-top-offers\",children:[(0,U.jsx)(vo,{children:(0,U.jsx)(ko,{children:n??W(z.widget.topPerformingOffers.title)})}),(0,U.jsx)(Fr,{\"data-testid\":\"top-offers-empty-state\",children:(0,U.jsx)(Lr,{children:W(z.widget.topPerformingOffers.emptyState)})})]}):(0,U.jsxs)(Yt,{as:\"section\",\"data-testid\":\"widget-top-offers\",\"aria-label\":W(z.ariaLabel.topOffers),children:[(0,U.jsxs)(vo,{children:[(0,U.jsx)(ko,{as:\"button\",onClick:s,\"aria-label\":W(z.ariaLabel.topOffers),\"data-testid\":\"widget-title-top-offers\",children:n??W(z.widget.topPerformingOffers.title)}),(0,U.jsxs)(xr,{children:[(0,U.jsxs)(br,{id:\"offer-sort\",\"data-testid\":\"offer-sort-dropdown\",value:t,onChange:d,disabled:o,\"aria-label\":W(z.ariaLabel.topOffers),children:[(0,U.jsx)(\"option\",{value:\"revenue\",children:W(z.filter.offerSort.byRevenue)}),(0,U.jsx)(\"option\",{value:\"units\",children:W(z.filter.offerSort.byUnits)})]}),(0,U.jsx)(nt,{widgetId:\"top-offers\",onFullView:s})]})]}),(0,U.jsxs)(yr,{children:[(0,U.jsxs)(wr,{\"data-testid\":\"top-offers-chart\",children:[(0,U.jsx)($t.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,U.jsxs)($t.PieChart,{children:[(0,U.jsx)($t.Pie,{data:p,cx:\"50%\",cy:\"50%\",innerRadius:\"55%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,children:p.map(g=>(0,U.jsx)($t.Cell,{fill:g.color},`cell-${g.id}`))}),(0,U.jsx)($t.Tooltip,{formatter:g=>Z(g,x)})]})}),(0,U.jsxs)(Cr,{\"data-testid\":\"top-offers-donut-center\",children:[(0,U.jsx)(vr,{children:W(z.widget.topPerformingOffers.totalRevenue)}),(0,U.jsx)(kr,{children:Z(w,x)}),(0,U.jsx)(Sr,{direction:C,children:u})]})]}),(0,U.jsx)(Tr,{\"data-testid\":\"top-offers-legend-container\",children:p.map((g,b)=>{let f=Gt(g.trend?.revenue);return(0,U.jsxs)(Dr,{\"data-testid\":`offer-legend-${b}`,children:[(0,U.jsx)(Pr,{color:g.color}),(0,U.jsxs)(Rr,{children:[(0,U.jsx)(Mr,{children:g.name}),(0,U.jsx)(Or,{children:Z(g.revenue,g.currencyCode)})]}),(0,U.jsxs)(Ts,{children:[g.percentage,\"%\"]}),g.trend?.revenue?(0,U.jsx)(Rs,{direction:f,\"data-testid\":`offer-legend-trend-${b}`,\"aria-label\":g.trend.revenue,children:rt(f)}):null]},g.id)})})]})]})},jo=ta.default.memo(au);jo.displayName=\"TopPerformingOffersPieChart\";var We=require(\"react/jsx-runtime\"),nu=[],iu=[],lu=[],oa=({stats:e,topProducts:t,conversionData:o,topOffers:n,isLoading:i=!1,error:s,dashboardTitle:d,className:p,dateRange:w=\"last30days\",market:C=\"all\",productSort:u=\"units\",conversionFilter:x=\"all\",offerSort:g=\"revenue\",conversionSummaryRate:b,conversionSummaryChangePct:f,markets:c,onDateRangeChange:v,onMarketChange:y,onProductSortChange:D,onConversionFilterChange:h,onOfferSortChange:F,onProductsTitleClick:V,onConversionTitleClick:q,onOffersTitleClick:A})=>{let H=t??nu,Q=o??iu,I=n??lu,m=k=>k?k.startsWith(\"+\")&&k!==\"+0%\"?\"up\":k.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\";return s?(0,We.jsx)(Qa,{as:\"main\",className:p,\"aria-label\":W(z.ariaLabel.dashboard),children:(0,We.jsxs)(Dp,{\"data-testid\":\"dashboard-error\",role:\"alert\",\"aria-live\":\"assertive\",children:[(0,We.jsxs)(\"strong\",{children:[W(z.error),\":\"]}),\" \",s]})}):(0,We.jsxs)(Qa,{as:\"main\",className:p,\"data-testid\":\"product-offer-dashboard\",\"aria-label\":W(z.ariaLabel.dashboard),\"aria-busy\":i,children:[(0,We.jsx)(ho,{shopTitle:d??W(z.title),dateRange:w,market:C,isLoading:i,markets:c,stats:e?{shopTitle:e.shopTitle??\"\",dateRange:e.dateRange,selectedMarket:e.selectedMarket,metrics:{revenue:e.metrics.revenue,volume:\"\",siteVisits:\"\",conversionRate:e.metrics.conversionRate},trend:{}}:void 0,onDateRangeChange:v,onMarketChange:y}),(0,We.jsxs)(kp,{\"data-testid\":\"top-charts-row\",children:[(0,We.jsx)(ao,{conversionData:Q,conversionFilter:x,isLoading:i,summaryRate:b,summaryChangePct:f,onFilterChange:h,onTitleClick:q}),(0,We.jsxs)(Sp,{\"data-testid\":\"stats-card-stack\",children:[(0,We.jsx)(Ct,{layout:\"split\",title:W(z.stats.revenue),value:e?.metrics?.revenue??\"$0\",trendDirection:m(e?.trend?.revenue),trendValue:e?.trend?.revenue,caption:W(z.stats.comparedTo),testId:\"stats-card-revenue\",isLoading:i}),(0,We.jsx)(Ct,{layout:\"split\",title:W(z.stats.offersPurchased),value:e?.metrics?.offersPurchased??\"0\",trendDirection:m(e?.trend?.offersPurchased),trendValue:e?.trend?.offersPurchased,caption:W(z.stats.comparedTo),testId:\"stats-card-offers-purchased\",isLoading:i})]})]}),(0,We.jsxs)(Tp,{\"data-testid\":\"bottom-charts-row\",children:[(0,We.jsx)(ro,{products:H,productSort:u,isLoading:i,maxProducts:5,onSortChange:D,onTitleClick:V}),(0,We.jsx)(jo,{offers:I,offerSort:g,isLoading:i,onSortChange:F,onTitleClick:A})]})]})};var ce=M(require(\"react\"));var It=M(require(\"react\")),Nt=require(\"recharts\");var re=require(\"@mui/material/styles\"),te=require(\"@mui/material\"),Pp=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Xa}=Pp.ColorUtils,Rp=(0,re.styled)(te.Box)`\n display: flex;\n gap: 24px;\n padding: 24px;\n background-color: ${({theme:e})=>Xa(e,\"N20\")};\n border-radius: 8px;\n box-shadow: ${({theme:e})=>e.shadows[1]};\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n }\n`,Mp=(0,re.styled)(te.Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`,Op=(0,re.styled)(te.Box)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 120px;\n`,Fp=(0,re.styled)(te.Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Lp=(0,re.styled)(te.Typography)`\n margin-top: 2px;\n font-size: 1.25rem;\n line-height: 1.2;\n font-weight: 700;\n color: ${({theme:e})=>e.palette.text.primary};\n`,$p=(0,re.styled)(te.Typography)`\n margin-top: 2px;\n font-size: 0.875rem;\n line-height: 1.2;\n font-weight: 600;\n color: ${({direction:e,theme:t})=>e===\"up\"?t.palette.success.main:e===\"down\"?t.palette.error.main:t.palette.text.secondary};\n`,Ip=(0,re.styled)(te.Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex: 1;\n`,Np=(0,re.styled)(te.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 12px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Xa(e,\"N30\")};\n }\n`,ra=(0,re.styled)(te.Box)`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({dotColor:e})=>e};\n flex-shrink: 0;\n`,Vp=(0,re.styled)(te.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`,Ap=(0,re.styled)(te.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`,zp=(0,re.styled)(te.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Bp=(0,re.styled)(te.Typography)`\n font-size: 1rem;\n font-weight: 600;\n flex-shrink: 0;\n`,Ep=(0,re.styled)(te.Box)`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({theme:e,direction:t})=>t===\"up\"?e.palette.success.main:t===\"down\"?e.palette.error.main:e.palette.text.secondary};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,Hp=(0,re.styled)(te.Box)`\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-weight: 600;\n color: ${({theme:e,direction:t})=>t===\"up\"?e.palette.success.main:t===\"down\"?e.palette.error.main:e.palette.text.secondary};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,Wp=(0,re.styled)(te.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,_p=(0,re.styled)(te.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,Kp=(0,re.styled)(te.Box)`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>Xa(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`,Up=(0,re.styled)(te.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Gp=(0,re.styled)(te.Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n color: ${({theme:e})=>e.palette.text.primary};\n word-break: break-word;\n`,jp=(0,re.styled)(te.Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({theme:e})=>e.palette.divider};\n`,aa=(0,re.styled)(te.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`,na=(0,re.styled)(te.Typography)`\n font-size: 0.625rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n text-transform: uppercase;\n`,en=(0,re.styled)(te.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.primary};\n`,Yp=(0,re.styled)(te.Typography)`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n font-size: 0.875rem;\n font-weight: 600;\n color: ${({theme:e,direction:t})=>t===\"up\"?e.palette.success.main:t===\"down\"?e.palette.error.main:e.palette.text.secondary};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;var O=require(\"react/jsx-runtime\"),ia=({offers:e,dateRange:t,market:o,offerSort:n,markets:i,isLoading:s=!1,onBack:d,onDateRangeChange:p,onMarketChange:w,onOfferSortChange:C})=>{let[u,x]=(0,It.useState)(1),g=10,b=Rt(),f=It.default.useCallback(()=>d?.(),[d]),c=ot(i),v=It.default.useMemo(()=>[Tt(t,z),Dt(o,c,z),{key:\"sort\",label:W(z.filter.offerSort.byRevenue),value:n,options:[{value:\"revenue\",label:W(z.filter.offerSort.byRevenue)},{value:\"units\",label:W(z.filter.offerSort.byUnits)}]}],[t,o,c,n]),y=It.default.useCallback((m,k)=>{m===\"dateRange\"?p?.(k):m===\"market\"?w?.(k):m===\"sort\"&&(C?.(k),x(1))},[C,p,w]),D=It.default.useMemo(()=>[...e].sort((m,k)=>n===\"revenue\"?k.revenue-m.revenue:k.percentage-m.percentage),[e,n]),{totalRevenue:h,totalRevenueTrendDirection:F,totalRevenueTrend:V}=It.default.useMemo(()=>{let m=D.reduce((l,R)=>l+R.revenue,0),{direction:k,formatted:S}=jt(D,l=>l.revenue,l=>l.trend?.revenue);return{totalRevenue:m,totalRevenueTrendDirection:k,totalRevenueTrend:S}},[D]),q=It.default.useMemo(()=>D.slice(0,5),[D]),{totalPages:A,pageItems:H}=kt(D,u,g),Q=It.default.useMemo(()=>[{key:\"name\",label:W(z.fullView.topOffers.columnName),sortable:!0,render:(m,k)=>(0,O.jsxs)(qr,{children:[(0,O.jsx)(ra,{dotColor:k.color}),(0,O.jsx)(\"span\",{children:k.name})]})},{key:\"revenue\",label:W(z.fullView.topOffers.columnRevenue),sortable:!0,render:(m,k)=>Z(Number(m),k.currencyCode)},{key:\"percentage\",label:W(z.fullView.topOffers.columnPercentage),sortable:!0,render:m=>`${Number(m)}%`},{key:\"trend\",label:W(z.fullView.topOffers.columnTrend),render:(m,k)=>{if(!k.trend?.revenue)return W(z.defaults.noData);let S=Gt(k.trend.revenue);return(0,O.jsxs)(Hp,{direction:S,children:[rt(S),(0,O.jsx)(\"span\",{children:k.trend.revenue})]})}}],[]),I=D[0]?.currencyCode;return s?(0,O.jsxs)(De,{\"data-testid\":\"top-offers-full-view\",children:[(0,O.jsx)(me,{title:W(z.fullView.topOffers.title),dateRange:ve(t),onBack:f,filters:v,onFilterChange:y}),(0,O.jsx)(Ut,{})]}):e.length===0?(0,O.jsxs)(De,{\"data-testid\":\"top-offers-full-view\",children:[(0,O.jsx)(me,{title:W(z.fullView.topOffers.title),dateRange:ve(t),onBack:f,filters:v,onFilterChange:y}),(0,O.jsx)(qt,{\"data-testid\":\"top-offers-fullview-empty\",children:W(z.widget.topPerformingOffers.emptyState)})]}):(0,O.jsxs)(De,{\"data-testid\":\"top-offers-full-view\",children:[(0,O.jsx)(me,{title:W(z.fullView.topOffers.title),dateRange:ve(t),onBack:f,filters:v,onFilterChange:y}),(0,O.jsxs)(Rp,{\"data-testid\":\"top-offers-fullview-top-section\",children:[(0,O.jsxs)(Mp,{\"data-testid\":\"top-offers-fullview-chart\",children:[(0,O.jsx)(Nt.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,O.jsxs)(Nt.PieChart,{children:[(0,O.jsx)(Nt.Pie,{data:D,cx:\"50%\",cy:\"50%\",innerRadius:\"50%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,children:D.map(m=>(0,O.jsx)(Nt.Cell,{fill:m.color},`cell-${m.id}`))}),(0,O.jsx)(Nt.Tooltip,{formatter:m=>Z(m,I)})]})}),(0,O.jsxs)(Op,{\"data-testid\":\"top-offers-fullview-donut-center\",children:[(0,O.jsx)(Fp,{children:W(z.widget.topPerformingOffers.totalRevenue)}),(0,O.jsx)(Lp,{children:Z(h,I)}),(0,O.jsx)($p,{direction:F,children:V})]})]}),(0,O.jsx)(Ip,{\"data-testid\":\"top-offers-fullview-summary\",children:q.map(m=>{let k=Gt(m.trend?.revenue);return(0,O.jsxs)(Np,{children:[(0,O.jsx)(ra,{dotColor:m.color}),(0,O.jsxs)(Vp,{children:[(0,O.jsx)(Ap,{children:m.name}),(0,O.jsx)(zp,{children:Z(m.revenue,m.currencyCode)})]}),(0,O.jsxs)(Bp,{children:[m.percentage,\"%\"]}),m.trend?.revenue?(0,O.jsx)(Ep,{direction:k,\"aria-label\":m.trend.revenue,children:rt(k)}):null]},m.id)})})]}),(0,O.jsxs)(Zt,{\"data-testid\":\"top-offers-table\",children:[(0,O.jsxs)(Jt,{\"data-testid\":\"top-offers-fullview-table-title\",children:[W(z.fullView.topOffers.title),\" (\",D.length,\")\"]}),b?(0,O.jsx)(_p,{children:H.map(m=>{let k=vt(m.trend?.revenue),S=\"neutral\";return k!==null&&k>0?S=\"up\":k!==null&&k<0&&(S=\"down\"),(0,O.jsxs)(Kp,{children:[(0,O.jsxs)(Up,{children:[(0,O.jsx)(ra,{dotColor:m.color}),(0,O.jsx)(Gp,{children:m.name})]}),(0,O.jsxs)(jp,{children:[(0,O.jsxs)(aa,{children:[(0,O.jsx)(na,{children:W(z.fullView.topOffers.columnRevenue)}),(0,O.jsx)(en,{children:Z(m.revenue,m.currencyCode)})]}),(0,O.jsxs)(aa,{children:[(0,O.jsx)(na,{children:W(z.fullView.topOffers.columnPercentage)}),(0,O.jsxs)(en,{children:[m.percentage,\"%\"]})]}),(0,O.jsxs)(aa,{children:[(0,O.jsx)(na,{children:W(z.fullView.topOffers.columnTrend)}),(0,O.jsx)(Yp,{direction:S,children:m.trend?.revenue?(0,O.jsxs)(O.Fragment,{children:[rt(S),(0,O.jsx)(\"span\",{children:m.trend.revenue})]}):W(z.defaults.noData)})]})]})]},m.id)})}):(0,O.jsx)(Wp,{children:(0,O.jsx)(lt,{columns:Q,data:H,sortable:!0,getRowKey:m=>m.id})}),A>1&&(0,O.jsx)(st,{currentPage:u,totalPages:A,onPageChange:x,itemsPerPage:g,totalItems:D.length,\"data-testid\":\"top-offers-pagination\"})]})]})};var Yo=require(\"react/jsx-runtime\"),su=\"productOfferDashboardView\",du=[],pu=[],cu=[],uu=[];function Zp(e){return typeof e==\"object\"&&e!==null}function gu(e){return e===\"dashboard\"||e===\"products\"||e===\"conversion-rate\"||e===\"top-offers\"}function la(e,t){if(!Zp(e))return\"dashboard\";let o=e[t];return gu(o)?o:\"dashboard\"}function Jp(e,t,o){return{...Zp(e)?e:{},[t]:o}}function fu(e,t){return{pathname:e?.pathname,search:e?.search,hash:e?.hash,state:t}}var qp=({stats:e,topProducts:t,conversionData:o,topOffers:n,isLoading:i=!1,error:s,dashboardTitle:d,className:p,allProducts:w,orders:C,allOffers:u,conversionSummaryRate:x,conversionSummaryChangePct:g,conversionFullViewData:b,conversionFullViewRate:f,conversionFullViewChangePct:c,initialDateRange:v=\"last30days\",initialMarket:y=\"all\",initialProductSort:D=\"units\",initialConversionFilter:h=\"all\",initialOfferSort:F=\"revenue\",markets:V,translate:q,historyAdapter:A,historyStateKey:H=su,resetToDashboardOnMount:Q=!0,onDateRangeChange:I,onMarketChange:m,onProductSortChange:k,onConversionFilterChange:S,onOfferSortChange:l,onViewChange:R})=>{io(q);let[Y,be]=ce.default.useState(\"dashboard\"),de=ce.default.useRef(!1),[_e,Vt]=ce.default.useState(v),[Qe,ie]=ce.default.useState(y),[pt,Xe]=ce.default.useState(D),[po,co]=ce.default.useState(h),[Jo,Zo]=ce.default.useState(F),Fo=t??du,Lo=o??pu,$o=n??cu,pa=w??Fo,ca=C??uu,ct=u??$o,et=ce.default.useCallback(X=>{be(X),R?.(X)},[R]),At=ce.default.useCallback(()=>A?la(A.location?.state,H):typeof window>\"u\"?\"dashboard\":la(window.history.state,H),[A,H]),Ae=ce.default.useCallback((X,_)=>{if(A){let tt=Jp(A.location?.state,H,X),to=fu(A.location,tt);if(_===\"replace\"){A.replace(to);return}A.push(to);return}if(typeof window>\"u\")return;let Ke=Jp(window.history.state,H,X);if(_===\"replace\"){window.history.replaceState(Ke,\"\");return}window.history.pushState(Ke,\"\")},[A,H]);ce.default.useEffect(()=>{if(Q?(Ae(\"dashboard\",\"replace\"),de.current=!1,et(\"dashboard\")):et(At()),A)return A.listen((_,Ke)=>{if(Ke===\"POP\"){let tt=la(_.state,H);de.current=tt!==\"dashboard\",et(tt)}});let X=_=>{let Ke=la(_.state,H);de.current=Ke!==\"dashboard\",et(Ke)};return window.addEventListener(\"popstate\",X),()=>{window.removeEventListener(\"popstate\",X)}},[A,H,At,Q,et,Ae]);let ut=ce.default.useCallback(X=>{de.current=!0,Ae(X,\"push\"),et(X)},[et,Ae]),zt=ce.default.useCallback(()=>{if(Y!==\"dashboard\"&&de.current){if(A){A.goBack();return}typeof window<\"u\"&&window.history.back();return}de.current=!1,Ae(\"dashboard\",\"replace\"),et(\"dashboard\")},[Y,A,et,Ae]),xt=ce.default.useCallback(X=>{Vt(X),I?.(X)},[I]),eo=ce.default.useCallback(X=>{ie(X),m?.(X)},[m]),Io=ce.default.useCallback(X=>{Xe(X),k?.(X)},[k]),No=ce.default.useCallback(X=>{co(X),S?.(X)},[S]),Vo=ce.default.useCallback(X=>{Zo(X),l?.(X)},[l]),ua=ce.default.useCallback(()=>{ut(\"products\")},[ut]),ga=ce.default.useCallback(()=>{ut(\"conversion-rate\")},[ut]),fa=ce.default.useCallback(()=>{ut(\"top-offers\")},[ut]);return Y===\"products\"?(0,Yo.jsx)(So,{products:pa,dateRange:_e,market:Qe,productSort:pt,markets:V,isLoading:i,onBack:zt,onDateRangeChange:xt,onMarketChange:eo,onProductSortChange:Io}):Y===\"conversion-rate\"?(0,Yo.jsx)(To,{conversionData:b??Lo,orders:ca,summaryRate:f??x,summaryChangePct:c??g,dateRange:_e,market:Qe,conversionFilter:po,markets:V,isLoading:i,onBack:zt,onDateRangeChange:xt,onMarketChange:eo,onConversionFilterChange:No}):Y===\"top-offers\"?(0,Yo.jsx)(ia,{offers:ct,dateRange:_e,market:Qe,offerSort:Jo,markets:V,isLoading:i,onBack:zt,onDateRangeChange:xt,onMarketChange:eo,onOfferSortChange:Vo}):(0,Yo.jsx)(oa,{stats:e,topProducts:Fo,conversionData:Lo,topOffers:$o,isLoading:i,error:s,dashboardTitle:d,className:p,dateRange:_e,market:Qe,productSort:pt,conversionFilter:po,offerSort:Jo,conversionSummaryRate:x,conversionSummaryChangePct:g,markets:V,onDateRangeChange:xt,onMarketChange:eo,onProductSortChange:Io,onConversionFilterChange:No,onOfferSortChange:Vo,onProductsTitleClick:ua,onConversionTitleClick:ga,onOffersTitleClick:fa})};var Ro=require(\"@nuskin/foundation-theme\"),{getGenomeColor:lo}=Ro.ColorUtils,Qp=(0,Ro.styled)(\"div\")`\n display: flex;\n gap: 12px;\n margin-bottom: 24px;\n flex-wrap: wrap;\n`,Xp=(0,Ro.styled)(\"select\")`\n min-width: 160px;\n height: 40px;\n padding: 8px 12px;\n background-color: ${({theme:e})=>lo(e,\"N20\")};\n border: 1px solid ${({theme:e})=>lo(e,\"N40\")};\n border-radius: 8px;\n font-size: 14px;\n font-weight: 400;\n color: ${({theme:e})=>lo(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>lo(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>lo(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>lo(e,\"A20\")};\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n`,ec=(0,Ro.styled)(\"label\")`\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n color: ${({theme:e})=>lo(e,\"N70\")};\n`;var Mo=require(\"react/jsx-runtime\"),tc=({filters:e,onChange:t})=>(0,Mo.jsx)(Qp,{\"data-testid\":\"filter-bar\",children:e.map(o=>(0,Mo.jsxs)(ec,{htmlFor:`filter-${o.key}`,children:[o.label,(0,Mo.jsx)(Xp,{id:`filter-${o.key}`,value:o.value,onChange:n=>t(o.key,n.target.value),disabled:o.disabled,\"aria-label\":`${o.label} ${a(r.ariaLabel.filterSuffix)}`,\"data-testid\":`filter-dropdown-${o.key}`,children:o.options.map(n=>(0,Mo.jsx)(\"option\",{value:n.value,children:n.label},n.value))})]},o.key))});var tn={shopTitle:\"My NuSkin Shop\",dateRange:{start:\"2026-03-01\",end:\"2026-03-31\",label:\"Mar 1 - Mar 31\"},selectedMarket:\"all\",metrics:{revenue:\"$9,453\",volume:\"1,211\",siteVisits:\"17,935\",conversionRate:\"4.2%\"},trend:{revenue:\"+12.5%\",volume:\"+8.3%\",siteVisits:\"-2.1%\"}},sa=[{id:\"prod-001\",rank:1,name:\"ageLOC LumiSpa\",imageUrl:\"\",unitsSold:342,revenue:29580,volume:245,trend:{units:\"+15%\",revenue:\"+12%\",volume:\"+8%\"}},{id:\"prod-002\",rank:2,name:\"Pharmanex LifePak\",imageUrl:\"\",unitsSold:287,revenue:24395,volume:198,trend:{units:\"+8%\",revenue:\"+10%\",volume:\"+5%\"}},{id:\"prod-003\",rank:3,name:\"ageLOC Meta\",imageUrl:\"\",unitsSold:256,revenue:21760,volume:176,trend:{units:\"-3%\",revenue:\"-1%\",volume:\"-2%\"}},{id:\"prod-004\",rank:4,name:\"Nu Skin 180 System\",imageUrl:\"\",unitsSold:198,revenue:17820,volume:142,trend:{units:\"+22%\",revenue:\"+18%\",volume:\"+15%\"}},{id:\"prod-005\",rank:5,name:\"Epoch Baobab Body Butter\",imageUrl:\"\",unitsSold:176,revenue:8800,volume:88,trend:{units:\"+5%\",revenue:\"+3%\",volume:\"+2%\"}}],Oo=Array.from({length:30},(e,t)=>{let o=new Date(\"2026-03-01\");return o.setDate(o.getDate()+t),{date:`${[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"][o.getMonth()]} ${o.getDate()}`,rate:Number((4+t%15*.1).toFixed(2)),orders:200+t*13%100,siteVisits:4e3+t*97%2e3}}),mu=Oo.map(e=>({...e,rate:Number((e.rate*1.35).toFixed(2)),orders:Math.round(e.orders*.7)})),hu=Oo.map(e=>({...e,rate:Number((e.rate*.55).toFixed(2)),orders:Math.round(e.orders*.3)})),on=Array.from({length:30},(e,t)=>{let o=new Date(\"2026-03-01\");o.setDate(o.getDate()+t);let n=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],i=80+t*11%40,s=Math.floor(i*.4),d=Math.floor(i*.35),p=i-s-d;return{date:`${n[o.getMonth()]} ${o.getDate()}`,total:i,members:s,retail:d,brandAffiliates:p}}),rn=[{id:\"cat-001\",name:\"Favorites\",revenue:45200,percentage:29,color:\"#C95D63\",trend:{revenue:\"+8%\",units:\"+10%\"}},{id:\"cat-002\",name:\"Daily Routine\",revenue:42100,percentage:27,color:\"#6C7A9B\",trend:{revenue:\"+12%\",units:\"+15%\"}},{id:\"cat-003\",name:\"Fit & Trim Body\",revenue:34300,percentage:22,color:\"#E8975E\",trend:{revenue:\"-3%\",units:\"-1%\"}},{id:\"cat-004\",name:\"Dull Skin\",revenue:24900,percentage:16,color:\"#5F8FC4\",trend:{revenue:\"+5%\",units:\"+7%\"}},{id:\"cat-005\",name:\"Acne\",revenue:9400,percentage:6,color:\"#A2C3B3\",trend:{revenue:\"+2%\",units:\"+3%\"}}],da=Array.from({length:50},(e,t)=>{let o=[\"Sarah\",\"John\",\"Emma\",\"Michael\",\"Olivia\",\"William\",\"Ava\",\"James\"],n=[\"Smith\",\"Johnson\",\"Williams\",\"Brown\",\"Jones\",\"Garcia\",\"Miller\",\"Davis\"],i=new Date(\"2026-03-31\");return i.setDate(i.getDate()-t%30),{orderId:`ORD-${String(1e4+t).padStart(5,\"0\")}`,date:i.toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\"}),customerName:`${o[t%o.length]} ${n[t%n.length]}`,customerType:t%3===0?\"Subscription\":\"Standard\",items:t%5+1,total:Number((50+t*17%200+t%10*.1).toFixed(2)),bv:30+t*9%150}}),an=Array.from({length:30},(e,t)=>{let o=[\"Alice\",\"Bob\",\"Carol\",\"David\",\"Eva\",\"Frank\",\"Grace\",\"Henry\"],n=[\"Anderson\",\"Baker\",\"Clark\",\"Davis\",\"Evans\",\"Fisher\",\"Grant\",\"Hall\"],i=[\"Member\",\"Retail\",\"Brand Affiliate\"],s=new Date(\"2026-03-31\");return s.setDate(s.getDate()-t%30),{id:`SU-${String(1e3+t).padStart(4,\"0\")}`,name:`${o[t%o.length]} ${n[t%n.length]}`,date:s.toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\"}),type:i[t%i.length],email:`${o[t%o.length].toLowerCase()}.${n[t%n.length].toLowerCase()}@example.com`,status:t%4===0?\"Pending\":\"Active\"}});var so={shopTitle:\"Performance Overview\",dateRange:{start:\"2026-03-01\",end:\"2026-03-31\",label:\"Mar 1 - Mar 31\"},selectedMarket:\"all\",metrics:{revenue:\"$5,208\",offersPurchased:\"285\",conversionRate:\"4.2%\"},trend:{revenue:\"+2.3%\",offersPurchased:\"+3.7%\"}},nx={...so,trend:{revenue:\"+5.1%\",offersPurchased:\"+12.5%\"}},ix={...so,trend:{revenue:\"-1.8%\",offersPurchased:\"-3.7%\"}},lx={...so,trend:{revenue:\"+0%\",offersPurchased:\"+0%\"}},sx={...so,metrics:{...so.metrics,offersPurchased:\"0\"},trend:{revenue:\"+0%\",offersPurchased:\"+0%\"}},oc=[{id:\"offer-1\",name:\"Winter Skincare Bundle\",revenue:2800,percentage:29,color:\"#6B8E7B\",trend:{revenue:\"-4.2%\"}},{id:\"offer-2\",name:\"Supplement Starter Pack\",revenue:2500,percentage:27,color:\"#E8915A\",trend:{revenue:\"+3.1%\"}},{id:\"offer-3\",name:\"Holiday Special Bundle\",revenue:2100,percentage:22,color:\"#C75B5B\",trend:{revenue:\"-1.5%\"}},{id:\"offer-4\",name:\"LumiSpa Cleansing Kit\",revenue:1500,percentage:16,color:\"#5B8EC7\",trend:{revenue:\"+2.8%\"}},{id:\"offer-5\",name:\"Daily Wellness Bundle\",revenue:529,percentage:6,color:\"#9B8EC7\",trend:{revenue:\"+7.2%\"}}];\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","export * from './common';\n","import React, { ReactElement, useState } from 'react';\nimport { NsImage } from '@nuskin/foundation-ui-components';\nimport { ProductImageType } from '../types/image';\nimport {\n PriceComponent,\n ProductCardContainer,\n ImageContainer,\n DefaultImage,\n ProductTitle,\n ProductBadgeContainer,\n AddToCartButton,\n CartIcon,\n} from './styles/NsProductCard.Styled';\nimport { useMediaQuery } from '@mui/material';\nimport { NsCardButton } from './types';\n\ntype NsProductCardProps = {\n readonly productTitle: string;\n readonly imageDetails?: ProductImageType;\n readonly className?: string;\n readonly button?: NsCardButton & { disabled?: boolean };\n readonly onCardClick?: () => void;\n readonly productStatusBadge?: React.ReactNode;\n readonly directSellerBadge?: React.ReactNode;\n readonly mySitePriceComponent?: React.ReactNode;\n readonly testId?: string;\n};\n\nconst NsProductCard = ({\n productTitle,\n imageDetails,\n className,\n button,\n onCardClick,\n productStatusBadge,\n directSellerBadge,\n mySitePriceComponent,\n testId,\n}: NsProductCardProps): ReactElement => {\n const [isButtonHovered, setIsButtonHovered] = useState(false);\n const isMobile = useMediaQuery('(max-width: 560px)');\n\n const handleImageError = (e: React.SyntheticEvent<HTMLImageElement, Event>) => {\n const target = e.target as HTMLImageElement;\n const noImageFallback = imageDetails?.fallbackImage;\n if (noImageFallback && target.src !== noImageFallback) {\n target.src = noImageFallback;\n }\n };\n\n return (\n <ProductCardContainer\n className={className}\n onClick={onCardClick}\n tabIndex={0}\n data-testid=\"product-card\"\n isMobile={isMobile}\n >\n <ImageContainer bgColor={imageDetails?.bgColor} onError={handleImageError}>\n {imageDetails?.imageSrc ? (\n <NsImage\n data-testid={testId ?? 'test-product-image'}\n className={imageDetails.className ?? ''}\n src={imageDetails.imageSrc}\n alt={imageDetails.imageAlt}\n aria-label={imageDetails.areaLabel ?? imageDetails.imageAlt}\n width={'100%'}\n />\n ) : (\n <DefaultImage alt=\"\" />\n )}\n </ImageContainer>\n <ProductTitle title={productTitle} data-testid=\"product-title\">\n {productTitle}\n </ProductTitle>\n {directSellerBadge && <ProductBadgeContainer>{directSellerBadge}</ProductBadgeContainer>}\n <ProductBadgeContainer>{productStatusBadge}</ProductBadgeContainer>\n <PriceComponent>{mySitePriceComponent}</PriceComponent>\n {button?.showButton && (\n <AddToCartButton\n tabIndex={0}\n aria-roledescription=\":\"\n aria-label={button.buttonText || 'ADD TO CART'}\n data-testid=\"add-to-cart-button\"\n disabled={button?.disabled ?? false}\n isMobile={isMobile}\n isHovered={isButtonHovered}\n onClick={(e) => {\n e.stopPropagation();\n if (!button?.disabled) {\n button.onClick?.();\n }\n }}\n onMouseEnter={() => {\n if (!isMobile && !button?.disabled) {\n setIsButtonHovered(true);\n }\n }}\n onMouseLeave={() => {\n if (!isMobile) {\n setIsButtonHovered(false);\n }\n }}\n >\n <CartIcon className=\"cart-icon\" disabled={button?.disabled}>\n <svg width=\"24\" height=\"22\" viewBox=\"0 0 24 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0 1.86358C0 1.26109 0.488416 0.772675 1.09091 0.772675H3.48173C4.51054 0.772675 5.39955 1.49136 5.61511 2.49733L5.71309 2.95456H22.9091C23.245 2.95456 23.5622 3.10933 23.7689 3.37411C23.9757 3.63889 24.0489 3.98415 23.9674 4.31005L22.4053 10.5583C21.9197 12.5009 20.1743 13.8636 18.172 13.8636H8.05068L8.28444 14.9546H20.7273C21.3298 14.9546 21.8182 15.443 21.8182 16.0455C21.8182 16.648 21.3298 17.1364 20.7273 17.1364H19.6364H8.18182H7.40252C6.88811 17.1364 6.4436 16.777 6.33582 16.274L3.76449 4.27405L3.48173 2.95449H1.09091C0.488416 2.95449 0 2.46608 0 1.86358ZM8.18182 17.1364C6.97683 17.1364 6 18.1132 6 19.3182C6 20.5232 6.97683 21.5 8.18182 21.5C9.3868 21.5 10.3636 20.5232 10.3636 19.3182C10.3636 18.1132 9.3868 17.1364 8.18182 17.1364ZM19.6364 17.1364C18.4314 17.1364 17.4545 18.1132 17.4545 19.3182C17.4545 20.5232 18.4314 21.5 19.6364 21.5C20.8413 21.5 21.8182 20.5232 21.8182 19.3182C21.8182 18.1132 20.8413 17.1364 19.6364 17.1364ZM7.58317 11.6818H18.172C19.1732 11.6818 20.0459 11.0005 20.2887 10.0292L21.5119 5.13638H6.18062L7.58317 11.6818Z\"\n fill={button?.disabled ? '#999' : '#ffffff'}\n />\n </svg>\n </CartIcon>\n {button.buttonText || 'ADD TO CART'}\n </AddToCartButton>\n )}\n </ProductCardContainer>\n );\n};\n\nexport default NsProductCard;\n","import { styled } from '@nuskin/foundation-theme';\n\nexport const PriceComponent = styled('div')`\n width: 200px;\n text-align: left;\n margin-bottom: 5px;\n`;\n\nexport const ProductCardContainer = styled('button')<{ isMobile: boolean }>`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n width: 240px;\n height: ${(props) => (props.isMobile ? '410px' : '513px')};\n overflow: hidden;\n cursor: pointer;\n border: 1px solid #ededed;\n background: var(--color-primary-n-10-primary-white, #fff);\n`;\n\nexport const ImageContainer = styled('div')<{\n bgColor?: string;\n}>`\n width: '240px';\n height: '240px';\n background: ${(props) => props.bgColor ?? '#f5f5f5'};\n border-radius: 8px;\n overflow: hidden;\n margin-bottom: 0;\n display: flex;\n align-items: normal;\n justify-content: center;\n position: relative;\n @media (max-width: 560px) {\n width: 200px;\n height: 200px;\n align-items: unset;\n }\n`;\n\nexport const DefaultImage = styled('img')`\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n display: block;\n`;\n\nexport const ProductTitle = styled('div')`\n width: 200px;\n margin-top: 16px;\n max-height: 66px;\n text-align: left;\n font-size: 16px;\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n line-height: 22px;\n overflow: hidden;\n color: #666;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n @media (max-width: 560px) {\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n margin-top: 5px;\n max-height: 54px;\n line-height: 18px;\n }\n`;\n\nexport const ProductBadgeContainer = styled('div')`\n width: 200px;\n text-align: left;\n margin-bottom: 12px;\n @media (max-width: 560px) {\n margin-bottom: 8px;\n }\n`;\n\nexport const AddToCartButton = styled('button')<{\n disabled?: boolean;\n isMobile: boolean;\n isHovered: boolean;\n}>`\n width: 200px;\n height: 40px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n gap: 10px;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0.14px;\n text-transform: none;\n justify-content: flex-start;\n padding-left: 31px;\n overflow: hidden;\n white-space: normal;\n word-break: break-word;\n overflow-wrap: break-word;\n text-overflow: ellipsis;\n margin-top: 8px;\n margin-bottom: 10px;\n -webkit-appearance: none;\n -webkit-tap-highlight-color: transparent;\n\n color: ${(props) => (props.disabled ? '#999' : '#fff')};\n background-color: ${(props) => {\n if (props.disabled) return '#e0e0e0';\n if (!props.isMobile && props.isHovered) return '#888';\n return '#000';\n }};\n border: ${(props) => (props.disabled ? '1px solid #ccc' : 'none')};\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n opacity: ${(props) => (props.disabled ? 0.6 : 1)};\n transition: ${(props) => (props.isMobile ? 'none' : 'all 0.3s ease')};\n\n @media (max-width: 560px) {\n margin: 5px 0;\n }\n`;\n\nexport const CartIcon = styled('span')<{ disabled?: boolean }>`\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n display: inline-block;\n background: none;\n transition: all 0.3s ease;\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n`;\n","import React, { ReactElement, useCallback, ReactNode, useRef } from 'react';\nimport Slider from 'react-slick';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport 'slick-carousel/slick/slick.css';\nimport { NsCardButton, NsCarouselControl } from '@nuskin/foundation-ui-components';\nimport { ProductImageType } from '../types/image';\nimport NsProductCard from '../card/NsProductCard';\nimport {\n SlickContainer,\n ControlsContainer,\n ControlsHeaderRow,\n ScrollableContainer,\n CardList,\n ViewAllWrapper,\n ProductCountWrapper,\n ArrowsWrapper,\n CustomTypography,\n ViewAllLink,\n ProductInfoWrapper,\n CategoryNameWrapper,\n EmptyProductCategories,\n} from './NsProductCarousel.styled';\n\nexport type ProductCardEntry = {\n readonly productTitle: string;\n readonly imageDetails?: ProductImageType;\n readonly button?: NsCardButton;\n readonly onCardClick?: () => void;\n readonly productStatusBadge?: React.ReactNode;\n readonly directSeller?: React.ReactNode;\n readonly mySitePriceComponent?: React.ReactNode;\n};\n\ninterface SlickSettings {\n dots?: boolean;\n infinite?: boolean;\n speed?: number;\n slidesToShow?: number;\n slidesToScroll?: number;\n swipe?: boolean;\n draggable?: boolean;\n arrows?: boolean;\n responsive?: Array<{\n breakpoint: number;\n settings: {\n slidesToShow?: number;\n slidesToScroll?: number;\n arrows?: boolean;\n };\n }>;\n}\n\ninterface ProductCardCarouselProps<T = ProductCardEntry> {\n readonly entries: T[];\n readonly settings?: SlickSettings;\n readonly showControlButtons?: boolean;\n readonly renderEntry?: (entry: T, index: number) => ReactNode;\n readonly allEntryLabel?: string;\n readonly allEntryLink?: string;\n readonly categoryName?: string;\n readonly emptyProductMessage?: string;\n readonly productsCountLabel?: string;\n readonly isInitialDataLoading?: boolean;\n readonly history?: {\n push: (path: string) => void;\n };\n}\n\nexport default function ProductCardCarousel({\n entries,\n renderEntry,\n settings = {},\n showControlButtons = true,\n allEntryLabel = 'View All',\n allEntryLink = '',\n categoryName,\n emptyProductMessage = 'No Products Available For The Selected Category',\n productsCountLabel = 'Products',\n isInitialDataLoading,\n history,\n}: ProductCardCarouselProps): ReactElement {\n const sliderRef = useRef<Slider>(null);\n const isMobile = useMediaQuery('(max-width: 560px)');\n\n const prev = useCallback(() => {\n sliderRef.current?.slickPrev();\n }, []);\n\n const next = useCallback(() => {\n sliderRef.current?.slickNext();\n }, []);\n\n const renderProductEntry =\n renderEntry ??\n ((entry: ProductCardEntry, index: number) => (\n <NsProductCard\n key={`${entry.productTitle}-${index}`}\n productTitle={entry.productTitle}\n imageDetails={entry.imageDetails}\n button={entry.button}\n onCardClick={entry.onCardClick}\n productStatusBadge={entry.productStatusBadge}\n directSellerBadge={entry.directSeller}\n mySitePriceComponent={entry.mySitePriceComponent}\n />\n ));\n\n const sliderSettings = {\n dots: true,\n infinite: true,\n speed: 500,\n slidesToShow: Math.min(entries?.length ?? 0, 4),\n slidesToScroll: 4,\n swipe: true,\n draggable: true,\n arrows: true,\n responsive: [\n {\n breakpoint: 1320,\n settings: {\n slidesToShow: Math.min(entries?.length ?? 0, 3),\n slidesToScroll: 3,\n },\n },\n {\n breakpoint: 900,\n settings: {\n slidesToShow: Math.min(entries?.length ?? 0, 2),\n slidesToScroll: 2,\n },\n },\n {\n breakpoint: 600,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n arrows: false,\n },\n },\n ],\n ...settings,\n };\n\n const shouldShowNavigation = (entries?.length ?? 0) > sliderSettings.slidesToShow;\n\n const renderCarouselContent = () => {\n if (entries?.length === 0 && !isInitialDataLoading) {\n return <EmptyProductCategories>{emptyProductMessage}</EmptyProductCategories>;\n }\n\n if (isMobile) {\n return (\n <ScrollableContainer>\n <CardList>{entries.map((entry, index) => entry && renderProductEntry(entry, index))}</CardList>\n </ScrollableContainer>\n );\n }\n\n return (\n <Slider {...sliderSettings} ref={sliderRef}>\n {entries.map((entry, index) => entry && renderProductEntry(entry, index))}\n </Slider>\n );\n };\n\n return (\n <SlickContainer>\n {showControlButtons && (\n <ControlsContainer>\n <ControlsHeaderRow>\n <ProductInfoWrapper>\n <ProductCountWrapper>\n <CustomTypography variant=\"body-m\">\n {entries?.length ?? 0} {productsCountLabel}\n </CustomTypography>\n </ProductCountWrapper>\n {!isMobile && categoryName && <CategoryNameWrapper>{categoryName}</CategoryNameWrapper>}\n </ProductInfoWrapper>\n <ViewAllWrapper $isMobile={isMobile}>\n <ViewAllLink\n $disabled={(entries?.length ?? 0) === 0}\n onClick={(e) => {\n e.preventDefault();\n if ((entries?.length ?? 0) > 0 && history) {\n history.push(allEntryLink);\n }\n }}\n >\n {allEntryLabel}\n </ViewAllLink>\n </ViewAllWrapper>\n </ControlsHeaderRow>\n {!isMobile && (\n <ArrowsWrapper $isDisabled={!shouldShowNavigation}>\n <NsCarouselControl prev={prev} next={next} viewAllLabel={''} viewAllUrl={''} />\n </ArrowsWrapper>\n )}\n </ControlsContainer>\n )}\n {renderCarouselContent()}\n </SlickContainer>\n );\n}\n","import React from 'react';\nimport { styled } from '@nuskin/foundation-theme';\nimport Box, { BoxProps } from '@mui/material/Box';\nimport { NsTypography } from '@nuskin/foundation-ui-components';\n\nexport const SlickContainer: React.ComponentType<BoxProps> = styled(Box)`\n padding: 30px 0 60px;\n width: 100%;\n margin: auto;\n margin-top: 50px;\n position: relative;\n\n .slick-list {\n padding-left: 24px;\n padding-right: 24px;\n }\n .slick-slide {\n display: flex;\n justify-content: center;\n padding: 0 12px;\n box-sizing: border-box;\n }\n .slick-prev,\n .slick-next {\n display: none !important;\n }\n\n @media (max-width: 1200px) {\n max-width: 1024px;\n .slick-list {\n padding-left: 12px;\n padding-right: 12px;\n }\n .slick-slide {\n padding: 0 6px;\n }\n }\n @media (max-width: 700px) {\n max-width: 100vw;\n padding: 10px 0 50px;\n .slick-list {\n padding-left: 4px;\n padding-right: 4px;\n }\n .slick-slide {\n padding: 0 2px;\n }\n }\n @media (max-width: 560px) {\n padding: 10px 0 10px;\n margin-top: 25px;\n }\n`;\nexport const ScrollableContainer = styled('div')`\n overflow-x: auto;\n display: flex;\n scroll-snap-type: x mandatory;\n -webkit-overflow-scrolling: touch;\n gap: 16px;\n padding: 0 8px 16px;\n width: 100%;\n box-sizing: border-box;\n\n &::-webkit-scrollbar {\n height: 6px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #007bff;\n border-radius: 10px;\n }\n`;\n\nexport const CardList = styled('div')`\n display: flex;\n scroll-snap-align: start;\n justify-content: center;\n gap: 15px;\n`;\n\nexport const ControlsContainer: React.ComponentType<BoxProps> = styled(Box)`\n position: absolute;\n bottom: calc(100% + 1px);\n right: 1px;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n`;\n\nexport const ViewAllWrapper: React.ComponentType<BoxProps & { $isMobile?: boolean }> = styled(Box)<{\n $isMobile?: boolean;\n}>`\n display: flex;\n align-items: center;\n margin-left: auto;\n margin-right: ${({ $isMobile }) => ($isMobile ? 0 : '24px')};\n\n @media (max-width: 560px) {\n margin-left: 0;\n order: 2;\n }\n`;\n\nexport const ProductCountWrapper: React.ComponentType<BoxProps> = styled(Box)`\n display: none;\n\n @media (max-width: 560px) {\n color: #666666;\n font-family: Inter;\n font-size: 14px !important;\n font-style: normal;\n font-weight: 600;\n line-height: 18px;\n display: flex;\n align-items: center;\n order: 1;\n }\n`;\n\nexport const ArrowsWrapper: React.ComponentType<BoxProps & { $isDisabled?: boolean }> = styled(Box)<{\n $isDisabled?: boolean;\n}>`\n display: flex;\n align-items: center;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.3 : 1)};\n pointer-events: ${({ $isDisabled }) => ($isDisabled ? 'none' : 'auto')};\n transition: opacity 0.3s ease;\n\n .carousal-prev-button,\n .carousal-next-button {\n transition: all 0.3s ease;\n border: 2px solid #000000;\n border-radius: 3px;\n padding: 9px;\n cursor: pointer;\n\n svg {\n transition: all 0.3s ease;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n\n &:hover {\n background-color: #f5f5f5;\n border: 2px solid #ddd;\n\n svg {\n opacity: 0.5;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n }\n }\n\n @media (max-width: 560px) {\n display: none;\n }\n`;\nexport const Scrollablewrapper = styled('div')`\n @media (max-width: 560px) {\n overflow-y: hidden;\n scrollbar-width: thin;\n scrollbar-color: #007bff #eee;\n &::-webkit-scrollbar {\n width: 8px;\n }\n &::-webkit-scrollbar-track {\n background: #eee;\n }\n &::-webkit-scrollbar-thumb {\n background-color: red;\n border-radius: 8px;\n border: 2px solid #eee;\n }\n }\n`;\nexport const CustomTypography = styled(NsTypography)`\n color: #666666;\n font-family: Inter;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 22px;\n @media (max-width: 560px) {\n margin: 0 3px;\n }\n`;\n\nexport const ViewAllLink = styled('a')<{ $disabled?: boolean }>`\n color: ${({ $disabled }) => ($disabled ? '#999999' : '#000000')};\n font-family: Inter, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 22px;\n text-decoration: none;\n border-bottom: 1px solid ${({ $disabled }) => ($disabled ? '#999999' : '#000000')};\n padding-bottom: 4px;\n transition: all 0.3s ease;\n cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'pointer')};\n pointer-events: ${({ $disabled }) => ($disabled ? 'none' : 'auto')};\n opacity: ${({ $disabled }) => ($disabled ? 0.5 : 1)};\n\n @media (max-width: 560px) {\n font-size: 14px;\n line-height: 18px;\n }\n\n &:hover {\n color: ${({ $disabled }) => ($disabled ? '#999999' : '#666666')};\n border-bottom: 1px solid ${({ $disabled }) => ($disabled ? '#999999' : '#666666')};\n cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'pointer')};\n }\n`;\n\nexport const EmptyProductCategories = styled('div')`\n padding-top: 20px;\n font-size: 20px;\n text-align: center;\n`;\nexport const ControlsHeaderRow = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`;\n\nexport const ProductInfoWrapper = styled('div')`\n display: flex;\n align-items: center;\n flex: 1;\n min-width: 0;\n`;\n\nexport const CategoryNameWrapper = styled('div')`\n font-family: 'Lora';\n font-weight: 400;\n font-size: 22px;\n margin-left: 16px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 13px;\n`;\n","import React, { useState, useEffect, useCallback } from 'react';\nimport { useMediaQuery } from '@mui/material';\n\nimport { NsCategoryNavigation } from '../Nav-Category-Navigation';\nimport { NsSpinner } from '@nuskin/foundation-ui-components';\nimport ProductCardCarousel, { ProductCardEntry } from './NsProductCarousel';\nimport {\n ProductTabCarouselContainer,\n TabsContainer,\n ContentContainer,\n NoTabsContainer,\n SpinnerContainer,\n} from './ProductTabCarousel.styled';\n\ninterface Category {\n label: string;\n categoryId: string;\n}\n\ninterface SlickSettings {\n dots?: boolean;\n infinite?: boolean;\n speed?: number;\n slidesToShow?: number;\n slidesToScroll?: number;\n swipe?: boolean;\n draggable?: boolean;\n arrows?: boolean;\n responsive?: Array<{\n breakpoint: number;\n settings: {\n slidesToShow?: number;\n slidesToScroll?: number;\n arrows?: boolean;\n };\n }>;\n}\n\ninterface ProductTabCarouselProps {\n readonly allEntryLabel?: string;\n readonly allEntryLink?: string;\n readonly renderEntry?: (entry: ProductCardEntry) => React.ReactNode;\n readonly settings?: SlickSettings;\n readonly showControlButtons?: boolean;\n readonly fetchCategories: () => Promise<Category[]>;\n readonly fetchProducts: (categoryId: string) => Promise<ProductCardEntry[]>;\n readonly emptyProductTabs?: string;\n readonly emptyProductMessage?: string;\n readonly showCustomCategory?: boolean;\n readonly productsCountLabel?: string;\n readonly getCategoryId?: (categoryId: string) => Promise<Category[]>;\n readonly history?: {\n push: (path: string) => void;\n };\n}\n\nconst ProductTabCarousel: React.FC<ProductTabCarouselProps> = ({\n allEntryLabel,\n allEntryLink,\n renderEntry,\n settings,\n showControlButtons = true,\n fetchCategories,\n fetchProducts,\n showCustomCategory = false,\n emptyProductTabs = 'No tabs available',\n emptyProductMessage,\n productsCountLabel,\n getCategoryId,\n history,\n}) => {\n const isMobile = useMediaQuery('(max-width:768px)');\n const [isLoadingInitialData, setIsLoadingInitialData] = useState(true);\n const [categories, setCategories] = useState<Category[]>([]);\n const [isCategoriesLoaded, setIsCategoriesLoaded] = useState(false);\n const [selectedTab, setSelectedTab] = useState(0);\n const [products, setProducts] = useState<ProductCardEntry[]>([]);\n const [loading, setLoading] = useState(false);\n const [shouldShowSpinner, setShouldShowSpinner] = useState(true);\n\n const checkForExistingSpinners = useCallback(() => {\n const existingSpinners = document.querySelectorAll('[data-testid*=\"spinner\"], .ns-spinner, [class*=\"spinner\"]');\n setShouldShowSpinner(existingSpinners.length === 0);\n }, []);\n\n useEffect(() => {\n if (loading) {\n checkForExistingSpinners();\n }\n }, [loading, checkForExistingSpinners]);\n\n useEffect(() => {\n fetchCategories().then((data) => {\n setCategories(data);\n setIsCategoriesLoaded(true);\n });\n }, [fetchCategories]);\n\n useEffect(() => {\n if (!isCategoriesLoaded) return;\n\n if (categories.length > 0) {\n const categoryId = categories[selectedTab]?.categoryId;\n if (getCategoryId) {\n getCategoryId(categoryId);\n }\n\n setLoading(true);\n fetchProducts(categoryId)\n .then(setProducts)\n .finally(() => {\n setLoading(false);\n setIsLoadingInitialData(false);\n });\n } else {\n setLoading(false);\n }\n }, [categories, selectedTab, fetchProducts, isCategoriesLoaded]);\n\n const itemArray = categories.map((cat) => ({\n label: cat.label,\n content: '',\n categoryId: cat.categoryId,\n }));\n\n return (\n <ProductTabCarouselContainer isMobile={isMobile} $hasCategories={categories.length > 0}>\n {showCustomCategory &&\n (itemArray.length > 0 ? (\n <TabsContainer isMobile={isMobile}>\n <NsCategoryNavigation\n itemArray={itemArray}\n value={selectedTab}\n onChange={(_, newValue) => setSelectedTab(newValue)}\n />\n </TabsContainer>\n ) : (\n <NoTabsContainer>{emptyProductTabs}</NoTabsContainer>\n ))}\n <ContentContainer isMobile={isMobile}>\n {loading ? (\n <SpinnerContainer>{shouldShowSpinner && <NsSpinner />}</SpinnerContainer>\n ) : (\n <ProductCardCarousel\n isInitialDataLoading={isLoadingInitialData}\n entries={products}\n allEntryLabel={allEntryLabel}\n allEntryLink={allEntryLink}\n renderEntry={\n renderEntry\n ? (entry) => renderEntry({ ...entry, productStatusBadge: entry.productStatusBadge })\n : undefined\n }\n settings={settings}\n showControlButtons={showControlButtons}\n categoryName={categories[selectedTab]?.label}\n emptyProductMessage={emptyProductMessage}\n productsCountLabel={productsCountLabel}\n history={history}\n />\n )}\n </ContentContainer>\n </ProductTabCarouselContainer>\n );\n};\n\nexport default ProductTabCarousel;\n","import * as React from 'react';\nimport Tabs from '@mui/material/Tabs';\nimport Tab from '@mui/material/Tab';\nimport Box from '@mui/material/Box';\nimport PropTypes from 'prop-types';\nimport { NsCategoryNavigationContainer } from './NsCategoryNavigation.styled';\nimport { useMediaQuery } from '@mui/material';\n\nfunction TabPanel(\n props: Readonly<{\n children?: React.ReactNode;\n value: number;\n index: number;\n [key: string]: unknown;\n }>,\n) {\n const { children, value, index, ...other } = props;\n return (\n <div\n role=\"tabpanel\"\n hidden={value !== index}\n id={`vertical-tabpanel-${index}`}\n aria-labelledby={`vertical-tab-${index}`}\n {...other}\n >\n {value === index && <Box className=\"tabPanel\">{children}</Box>}\n </div>\n );\n}\nTabPanel.propTypes = {\n children: PropTypes.node,\n index: PropTypes.number.isRequired,\n value: PropTypes.number.isRequired,\n};\n\ninterface NsCategoryNavigationProps {\n itemArray: { label: string; content: React.ReactNode; categoryId: string }[];\n value?: number;\n onChange?: (event: React.SyntheticEvent, newValue: number) => void;\n}\n\nexport const NsCategoryNavigation: React.FC<Readonly<NsCategoryNavigationProps>> = ({\n itemArray,\n value: controlledValue,\n onChange,\n}) => {\n const [internalValue, setInternalValue] = React.useState(0);\n const isMobile = useMediaQuery('(max-width:768px)');\n const value = controlledValue ?? internalValue;\n const handleChange = (event: React.SyntheticEvent, newValue: number) => {\n if (onChange) {\n onChange(event, newValue);\n } else {\n setInternalValue(newValue);\n }\n };\n\n return (\n <NsCategoryNavigationContainer>\n <Box className=\"tabContainer\">\n <Tabs\n orientation={isMobile ? 'horizontal' : 'vertical'}\n variant=\"scrollable\"\n value={value}\n onChange={handleChange}\n aria-label=\"Vertical tabs example\"\n className=\"tabsStyle\"\n >\n {itemArray.map((item) => (\n <Tab key={item.categoryId} label={item.label} className=\"tabStyle\" />\n ))}\n </Tabs>\n {itemArray.map((item) => (\n <TabPanel\n key={item.categoryId}\n value={value}\n index={itemArray.findIndex((i) => i.categoryId === item.categoryId)}\n >\n {item.content}\n </TabPanel>\n ))}\n </Box>\n </NsCategoryNavigationContainer>\n );\n};\n","import { styled } from '@nuskin/foundation-theme';\nexport const NsCategoryNavigationContainer = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n width: 100%;\n height: 100%;\n background-color: #fff;\n .tabsStyle {\n display: flex;\n padding-top: 8.533px;\n flex-direction: column;\n align-items: flex-start;\n gap: 12.8px;\n border-right: 1px;\n border-color: divider;\n width: 200px;\n & .Mui-selected {\n font-weight: 700;\n font-size: 14px;\n font-family: 'inter', sans-serif;\n font-style: normal;\n font-height: 20px;\n border-radius: 4px;\n }\n & .MuiTabs-indicator {\n left: 0;\n background-color: #5b81a5;\n color: #5b81a5;\n\n @media (max-width: 768px) {\n display: none;\n }\n }\n }\n\n .tabContainer {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n min-width: 100%;\n background-color: #fff;\n @media (max-width: 768px) {\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n }\n\n .tabStyle {\n align-items: flex-start;\n display: flex;\n text-align: left;\n font-size: 14px;\n font-family: 'inter' sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n min-height: 20px;\n padding: 1px;\n padding-left: 10px;\n margin-bottom: 10px;\n cursor: pointer;\n text-transform: none;\n }\n @media (max-width: 768px) {\n flex-direction: row;\n\n .tabsStyle {\n width: 100%;\n border-right: none;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding-top: 0px;\n }\n\n .tabStyle {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 70px;\n padding: 8px 16px;\n text-align: center;\n margin: 4px;\n background-color: #fff;\n cursor: pointer;\n color: black;\n font-family: Inter;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n }\n\n .tabStyle.Mui-selected {\n background-color: #5b81a5;\n color: #ffffff !important;\n font-weight: 700;\n border-radius: 70px;\n }\n }\n .tabPanel {\n padding: 8px;\n text-align: left;\n }\n`;\n","import { styled } from '@nuskin/foundation-theme';\n\nconst getMinHeight = ({ isMobile, $hasCategories }: { isMobile?: boolean; $hasCategories?: boolean }) => {\n if (isMobile) return 'auto';\n return $hasCategories ? '800px' : 'auto';\n};\n\nexport const ProductTabCarouselContainer = styled('div')<{ isMobile?: boolean; $hasCategories?: boolean }>`\n display: flex;\n flex-direction: ${({ isMobile }) => (isMobile ? 'column' : 'row')};\n align-items: ${({ isMobile }) => (isMobile ? 'stretch' : 'flex-start')};\n width: 100%;\n max-width: 1920px;\n min-height: ${getMinHeight};\n margin: 0 auto;\n box-sizing: border-box;\n overflow: visible;\n background: #fff;\n padding: ${({ isMobile }) => (isMobile ? '10px 16px 0px 16px' : '50px 60px 0px 60px')};\n\n @media (max-width: 768px) {\n padding: 10px 16px 0px 16px;\n min-height: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n padding: 30px 40px 0px 40px;\n gap: 20px;\n }\n\n transform: translateZ(0);\n will-change: auto;\n`;\n\nexport const TabsContainer = styled('div')<{ isMobile?: boolean }>`\n min-width: ${({ isMobile }) => (isMobile ? '100%' : 'auto')};\n height: ${({ isMobile }) => (isMobile ? 'auto' : '100%')};\n flex-shrink: 0;\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n\n overflow-x: auto;\n overflow-y: visible;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: none;\n -ms-overflow-style: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-width: 200px;\n margin-right: 20px;\n }\n`;\n\nexport const ContentContainer = styled('div')<{ isMobile?: boolean }>`\n flex: 1;\n min-width: 0;\n height: ${({ isMobile }) => (isMobile ? 'auto' : '100%')};\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n min-height: 300px;\n\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-height: 400px;\n }\n\n contain: layout style paint;\n transform: translateZ(0);\n`;\n\nexport const LoadingContainer = styled('div')`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 200px;\n padding: 20px;\n\n @media (max-width: 768px) {\n min-height: 150px;\n padding: 16px;\n }\n`;\n\nexport const NoTabsContainer = styled('div')`\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 40px 20px;\n color: #666;\n font-size: 16px;\n\n @media (max-width: 768px) {\n padding: 20px 16px;\n font-size: 14px;\n }\n`;\nexport const SpinnerContainer = styled('div')`\n padding: 10px;\n display: flex;\n justify-content: center;\n`;\n","import React, { ReactElement, useState, useEffect, useMemo } from 'react';\nimport { Typography, Box, useMediaQuery, Tooltip } from '@mui/material';\nimport { NsLink, NsImage } from '@nuskin/foundation-ui-components';\nimport {\n MysiteHeroContainer,\n MysiteHeroContainerMobile,\n BadgeContainer,\n Badge,\n ToggleButtonMobile,\n StyledSpan,\n ImgTabIndex,\n ContactLink,\n BadgeValue,\n} from '@/common/headers/MysiteHero.styled';\nimport { PlaceholderImage } from '../icon/icons/PlaceholderImage';\nimport { ArrowDownIcon } from '../icon/icons/ArrowDownIcon';\nimport { trackGTMEvent } from '../utils/gtmTracking';\n\ntype MysiteHeroProps = {\n readonly imageDetails?: {\n imageSrc: string;\n imageAlt: string;\n bgColor: string;\n };\n readonly shopTitle: string;\n readonly shopDescription: string;\n readonly socialTitleText: string;\n readonly email: string;\n readonly phone: string;\n readonly className?: string;\n readonly bannerProps?: {\n backgroundColor?: string;\n headlineFont?: string;\n paragraphFont?: string;\n };\n readonly socialIcons?: {\n type: string;\n url: string;\n }[];\n readonly expirationDate?: string;\n readonly showBadges?: boolean;\n readonly totalSavings?: string;\n};\n\ntype ImageDetails = {\n imageSrc: string;\n imageAlt: string;\n bgColor: string;\n};\n\ntype BannerProps = {\n backgroundColor?: string;\n headlineFont?: string;\n paragraphFont?: string;\n};\n\ntype ContentProps = {\n shopTitle: string;\n shopDescription: string;\n socialTitleText: string;\n email: string;\n phone: string;\n showBadges: boolean;\n expirationDate?: string;\n totalSavings?: string;\n};\n\nconst renderImageContent = (imageDetails: ImageDetails | undefined, bannerProps: BannerProps, className: string) => {\n const placeholderClass = className.includes('mobile') ? 'placeholder-image-mobile' : 'placeholder-image';\n return imageDetails?.imageSrc ? (\n <ImgTabIndex tabIndex={0}>\n <NsImage className={className} src={imageDetails.imageSrc} alt={imageDetails.imageAlt} />\n </ImgTabIndex>\n ) : (\n <Box className={placeholderClass}>\n <PlaceholderImage\n width={className.includes('mobile') ? '144px' : '246px'}\n height={className.includes('mobile') ? '144px' : '246px'}\n backgroundColor={bannerProps?.backgroundColor ?? '#5F5F5F'}\n />\n </Box>\n );\n};\n\nconst renderBadges = (\n showBadges: boolean,\n expirationDate: string,\n isMobile: boolean,\n hasWhiteBackground: boolean,\n totalSavings?: string,\n) => {\n if (!showBadges || (!expirationDate && !totalSavings)) return null;\n\n const badgeClass = isMobile ? 'mobile-badge' : 'tablet-badge';\n const containerClass = isMobile ? 'mobile-badges' : 'tablet-badges';\n\n return (\n <BadgeContainer className={containerClass}>\n {totalSavings && (\n <Badge\n className={`${badgeClass} total-savings-badge`}\n hasWhiteBackground={hasWhiteBackground}\n tabIndex={0}\n >\n <BadgeValue className=\"badge-value\">{totalSavings}</BadgeValue>\n </Badge>\n )}\n {expirationDate && (\n <Badge\n className={`${badgeClass} expiration-badge`}\n hasWhiteBackground={hasWhiteBackground}\n tabIndex={0}\n >\n <BadgeValue className=\"badge-value\">{expirationDate}</BadgeValue>\n </Badge>\n )}\n </BadgeContainer>\n );\n};\n\nconst renderMobileContent = (\n props: ContentProps,\n isScrolled: boolean,\n renderSocialMediaIcons: React.ReactNode,\n isMobile: boolean,\n hasWhiteBackground: boolean,\n) => {\n const { shopTitle, socialTitleText, email, showBadges, expirationDate, phone, totalSavings } = props;\n\n return (\n <Box className=\"content-mobile\">\n <Typography component=\"h1\" tabIndex={shopTitle?.trim() ? 0 : -1} className=\"body-title-mobile\">\n {shopTitle}\n </Typography>\n {!isScrolled && (\n <>\n <Typography tabIndex={socialTitleText?.trim() ? 0 : -1} className=\"social-title-text-mobile\">\n {socialTitleText}\n </Typography>\n {email?.trim() && renderContactLink('email', email, 'email-text-mobile')}\n {phone?.trim() && renderContactLink('phone', phone, 'phone-text-mobile')}\n <Box className=\"social-icons-mobile\">{renderSocialMediaIcons}</Box>\n {renderBadges(showBadges, expirationDate ?? '', isMobile, hasWhiteBackground, totalSavings)}\n </>\n )}\n </Box>\n );\n};\n\nconst renderDesktopContent = (\n props: ContentProps,\n isScrolled: boolean,\n renderSocialMediaIcons: React.ReactNode,\n isMobile: boolean,\n hasWhiteBackground: boolean,\n) => {\n const { shopTitle, shopDescription, socialTitleText, email, phone, showBadges, expirationDate, totalSavings } =\n props;\n\n return (\n <Box className=\"content\">\n <Typography component=\"h1\" tabIndex={shopTitle?.trim() ? 0 : -1} className=\"body-title\">\n {shopTitle}\n </Typography>\n {!isScrolled && (\n <>\n {shopDescription?.length > 480 ? (\n <Tooltip title={shopDescription} arrow>\n <Typography tabIndex={shopDescription?.trim() ? 0 : -1} className=\"body-text\">\n {shopDescription}\n </Typography>\n </Tooltip>\n ) : (\n <Typography tabIndex={shopDescription?.trim() ? 0 : -1} className=\"body-text\">\n {shopDescription}\n </Typography>\n )}\n <Box className=\"social-media\">\n <Typography tabIndex={socialTitleText?.trim() ? 0 : -1} className=\"social-title-text\">\n {socialTitleText}\n </Typography>\n <Box className=\"social-icons\">\n {renderSocialMediaIcons}\n {email?.trim() && renderContactLink('email', email, 'email-text')}\n {phone?.trim() && renderContactLink('phone', phone, 'phone-text')}\n </Box>\n </Box>\n {renderBadges(showBadges, expirationDate ?? '', isMobile, hasWhiteBackground, totalSavings)}\n </>\n )}\n </Box>\n );\n};\n\nconst checkIfImageIsCircular = (url: string): Promise<boolean> => {\n return new Promise((resolve, reject) => {\n const imageContext = new Image();\n imageContext.crossOrigin = 'anonymous';\n imageContext.src = url;\n\n imageContext.onload = () => {\n const canvas = document.createElement('canvas');\n const context = canvas.getContext('2d');\n if (!context) return reject(new Error('Canvas not supported'));\n\n canvas.width = imageContext.width;\n canvas.height = imageContext.height;\n\n context.drawImage(imageContext, 0, 0);\n\n const corners = [\n context.getImageData(0, 0, 1, 1).data,\n context.getImageData(imageContext.width - 1, 0, 1, 1).data,\n context.getImageData(0, imageContext.height - 1, 1, 1).data,\n context.getImageData(imageContext.width - 1, imageContext.height - 1, 1, 1).data,\n ];\n\n const isCircular = corners.every((corner) => {\n const imageArray = Array.prototype.slice.call(corner);\n const alpha = imageArray[3];\n return alpha < 10;\n });\n resolve(isCircular);\n };\n imageContext.onerror = () => reject(new Error('Failed to load image'));\n });\n};\n\nconst isWhiteOrNearWhite = (color: string | undefined): boolean => {\n if (!color) return false;\n\n const hex = color.replace('#', '').toLowerCase();\n\n /* regex pattern for hex color format: 3 chars (#fff), 4 chars (#ffff), 6 chars (#ffffff), or 8 chars (#ffffffff)*/\n if (!/^[0-9a-f]{3,4}$|^[0-9a-f]{6}$|^[0-9a-f]{8}$/i.test(hex)) return false;\n\n let fullHex = hex;\n if (hex.length === 3 || hex.length === 4) {\n fullHex = hex\n .split('')\n .map((char) => char + char)\n .join('');\n }\n\n const r = Number.parseInt(fullHex.substring(0, 2), 16);\n const g = Number.parseInt(fullHex.substring(2, 4), 16);\n const b = Number.parseInt(fullHex.substring(4, 6), 16);\n\n const threshold = 220;\n return r >= threshold && g >= threshold && b >= threshold;\n};\n\nconst createContactClickHandler = (contactType: 'email' | 'phone', contactValue: string) => ({\n onClick: () => {\n trackGTMEvent({\n event: 'contact_click',\n contact_type: contactType,\n contact_value: contactValue,\n click_element: `${contactType}_link`,\n });\n },\n onKeyDown: (e: React.KeyboardEvent<HTMLAnchorElement>) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n trackGTMEvent({\n event: 'contact_click',\n contact_type: contactType,\n contact_value: contactValue,\n click_element: `${contactType}_link`,\n });\n globalThis.location.href = `${contactType === 'email' ? 'mailto' : 'tel'}:${contactValue}`;\n }\n },\n});\n\nconst renderContactLink = (contactType: 'email' | 'phone', contactValue: string, className: string) => {\n const protocol = contactType === 'email' ? 'mailto:' : 'tel:';\n const handlers = createContactClickHandler(contactType, contactValue);\n\n return (\n <Typography className={className}>\n <ContactLink href={`${protocol}${contactValue}`} {...handlers}>\n {contactValue}\n </ContactLink>\n </Typography>\n );\n};\nexport default function MysiteHero({\n className,\n shopTitle,\n shopDescription,\n socialTitleText,\n imageDetails,\n email,\n phone,\n bannerProps,\n socialIcons,\n expirationDate,\n showBadges = false,\n totalSavings,\n}: MysiteHeroProps): ReactElement {\n const isMobile = useMediaQuery('(max-width: 560px)');\n const [isScrolled, setIsScrolled] = useState(false);\n const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false);\n const [hasWhiteBackground, setHasWhiteBackground] = useState(false);\n const [isImageCircular, setIsImageCircular] = useState(false);\n\n const toggleDescription = () => {\n setIsDescriptionExpanded(!isDescriptionExpanded);\n };\n\n useEffect(() => {\n const checkImage = async () => {\n if (imageDetails?.imageSrc) {\n const isCircular = await checkIfImageIsCircular(imageDetails.imageSrc);\n setIsImageCircular(isCircular);\n } else {\n setIsImageCircular(false);\n }\n };\n\n checkImage();\n }, [imageDetails?.imageSrc]);\n\n useEffect(() => {\n setHasWhiteBackground(isWhiteOrNearWhite(bannerProps?.backgroundColor));\n }, [bannerProps?.backgroundColor]);\n\n useEffect(() => {\n let debounceTimeout: ReturnType<typeof setTimeout>;\n let lastScrollY = window.scrollY;\n let currentScrollState = false;\n let isTransitioning = false;\n let lastUpdateTime = 0;\n\n const updateScrollState = (newState: boolean) => {\n const now = Date.now();\n\n if (currentScrollState !== newState && !isTransitioning) {\n if (now - lastUpdateTime < 100) {\n return;\n }\n\n isTransitioning = true;\n currentScrollState = newState;\n lastUpdateTime = now;\n\n if (newState) {\n setIsDescriptionExpanded(false);\n }\n\n clearTimeout(debounceTimeout);\n setIsScrolled(newState);\n\n debounceTimeout = setTimeout(() => {\n isTransitioning = false;\n\n if (newState && window.scrollY < 15) {\n window.scrollTo({\n top: isMobile ? 20 : 30,\n behavior: 'smooth',\n });\n }\n }, 300);\n }\n };\n\n const handleScroll = () => {\n const currentScrollY = window.scrollY;\n\n if (isTransitioning) {\n lastScrollY = currentScrollY;\n return;\n }\n\n const scrollDelta = Math.abs(currentScrollY - lastScrollY);\n\n if (scrollDelta < 0.5) {\n return;\n }\n\n const scrollingDown = currentScrollY > lastScrollY;\n\n const scrollDownThreshold = isMobile ? 15 : 25;\n const scrollUpThreshold = isMobile ? 8 : 12;\n\n if (scrollingDown && currentScrollY > scrollDownThreshold && !currentScrollState) {\n updateScrollState(true);\n } else if (!scrollingDown && currentScrollY < scrollUpThreshold && currentScrollState) {\n updateScrollState(false);\n }\n\n lastScrollY = currentScrollY;\n };\n\n const initializeState = () => {\n const initialScrollY = window.scrollY;\n const scrollThreshold = isMobile ? 5 : 10;\n const shouldStartCompact = initialScrollY > scrollThreshold;\n\n currentScrollState = shouldStartCompact;\n setIsScrolled(shouldStartCompact);\n lastScrollY = initialScrollY;\n lastUpdateTime = Date.now();\n };\n\n let rafId: number | null = null;\n let lastRafTime = 0;\n const throttledScrollHandler = () => {\n if (rafId) return;\n\n const now = Date.now();\n if (now - lastRafTime < 16) {\n return;\n }\n\n rafId = requestAnimationFrame(() => {\n handleScroll();\n lastRafTime = Date.now();\n rafId = null;\n });\n };\n\n initializeState();\n window.addEventListener('scroll', throttledScrollHandler, { passive: true });\n\n return () => {\n window.removeEventListener('scroll', throttledScrollHandler);\n if (rafId) cancelAnimationFrame(rafId);\n clearTimeout(debounceTimeout);\n };\n }, [isMobile]);\n\n const renderSocialMediaIcons = useMemo(() => {\n return socialIcons?.map((icon, index) => {\n const handleSocialClick = (e: React.MouseEvent) => {\n e.preventDefault();\n trackGTMEvent({\n event: 'social_click',\n social_platform: icon.type,\n social_url: icon.url,\n click_element: 'social_icon',\n });\n window.open(icon.url, '_blank');\n };\n\n return (\n <StyledSpan key={icon?.type + index} onClick={handleSocialClick}>\n <NsLink href={icon.url} target=\"_blank\">\n <NsImage\n key={icon?.type + index}\n src={`https://www.google.com/s2/favicons?domain=${icon?.url}&sz=24`}\n alt={`${icon.type} icon`}\n width=\"24\"\n height=\"24\"\n />\n </NsLink>\n </StyledSpan>\n );\n });\n }, [socialIcons]);\n\n const containerClass = `${className} ${isScrolled ? 'scrolled' : ''}`;\n const props = {\n shopTitle,\n shopDescription,\n socialTitleText,\n email,\n phone,\n showBadges,\n expirationDate,\n totalSavings,\n };\n\n const getCharacterLimit = () => {\n if (window.innerWidth <= 380) return 50;\n if (window.innerWidth <= 415) return 56;\n if (window.innerWidth <= 460) return 62;\n return 80;\n };\n\n const shouldShowToggle = isMobile && shopDescription && shopDescription.length > getCharacterLimit();\n\n return isMobile ? (\n <MysiteHeroContainerMobile\n className={containerClass}\n data-testid=\"my-site-shop-header\"\n bannerProps={bannerProps}\n isCircularImage={isImageCircular}\n hasWhiteBackground={hasWhiteBackground}\n >\n <Box className=\"image-content-mobile\">\n {renderImageContent(imageDetails, bannerProps ?? {}, 'bg-image-mobile')}\n {renderMobileContent(props, isScrolled, renderSocialMediaIcons, isMobile, hasWhiteBackground)}\n </Box>\n {!isScrolled && (\n <Box className=\"expandable-description-mobile\">\n <Typography\n className={`description-content-mobile ${isDescriptionExpanded || !shouldShowToggle ? 'expanded' : 'collapsed'}`}\n >\n {shopDescription}\n </Typography>\n {shouldShowToggle && (\n <ToggleButtonMobile onClick={toggleDescription}>\n <ArrowDownIcon\n width={16}\n height={16}\n className={`arrow-icon-mobile ${isDescriptionExpanded ? 'expanded' : ''}`}\n />\n </ToggleButtonMobile>\n )}\n </Box>\n )}\n </MysiteHeroContainerMobile>\n ) : (\n <MysiteHeroContainer\n className={containerClass}\n data-testid=\"my-site-shop-header\"\n bannerProps={bannerProps}\n isCircularImage={isImageCircular}\n hasWhiteBackground={hasWhiteBackground}\n >\n {renderImageContent(imageDetails, bannerProps ?? {}, 'bg-image')}\n {renderDesktopContent(props, isScrolled, renderSocialMediaIcons, isMobile, hasWhiteBackground)}\n </MysiteHeroContainer>\n );\n}\n","import React from 'react';\nimport { styled } from '@nuskin/foundation-theme';\nimport { Box, BoxProps } from '@mui/material';\n\ninterface StyledBoxProps extends BoxProps {\n bannerProps?: {\n backgroundColor?: string;\n headlineFont?: string;\n paragraphFont?: string;\n };\n isCircularImage?: boolean;\n hasWhiteBackground?: boolean;\n}\n\ninterface BadgeProps extends BoxProps {\n hasWhiteBackground?: boolean;\n}\n\nconst getContactTextStyles = (hasWhiteBackground: boolean | undefined) => ({\n fontSize: '12px',\n fontStyle: 'normal' as const,\n fontWeight: '600',\n lineHeight: '16px',\n letterSpacing: '0.12px',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n '& a': {\n color: 'inherit',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n});\n\nconst getSocialTitleStyles = (hasWhiteBackground: boolean | undefined) => ({\n fontSize: '12px',\n fontStyle: 'normal' as const,\n fontWeight: '700',\n lineHeight: '16px',\n letterSpacing: '0.48px',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n textTransform: 'uppercase' as const,\n paddingLeft: '5px',\n});\n\nconst getSocialIconsStyles = () => ({\n display: 'flex',\n flexDirection: 'row' as const,\n gap: '10px',\n alignItems: 'center',\n});\n\nconst getContactTextMobileStyles = (hasWhiteBackground: boolean | undefined) => ({\n ...getContactTextStyles(hasWhiteBackground),\n paddingBottom: '11px',\n wordBreak: 'break-all' as const,\n overflowWrap: 'break-word' as const,\n paddingLeft: '5px',\n '& a': {\n color: 'inherit',\n textDecoration: 'none',\n },\n '@media (max-width: 420px)': {\n fontSize: '11px',\n lineHeight: '15px',\n paddingBottom: '8px',\n },\n '@media (max-width: 400px)': {\n fontSize: '10px',\n lineHeight: '14px',\n paddingBottom: '6px',\n },\n '@media (max-width: 375px)': {\n fontSize: '8px',\n lineHeight: '12px',\n paddingBottom: '4px',\n },\n});\n\nconst getSocialTitleMobileStyles = (hasWhiteBackground: boolean | undefined) => ({\n ...getSocialTitleStyles(hasWhiteBackground),\n marginBottom: '11px',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n '@media (max-width: 420px)': {\n fontSize: '11px',\n lineHeight: '14px',\n marginBottom: '8px',\n },\n '@media (max-width: 400px)': {\n fontSize: '10px',\n lineHeight: '12px',\n marginBottom: '5px',\n },\n '@media (max-width: 375px)': {\n fontSize: '8px',\n lineHeight: '11px',\n marginBottom: '4px',\n },\n});\n\nexport const MysiteHeroContainer = styled((props: StyledBoxProps) => <Box {...props} />)(\n ({ bannerProps, isCircularImage, hasWhiteBackground }) => ({\n backgroundClip: 'border-box',\n display: 'flex',\n background: bannerProps?.backgroundColor ?? '#383838',\n position: 'relative',\n overflow: 'hidden',\n width: '100%',\n height: 'auto',\n flexDirection: 'row',\n alignItems: 'center',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'transform, opacity',\n transform: 'translateZ(0)',\n backfaceVisibility: 'hidden',\n '&.scrolled': {\n top: 0,\n left: 0,\n right: 0,\n boxShadow: '0 2px 8px rgba(0,0,0,0.2)',\n '.content': {\n paddingTop: '0',\n justifyContent: 'center',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.body-title': {\n fontSize: '26px',\n lineHeight: '34px',\n marginBottom: '0',\n fontStyle: 'normal',\n fontWeight: '400',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n\n '.bg-image': {\n width: '90px',\n height: '90px',\n padding: isCircularImage ? '2px' : '0px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n objectFit: 'cover',\n objectPosition: 'center',\n },\n '.placeholder-image': {\n '& > div': {\n width: '90px',\n height: '90px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n },\n },\n '.content': {\n width: '70%',\n height: '100%',\n marginLeft: '2%',\n marginRight: 'auto',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n boxSizing: 'border-box',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.bg-image': {\n width: '252px',\n height: '252px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n padding: isCircularImage ? '3px' : '0px',\n objectFit: 'cover',\n objectPosition: 'center',\n },\n '.placeholder-image': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n '& > div': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n },\n '.body-title': {\n fontSize: '32px',\n lineHeight: '38px',\n marginBottom: '8px',\n fontWeight: '400',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n paddingLeft: '5px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.body-text': {\n fontSize: '16px',\n marginBottom: '12px',\n fontStyle: 'normal',\n fontWeight: '400',\n lineHeight: '22px',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontFamily: bannerProps?.paragraphFont ?? 'inherit',\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n WebkitLineClamp: 3,\n textOverflow: 'ellipsis',\n paddingLeft: '5px',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n },\n '.social-media': {\n display: 'flex',\n flexDirection: 'column',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n },\n '.email-text': getContactTextStyles(hasWhiteBackground),\n '.phone-text': getContactTextStyles(hasWhiteBackground),\n '.social-title-text': {\n ...getSocialTitleStyles(hasWhiteBackground),\n marginBottom: '8px',\n },\n '.social-icons': {\n ...getSocialIconsStyles(),\n paddingBottom: '8px',\n },\n }),\n);\n\nexport const MysiteHeroContainerMobile = styled((props: StyledBoxProps) => <Box {...props} />)(\n ({ bannerProps, isCircularImage, hasWhiteBackground }) => ({\n backgroundClip: 'border-box',\n display: 'flex',\n background: bannerProps?.backgroundColor ?? '#383838',\n position: 'relative',\n overflow: 'hidden',\n width: '100%',\n flexDirection: 'column',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'transform, opacity',\n transform: 'translateZ(0)',\n backfaceVisibility: 'hidden',\n '&.scrolled': {\n top: 0,\n left: 0,\n right: 0,\n boxShadow: '0 2px 8px rgba(0,0,0,0.2)',\n '.content-mobile': {\n paddingTop: '5px',\n width: '60%',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.body-title-mobile': {\n fontSize: '18px',\n lineHeight: '28px',\n marginBottom: '0',\n fontStyle: 'normal',\n fontWeight: '400',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.bg-image-mobile': {\n width: '75px',\n height: '75px',\n padding: isCircularImage ? '2px' : '0px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n objectFit: 'cover',\n objectPosition: 'center',\n },\n '.placeholder-image-mobile': {\n '& > div': {\n width: '75px !important',\n height: '75px !important',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n },\n },\n '.image-content-mobile': {\n display: 'flex',\n flexDirection: 'row',\n width: '100%',\n justifyContent: 'center',\n alignItems: 'center',\n },\n '.content-mobile': {\n width: '55%',\n height: '100%',\n paddingTop: '10px',\n paddingRight: '10px',\n marginLeft: '8px',\n marginRight: 'auto',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n '@media (max-width: 420px)': {\n paddingTop: '8px',\n width: '100%',\n },\n '@media (max-width: 400px)': {\n paddingTop: '6px',\n width: '100%',\n height: '100%',\n },\n '@media (max-width: 375px)': {\n paddingTop: '4px',\n width: '100%',\n height: '100%',\n },\n },\n '.bg-image-mobile': {\n width: '144px',\n height: '144px',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n objectFit: 'cover',\n objectPosition: 'center',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n padding: isCircularImage ? '2px' : '0px',\n '@media (max-width: 420px)': {\n width: '120px',\n height: '120px',\n },\n '@media (max-width: 400px)': {\n width: '112px',\n height: '112px',\n },\n '@media (max-width: 375px)': {\n width: '90px',\n height: '90px',\n },\n },\n '.placeholder-image-mobile': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n '& > div': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n width: '144px',\n height: '144px',\n '@media (max-width: 420px)': {\n width: '120px',\n height: '120px',\n },\n '@media (max-width: 400px)': {\n width: '110px !important',\n height: '110px !important',\n },\n '@media (max-width: 375px)': {\n width: '90px',\n height: '90px',\n },\n },\n },\n '.body-title-mobile': {\n fontSize: '22px',\n lineHeight: '28px',\n marginBottom: '13px',\n fontWeight: '400',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontStyle: 'normal',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n paddingLeft: '5px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n '@media (max-width: 420px)': {\n fontSize: '16px',\n lineHeight: '24px',\n marginBottom: '8px',\n },\n '@media (max-width: 400px)': {\n fontSize: '16px',\n lineHeight: '22px',\n marginBottom: '6px',\n },\n '@media (max-width: 375px)': {\n fontSize: '14px',\n lineHeight: '20px',\n marginBottom: '4px',\n },\n },\n '.body-text-mobile': {\n fontSize: '14px',\n padding: '20px 25px 20px 25px',\n fontStyle: 'normal',\n fontWeight: '400',\n lineHeight: '20px',\n color: '#252525',\n backgroundColor: '#E0E0E0',\n fontFamily: bannerProps?.paragraphFont ?? 'inherit',\n transition: 'all 0.25s cubic-bezier(0.4, 0, 0.2, 1)',\n opacity: 1,\n transform: 'translateY(0)',\n },\n '.expandable-description-mobile': {\n backgroundColor: '#E0E0E0',\n position: 'relative',\n },\n '.description-content-mobile': {\n fontSize: '14px',\n padding: '10px 15px',\n fontStyle: 'normal',\n fontWeight: '400',\n lineHeight: '20px',\n color: '#252525',\n fontFamily: bannerProps?.paragraphFont ?? 'inherit',\n transition: 'max-height 0.3s ease-in-out, opacity 0.3s ease-in-out',\n overflow: 'hidden',\n position: 'relative',\n '&.collapsed': {\n maxHeight: '50px',\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n height: '20px',\n background: 'linear-gradient(transparent, rgba(224, 224, 224, 0.8), #E0E0E0)',\n pointerEvents: 'none',\n },\n },\n '&.expanded': {\n maxHeight: 'none',\n whiteSpace: 'normal',\n display: 'block',\n '&::after': {\n display: 'none',\n },\n },\n },\n '.email-text-mobile': getContactTextMobileStyles(hasWhiteBackground),\n '.phone-text-mobile': getContactTextMobileStyles(hasWhiteBackground),\n '.social-title-text-mobile': getSocialTitleMobileStyles(hasWhiteBackground),\n '.social-icons-mobile': {\n ...getSocialIconsStyles(),\n paddingBottom: '10px',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n '& img': {\n width: '24px',\n height: '24px',\n '@media (max-width: 400px)': {\n width: '20px',\n height: '20px',\n },\n '@media (max-width: 375px)': {\n width: '18px',\n height: '18px',\n },\n },\n '@media (max-width: 420px)': {\n paddingBottom: '8px',\n },\n '@media (max-width: 400px)': {\n paddingBottom: '4px',\n },\n '@media (max-width: 375px)': {\n paddingBottom: '3px',\n },\n },\n }),\n);\n\nexport const BadgeContainer = styled(Box)({\n display: 'flex',\n gap: '12px',\n marginBottom: '16px',\n paddingLeft: '5px',\n\n '&.mobile-badges': {\n flexDirection: 'column',\n gap: '8px',\n marginBottom: '12px',\n },\n\n '&.tablet-badges': {\n flexDirection: 'row',\n gap: '12px',\n marginBottom: '8px',\n },\n});\n\nexport const Badge = styled((props: BadgeProps) => <Box {...props} />)(({ hasWhiteBackground }) => ({\n backgroundColor: 'rgba(255, 255, 255, 0.2)',\n backdropFilter: 'blur(10px)',\n borderRadius: '20px',\n padding: '8px 16px',\n display: 'flex',\n alignItems: 'center',\n gap: '4px',\n border: '1px solid rgba(255, 255, 255, 0.3)',\n transition: 'all 0.3s ease',\n\n '&.mobile-badge': {\n padding: '6px 12px',\n borderRadius: '16px',\n fontSize: '12px',\n },\n\n '&.tablet-badge': {\n padding: '8px 16px',\n borderRadius: '20px',\n fontSize: '14px',\n },\n\n '&.total-savings-badge': {\n backgroundColor: '#4A6987',\n border: 'none',\n borderRadius: '8px',\n padding: '8px 16px',\n gap: '4px',\n minHeight: '32px',\n backdropFilter: 'none',\n '.badge-value': {\n color: '#FFFFFF',\n },\n '&:hover': {\n backgroundColor: '#4A6987',\n transform: 'none',\n boxShadow: 'none',\n },\n },\n\n '&.expiration-badge': {\n borderRadius: '8px',\n padding: '8px 16px',\n gap: '4px',\n minHeight: '32px',\n },\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.3)',\n transform: 'translateY(-1px)',\n boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',\n },\n\n '.badge-text': {\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontWeight: '400',\n opacity: 0.9,\n },\n\n '.badge-value': {\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontWeight: '600',\n },\n}));\nexport const ToggleButtonMobile = styled('button')({\n backgroundColor: '#E0E0E0',\n border: '1px solid #252525',\n borderRadius: '10px',\n cursor: 'pointer',\n width: '40px',\n height: '20px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n margin: '10px auto 5px auto',\n transition: 'all 0.2s ease',\n '& .arrow-icon-mobile': {\n transition: 'transform 0.3s ease',\n '&.expanded': {\n transform: 'rotate(180deg)',\n },\n },\n});\nexport const StyledSpan = styled(Box)`\n background: none;\n border: 2px solid transparent;\n cursor: pointer;\n padding: 2px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n transition: all 0.3s ease;\n\n &:hover {\n transform: scale(1.1);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n\n &:focus,\n &:focus-within {\n outline: none;\n border-color: #007bff;\n box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);\n }\n\n &:hover svg {\n fill: #ffffff;\n }\n`;\nexport const ImgTabIndex = styled('span')`\n line-height: 0.5;\n`;\n\nexport const ContactLink = styled('a')({\n fontSize: 'inherit',\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit',\n color: 'inherit',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n});\n\nexport const BadgeValue = styled('span')({});\n","import React from 'react';\nimport { Box } from '@mui/material';\n\ntype PlaceholderImageProps = {\n readonly width: string | number;\n readonly height: string | number;\n readonly backgroundColor: string;\n};\n\nexport const PlaceholderImage: React.FC<PlaceholderImageProps> = ({ width, height, backgroundColor }) => {\n return (\n <Box\n sx={{\n width,\n height,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor,\n }}\n data-testid=\"placeholder-image\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"128\" height=\"129\" viewBox=\"0 0 128 129\" fill=\"none\">\n <g id=\"ns_logomark\">\n <path\n id=\"Vector\"\n d=\"M127.495 52.1946C125.663 47.9538 122.999 44.1171 119.661 40.9073C112.565 34.2835 102.562 31.7037 93.1175 34.0622C83.6733 36.4206 76.0882 43.3926 72.991 52.5619C71.4142 56.8414 70.6063 61.3627 70.6039 65.9196C70.6039 85.8227 70.6039 105.737 70.6039 125.662C70.6039 129.001 70.6039 129.001 66.9051 128.834C66.9051 128.2 66.9051 127.499 66.9051 126.831C66.9051 104.323 66.9051 81.8263 66.9051 59.3409C66.3415 45.3064 74.9302 32.5039 88.1888 27.6164C89.79 27.0612 91.4307 26.6259 93.0981 26.314C94.7114 25.98 96.4605 25.8465 98.0738 25.6461C96.0231 16.3291 78.9419 5.60953 65.0889 4.97504C50.3084 4.62252 36.6074 12.6365 29.7509 25.6461C31.331 25.8465 32.8779 25.9466 34.3569 26.2138C48.0999 28.544 58.7086 39.4998 60.5168 53.2298C60.8904 55.7285 61.0812 58.2508 61.0877 60.7769C61.0877 82.7507 61.0877 104.724 61.0877 126.697C61.0877 128.434 60.6842 129.169 58.8016 128.968C56.9183 128.768 57.1204 128.2 57.1204 126.965C57.1204 119.985 57.1204 113.006 57.1204 105.993C57.1204 92.1674 57.1204 78.3423 57.1204 64.5171C57.2385 56.3928 54.2457 48.5271 48.7477 42.5103C42.2429 35.5282 32.6539 32.2371 23.1959 33.7401C13.7379 35.243 5.66194 41.3411 1.67448 49.9906C1.23781 50.8254 0.867444 51.6937 0.262573 52.9293C5.79294 22.3996 32.4752 0.139867 63.7085 0.000656323C94.9411 -0.138555 121.824 21.8824 127.629 52.3616\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_2\"\n d=\"M86.0995 124.927C86.0995 124.293 86.0995 123.858 86.0995 123.425C86.0995 111.669 86.0995 100.049 86.0995 88.1269C85.8836 82.4231 88.0775 76.89 92.1523 72.8653C97.3131 67.9567 104.984 66.7091 111.452 69.7263C117.892 72.1185 122.166 78.225 122.178 85.0541C122.372 92.1747 119.781 99.0921 114.949 104.356C107.882 113.237 98.6134 120.141 88.05 124.392C87.4217 124.616 86.782 124.805 86.1335 124.96\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_3\"\n d=\"M41.8183 125.395C37.6149 123.224 33.6477 121.487 29.9828 119.25C21.5405 114.299 14.4778 107.331 9.43828 98.9796C6.53442 94.3985 5.34408 88.9493 6.07591 83.5852C7.056 75.2882 13.8859 68.8841 22.2829 68.3905C31.1231 67.2473 39.3527 73.0751 41.1455 81.7484C41.76 84.263 42.0762 86.8411 42.0868 89.4287C42.0868 100.516 42.0868 111.636 42.0868 122.823C42.0868 123.457 42.0867 124.059 41.8854 125.294\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_4\"\n d=\"M51.3337 127.431C47.9713 127.431 47.6681 127.198 47.6681 124.326V76.6386C48.1096 67.937 42.9747 59.906 34.8574 56.602C25.8992 52.8557 15.5485 54.8615 8.66523 61.6779C4.28638 66.6086 1.89197 72.9696 1.94049 79.5438C1.95423 80.2444 1.78037 80.9357 1.43588 81.5476C1.06552 79.9446 0.62885 78.2081 0.426687 76.7387C-0.724024 70.4463 0.471163 63.9529 3.78906 58.472C6.09291 54.6111 9.65016 51.6434 13.8762 50.0567C22.8587 46.555 32.9393 47.1785 41.4148 51.7598C47.6592 54.8694 51.5262 61.2882 51.3337 68.2232C51.5019 87.6249 51.3337 107.027 51.3337 126.396C51.3337 126.797 51.3337 127.164 51.3337 127.532\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_5\"\n d=\"M76.287 127.499V125.094C76.287 107.196 76.4883 89.2963 76.287 71.3966C76.0848 56.9034 84.2554 50.6588 95.7553 48.3545C101.535 47.2005 107.524 47.6393 113.071 49.6235C122.914 53.3319 128.994 63.1725 127.866 73.5672C127.631 76.2831 127.17 78.975 126.487 81.6151C125.916 78.2758 125.68 74.9364 124.772 71.597C122.808 64.3002 117.377 58.4174 110.228 55.8421C103.078 53.2668 95.1132 54.3239 88.8955 58.6734C83.0441 62.6207 79.7011 69.3237 80.086 76.3389C80.086 92.2349 80.086 108.131 80.086 124.026C80.086 127.366 80.086 127.366 76.2198 127.366\"\n fill=\"#252525\"\n />\n </g>\n </svg>\n </Box>\n );\n};\n","import React from 'react';\n\ntype ArrowDownIconProps = {\n readonly width?: string | number;\n readonly height?: string | number;\n readonly className?: string;\n};\n\nexport const ArrowDownIcon: React.FC<ArrowDownIconProps> = ({ width = 16, height = 16, className = '' }) => {\n return (\n <svg\n width={width}\n height={height}\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className={className}\n data-testid=\"arrow-down-icon\"\n >\n <path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\" />\n </svg>\n );\n};\n","export interface GTMEvent {\n event: string;\n\n [key: string]: unknown;\n}\n\ndeclare global {\n interface Window {\n dataLayer: unknown[];\n }\n}\n\nexport function trackGTMEvent(eventData: GTMEvent): void {\n if (typeof window === 'undefined') {\n return;\n }\n\n const url = window.location.href;\n const updatedEventData = { ...eventData };\n\n const prefix = url.includes('personal-offer') ? 'postorefront_' : 'mysite_';\n updatedEventData.event = prefix + eventData.event;\n\n try {\n if (window.dataLayer) {\n window.dataLayer.push(updatedEventData);\n } else {\n console.error('GTM dataLayer not available, but event logged');\n window.dataLayer = [];\n window.dataLayer.push(updatedEventData);\n }\n } catch (error) {\n console.error('Failed to track GTM event:', error);\n }\n}\n","import { styled } from '@nuskin/foundation-theme';\n\nexport const DashboardContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 24px;\n }\n\n @media (min-width: 1080px) {\n padding: 32px;\n }\n`;\n\nexport const StatsRow = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`;\n\nexport const WidgetContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n gap: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`;\n\nexport const TwoColumnGrid = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: repeat(2, 1fr);\n gap: 24px;\n }\n`;\n\nexport const ErrorContainer = styled('div')`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;\n","import React from 'react';\nimport CalendarTodayIcon from '@mui/icons-material/CalendarToday';\nimport PublicIcon from '@mui/icons-material/Public';\nimport { NsSpinner } from '@nuskin/foundation-ui-components';\nimport {\n HeaderContainer,\n TitleSection,\n ShopTitle,\n DateRangeLabel,\n FiltersSection,\n FilterDropdownContainer,\n FilterLabel,\n StyledSelect,\n FilterIcon,\n LoadingIndicatorContainer,\n DesktopFiltersContainer,\n} from './DashboardHeader.styled';\nimport type { DateRangeOption, MarketOption, MarketFilterOption, DashboardStats } from '../types.d';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport { useMarketOptions } from '../utils/marketOptions';\n\nexport interface DashboardHeaderProps {\n readonly shopTitle?: string;\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly dateRangeLabel?: string;\n readonly isLoading?: boolean;\n readonly stats?: DashboardStats | null;\n\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n}\n\nexport const DashboardHeader: React.FC<DashboardHeaderProps> = ({\n shopTitle,\n dateRange,\n market,\n dateRangeLabel: dateRangeLabelProp,\n isLoading = false,\n stats,\n markets,\n onDateRangeChange,\n onMarketChange,\n}) => {\n const marketOptions = useMarketOptions(markets);\n\n const handleDateRangeChange = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newDateRange = event.target.value as DateRangeOption;\n onDateRangeChange?.(newDateRange);\n };\n\n const handleMarketChange = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newMarket = event.target.value;\n onMarketChange?.(newMarket);\n };\n\n const handleFilterKeyDown = (event: React.KeyboardEvent<HTMLSelectElement>) => {\n if (event.key === 'Escape') {\n (event.target as HTMLSelectElement).blur();\n }\n };\n\n const getDateRangeLabelText = () => {\n if (dateRangeLabelProp) return dateRangeLabelProp;\n if (stats?.dateRange) return stats.dateRange.label;\n return getTranslation(Keys.filter.dateRange.last30days);\n };\n\n return (\n <HeaderContainer as=\"header\" data-testid=\"dashboard-header\">\n <TitleSection>\n <ShopTitle data-testid=\"dashboard-shop-title\">\n {shopTitle ?? stats?.shopTitle ?? getTranslation(Keys.title)}\n </ShopTitle>\n <DateRangeLabel aria-live=\"polite\" data-testid=\"dashboard-date-range-label\">\n {getDateRangeLabelText()}\n </DateRangeLabel>\n </TitleSection>\n\n <FiltersSection\n aria-label={getTranslation(Keys.ariaLabel.dashboardFilters)}\n data-testid=\"dashboard-filters-section\"\n >\n <DesktopFiltersContainer>\n {isLoading && (\n <LoadingIndicatorContainer\n as=\"output\"\n aria-live=\"polite\"\n aria-label={getTranslation(Keys.ariaLabel.loadingDashboard)}\n data-testid=\"dashboard-loading-indicator\"\n >\n <NsSpinner />\n </LoadingIndicatorContainer>\n )}\n\n <FilterDropdownContainer>\n <FilterLabel htmlFor=\"filter-date-range\">\n {getTranslation(Keys.filter.dateRangeLabel)}\n </FilterLabel>\n <FilterIcon aria-hidden=\"true\">\n <CalendarTodayIcon />\n </FilterIcon>\n <StyledSelect\n id=\"filter-date-range\"\n data-testid=\"filter-date-range\"\n value={dateRange}\n onChange={handleDateRangeChange}\n onKeyDown={handleFilterKeyDown}\n disabled={isLoading}\n aria-label={`${getTranslation(Keys.ariaLabel.dateRangeFilter)} ${getTranslation(Keys.filter.dateRange[dateRange])}`}\n >\n <option value=\"last7days\">{getTranslation(Keys.filter.dateRange.last7days)}</option>\n <option value=\"last30days\">{getTranslation(Keys.filter.dateRange.last30days)}</option>\n <option value=\"last90days\">{getTranslation(Keys.filter.dateRange.last90days)}</option>\n <option value=\"thisMonth\">{getTranslation(Keys.filter.dateRange.thisMonth)}</option>\n </StyledSelect>\n </FilterDropdownContainer>\n\n <FilterDropdownContainer>\n <FilterLabel htmlFor=\"filter-market\">{getTranslation(Keys.filter.marketLabel)}</FilterLabel>\n <FilterIcon aria-hidden=\"true\">\n <PublicIcon />\n </FilterIcon>\n <StyledSelect\n id=\"filter-market\"\n data-testid=\"filter-market\"\n value={market}\n onChange={handleMarketChange}\n onKeyDown={handleFilterKeyDown}\n disabled={isLoading}\n aria-label={`${getTranslation(Keys.ariaLabel.marketFilter)} ${\n marketOptions.find((opt) => opt.value === market)?.label ?? String(market)\n }`}\n >\n {marketOptions.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </StyledSelect>\n </FilterDropdownContainer>\n </DesktopFiltersContainer>\n </FiltersSection>\n </HeaderContainer>\n );\n};\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const HeaderContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 12px;\n min-height: 64px;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 24px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px 32px;\n }\n`;\n\nexport const TitleSection = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: baseline;\n gap: 12px;\n flex-wrap: wrap;\n`;\n\nexport const ShopTitle = styled('h1')`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n\n @media (min-width: 1080px) {\n font-size: 16px;\n }\n`;\n\nexport const DateRangeLabel = styled('div')`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`;\n\nexport const FiltersSection = styled('div')`\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: center;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n width: auto;\n }\n`;\n\nexport const FilterDropdownContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n position: relative;\n`;\n\nexport const FilterLabel = styled('label')`\n font-size: 14px;\n font-weight: 500;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N80')};\n white-space: nowrap;\n display: none;\n\n @media (min-width: 1080px) {\n display: block;\n }\n`;\n\nexport const StyledSelect = styled('select')`\n display: flex;\n align-items: center;\n gap: 12px;\n height: 40px;\n padding: 8px 12px;\n background-color: transparent;\n border: none;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n appearance: none;\n background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3e%3cpath d=\"M5.625 7.3125L9 10.6875L12.375 7.3125\" stroke=\"%235f5f5f\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/%3e%3c/svg%3e');\n background-repeat: no-repeat;\n background-position: right 8px center;\n padding-right: 32px;\n min-width: auto;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n @media (min-width: 768px) {\n min-width: 160px;\n }\n\n @media (min-width: 1080px) {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N10')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 8px;\n min-width: 180px;\n }\n`;\n\nexport const FilterIcon = styled('span')`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n svg {\n width: 16px;\n height: 16px;\n }\n`;\n\nexport const LoadingIndicatorContainer = styled('div')`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n overflow: hidden;\n\n svg,\n img,\n > * {\n width: 28px !important;\n height: 28px !important;\n max-width: 28px;\n max-height: 28px;\n }\n`;\n\nexport const DesktopFiltersContainer = styled('div')`\n display: flex;\n flex-wrap: wrap;\n gap: 16px;\n align-items: center;\n width: 100%;\n\n @media (min-width: 768px) {\n width: auto;\n }\n`;\n\nexport const StyledCircularProgress = styled('div')`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n","export type TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport type TranslateFn = (key: string, fallback: string) => string;\n\nlet activeResolver: TranslateFn | undefined;\n\nexport function setTranslationResolver(resolver: TranslateFn | undefined): void {\n activeResolver = resolver;\n}\n\nexport function getTranslationResolver(): TranslateFn | undefined {\n return activeResolver;\n}\n\nexport function resolveTranslation(entry: TranslationEntry): string {\n if (!activeResolver) {\n return entry.fallback;\n }\n let result: string | undefined;\n try {\n result = activeResolver(entry.key, entry.fallback);\n } catch {\n result = undefined;\n }\n return typeof result === 'string' && result.length > 0 ? result : entry.fallback;\n}\n","import { resolveTranslation } from './translationResolver';\n\nexport const ShoppingDashboardTranslationKeys = {\n title: {\n key: 'shoppingDashboard.title',\n fallback: 'Shop Performance',\n },\n error: {\n key: 'shoppingDashboard.error',\n fallback: 'Error loading dashboard',\n },\n stats: {\n revenue: {\n key: 'shoppingDashboard.stats.revenue',\n fallback: 'Total Revenue',\n },\n volume: {\n key: 'shoppingDashboard.stats.volume',\n fallback: 'Volume',\n },\n visits: {\n key: 'shoppingDashboard.stats.visits',\n fallback: 'Site Visits',\n },\n subtitle: {\n dcSv: {\n key: 'shoppingDashboard.stats.subtitle.dcSv',\n fallback: 'DC-SV',\n },\n conversionRate: {\n key: 'shoppingDashboard.stats.subtitle.conversionRate',\n fallback: 'Conversion Rate',\n },\n },\n trend: {\n increased: {\n key: 'shoppingDashboard.stats.trend.increased',\n fallback: 'increased',\n },\n decreased: {\n key: 'shoppingDashboard.stats.trend.decreased',\n fallback: 'decreased',\n },\n unchanged: {\n key: 'shoppingDashboard.stats.trend.unchanged',\n fallback: 'unchanged',\n },\n },\n details: {\n key: 'shoppingDashboard.stats.details',\n fallback: 'details',\n },\n },\n filter: {\n dateRange: {\n label: {\n key: 'shoppingDashboard.filter.dateRange.label',\n fallback: 'Date Range',\n },\n last7days: {\n key: 'shoppingDashboard.filter.dateRange.last7days',\n fallback: 'Last 7 Days',\n },\n last30days: {\n key: 'shoppingDashboard.filter.dateRange.last30days',\n fallback: 'Last 30 Days',\n },\n last90days: {\n key: 'shoppingDashboard.filter.dateRange.last90days',\n fallback: 'Last 90 Days',\n },\n thisMonth: {\n key: 'shoppingDashboard.filter.dateRange.thisMonth',\n fallback: 'This Month',\n },\n },\n dateRangeLabel: {\n key: 'shoppingDashboard.filter.dateRangeLabel',\n fallback: 'Date Range',\n },\n market: {\n label: {\n key: 'shoppingDashboard.filter.market.label',\n fallback: 'Market',\n },\n all: {\n key: 'shoppingDashboard.filter.market.all',\n fallback: 'All Markets',\n },\n },\n marketLabel: {\n key: 'shoppingDashboard.filter.marketLabel',\n fallback: 'Market',\n },\n productSort: {\n label: {\n key: 'shoppingDashboard.filter.productSort.label',\n fallback: 'Sort By',\n },\n units: {\n key: 'shoppingDashboard.filter.productSort.units',\n fallback: 'Units',\n },\n revenue: {\n key: 'shoppingDashboard.filter.productSort.revenue',\n fallback: 'Revenue',\n },\n volume: {\n key: 'shoppingDashboard.filter.productSort.volume',\n fallback: 'Volume',\n },\n byUnits: {\n key: 'shoppingDashboard.filter.productSort.byUnits',\n fallback: 'By: Units',\n },\n byRevenue: {\n key: 'shoppingDashboard.filter.productSort.byRevenue',\n fallback: 'By: Revenue',\n },\n byVolume: {\n key: 'shoppingDashboard.filter.productSort.byVolume',\n fallback: 'By: Volume',\n },\n },\n signupView: {\n label: {\n key: 'shoppingDashboard.filter.signupView.label',\n fallback: 'Show',\n },\n all: {\n key: 'shoppingDashboard.filter.signupView.all',\n fallback: 'All',\n },\n members: {\n key: 'shoppingDashboard.filter.signupView.members',\n fallback: 'Members',\n },\n retail: {\n key: 'shoppingDashboard.filter.signupView.retail',\n fallback: 'Retail',\n },\n brandAffiliates: {\n key: 'shoppingDashboard.filter.signupView.brandAffiliates',\n fallback: 'Brand Affiliates',\n },\n showAll: {\n key: 'shoppingDashboard.filter.signupView.showAll',\n fallback: 'Show: All',\n },\n showMembers: {\n key: 'shoppingDashboard.filter.signupView.showMembers',\n fallback: 'Show: Members',\n },\n showRetail: {\n key: 'shoppingDashboard.filter.signupView.showRetail',\n fallback: 'Show: Retail',\n },\n showBrandAffiliates: {\n key: 'shoppingDashboard.filter.signupView.showBrandAffiliates',\n fallback: 'Show: Brand Affiliates',\n },\n },\n conversionType: {\n all: {\n key: 'shoppingDashboard.filter.conversionType.all',\n fallback: 'All',\n },\n standard: {\n key: 'shoppingDashboard.filter.conversionType.standard',\n fallback: 'Standard',\n },\n subscription: {\n key: 'shoppingDashboard.filter.conversionType.subscription',\n fallback: 'Subscription',\n },\n },\n categorySort: {\n byRevenue: {\n key: 'shoppingDashboard.filter.categorySort.byRevenue',\n fallback: 'By: Revenue',\n },\n byTrend: {\n key: 'shoppingDashboard.filter.categorySort.byTrend',\n fallback: 'By: Trend',\n },\n },\n },\n widget: {\n topProducts: {\n title: {\n key: 'shoppingDashboard.widget.topProducts.title',\n fallback: 'Top Selling Products',\n },\n viewAll: {\n key: 'shoppingDashboard.widget.topProducts.viewAll',\n fallback: 'View All Products',\n },\n units: {\n key: 'shoppingDashboard.widget.topProducts.units',\n fallback: 'Units',\n },\n revenue: {\n key: 'shoppingDashboard.widget.topProducts.revenue',\n fallback: 'Revenue',\n },\n loading: {\n key: 'shoppingDashboard.widget.topProducts.loading',\n fallback: 'Loading products...',\n },\n empty: {\n key: 'shoppingDashboard.widget.topProducts.empty',\n fallback: 'No products available',\n },\n ariaLabel: {\n key: 'shoppingDashboard.widget.topProducts.ariaLabel',\n fallback: 'Top Selling Products widget',\n },\n titleAriaLabel: {\n key: 'shoppingDashboard.widget.topProducts.titleAriaLabel',\n fallback: 'Click to view full top products details page',\n },\n sortAriaLabel: {\n key: 'shoppingDashboard.widget.topProducts.sortAriaLabel',\n fallback: 'Sort products by',\n },\n noImageAriaLabel: {\n key: 'shoppingDashboard.widget.topProducts.noImageAriaLabel',\n fallback: 'No image available',\n },\n unitsSuffix: {\n key: 'shoppingDashboard.widget.topProducts.unitsSuffix',\n fallback: 'units',\n },\n revenueSuffix: {\n key: 'shoppingDashboard.widget.topProducts.revenueSuffix',\n fallback: 'revenue',\n },\n dcSvSuffix: {\n key: 'shoppingDashboard.widget.topProducts.dcSvSuffix',\n fallback: 'DC-SV',\n },\n rank: {\n key: 'shoppingDashboard.widget.topProducts.rank',\n fallback: 'Rank',\n },\n trend: {\n key: 'shoppingDashboard.widget.topProducts.trend',\n fallback: 'Trend',\n },\n },\n conversionRate: {\n title: {\n key: 'shoppingDashboard.widget.conversionRate.title',\n fallback: 'Conversion Rate',\n },\n formula: {\n key: 'shoppingDashboard.widget.conversionRate.formula',\n fallback: 'Orders \\u00F7 Site visits',\n },\n comparison: {\n key: 'shoppingDashboard.widget.conversionRate.comparison',\n fallback: 'compared to this time last month',\n },\n chartAriaLabel: {\n key: 'shoppingDashboard.widget.conversionRate.chartAriaLabel',\n fallback: 'Conversion Rate chart showing daily rates',\n },\n titleAriaLabel: {\n key: 'shoppingDashboard.widget.conversionRate.titleAriaLabel',\n fallback: 'Click to view full conversion rate details page',\n },\n filterAriaLabel: {\n key: 'shoppingDashboard.widget.conversionRate.filterAriaLabel',\n fallback: 'Filter conversion rate by customer type',\n },\n noData: {\n key: 'shoppingDashboard.widget.conversionRate.noData',\n fallback: 'No data',\n },\n noChange: {\n key: 'shoppingDashboard.widget.conversionRate.noChange',\n fallback: 'No change',\n },\n tooltipOrders: {\n key: 'shoppingDashboard.widget.conversionRate.tooltipOrders',\n fallback: 'orders',\n },\n tooltipVisits: {\n key: 'shoppingDashboard.widget.conversionRate.tooltipVisits',\n fallback: 'visits',\n },\n ordersPerSiteVisits: {\n key: 'shoppingDashboard.widget.conversionRate.ordersPerSiteVisits',\n fallback: 'Orders / Site Visits',\n },\n },\n signups: {\n title: {\n key: 'shoppingDashboard.widget.signups.title',\n fallback: 'Sign-ups',\n },\n total: {\n key: 'shoppingDashboard.widget.signups.total',\n fallback: 'Total',\n },\n members: {\n key: 'shoppingDashboard.widget.signups.members',\n fallback: 'Members',\n },\n retail: {\n key: 'shoppingDashboard.widget.signups.retail',\n fallback: 'Retail',\n },\n brandAffiliates: {\n key: 'shoppingDashboard.widget.signups.brandAffiliates',\n fallback: 'Brand Affiliates',\n },\n chartAriaLabel: {\n key: 'shoppingDashboard.widget.signups.chartAriaLabel',\n fallback: 'Signups multi-line chart showing Total, Members, Retail, and Brand Affiliates',\n },\n titleAriaLabel: {\n key: 'shoppingDashboard.widget.signups.titleAriaLabel',\n fallback: 'Click to view full signups details page',\n },\n filterAriaLabel: {\n key: 'shoppingDashboard.widget.signups.filterAriaLabel',\n fallback: 'Filter signups view',\n },\n noData: {\n key: 'shoppingDashboard.widget.signups.noData',\n fallback: 'No data',\n },\n noChange: {\n key: 'shoppingDashboard.widget.signups.noChange',\n fallback: 'No change',\n },\n totalSignupsInPeriod: {\n key: 'shoppingDashboard.widget.signups.totalSignupsInPeriod',\n fallback: 'Total sign-ups in period',\n },\n noTrendData: {\n key: 'shoppingDashboard.widget.signups.noTrendData',\n fallback: 'No sign-up trend data available.',\n },\n },\n topCategories: {\n title: {\n key: 'shoppingDashboard.widget.topCategories.title',\n fallback: 'Top Categories',\n },\n revenue: {\n key: 'shoppingDashboard.widget.topCategories.revenue',\n fallback: 'Revenue',\n },\n units: {\n key: 'shoppingDashboard.widget.topCategories.units',\n fallback: 'Units',\n },\n empty: {\n key: 'shoppingDashboard.widget.topCategories.empty',\n fallback: 'No category data available',\n },\n chartAriaLabel: {\n key: 'shoppingDashboard.widget.topCategories.chartAriaLabel',\n fallback: 'Top Categories donut chart showing revenue distribution by category',\n },\n titleAriaLabel: {\n key: 'shoppingDashboard.widget.topCategories.titleAriaLabel',\n fallback: 'Click to view full categories details page',\n },\n sortAriaLabel: {\n key: 'shoppingDashboard.widget.topCategories.sortAriaLabel',\n fallback: 'Sort categories by',\n },\n },\n menu: {\n ariaLabel: {\n key: 'shoppingDashboard.widget.menu.ariaLabel',\n fallback: 'widget options',\n },\n fullView: {\n key: 'shoppingDashboard.widget.menu.fullView',\n fallback: 'Full View',\n },\n },\n },\n navigation: {\n backToDashboard: {\n key: 'shoppingDashboard.navigation.backToDashboard',\n fallback: 'Back to Dashboard',\n },\n backAriaLabel: {\n key: 'shoppingDashboard.navigation.backAriaLabel',\n fallback: 'Back to dashboard',\n },\n },\n ariaLabel: {\n dashboard: {\n key: 'shoppingDashboard.ariaLabel.dashboard',\n fallback: 'Shopping Dashboard',\n },\n statsRow: {\n key: 'shoppingDashboard.ariaLabel.statsRow',\n fallback: 'Key performance metrics',\n },\n dashboardFilters: {\n key: 'shoppingDashboard.ariaLabel.dashboardFilters',\n fallback: 'Dashboard filters',\n },\n loadingDashboard: {\n key: 'shoppingDashboard.ariaLabel.loadingDashboard',\n fallback: 'Loading dashboard data',\n },\n dateRangeFilter: {\n key: 'shoppingDashboard.ariaLabel.dateRangeFilter',\n fallback: 'Date range filter, currently selected:',\n },\n marketFilter: {\n key: 'shoppingDashboard.ariaLabel.marketFilter',\n fallback: 'Market filter, currently selected:',\n },\n filterSuffix: {\n key: 'shoppingDashboard.ariaLabel.filterSuffix',\n fallback: 'filter',\n },\n },\n fullView: {\n signups: {\n columns: {\n id: { key: 'shoppingDashboard.fullView.signups.columns.id', fallback: 'ID' },\n name: { key: 'shoppingDashboard.fullView.signups.columns.name', fallback: 'Name' },\n date: { key: 'shoppingDashboard.fullView.signups.columns.date', fallback: 'Date' },\n type: { key: 'shoppingDashboard.fullView.signups.columns.type', fallback: 'Type' },\n email: { key: 'shoppingDashboard.fullView.signups.columns.email', fallback: 'Email' },\n status: { key: 'shoppingDashboard.fullView.signups.columns.status', fallback: 'Status' },\n },\n detailsTitle: {\n key: 'shoppingDashboard.fullView.signups.detailsTitle',\n fallback: 'Signup Details',\n },\n },\n conversionRate: {\n columns: {\n orderId: { key: 'shoppingDashboard.fullView.conversionRate.columns.orderId', fallback: 'Order ID' },\n date: { key: 'shoppingDashboard.fullView.conversionRate.columns.date', fallback: 'Date' },\n customer: { key: 'shoppingDashboard.fullView.conversionRate.columns.customer', fallback: 'Customer' },\n type: { key: 'shoppingDashboard.fullView.conversionRate.columns.type', fallback: 'Type' },\n items: { key: 'shoppingDashboard.fullView.conversionRate.columns.items', fallback: 'Items' },\n total: { key: 'shoppingDashboard.fullView.conversionRate.columns.total', fallback: 'Order Total' },\n bv: { key: 'shoppingDashboard.fullView.conversionRate.columns.bv', fallback: 'BV' },\n orderTotal: {\n key: 'shoppingDashboard.fullView.conversionRate.columns.orderTotal',\n fallback: 'Order Total',\n },\n totalSv: { key: 'shoppingDashboard.fullView.conversionRate.columns.totalSv', fallback: 'Total SV' },\n },\n orderDetailsTitle: {\n key: 'shoppingDashboard.fullView.conversionRate.orderDetailsTitle',\n fallback: 'Order Details',\n },\n notAvailable: {\n key: 'shoppingDashboard.fullView.conversionRate.notAvailable',\n fallback: 'N/A',\n },\n },\n products: {\n columns: {\n rank: { key: 'shoppingDashboard.fullView.products.columns.rank', fallback: '#' },\n product: { key: 'shoppingDashboard.fullView.products.columns.product', fallback: 'Product' },\n unitsSold: { key: 'shoppingDashboard.fullView.products.columns.unitsSold', fallback: 'Units Sold' },\n revenue: { key: 'shoppingDashboard.fullView.products.columns.revenue', fallback: 'Revenue' },\n volume: { key: 'shoppingDashboard.fullView.products.columns.volume', fallback: 'Volume (DC-SV)' },\n },\n skuPrefix: {\n key: 'shoppingDashboard.fullView.products.skuPrefix',\n fallback: 'SKU',\n },\n noProducts: {\n key: 'shoppingDashboard.fullView.products.noProducts',\n fallback: 'No products available.',\n },\n },\n categories: {\n columns: {\n category: { key: 'shoppingDashboard.fullView.categories.columns.category', fallback: 'Category' },\n revenue: { key: 'shoppingDashboard.fullView.categories.columns.revenue', fallback: 'Revenue' },\n percentOfTotal: {\n key: 'shoppingDashboard.fullView.categories.columns.percentOfTotal',\n fallback: '% of Total',\n },\n trend: { key: 'shoppingDashboard.fullView.categories.columns.trend', fallback: 'Trend' },\n },\n allCategoriesTitle: {\n key: 'shoppingDashboard.fullView.categories.allCategoriesTitle',\n fallback: 'All Categories',\n },\n noCategoryData: {\n key: 'shoppingDashboard.fullView.categories.noCategoryData',\n fallback: 'No category data available.',\n },\n },\n },\n dataTable: {\n noDataAvailable: {\n key: 'shoppingDashboard.dataTable.noDataAvailable',\n fallback: 'No data available',\n },\n sortableColumn: {\n key: 'shoppingDashboard.dataTable.sortableColumn',\n fallback: ', sortable column',\n },\n },\n pagination: {\n previousPage: {\n key: 'shoppingDashboard.pagination.previousPage',\n fallback: 'Previous page',\n },\n nextPage: {\n key: 'shoppingDashboard.pagination.nextPage',\n fallback: 'Next page',\n },\n goToPage: {\n key: 'shoppingDashboard.pagination.goToPage',\n fallback: 'Go to page',\n },\n of: {\n key: 'shoppingDashboard.pagination.of',\n fallback: 'of',\n },\n },\n defaults: {\n zeroTrend: {\n key: 'shoppingDashboard.defaults.zeroTrend',\n fallback: '+0%',\n },\n noValue: {\n key: 'shoppingDashboard.defaults.noValue',\n fallback: '--',\n },\n },\n} as const;\n\ntype TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport function getTranslation(entry: TranslationEntry): string {\n return resolveTranslation(entry);\n}\n","import { useMemo } from 'react';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport type { MarketFilterOption } from '../types.d';\n\nexport function buildDefaultMarketOptions(): MarketFilterOption[] {\n return [{ value: 'all', label: getTranslation(Keys.filter.market.all) }];\n}\n\nexport function resolveMarketOptions(\n markets: ReadonlyArray<MarketFilterOption> | undefined,\n): ReadonlyArray<MarketFilterOption> {\n if (markets && markets.length > 0) {\n return markets;\n }\n return buildDefaultMarketOptions();\n}\n\nexport function useMarketOptions(\n markets: ReadonlyArray<MarketFilterOption> | undefined,\n): ReadonlyArray<MarketFilterOption> {\n return useMemo(() => resolveMarketOptions(markets), [markets]);\n}\n","import React from 'react';\nimport ShowChartIcon from '@mui/icons-material/ShowChart';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport {\n StatsCardContainer,\n StatsTitle,\n StatsValueContainer,\n StatsValue,\n StatsSubtitle,\n ValueSubtitleWrapper,\n TrendContainer,\n TrendText,\n StatsCardHeader,\n SplitTitle,\n SplitRow,\n LegendColumn,\n SplitTrend,\n LegendCaption,\n} from './StatsCard.styled';\nimport { StatsCardSkeleton } from './LoadingSkeletons';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface StatsCardProps {\n readonly title: string;\n readonly value: string;\n readonly subtitle?: string;\n readonly caption?: string;\n readonly layout?: 'default' | 'split';\n readonly trendDirection?: 'up' | 'down' | 'neutral';\n readonly trendValue?: string;\n readonly testId?: string;\n readonly isLoading?: boolean;\n}\n\nconst StatsCardComponent: React.FC<StatsCardProps> = ({\n title,\n value,\n subtitle,\n caption,\n layout = 'default',\n trendDirection = 'neutral',\n trendValue,\n testId,\n isLoading = false,\n}) => {\n if (isLoading) {\n return (\n <StatsCardContainer $layout={layout} data-testid={testId}>\n <StatsCardSkeleton />\n </StatsCardContainer>\n );\n }\n\n const getTrendAriaLabel = () => {\n let directionText = getTranslation(Keys.stats.trend.unchanged);\n if (trendDirection === 'up') directionText = getTranslation(Keys.stats.trend.increased);\n else if (trendDirection === 'down') directionText = getTranslation(Keys.stats.trend.decreased);\n\n return `${title} ${directionText} ${trendValue ?? ''}`;\n };\n\n const getTrendChartIcon = (iconSize: string) => {\n if (trendDirection === 'up') {\n return <TrendingUpIcon sx={{ fontSize: iconSize }} aria-hidden=\"true\" />;\n }\n if (trendDirection === 'down') {\n return <TrendingDownIcon sx={{ fontSize: iconSize }} aria-hidden=\"true\" />;\n }\n return <ShowChartIcon sx={{ fontSize: iconSize }} aria-hidden=\"true\" />;\n };\n\n if (layout === 'split') {\n return (\n <StatsCardContainer as=\"article\" $layout=\"split\" aria-label={`${title}: ${value}`} data-testid={testId}>\n <SplitTitle id={`stats-title-${testId}`}>{title}</SplitTitle>\n <SplitRow>\n <StatsValue aria-describedby={`stats-title-${testId}`} data-testid={`stats-value-${testId}`}>\n {value}\n </StatsValue>\n {(trendValue ?? caption) && (\n <LegendColumn>\n {trendValue && (\n <SplitTrend\n as=\"output\"\n direction={trendDirection}\n aria-live=\"polite\"\n aria-label={getTrendAriaLabel()}\n data-testid={`stats-trend-${testId}`}\n >\n {getTrendChartIcon('18px')}\n <TrendText>{trendValue}</TrendText>\n </SplitTrend>\n )}\n {caption && (\n <LegendCaption data-testid={`stats-caption-${testId}`}>{caption}</LegendCaption>\n )}\n </LegendColumn>\n )}\n </SplitRow>\n </StatsCardContainer>\n );\n }\n\n return (\n <StatsCardContainer as=\"article\" aria-label={`${title}: ${value}`} data-testid={testId}>\n <StatsCardHeader>\n <StatsTitle id={`stats-title-${testId}`}>{title}</StatsTitle>\n </StatsCardHeader>\n\n <StatsValueContainer>\n <ValueSubtitleWrapper>\n <StatsValue aria-describedby={`stats-title-${testId}`} data-testid={`stats-value-${testId}`}>\n {value}\n </StatsValue>\n {subtitle && (\n <StatsSubtitle\n aria-label={`${title} ${getTranslation(Keys.stats.details)}: ${subtitle}`}\n data-testid={`stats-subtitle-${testId}`}\n >\n {subtitle}\n </StatsSubtitle>\n )}\n </ValueSubtitleWrapper>\n\n {trendValue && (\n <TrendContainer\n as=\"output\"\n direction={trendDirection}\n aria-live=\"polite\"\n aria-label={getTrendAriaLabel()}\n data-testid={`stats-trend-${testId}`}\n >\n {getTrendChartIcon('16px')}\n <TrendText>{trendValue}</TrendText>\n </TrendContainer>\n )}\n </StatsValueContainer>\n </StatsCardContainer>\n );\n};\n\nexport const StatsCard = React.memo(StatsCardComponent);\nStatsCard.displayName = 'StatsCard';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const StatsCardContainer = styled('div')<{ $layout?: 'default' | 'split' }>`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n box-sizing: border-box;\n gap: ${({ $layout }) => ($layout === 'split' ? '8px' : '0')};\n padding: ${({ $layout }) => ($layout === 'split' ? '16px' : '12px')};\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 8px;\n min-height: ${({ $layout }) => ($layout === 'split' ? '127px' : '120px')};\n transition: box-shadow 0.2s ease;\n\n &:hover {\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);\n }\n\n @media (min-width: 768px) {\n padding: ${({ $layout }) => ($layout === 'split' ? '24px' : '20px')};\n min-height: ${({ $layout }) => ($layout === 'split' ? '127px' : '140px')};\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n min-height: ${({ $layout }) => ($layout === 'split' ? '127px' : '160px')};\n }\n`;\n\nexport const SplitTitle = styled('div')`\n width: 100%;\n font-size: 16px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`;\n\nexport const SplitRow = styled('div')`\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n`;\n\nexport const LegendColumn = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;\n gap: 2px;\n`;\n\nexport const SplitTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n flex-shrink: 0;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#066100';\n if (direction === 'down') return '#9b131a';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 24px;\n height: 24px;\n }\n`;\n\nexport const LegendCaption = styled('div')`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n letter-spacing: 0.12px;\n text-align: right;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n\nexport const StatsTitle = styled('div')`\n font-size: 20px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin-bottom: 4px;\n text-transform: capitalize;\n\n @media (min-width: 768px) {\n font-size: 20px;\n margin-bottom: 6px;\n }\n\n @media (min-width: 1080px) {\n font-size: 20px;\n }\n`;\n\nexport const StatsValueContainer = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n margin-top: 8px;\n width: 100%;\n`;\n\nexport const StatsValue = styled('div')`\n font-size: 24px;\n font-weight: 700;\n line-height: 1.2;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n\n @media (min-width: 768px) {\n font-size: 28px;\n }\n\n @media (min-width: 1080px) {\n font-size: 32px;\n }\n`;\n\nexport const ValueSubtitleWrapper = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n`;\n\nexport const StatsSubtitle = styled('div')`\n font-size: 16px;\n font-weight: 400;\n line-height: normal;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n padding-bottom: 2px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`;\n\nexport const TrendContainer = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n flex-shrink: 0;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#22C55E';\n if (direction === 'down') return '#DC2626';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 14px;\n\n svg {\n width: 18px;\n height: 18px;\n }\n }\n`;\n\nexport const TrendIcon = styled('span')`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const TrendText = styled('span')`\n white-space: nowrap;\n`;\n\nexport const StatsCardHeader = styled('div')`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;\n","import React from 'react';\nimport Skeleton from '@mui/material/Skeleton';\nimport {\n SkeletonCard,\n SkeletonHeader,\n SkeletonRow,\n StatsCardWrapper,\n StatsCardHeaderRow,\n StatsCardBody,\n StatsCardSubtitle,\n ProductRowInfo,\n ProductRowMetrics,\n ChartMetricRow,\n ChartMetricTrend,\n ChartAreaSkeleton,\n PieChartLayout,\n PieCircleSkeleton,\n LegendList,\n LegendRowWrapper,\n LegendRowInfo,\n DashboardLayout,\n DashboardHeaderRow,\n DashboardFilterGroup,\n StatsGrid,\n WidgetGrid,\n FullViewLayout,\n FullViewMetricCard,\n FullViewMetricCenter,\n FullViewChartArea,\n FullViewTableCard,\n FullViewTableRow,\n SummaryCardsGrid,\n} from './LoadingSkeletons.styled';\n\nexport const StatsCardSkeleton: React.FC = () => (\n <StatsCardWrapper data-testid=\"skeleton-stats-card\">\n <StatsCardHeaderRow>\n <Skeleton variant=\"text\" width={80} height={18} />\n <Skeleton variant=\"text\" width={48} height={16} />\n </StatsCardHeaderRow>\n <StatsCardBody>\n <Skeleton variant=\"text\" width={120} height={36} />\n <StatsCardSubtitle variant=\"text\" width={100} height={16} />\n </StatsCardBody>\n </StatsCardWrapper>\n);\n\nconst ProductRowSkeleton: React.FC = () => (\n <SkeletonRow>\n <Skeleton variant=\"rounded\" width={28} height={28} />\n <Skeleton variant=\"rounded\" width={50} height={50} />\n <ProductRowInfo>\n <Skeleton variant=\"text\" width=\"70%\" height={18} />\n <Skeleton variant=\"text\" width=\"50%\" height={14} />\n </ProductRowInfo>\n <ProductRowMetrics>\n <Skeleton variant=\"text\" width={80} height={18} />\n <Skeleton variant=\"text\" width={48} height={14} />\n </ProductRowMetrics>\n </SkeletonRow>\n);\n\nexport const ProductsListSkeleton: React.FC = () => (\n <SkeletonCard data-testid=\"skeleton-products-list\">\n <SkeletonHeader>\n <Skeleton variant=\"text\" width={160} height={22} />\n <Skeleton variant=\"rounded\" width={100} height={32} />\n </SkeletonHeader>\n {['product-1', 'product-2', 'product-3', 'product-4', 'product-5'].map((rowKey) => (\n <ProductRowSkeleton key={rowKey} />\n ))}\n </SkeletonCard>\n);\n\nexport const ChartWidgetSkeleton: React.FC = () => (\n <SkeletonCard data-testid=\"skeleton-chart-widget\">\n <SkeletonHeader>\n <Skeleton variant=\"text\" width={140} height={22} />\n <Skeleton variant=\"rounded\" width={110} height={32} />\n </SkeletonHeader>\n <ChartMetricRow>\n <Skeleton variant=\"text\" width={100} height={36} />\n <ChartMetricTrend>\n <Skeleton variant=\"text\" width={60} height={18} />\n <Skeleton variant=\"text\" width={140} height={14} />\n </ChartMetricTrend>\n </ChartMetricRow>\n <ChartAreaSkeleton variant=\"rounded\" width=\"100%\" />\n </SkeletonCard>\n);\n\nconst LegendRowSkeleton: React.FC = () => (\n <LegendRowWrapper>\n <Skeleton variant=\"circular\" width={12} height={12} />\n <LegendRowInfo>\n <Skeleton variant=\"text\" width=\"60%\" height={16} />\n <Skeleton variant=\"text\" width=\"40%\" height={14} />\n </LegendRowInfo>\n <Skeleton variant=\"text\" width={36} height={18} />\n </LegendRowWrapper>\n);\n\nexport const CategoriesPieChartSkeleton: React.FC = () => (\n <SkeletonCard data-testid=\"skeleton-categories-pie\">\n <SkeletonHeader>\n <Skeleton variant=\"text\" width={140} height={22} />\n <Skeleton variant=\"rounded\" width={100} height={32} />\n </SkeletonHeader>\n <PieChartLayout>\n <PieCircleSkeleton variant=\"circular\" />\n <LegendList>\n {['legend-1', 'legend-2', 'legend-3', 'legend-4', 'legend-5'].map((rowKey) => (\n <LegendRowSkeleton key={rowKey} />\n ))}\n </LegendList>\n </PieChartLayout>\n </SkeletonCard>\n);\n\nexport const DashboardSkeleton: React.FC = () => (\n <DashboardLayout data-testid=\"skeleton-dashboard\">\n <DashboardHeaderRow>\n <Skeleton variant=\"text\" width={200} height={32} />\n <DashboardFilterGroup>\n <Skeleton variant=\"rounded\" width={140} height={36} />\n <Skeleton variant=\"rounded\" width={140} height={36} />\n </DashboardFilterGroup>\n </DashboardHeaderRow>\n\n <StatsGrid>\n <StatsCardSkeleton />\n <StatsCardSkeleton />\n <StatsCardSkeleton />\n </StatsGrid>\n\n <WidgetGrid>\n <ProductsListSkeleton />\n <ChartWidgetSkeleton />\n </WidgetGrid>\n\n <WidgetGrid>\n <ChartWidgetSkeleton />\n <CategoriesPieChartSkeleton />\n </WidgetGrid>\n </DashboardLayout>\n);\n\nexport const FullViewChartSkeleton: React.FC = () => (\n <FullViewLayout data-testid=\"skeleton-fullview-chart\">\n <FullViewMetricCard>\n <FullViewMetricCenter>\n <Skeleton variant=\"text\" width={140} height={52} />\n <Skeleton variant=\"text\" width={80} height={24} />\n <Skeleton variant=\"text\" width={160} height={16} />\n </FullViewMetricCenter>\n <FullViewChartArea variant=\"rounded\" width=\"100%\" />\n </FullViewMetricCard>\n\n <FullViewTableCard>\n <Skeleton variant=\"text\" width={200} height={24} />\n {['table-row-1', 'table-row-2', 'table-row-3', 'table-row-4', 'table-row-5'].map((rowKey) => (\n <FullViewTableRow key={rowKey} variant=\"rounded\" width=\"100%\" height={44} />\n ))}\n </FullViewTableCard>\n </FullViewLayout>\n);\n\nexport const FullViewTableSkeleton: React.FC = () => (\n <FullViewLayout data-testid=\"skeleton-fullview-table\">\n <SummaryCardsGrid>\n <StatsCardSkeleton />\n <StatsCardSkeleton />\n <StatsCardSkeleton />\n </SummaryCardsGrid>\n\n <FullViewTableCard>\n <Skeleton variant=\"text\" width={200} height={24} />\n <FullViewTableRow variant=\"rounded\" width=\"100%\" height={40} />\n {[\n 'summary-row-1',\n 'summary-row-2',\n 'summary-row-3',\n 'summary-row-4',\n 'summary-row-5',\n 'summary-row-6',\n 'summary-row-7',\n 'summary-row-8',\n ].map((rowKey) => (\n <FullViewTableRow key={rowKey} variant=\"rounded\" width=\"100%\" height={44} />\n ))}\n </FullViewTableCard>\n </FullViewLayout>\n);\n","import { styled } from '@nuskin/foundation-theme';\nimport Skeleton from '@mui/material/Skeleton';\n\nexport const SkeletonCard = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const SkeletonHeader = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 12px;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const SkeletonRow = styled('div')`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 0;\n\n @media (min-width: 768px) {\n gap: 14px;\n padding: 14px 0;\n }\n`;\n\nexport const StatsCardWrapper = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 12px;\n border-radius: 8px;\n min-height: 120px;\n\n @media (min-width: 600px) {\n padding: 20px;\n min-height: 140px;\n }\n @media (min-width: 900px) {\n padding: 24px;\n min-height: 160px;\n }\n`;\n\nexport const StatsCardHeaderRow = styled('div')`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;\n\nexport const StatsCardBody = styled('div')`\n margin-top: 8px;\n`;\n\nexport const StatsCardSubtitle = styled(Skeleton)`\n margin-top: 4px;\n`;\n\nexport const ProductRowInfo = styled('div')`\n flex: 1;\n min-width: 0;\n`;\n\nexport const ProductRowMetrics = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n`;\n\nexport const ChartMetricRow = styled('div')`\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin-bottom: 16px;\n`;\n\nexport const ChartMetricTrend = styled('div')`\n padding-top: 4px;\n`;\n\nexport const ChartAreaSkeleton = styled(Skeleton)`\n border-radius: 8px;\n height: 220px;\n\n @media (min-width: 600px) {\n height: 280px;\n }\n @media (min-width: 900px) {\n height: 340px;\n }\n`;\n\nexport const PieChartLayout = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media (min-width: 600px) {\n flex-direction: row;\n gap: 24px;\n }\n`;\n\nexport const PieCircleSkeleton = styled(Skeleton)`\n width: 100%;\n height: 200px;\n border-radius: 8px;\n flex-shrink: 0;\n\n @media (min-width: 600px) {\n width: 200px;\n border-radius: 50%;\n }\n`;\n\nexport const LegendList = styled('div')`\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n`;\n\nexport const LegendRowWrapper = styled('div')`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px;\n`;\n\nexport const LegendRowInfo = styled('div')`\n flex: 1;\n`;\n\nexport const DashboardLayout = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n @media (min-width: 600px) {\n gap: 32px;\n }\n @media (min-width: 900px) {\n gap: 40px;\n }\n`;\n\nexport const DashboardHeaderRow = styled('div')`\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n`;\n\nexport const DashboardFilterGroup = styled('div')`\n display: flex;\n gap: 16px;\n`;\n\nexport const StatsGrid = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 600px) {\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n }\n @media (min-width: 900px) {\n gap: 24px;\n }\n`;\n\nexport const WidgetGrid = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 900px) {\n grid-template-columns: repeat(2, 1fr);\n gap: 24px;\n }\n`;\n\nexport const FullViewLayout = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 24px;\n`;\n\nexport const FullViewMetricCard = styled('div')`\n padding: 24px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 24px;\n`;\n\nexport const FullViewMetricCenter = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 16px 0;\n gap: 8px;\n`;\n\nexport const FullViewChartArea = styled(Skeleton)`\n border-radius: 8px;\n height: 260px;\n\n @media (min-width: 600px) {\n height: 320px;\n }\n @media (min-width: 900px) {\n height: 400px;\n }\n`;\n\nexport const FullViewTableCard = styled('div')`\n padding: 20px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n`;\n\nexport const FullViewTableRow = styled(Skeleton)`\n border-radius: 4px;\n`;\n\nexport const SummaryCardsGrid = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 600px) {\n grid-template-columns: repeat(3, 1fr);\n }\n`;\n","import React from 'react';\nimport ShoppingCartIcon from '@mui/icons-material/ShoppingCart';\nimport ShowChartIcon from '@mui/icons-material/ShowChart';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { getTrendDirectionLabel } from '../../utils/trendUtils';\nimport { formatMoney } from '../../utils/dataUtils';\nimport {\n ProductsListContainer,\n WidgetHeader,\n WidgetTitle,\n SortDropdown,\n HeaderActionsContainer,\n ProductsList,\n ProductItem,\n ProductRank,\n ProductImage,\n ProductImagePlaceholder,\n ProductInfo,\n ProductName,\n ProductSubtitle,\n ProductMetrics,\n ProductValue,\n ProductTrend,\n EmptyState,\n EmptyStateText,\n} from './TopSellingProductsList.styled';\nimport { WidgetMenu } from '../WidgetMenu';\nimport type { TopProduct, ProductSortOption } from '../../types.d';\nimport type { TrendDirection } from '../types';\nimport { ProductsListSkeleton } from '../LoadingSkeletons';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface TopSellingProductsListProps {\n readonly products: TopProduct[];\n readonly productSort: ProductSortOption;\n readonly isLoading?: boolean;\n readonly maxProducts?: number;\n readonly onSortChange?: (sort: ProductSortOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nconst TopSellingProductsListComponent: React.FC<TopSellingProductsListProps> = ({\n products,\n productSort,\n isLoading = false,\n maxProducts = 5,\n onSortChange,\n onTitleClick,\n}) => {\n const handleSortChange = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newSort = event.target.value as ProductSortOption;\n onSortChange?.(newSort);\n };\n\n const formatValue = (product: TopProduct, sortBy: ProductSortOption) => {\n switch (sortBy) {\n case 'units':\n return `${product.unitsSold.toLocaleString()} ${getTranslation(Keys.widget.topProducts.unitsSuffix)}`;\n case 'revenue':\n return formatMoney(product.revenue, product.currencyCode);\n case 'volume':\n return `${product.volume.toLocaleString()} ${getTranslation(Keys.widget.topProducts.dcSvSuffix)}`;\n default:\n return `${product.unitsSold.toLocaleString()} ${getTranslation(Keys.widget.topProducts.unitsSuffix)}`;\n }\n };\n\n const getSubtitle = (product: TopProduct, sortBy: ProductSortOption) => {\n switch (sortBy) {\n case 'units':\n return `${formatMoney(product.revenue, product.currencyCode)} ${getTranslation(Keys.widget.topProducts.revenueSuffix)}`;\n case 'revenue':\n return `${product.unitsSold.toLocaleString()} ${getTranslation(Keys.widget.topProducts.unitsSuffix)}`;\n case 'volume':\n return `${formatMoney(product.revenue, product.currencyCode)} ${getTranslation(Keys.widget.topProducts.revenueSuffix)}`;\n default:\n return `${formatMoney(product.revenue, product.currencyCode)} ${getTranslation(Keys.widget.topProducts.revenueSuffix)}`;\n }\n };\n\n const getTrendValue = (product: TopProduct, sortBy: ProductSortOption) => {\n const trend = product.trend;\n if (!trend) return '';\n switch (sortBy) {\n case 'units':\n return trend.units ?? '';\n case 'revenue':\n return trend.revenue ?? '';\n case 'volume':\n return trend.volume ?? '';\n default:\n return trend.units ?? '';\n }\n };\n\n const getTrendDirection = (product: TopProduct, sortBy: ProductSortOption): TrendDirection => {\n const trendValue = getTrendValue(product, sortBy);\n if (!trendValue) return 'neutral';\n if (trendValue.startsWith('+')) return 'up';\n if (trendValue.startsWith('-')) return 'down';\n return 'neutral';\n };\n\n const getTrendChartIcon = (direction: TrendDirection) => {\n if (direction === 'up') {\n return <TrendingUpIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n if (direction === 'down') {\n return <TrendingDownIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n return <ShowChartIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n };\n\n const displayedProducts = products.slice(0, maxProducts);\n const rankLabel = getTranslation(Keys.widget.topProducts.rank);\n const trendLabel = getTranslation(Keys.widget.topProducts.trend);\n\n if (isLoading && products.length === 0) {\n return (\n <ProductsListContainer data-testid=\"widget-top-products\">\n <ProductsListSkeleton />\n </ProductsListContainer>\n );\n }\n\n if (products.length === 0) {\n return (\n <ProductsListContainer data-testid=\"widget-top-products\">\n <WidgetHeader>\n <WidgetTitle>{getTranslation(Keys.widget.topProducts.title)}</WidgetTitle>\n </WidgetHeader>\n <EmptyState data-testid=\"products-empty-state\">\n <ShoppingCartIcon />\n <EmptyStateText>{getTranslation(Keys.widget.topProducts.empty)}</EmptyStateText>\n </EmptyState>\n </ProductsListContainer>\n );\n }\n\n return (\n <ProductsListContainer\n as=\"section\"\n data-testid=\"widget-top-products\"\n aria-label={getTranslation(Keys.widget.topProducts.ariaLabel)}\n >\n <WidgetHeader>\n <WidgetTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.widget.topProducts.titleAriaLabel)}\n data-testid=\"widget-title-top-products\"\n >\n {getTranslation(Keys.widget.topProducts.title)}\n </WidgetTitle>\n <HeaderActionsContainer>\n <SortDropdown\n id=\"product-sort\"\n data-testid=\"product-sort-dropdown\"\n value={productSort}\n onChange={handleSortChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.widget.topProducts.sortAriaLabel)}\n >\n <option value=\"units\">{getTranslation(Keys.filter.productSort.byUnits)}</option>\n <option value=\"revenue\">{getTranslation(Keys.filter.productSort.byRevenue)}</option>\n <option value=\"volume\">{getTranslation(Keys.filter.productSort.byVolume)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-products\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </WidgetHeader>\n\n <ProductsList as=\"ul\" data-testid=\"products-list\">\n {displayedProducts.map((product, index) => {\n const trendDirection = getTrendDirection(product, productSort);\n const trendValue = getTrendValue(product, productSort);\n\n return (\n <ProductItem\n as=\"li\"\n key={product.id}\n data-testid={`product-item-${index}`}\n aria-label={`${rankLabel} ${product.rank}: ${product.name}, ${formatValue(product, productSort)}`}\n >\n <ProductRank aria-label={`${rankLabel} ${product.rank}`}>{product.rank}</ProductRank>\n\n {product.imageUrl ? (\n <ProductImage\n src={product.imageUrl}\n alt={product.name}\n loading=\"lazy\"\n onError={(e) => {\n e.currentTarget.hidden = true;\n }}\n />\n ) : (\n <ProductImagePlaceholder\n aria-label={getTranslation(Keys.widget.topProducts.noImageAriaLabel)}\n >\n {product.name.substring(0, 2).toUpperCase()}\n </ProductImagePlaceholder>\n )}\n\n <ProductInfo>\n <ProductName title={product.name}>{product.name}</ProductName>\n <ProductSubtitle>{getSubtitle(product, productSort)}</ProductSubtitle>\n </ProductInfo>\n\n <ProductMetrics>\n <ProductValue>{formatValue(product, productSort)}</ProductValue>\n {trendValue && (\n <ProductTrend\n as=\"output\"\n direction={trendDirection}\n aria-live=\"polite\"\n aria-label={`${trendLabel}: ${getTrendDirectionLabel(trendDirection)} ${trendValue}`}\n >\n {getTrendChartIcon(trendDirection)}\n <span>{trendValue}</span>\n </ProductTrend>\n )}\n </ProductMetrics>\n </ProductItem>\n );\n })}\n </ProductsList>\n </ProductsListContainer>\n );\n};\n\nexport const TopSellingProductsList = React.memo(TopSellingProductsListComponent);\nTopSellingProductsList.displayName = 'TopSellingProductsList';\n","import React from 'react';\nimport ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\nimport RemoveIcon from '@mui/icons-material/Remove';\nimport type { TrendDirection } from '../shared/types';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport function parseTrendPercent(value?: string): number | null {\n if (!value) return null;\n const cleanedValue = value.replace('%', '').trim();\n const parsedValue = Number(cleanedValue);\n return Number.isFinite(parsedValue) ? parsedValue : null;\n}\n\nexport function resolveTrendDirection(value?: string): TrendDirection {\n const parsedValue = parseTrendPercent(value);\n if (parsedValue === null) return 'neutral';\n if (parsedValue > 0) return 'up';\n if (parsedValue < 0) return 'down';\n return 'neutral';\n}\n\nexport function calculateWeightedRevenueTrend<T>(\n items: readonly T[],\n getRevenue: (item: T) => number,\n getTrend: (item: T) => string | undefined,\n): { direction: TrendDirection; formatted: string } {\n const { weightedSum, weight } = items.reduce(\n (accumulator, item) => {\n const trendValue = parseTrendPercent(getTrend(item));\n if (trendValue === null) return accumulator;\n return {\n weightedSum: accumulator.weightedSum + trendValue * getRevenue(item),\n weight: accumulator.weight + getRevenue(item),\n };\n },\n { weightedSum: 0, weight: 0 },\n );\n\n const average = weight > 0 ? weightedSum / weight : 0;\n let direction: TrendDirection = 'neutral';\n if (average > 0) direction = 'up';\n else if (average < 0) direction = 'down';\n\n return { direction, formatted: `${average > 0 ? '+' : ''}${average.toFixed(1)}%` };\n}\n\nexport function getTrendDirectionLabel(direction: TrendDirection): string {\n if (direction === 'up') return getTranslation(Keys.stats.trend.increased);\n if (direction === 'down') return getTranslation(Keys.stats.trend.decreased);\n return getTranslation(Keys.stats.trend.unchanged);\n}\n\nexport function getTrendIcon(direction: TrendDirection): React.ReactNode {\n switch (direction) {\n case 'up':\n return <ArrowUpwardIcon />;\n case 'down':\n return <ArrowDownwardIcon />;\n case 'neutral':\n default:\n return <RemoveIcon />;\n }\n}\n\nexport function getTrendColor(direction: TrendDirection): string {\n switch (direction) {\n case 'up':\n return '#4caf50';\n case 'down':\n return '#f44336';\n case 'neutral':\n default:\n return '#757575';\n }\n}\n","import { useMemo } from 'react';\n\nexport function calculateTotalPages<T>(items: T[], itemsPerPage: number): number {\n return Math.ceil(items.length / itemsPerPage);\n}\n\nexport function paginateItems<T>(items: T[], currentPage: number, itemsPerPage: number): T[] {\n const startIndex = (currentPage - 1) * itemsPerPage;\n const endIndex = startIndex + itemsPerPage;\n return items.slice(startIndex, endIndex);\n}\n\nexport function sortByNumericProperty<T extends Record<string, unknown>>(\n items: T[],\n key: keyof T,\n direction: 'asc' | 'desc' = 'desc',\n): T[] {\n return [...items].sort((a, b) => {\n const aVal = a[key] as number;\n const bVal = b[key] as number;\n return direction === 'asc' ? aVal - bVal : bVal - aVal;\n });\n}\n\nexport function calculatePercentage(value: number, total: number, decimalPlaces: number = 1): string {\n if (total === 0) return '0.0';\n return ((value / total) * 100).toFixed(decimalPlaces);\n}\n\nexport function usePaginatedItems<T>(\n items: T[],\n currentPage: number,\n itemsPerPage: number,\n): { totalPages: number; pageItems: T[] } {\n const totalPages = useMemo(() => calculateTotalPages(items, itemsPerPage), [items, itemsPerPage]);\n const pageItems = useMemo(\n () => paginateItems(items, currentPage, itemsPerPage),\n [items, currentPage, itemsPerPage],\n );\n return { totalPages, pageItems };\n}\n\nexport function formatMoney(\n value: number,\n currencyCode?: string,\n locale: string = 'en-US',\n fractionDigits?: number,\n): string {\n const amount = Number.isFinite(value) ? value : 0;\n if (currencyCode) {\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency: currencyCode,\n ...(fractionDigits !== undefined\n ? { minimumFractionDigits: fractionDigits, maximumFractionDigits: fractionDigits }\n : { minimumFractionDigits: 0, maximumFractionDigits: 2 }),\n }).format(amount);\n } catch {}\n }\n return fractionDigits !== undefined ? `$${amount.toFixed(fractionDigits)}` : `$${amount.toLocaleString()}`;\n}\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const ProductsListContainer = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 12px;\n min-height: 320px;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n\n @media (min-width: 768px) {\n padding: 20px;\n min-height: 400px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const WidgetHeader = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const HeaderActionsContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const WidgetTitle = styled('h2')`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`;\n\nexport const SortDropdown = styled('select')`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const ProductsList = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 12px;\n width: 100%;\n overflow: hidden;\n list-style: none;\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n gap: 14px;\n }\n`;\n\nexport const ProductItem = styled('div')`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n transition:\n background-color 0.2s ease,\n box-shadow 0.2s ease;\n cursor: pointer;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n list-style: none;\n\n &:not(:last-child) {\n border-bottom: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n }\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06);\n }\n\n @media (min-width: 768px) {\n padding: 14px;\n gap: 14px;\n }\n`;\n\nexport const ProductRank = styled('div')`\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 24px;\n height: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'A10')};\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n border-radius: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n vertical-align: middle;\n\n @media (min-width: 768px) {\n min-width: 28px;\n height: 28px;\n font-size: 16px;\n }\n`;\n\nexport const ProductImage = styled('img')`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n object-fit: cover;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 50px;\n height: 50px;\n }\n`;\n\nexport const ProductImagePlaceholder = styled('div')`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N40')};\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n font-size: 10px;\n font-weight: 500;\n\n @media (min-width: 768px) {\n width: 50px;\n height: 50px;\n font-size: 11px;\n }\n`;\n\nexport const ProductInfo = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex-grow: 1;\n min-width: 0;\n`;\n\nexport const ProductName = styled('div')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 18ch;\n\n @media (min-width: 768px) {\n font-size: 16px;\n max-width: none;\n }\n`;\n\nexport const ProductSubtitle = styled('div')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 11px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`;\n\nexport const ProductMetrics = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n flex-shrink: 0;\n`;\n\nexport const ProductValue = styled('div')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.2;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`;\n\nexport const ProductTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 11px;\n font-weight: 500;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#22C55E';\n if (direction === 'down') return '#DC2626';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 12px;\n\n svg {\n width: 16px;\n height: 16px;\n }\n }\n`;\n\nexport const EmptyState = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n text-align: center;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n svg {\n width: 48px;\n height: 48px;\n color: ${({ theme }) => getGenomeColor(theme, 'N50')};\n }\n`;\n\nexport const EmptyStateText = styled('div')`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n","import React, { useState } from 'react';\nimport Menu from '@mui/material/Menu';\nimport MenuItem from '@mui/material/MenuItem';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport MoreVertIcon from '@mui/icons-material/MoreVert';\nimport VisibilityIcon from '@mui/icons-material/Visibility';\nimport { StyledIconButton } from './WidgetMenu.styled';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface WidgetMenuProps {\n readonly widgetId?: string;\n readonly onFullView?: () => void;\n}\n\nexport const WidgetMenu: React.FC<WidgetMenuProps> = ({ widgetId, onFullView }) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n const open = Boolean(anchorEl);\n const buttonId = `widget-menu-button-${widgetId}`;\n const menuId = `widget-menu-${widgetId}`;\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const handleFullView = () => {\n handleClose();\n if (onFullView) {\n onFullView();\n }\n };\n\n return (\n <>\n <StyledIconButton\n id={buttonId}\n data-testid={`widget-menu-button-${widgetId}`}\n aria-label={getTranslation(Keys.widget.menu.ariaLabel)}\n aria-controls={open ? menuId : undefined}\n aria-haspopup=\"true\"\n aria-expanded={open ? 'true' : undefined}\n onClick={handleClick}\n size=\"small\"\n >\n <MoreVertIcon fontSize=\"small\" />\n </StyledIconButton>\n <Menu\n id={menuId}\n data-testid={`widget-menu-${widgetId}`}\n anchorEl={anchorEl}\n open={open}\n onClose={handleClose}\n MenuListProps={{\n 'aria-labelledby': buttonId,\n }}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'right',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'right',\n }}\n >\n <MenuItem onClick={handleFullView} data-testid=\"widget-menu-item-fullview\">\n <ListItemIcon>\n <VisibilityIcon fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText>{getTranslation(Keys.widget.menu.fullView)}</ListItemText>\n </MenuItem>\n </Menu>\n </>\n );\n};\n","import IconButton from '@mui/material/IconButton';\nimport { styled } from '@nuskin/foundation-theme';\n\nexport const StyledIconButton = styled(IconButton)(() => ({\n padding: '4px',\n color: '#252525',\n '&:hover': {\n backgroundColor: 'rgba(37, 37, 37, 0.08)',\n },\n}));\n","import React from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport { WidgetMenu } from '../WidgetMenu';\nimport { getTrendIcon, getTrendDirectionLabel } from '../../utils/trendUtils';\nimport {\n ConversionRateContainer,\n ChartHeader,\n ChartTitle,\n FilterDropdown,\n MetricDisplay,\n MetricValue,\n MetricTrend,\n FormulaDisplay,\n ChartContainer,\n TooltipContainer,\n TooltipLabel,\n TooltipValue,\n TooltipDetails,\n TitleRow,\n HeaderActionsContainer,\n} from './ConversionRateChart.styled';\nimport type { ConversionDataPoint, ConversionFilterOption } from '../../types.d';\nimport { ChartWidgetSkeleton } from '../LoadingSkeletons';\nimport { formatAxisDate } from '../../utils/dateFormat';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface ConversionRateChartProps {\n readonly conversionData: ConversionDataPoint[];\n readonly conversionFilter: ConversionFilterOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly summaryRate?: number;\n readonly summaryChangePct?: number | null;\n readonly onFilterChange?: (filter: ConversionFilterOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nconst CHART_MARGIN = { top: 5, right: 10, left: -10, bottom: 5 };\nconst AXIS_TICK = { fontSize: 10 };\nconst LINE_DOT = { r: 3, fill: '#3B82F6' };\nconst ACTIVE_DOT = { r: 5 };\n\ninterface CustomTooltipProps {\n readonly active?: boolean;\n readonly payload?: Array<{ payload?: unknown }>;\n}\n\nconst rateTickFormatter = (value: number | string): string => `${value}%`;\n\nconst CustomTooltip: React.FC<CustomTooltipProps> = ({ active, payload }) => {\n if (!active || !payload?.length) return null;\n const data = payload[0].payload as ConversionDataPoint;\n return (\n <TooltipContainer>\n <TooltipLabel>{data.date}</TooltipLabel>\n <TooltipValue>{(data.rate ?? 0).toFixed(2)}%</TooltipValue>\n <TooltipDetails>\n {data.orders ?? 0} {getTranslation(Keys.widget.conversionRate.tooltipOrders)} /{' '}\n {(data.siteVisits ?? 0).toLocaleString()} {getTranslation(Keys.widget.conversionRate.tooltipVisits)}\n </TooltipDetails>\n </TooltipContainer>\n );\n};\n\nconst ConversionRateChartComponent: React.FC<ConversionRateChartProps> = ({\n conversionData,\n conversionFilter,\n isLoading = false,\n title,\n summaryRate,\n summaryChangePct,\n onFilterChange,\n onTitleClick,\n}) => {\n const handleFilterChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newFilter = event.target.value as ConversionFilterOption;\n onFilterChange?.(newFilter);\n },\n [onFilterChange],\n );\n\n const noDataText = getTranslation(Keys.widget.conversionRate.noData);\n const noChangeText = getTranslation(Keys.widget.conversionRate.noChange);\n\n const currentRate = React.useMemo(() => {\n if (typeof summaryRate === 'number' && Number.isFinite(summaryRate)) return summaryRate;\n return conversionData.at(-1)?.rate ?? 0;\n }, [summaryRate, conversionData]);\n\n const trendInfo = React.useMemo((): { direction: 'up' | 'down' | 'neutral'; value: string } => {\n if (summaryChangePct !== undefined) {\n if (summaryChangePct === null || Math.abs(summaryChangePct) < 0.1) {\n return { direction: 'neutral', value: noChangeText };\n }\n const direction = summaryChangePct > 0 ? 'up' : 'down';\n const formatted = `${summaryChangePct > 0 ? '+' : ''}${summaryChangePct.toFixed(2)}%`;\n return { direction, value: formatted };\n }\n if (conversionData.length < 2) return { direction: 'neutral', value: noDataText };\n const latestRate = conversionData.at(-1)?.rate ?? 0;\n const previousRate = conversionData[0].rate;\n if (previousRate === 0) return { direction: 'neutral', value: noChangeText };\n const change = latestRate - previousRate;\n const percentageChange = (change / previousRate) * 100;\n if (Math.abs(percentageChange) < 0.1) return { direction: 'neutral', value: noChangeText };\n const direction = change > 0 ? 'up' : 'down';\n const formattedChange = `${change > 0 ? '+' : ''}${change.toFixed(2)}%`;\n return { direction, value: formattedChange };\n }, [summaryChangePct, conversionData, noChangeText, noDataText]);\n\n const formattedData = React.useMemo(\n () => conversionData.map((item) => ({ ...item, shortDate: formatAxisDate(item.date) })),\n [conversionData],\n );\n\n if (isLoading && conversionData.length === 0) {\n return (\n <ConversionRateContainer data-testid=\"widget-conversion-rate\">\n <ChartWidgetSkeleton />\n </ConversionRateContainer>\n );\n }\n\n const chartAriaLabel = getTranslation(Keys.widget.conversionRate.chartAriaLabel);\n\n return (\n <ConversionRateContainer as=\"section\" data-testid=\"widget-conversion-rate\" aria-label={chartAriaLabel}>\n <ChartHeader>\n <TitleRow>\n <ChartTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.widget.conversionRate.titleAriaLabel)}\n data-testid=\"widget-title-conversion-rate\"\n >\n {title ?? getTranslation(Keys.widget.conversionRate.title)}\n </ChartTitle>\n <HeaderActionsContainer>\n <FilterDropdown\n id=\"conversion-filter\"\n data-testid=\"conversion-filter-dropdown\"\n value={conversionFilter}\n onChange={handleFilterChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.widget.conversionRate.filterAriaLabel)}\n >\n <option value=\"all\">{getTranslation(Keys.filter.conversionType.all)}</option>\n <option value=\"standard\">{getTranslation(Keys.filter.conversionType.standard)}</option>\n <option value=\"subscription\">\n {getTranslation(Keys.filter.conversionType.subscription)}\n </option>\n </FilterDropdown>\n <WidgetMenu widgetId=\"conversion-rate\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </TitleRow>\n </ChartHeader>\n\n <MetricDisplay>\n <MetricValue\n aria-label={`${getTranslation(Keys.widget.conversionRate.title)}: ${currentRate.toFixed(2)}%`}\n data-testid=\"conversion-metric-value\"\n >\n {currentRate.toFixed(2)}%\n </MetricValue>\n {trendInfo.value !== noDataText && (\n <MetricTrend\n as=\"output\"\n direction={trendInfo.direction}\n aria-live=\"polite\"\n aria-label={`${getTrendDirectionLabel(trendInfo.direction)} ${trendInfo.value}`}\n data-testid=\"conversion-metric-trend\"\n >\n <div className=\"trend-line\">\n <span aria-hidden=\"true\">{getTrendIcon(trendInfo.direction)}</span>\n <span className=\"change-value\">{trendInfo.value.replace('%', '')}</span>\n <span className=\"change-percent\">%</span>\n </div>\n <div className=\"comparison-text\">{getTranslation(Keys.widget.conversionRate.comparison)}</div>\n </MetricTrend>\n )}\n </MetricDisplay>\n\n <FormulaDisplay data-testid=\"conversion-formula\">\n {getTranslation(Keys.widget.conversionRate.formula)}\n </FormulaDisplay>\n\n <ChartContainer data-testid=\"conversion-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\" minHeight={200}>\n <LineChart data={formattedData} margin={CHART_MARGIN}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"shortDate\" tick={AXIS_TICK} tickLine={false} interval=\"preserveStartEnd\" />\n <YAxis\n tick={AXIS_TICK}\n tickLine={false}\n tickFormatter={rateTickFormatter}\n domain={['dataMin - 0.5', 'dataMax + 0.5']}\n />\n <Tooltip content={CustomTooltip} />\n <Line\n type=\"monotone\"\n dataKey=\"rate\"\n stroke=\"#3B82F6\"\n strokeWidth={2}\n dot={LINE_DOT}\n activeDot={ACTIVE_DOT}\n />\n </LineChart>\n </ResponsiveContainer>\n </ChartContainer>\n </ConversionRateContainer>\n );\n};\n\nexport const ConversionRateChart = React.memo(ConversionRateChartComponent);\nConversionRateChart.displayName = 'ConversionRateChart';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const ConversionRateContainer = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const ChartHeader = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin-bottom: 16px;\n padding-bottom: 0;\n border-bottom: none;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const TitleRow = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`;\n\nexport const HeaderActionsContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const ChartTitle = styled('h2')`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`;\n\nexport const FilterDropdown = styled('select')`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const MetricDisplay = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n margin-bottom: 8px;\n`;\n\nexport const MetricValue = styled('div')`\n font-size: 32px;\n font-weight: 700;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n font-size: 36px;\n }\n`;\n\nexport const MetricTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n margin: 0;\n padding: 0;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 3px;\n font-size: 13px;\n line-height: 1;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#066100';\n if (direction === 'down') return '#DC2626';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n\n .change-value {\n font-weight: 600;\n }\n\n .change-percent {\n font-weight: 400;\n }\n }\n\n .comparison-text {\n font-size: 11px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n letter-spacing: 0.1px;\n margin: 0;\n padding: 0;\n }\n`;\n\nexport const FormulaDisplay = styled('div')`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin-bottom: 16px;\n margin-top: 0;\n letter-spacing: 0.12px;\n`;\n\nexport const ChartContainer = styled('div')`\n width: 100%;\n height: 220px;\n margin-top: 0;\n\n @media (min-width: 768px) {\n height: 280px;\n }\n\n @media (min-width: 1080px) {\n height: 340px;\n }\n\n .recharts-cartesian-grid-horizontal line,\n .recharts-cartesian-grid-vertical line {\n stroke: ${({ theme }) => getGenomeColor(theme, 'N40')};\n stroke-width: 1px;\n }\n\n .recharts-text {\n fill: ${({ theme }) => getGenomeColor(theme, 'N70')};\n font-size: 10px;\n }\n\n .recharts-tooltip-wrapper {\n z-index: 100;\n }\n`;\n\nexport const TooltipContainer = styled('div')`\n background-color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n padding: 8px 12px;\n box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);\n`;\n\nexport const TooltipLabel = styled('div')`\n font-size: 11px;\n font-weight: 600;\n color: ${({ theme }) => getGenomeColor(theme, 'N10')};\n margin-bottom: 4px;\n`;\n\nexport const TooltipValue = styled('div')`\n font-size: 13px;\n font-weight: 700;\n color: ${({ theme }) => getGenomeColor(theme, 'A10')};\n`;\n\nexport const TooltipDetails = styled('div')`\n font-size: 10px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n margin-top: 2px;\n`;\n","import type { DateRangeOption } from '../types.d';\n\nexport const DAYS_MAP: Record<DateRangeOption, number> = {\n last7days: 7,\n last30days: 30,\n last90days: 90,\n thisMonth: 31,\n};\n\nexport const DATE_RANGE_LABELS: Record<DateRangeOption, string> = {\n last7days: 'Last 7 Days',\n last30days: 'Last 30 Days',\n last90days: 'Last 90 Days',\n thisMonth: 'This Month',\n};\n\nexport function getDaysFromDateRange(dateRange: DateRangeOption): number {\n return DAYS_MAP[dateRange] ?? 30;\n}\n\nexport function getDateRangeLabel(dateRange: DateRangeOption): string {\n return DATE_RANGE_LABELS[dateRange] ?? 'Last 30 Days';\n}\n","import type { DateRangeOption } from '../types.d';\nimport { getDateRangeLabel } from './dateConstants';\n\nexport function formatDateRangeLabel(dateRange: DateRangeOption): string {\n return getDateRangeLabel(dateRange);\n}\n\nexport function formatShortDate(date: Date): string {\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n return `${months[date.getMonth()]} ${date.getDate()}`;\n}\n\nconst AXIS_MONTH_MAP: Record<string, string> = {\n Jan: '1',\n Feb: '2',\n Mar: '3',\n Apr: '4',\n May: '5',\n Jun: '6',\n Jul: '7',\n Aug: '8',\n Sep: '9',\n Oct: '10',\n Nov: '11',\n Dec: '12',\n};\n\nexport function formatAxisDate(dateStr: string): string {\n const parts = dateStr.split(' ');\n if (parts.length !== 2) return dateStr;\n return `${AXIS_MONTH_MAP[parts[0]] || parts[0]}/${parts[1]}`;\n}\n\nexport function formatDisplayDate(dateStr: string): string {\n const date = new Date(dateStr);\n return formatShortDate(date);\n}\n\nexport function formatDateRange(start: string, end: string): string {\n return `${formatDisplayDate(start)} - ${formatDisplayDate(end)}`;\n}\n\nexport function formatISODate(date: Date): string {\n return date.toISOString().split('T')[0];\n}\n\n/**\n * Extract and format the date range from an array of data objects.\n * Handles various date field names: 'date', 'Date', 'dateTime', etc.\n * Falls back to calculating from dateRange option if no date data is available.\n * @param data Array of objects with date information\n * @param fallbackLabel Fallback label if no dates found\n * @returns Formatted date range string (e.g., \"May 30 - Aug 27\")\n */\nexport function getActualDateRange(data: unknown[], fallbackLabel: string = 'N/A'): string {\n if (!Array.isArray(data) || data.length === 0) return fallbackLabel;\n\n try {\n // Extract first and last dates from data\n const first = data[0] as Record<string, unknown>;\n const last = data[data.length - 1] as Record<string, unknown>;\n\n // Try various date field names\n const dateFieldNames = ['date', 'Date', 'dateTime', 'eventDate', 'timestamp'];\n let startDateStr: string | undefined;\n let endDateStr: string | undefined;\n\n for (const fieldName of dateFieldNames) {\n if (first[fieldName] && !startDateStr) {\n startDateStr = String(first[fieldName]);\n }\n if (last[fieldName] && !endDateStr) {\n endDateStr = String(last[fieldName]);\n }\n }\n\n if (startDateStr && endDateStr) {\n return formatDateRange(startDateStr, endDateStr);\n }\n } catch {\n // Silently fail and return fallback\n }\n\n return fallbackLabel;\n}\n\n/**\n * Calculate and format the date range based on a DateRangeOption.\n * Used for components without time-series data (e.g., TopProducts, TopCategories)\n * @param dateRangeOption The selected date range option\n * @returns Formatted date range string (e.g., \"Aug 28 - Sep 27\" for last30days)\n */\nexport function calculateDateRangeFromOption(dateRangeOption: DateRangeOption): string {\n const today = new Date();\n const year = today.getFullYear();\n const month = today.getMonth();\n const date = today.getDate();\n\n let startDate: Date;\n let endDate = new Date(year, month, date);\n\n switch (dateRangeOption) {\n case 'last7days':\n startDate = new Date(year, month, date - 7);\n break;\n case 'last30days':\n startDate = new Date(year, month, date - 30);\n break;\n case 'last90days':\n startDate = new Date(year, month, date - 90);\n break;\n case 'thisMonth':\n startDate = new Date(year, month, 1);\n endDate = new Date(year, month + 1, 0); // Last day of current month\n break;\n default:\n return 'N/A';\n }\n\n return formatDateRange(formatISODate(startDate), formatISODate(endDate));\n}\n","import React from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport { getTrendIcon, getTrendDirectionLabel } from '../../utils/trendUtils';\nimport { WidgetMenu } from '../WidgetMenu';\nimport {\n SignupsContainer,\n ChartHeader,\n ChartTitle,\n FilterDropdown,\n MetricDisplay,\n MetricValue,\n MetricTrend,\n ChartContainer,\n Legend,\n LegendItem,\n LegendColor,\n LegendLabel,\n HeaderActionsContainer,\n} from './SignupsChart.styled';\nimport type { SignupDataPoint, SignupViewOption } from '../../types.d';\nimport { ChartWidgetSkeleton } from '../LoadingSkeletons';\nimport { formatAxisDate } from '../../utils/dateFormat';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface SignupsChartProps {\n readonly signupData: SignupDataPoint[];\n readonly signupView: SignupViewOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly onViewChange?: (view: SignupViewOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nconst SERIES_COLORS = {\n total: '#3B82F6',\n members: '#7B92A8',\n retail: '#A3B5C7',\n brandAffiliates: '#CBD6E0',\n};\n\nconst CHART_MARGIN = { top: 5, right: 10, left: -10, bottom: 5 };\nconst AXIS_TICK = { fontSize: 10 };\nconst LINE_DOT = { r: 2 };\n\nconst SignupsChartComponent: React.FC<SignupsChartProps> = ({\n signupData,\n signupView,\n isLoading = false,\n title,\n onViewChange,\n onTitleClick,\n}) => {\n const handleViewChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newView = event.target.value as SignupViewOption;\n onViewChange?.(newView);\n },\n [onViewChange],\n );\n\n const noDataText = getTranslation(Keys.widget.signups.noData);\n const noChangeText = getTranslation(Keys.widget.signups.noChange);\n\n const totalSignups = React.useMemo(() => {\n if (signupData.length === 0) return 0;\n return signupData[signupData.length - 1].total;\n }, [signupData]);\n\n const trendInfo = React.useMemo((): { direction: 'up' | 'down' | 'neutral'; value: string } => {\n if (signupData.length < 2) return { direction: 'neutral', value: noDataText };\n const latestTotal = signupData[signupData.length - 1].total;\n const previousTotal = signupData[0].total;\n const change = latestTotal - previousTotal;\n const percentageChange = (change / previousTotal) * 100;\n if (Math.abs(percentageChange) < 0.1) return { direction: 'neutral', value: noChangeText };\n const direction = change > 0 ? 'up' : 'down';\n const formattedChange = `${change > 0 ? '+' : ''}${change} (${percentageChange.toFixed(1)}%)`;\n return { direction, value: formattedChange };\n }, [noChangeText, noDataText, signupData]);\n\n const formattedData = React.useMemo(\n () => signupData.map((item) => ({ ...item, shortDate: formatAxisDate(item.date) })),\n [signupData],\n );\n const totalLabel = getTranslation(Keys.widget.signups.total);\n const membersLabel = getTranslation(Keys.widget.signups.members);\n const retailLabel = getTranslation(Keys.widget.signups.retail);\n const brandAffiliatesLabel = getTranslation(Keys.widget.signups.brandAffiliates);\n\n if (isLoading && signupData.length === 0) {\n return (\n <SignupsContainer data-testid=\"widget-signups\">\n <ChartWidgetSkeleton />\n </SignupsContainer>\n );\n }\n\n return (\n <SignupsContainer\n as=\"section\"\n data-testid=\"widget-signups\"\n aria-label={getTranslation(Keys.widget.signups.chartAriaLabel)}\n >\n <ChartHeader>\n <ChartTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.widget.signups.titleAriaLabel)}\n data-testid=\"widget-title-signups\"\n >\n {title ?? getTranslation(Keys.widget.signups.title)}\n </ChartTitle>\n <HeaderActionsContainer>\n <FilterDropdown\n id=\"signup-view\"\n data-testid=\"signup-view-dropdown\"\n value={signupView}\n onChange={handleViewChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.widget.signups.filterAriaLabel)}\n >\n <option value=\"all\">{getTranslation(Keys.filter.signupView.showAll)}</option>\n <option value=\"members\">{getTranslation(Keys.filter.signupView.showMembers)}</option>\n <option value=\"retail\">{getTranslation(Keys.filter.signupView.showRetail)}</option>\n <option value=\"brandAffiliates\">\n {getTranslation(Keys.filter.signupView.showBrandAffiliates)}\n </option>\n </FilterDropdown>\n <WidgetMenu widgetId=\"signups\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </ChartHeader>\n\n <MetricDisplay data-testid=\"signups-metric-display\">\n <MetricValue\n data-testid=\"signups-metric-value\"\n aria-label={`${totalLabel}: ${totalSignups.toLocaleString()}`}\n >\n {totalSignups.toLocaleString()}\n </MetricValue>\n {trendInfo.value !== noDataText && (\n <MetricTrend\n as=\"output\"\n data-testid=\"signups-metric-trend\"\n direction={trendInfo.direction}\n aria-live=\"polite\"\n aria-label={`${getTrendDirectionLabel(trendInfo.direction)} ${trendInfo.value}`}\n >\n <div className=\"trend-line\">\n <span aria-hidden=\"true\">{getTrendIcon(trendInfo.direction)}</span>\n <span className=\"change-value\">{trendInfo.value.split(' ')[0]}</span>\n <span className=\"change-percent\">{trendInfo.value.split(' ')[1]}</span>\n </div>\n <div className=\"comparison-text\">{getTranslation(Keys.widget.conversionRate.comparison)}</div>\n </MetricTrend>\n )}\n </MetricDisplay>\n\n <ChartContainer data-testid=\"signups-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\" minHeight={200}>\n <LineChart data={formattedData} margin={CHART_MARGIN}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"shortDate\" tick={AXIS_TICK} tickLine={false} interval=\"preserveStartEnd\" />\n <YAxis tick={AXIS_TICK} tickLine={false} />\n <Tooltip />\n {(signupView === 'all' || signupView === 'members') && (\n <Line\n type=\"monotone\"\n dataKey={signupView === 'all' ? 'total' : 'members'}\n stroke={signupView === 'all' ? SERIES_COLORS.total : SERIES_COLORS.members}\n strokeWidth={2}\n dot={LINE_DOT}\n name={signupView === 'all' ? totalLabel : membersLabel}\n />\n )}\n {signupView === 'all' && (\n <>\n <Line\n type=\"monotone\"\n dataKey=\"members\"\n stroke={SERIES_COLORS.members}\n strokeWidth={2}\n dot={LINE_DOT}\n name={membersLabel}\n />\n <Line\n type=\"monotone\"\n dataKey=\"retail\"\n stroke={SERIES_COLORS.retail}\n strokeWidth={2}\n dot={LINE_DOT}\n name={retailLabel}\n />\n <Line\n type=\"monotone\"\n dataKey=\"brandAffiliates\"\n stroke={SERIES_COLORS.brandAffiliates}\n strokeWidth={2}\n dot={LINE_DOT}\n name={brandAffiliatesLabel}\n />\n </>\n )}\n {signupView === 'retail' && (\n <Line\n type=\"monotone\"\n dataKey=\"retail\"\n stroke={SERIES_COLORS.retail}\n strokeWidth={2}\n dot={LINE_DOT}\n name={retailLabel}\n />\n )}\n {signupView === 'brandAffiliates' && (\n <Line\n type=\"monotone\"\n dataKey=\"brandAffiliates\"\n stroke={SERIES_COLORS.brandAffiliates}\n strokeWidth={2}\n dot={LINE_DOT}\n name={brandAffiliatesLabel}\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n </ChartContainer>\n\n {signupView === 'all' && (\n <Legend data-testid=\"signups-legend\">\n <LegendItem data-testid=\"legend-total\">\n <LegendColor color={SERIES_COLORS.total} />\n <LegendLabel>{totalLabel}</LegendLabel>\n </LegendItem>\n <LegendItem data-testid=\"legend-members\">\n <LegendColor color={SERIES_COLORS.members} />\n <LegendLabel>{membersLabel}</LegendLabel>\n </LegendItem>\n <LegendItem data-testid=\"legend-retail\">\n <LegendColor color={SERIES_COLORS.retail} />\n <LegendLabel>{retailLabel}</LegendLabel>\n </LegendItem>\n <LegendItem data-testid=\"legend-brandAffiliates\">\n <LegendColor color={SERIES_COLORS.brandAffiliates} />\n <LegendLabel>{brandAffiliatesLabel}</LegendLabel>\n </LegendItem>\n </Legend>\n )}\n </SignupsContainer>\n );\n};\n\nexport const SignupsChart = React.memo(SignupsChartComponent);\nSignupsChart.displayName = 'SignupsChart';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const SignupsContainer = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const ChartHeader = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const HeaderActionsContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const ChartTitle = styled('h2')`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`;\n\nexport const FilterDropdown = styled('select')`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const MetricDisplay = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`;\n\nexport const MetricValue = styled('div')`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`;\n\nexport const MetricTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#066100';\n if (direction === 'down') return '#DC2626';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\n }\n`;\n\nexport const ChartContainer = styled('div')`\n width: 100%;\n height: 220px;\n margin-top: 16px;\n\n @media (min-width: 768px) {\n height: 280px;\n }\n @media (min-width: 1080px) {\n height: 340px;\n }\n\n .recharts-cartesian-grid-horizontal line,\n .recharts-cartesian-grid-vertical line {\n stroke: ${({ theme }) => getGenomeColor(theme, 'N40')};\n stroke-width: 1px;\n }\n .recharts-text {\n fill: ${({ theme }) => getGenomeColor(theme, 'N70')};\n font-size: 10px;\n }\n`;\n\nexport const Legend = styled('div')`\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 16px;\n margin-top: 16px;\n padding-top: 0;\n`;\n\nexport const LegendItem = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n`;\n\nexport const LegendColor = styled('div')<{ color: string }>`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ color }) => color};\n flex-shrink: 0;\n`;\n\nexport const LegendLabel = styled('span')`\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n","import React from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { WidgetMenu } from '../WidgetMenu';\nimport {\n CategoriesContainer,\n ChartHeader,\n ChartTitle,\n SortDropdown,\n ChartAndLegendContainer,\n ChartWrapper,\n LegendContainer,\n LegendItem,\n LegendColor,\n LegendInfo,\n LegendName,\n LegendValue,\n LegendValueWrapper,\n LegendTrendInline,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n EmptyState,\n EmptyStateText,\n HeaderActionsContainer,\n} from './TopCategoriesPieChart.styled';\nimport type { CategoryRevenue, CategorySortOption } from '../../types.d';\nimport { CategoriesPieChartSkeleton } from '../LoadingSkeletons';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport { parseTrendPercent, resolveTrendDirection, calculateWeightedRevenueTrend } from '../../utils/trendUtils';\nimport { formatMoney } from '../../utils/dataUtils';\n\nexport interface TopCategoriesPieChartProps {\n readonly categories: CategoryRevenue[];\n readonly categorySort: CategorySortOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly onSortChange?: (sort: CategorySortOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nconst TopCategoriesPieChartComponent: React.FC<TopCategoriesPieChartProps> = ({\n categories,\n categorySort,\n isLoading = false,\n title,\n onSortChange,\n onTitleClick,\n}) => {\n const handleSortChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newSort = event.target.value as CategorySortOption;\n onSortChange?.(newSort);\n },\n [onSortChange],\n );\n\n const { sortedCategories, totalRevenue, trendDirection, formattedTrend } = React.useMemo(() => {\n const nextSortedCategories = [...categories].sort((a, b) => {\n if (categorySort === 'revenue') return b.revenue - a.revenue;\n return (\n (parseTrendPercent(b.trend?.revenue) ?? -Infinity) - (parseTrendPercent(a.trend?.revenue) ?? -Infinity)\n );\n });\n\n const nextTotalRevenue = nextSortedCategories.reduce((sum, category) => sum + category.revenue, 0);\n\n const { direction: nextTrendDirection, formatted: nextFormattedTrend } = calculateWeightedRevenueTrend(\n nextSortedCategories,\n (category) => category.revenue,\n (category) => category.trend?.revenue,\n );\n\n return {\n sortedCategories: nextSortedCategories,\n totalRevenue: nextTotalRevenue,\n trendDirection: nextTrendDirection,\n formattedTrend: nextFormattedTrend,\n };\n }, [categories, categorySort]);\n\n const getTrendGraphIcon = (direction: 'up' | 'down' | 'neutral') => {\n if (direction === 'up') {\n return <TrendingUpIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n if (direction === 'down') {\n return <TrendingDownIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n return null;\n };\n\n interface CustomLabelProps {\n cx: number;\n cy: number;\n midAngle: number;\n innerRadius: number;\n outerRadius: number;\n percentage: number;\n }\n\n const renderCustomLabel = (props: CustomLabelProps) => {\n // eslint-disable-next-line react/prop-types\n const { cx, cy, midAngle, innerRadius, outerRadius, percentage } = props;\n const RADIAN = Math.PI / 180;\n // Position label in the middle of the donut ring\n const radius = innerRadius + (outerRadius - innerRadius) / 2;\n const x = cx + radius * Math.cos(-midAngle * RADIAN);\n const y = cy + radius * Math.sin(-midAngle * RADIAN);\n\n return (\n <text\n x={x}\n y={y}\n fill=\"white\"\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n fontSize=\"10\"\n fontWeight=\"600\"\n fontFamily=\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\"\n letterSpacing=\"0.2\"\n style={{ lineHeight: '12px', leadingTrim: 'none' }}\n >\n {`${percentage}%`}\n </text>\n );\n };\n\n const currencyCode = sortedCategories[0]?.currencyCode;\n\n if (isLoading && categories.length === 0) {\n return (\n <CategoriesContainer data-testid=\"widget-top-categories\">\n <CategoriesPieChartSkeleton />\n </CategoriesContainer>\n );\n }\n\n if (categories.length === 0) {\n return (\n <CategoriesContainer data-testid=\"widget-top-categories\">\n <ChartHeader>\n <ChartTitle>{title ?? getTranslation(Keys.widget.topCategories.title)}</ChartTitle>\n </ChartHeader>\n <EmptyState data-testid=\"categories-empty-state\">\n <EmptyStateText>{getTranslation(Keys.widget.topCategories.empty)}</EmptyStateText>\n </EmptyState>\n </CategoriesContainer>\n );\n }\n\n return (\n <CategoriesContainer\n as=\"section\"\n data-testid=\"widget-top-categories\"\n aria-label={getTranslation(Keys.widget.topCategories.chartAriaLabel)}\n >\n <ChartHeader>\n <ChartTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.widget.topCategories.titleAriaLabel)}\n data-testid=\"widget-title-top-categories\"\n >\n {title ?? getTranslation(Keys.widget.topCategories.title)}\n </ChartTitle>\n <HeaderActionsContainer>\n <SortDropdown\n id=\"category-sort\"\n data-testid=\"category-sort-dropdown\"\n value={categorySort}\n onChange={handleSortChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.widget.topCategories.sortAriaLabel)}\n >\n <option value=\"revenue\">{getTranslation(Keys.filter.categorySort.byRevenue)}</option>\n <option value=\"trend\">{getTranslation(Keys.filter.categorySort.byTrend)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-categories\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </ChartHeader>\n\n <ChartAndLegendContainer>\n <ChartWrapper data-testid=\"categories-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={sortedCategories}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius=\"55%\"\n outerRadius=\"85%\"\n dataKey=\"revenue\"\n nameKey=\"name\"\n paddingAngle={2}\n label={renderCustomLabel}\n labelLine={false}\n >\n {sortedCategories.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"categories-donut-center\">\n <DonutCenterLabel>{getTranslation(Keys.stats.revenue)}</DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</DonutCenterValue>\n <DonutCenterTrend direction={trendDirection}>\n {getTrendGraphIcon(trendDirection)}\n <span>{formattedTrend}</span>\n </DonutCenterTrend>\n </DonutCenterOverlay>\n </ChartWrapper>\n\n <LegendContainer data-testid=\"categories-legend-container\">\n {sortedCategories.map((category, index) => (\n <LegendItem key={category.id} data-testid={`category-legend-${index}`}>\n <LegendColor color={category.color} />\n <LegendInfo>\n <LegendName>{category.name}</LegendName>\n <LegendValueWrapper>\n <LegendValue>\n {formatMoney(category.revenue, category.currencyCode)} ({category.percentage}%)\n </LegendValue>\n {category.trend?.revenue ? (\n <LegendTrendInline\n direction={resolveTrendDirection(category.trend?.revenue)}\n data-testid={`category-legend-trend-${index}`}\n aria-label={category.trend.revenue}\n >\n {getTrendGraphIcon(resolveTrendDirection(category.trend?.revenue))}\n </LegendTrendInline>\n ) : null}\n </LegendValueWrapper>\n </LegendInfo>\n </LegendItem>\n ))}\n </LegendContainer>\n </ChartAndLegendContainer>\n </CategoriesContainer>\n );\n};\n\nexport const TopCategoriesPieChart = React.memo(TopCategoriesPieChartComponent);\nTopCategoriesPieChart.displayName = 'TopCategoriesPieChart';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const CategoriesContainer = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const ChartHeader = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const HeaderActionsContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const ChartTitle = styled('h2')`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`;\n\nexport const SortDropdown = styled('select')`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const ChartAndLegendContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 20px;\n align-items: center;\n justify-content: center;\n flex: 1;\n\n @media (min-width: 768px) {\n flex-direction: row;\n gap: 24px;\n align-items: center;\n justify-content: center;\n }\n`;\n\nexport const ChartWrapper = styled('div')`\n position: relative;\n width: 100%;\n height: 220px;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 260px;\n height: 260px;\n flex: 0 0 auto;\n }\n\n @media (min-width: 1080px) {\n width: 280px;\n height: 280px;\n flex: 0 0 auto;\n }\n\n /* Style recharts pie labels (percentages inside segments) */\n svg text {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n text[class*='recharts'] {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n`;\n\nexport const DonutCenterOverlay = styled('div')`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 96px;\n`;\n\nexport const DonutCenterLabel = styled('div')`\n font-size: 10px;\n line-height: 1.2;\n font-weight: 500;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n\nexport const DonutCenterValue = styled('div')`\n margin-top: 2px;\n font-size: 16px;\n line-height: 1.2;\n font-weight: 700;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n`;\n\nexport const DonutCenterTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 3px;\n margin-top: 4px;\n font-size: 12px;\n line-height: 1.2;\n font-weight: 600;\n color: ${({ direction, theme }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n\nexport const LegendContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex: 0 1 auto;\n\n @media (min-width: 768px) {\n gap: 10px;\n }\n`;\n\nexport const LegendItem = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 0;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n @media (min-width: 768px) {\n gap: 10px;\n padding: 6px 0;\n }\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n`;\n\nexport const LegendColor = styled('div')<{ color: string }>`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ color }) => color};\n flex-shrink: 0;\n`;\n\nexport const LegendInfo = styled('div')`\n display: flex;\n flex-direction: row;\n gap: 4px;\n flex: 1;\n min-width: 0;\n align-items: center;\n`;\n\nexport const LegendName = styled('div')`\n font-size: 13px;\n font-weight: 600;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n font-size: 14px;\n }\n`;\n\nexport const LegendValue = styled('div')`\n font-size: 12px;\n font-weight: 500;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n flex-shrink: 0;\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const LegendPercentage = styled('div')`\n display: none;\n`;\n\nexport const LegendValueWrapper = styled('div')`\n display: flex;\n align-items: center;\n gap: 4px;\n flex: 1;\n min-width: 0;\n`;\n\nexport const LegendTrendInline = styled('span')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ direction }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return '#757575';\n }};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n\nexport const LegendTrend = styled('span')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ direction }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return '#757575';\n }};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`;\n\nexport const EmptyState = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n text-align: center;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n\nexport const EmptyStateText = styled('div')`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n","import React from 'react';\nimport {\n DashboardContainer,\n StatsRow,\n WidgetContainer,\n TwoColumnGrid,\n ErrorContainer,\n} from './ShoppingDashboard.styled';\nimport { DashboardHeader } from './shared/DashboardHeader';\nimport { StatsCard } from './shared/StatsCard';\nimport { TopSellingProductsList } from './shared/TopProducts/TopSellingProductsList';\nimport { ConversionRateChart } from './shared/ConversionRate/ConversionRateChart';\nimport { SignupsChart } from './shared/Signups/SignupsChart';\nimport { TopCategoriesPieChart } from './shared/TopCategories/TopCategoriesPieChart';\nimport type {\n DashboardStats,\n TopProduct,\n ConversionDataPoint,\n SignupDataPoint,\n CategoryRevenue,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n ProductSortOption,\n SignupViewOption,\n ConversionFilterOption,\n CategorySortOption,\n} from './types.d';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from './TranslationKeys/ShoppingDashboardTranslationKeys';\n\nconst EMPTY_TOP_PRODUCTS: TopProduct[] = [];\nconst EMPTY_CONVERSION_DATA: ConversionDataPoint[] = [];\nconst EMPTY_SIGNUP_DATA: SignupDataPoint[] = [];\nconst EMPTY_CATEGORIES: CategoryRevenue[] = [];\n\nexport interface ShoppingDashboardProps {\n readonly stats?: DashboardStats | null;\n readonly topProducts?: TopProduct[];\n readonly conversionData?: ConversionDataPoint[];\n readonly signupData?: SignupDataPoint[];\n readonly categories?: CategoryRevenue[];\n readonly isLoading?: boolean;\n readonly error?: string | null;\n readonly shopTitle?: string;\n readonly className?: string;\n\n readonly dateRange?: DateRangeOption;\n readonly market?: MarketOption;\n readonly productSort?: ProductSortOption;\n readonly signupView?: SignupViewOption;\n readonly conversionFilter?: ConversionFilterOption;\n readonly categorySort?: CategorySortOption;\n\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onProductSortChange?: (sort: ProductSortOption) => void;\n readonly onSignupViewChange?: (view: SignupViewOption) => void;\n readonly onConversionFilterChange?: (filter: ConversionFilterOption) => void;\n readonly onCategorySortChange?: (sort: CategorySortOption) => void;\n\n readonly onProductsTitleClick?: () => void;\n readonly onConversionTitleClick?: () => void;\n readonly onSignupsTitleClick?: () => void;\n readonly onCategoriesToTitleClick?: () => void;\n}\n\nexport const ShoppingDashboard: React.FC<ShoppingDashboardProps> = ({\n stats,\n topProducts,\n conversionData,\n signupData,\n categories,\n isLoading = false,\n error,\n shopTitle,\n className,\n dateRange = 'last30days',\n market = 'all',\n productSort = 'units',\n signupView = 'all',\n conversionFilter = 'all',\n categorySort = 'revenue',\n markets,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onSignupViewChange,\n onConversionFilterChange,\n onCategorySortChange,\n onProductsTitleClick,\n onConversionTitleClick,\n onSignupsTitleClick,\n onCategoriesToTitleClick,\n}) => {\n const resolvedTopProducts = topProducts ?? EMPTY_TOP_PRODUCTS;\n const resolvedConversionData = conversionData ?? EMPTY_CONVERSION_DATA;\n const resolvedSignupData = signupData ?? EMPTY_SIGNUP_DATA;\n const resolvedCategories = categories ?? EMPTY_CATEGORIES;\n\n if (error) {\n return (\n <DashboardContainer as=\"main\" className={className} aria-label={getTranslation(Keys.ariaLabel.dashboard)}>\n <ErrorContainer data-testid=\"dashboard-error\" role=\"alert\" aria-live=\"assertive\">\n <strong>{getTranslation(Keys.error)}:</strong> {error}\n </ErrorContainer>\n </DashboardContainer>\n );\n }\n\n const getTrendDirection = (trendValue?: string): 'up' | 'down' | 'neutral' => {\n if (!trendValue) return 'neutral';\n if (trendValue.startsWith('+')) return 'up';\n if (trendValue.startsWith('-')) return 'down';\n return 'neutral';\n };\n\n return (\n <DashboardContainer\n as=\"main\"\n className={className}\n data-testid=\"shopping-dashboard\"\n aria-label={getTranslation(Keys.ariaLabel.dashboard)}\n aria-busy={isLoading}\n >\n <DashboardHeader\n shopTitle={shopTitle}\n dateRange={dateRange}\n market={market}\n isLoading={isLoading}\n stats={stats}\n markets={markets}\n onDateRangeChange={onDateRangeChange}\n onMarketChange={onMarketChange}\n />\n\n <StatsRow as=\"section\" data-testid=\"stats-row\" aria-label={getTranslation(Keys.ariaLabel.statsRow)}>\n <StatsCard\n title={getTranslation(Keys.stats.revenue)}\n value={stats?.metrics?.revenue ?? '$0'}\n trendDirection={getTrendDirection(stats?.trend?.revenue)}\n trendValue={stats?.trend?.revenue}\n testId=\"stats-card-revenue\"\n isLoading={isLoading}\n />\n <StatsCard\n title={getTranslation(Keys.stats.volume)}\n value={stats?.metrics?.volume ?? '0'}\n subtitle={getTranslation(Keys.stats.subtitle.dcSv)}\n trendDirection={getTrendDirection(stats?.trend?.volume)}\n trendValue={stats?.trend?.volume}\n testId=\"stats-card-volume\"\n isLoading={isLoading}\n />\n <StatsCard\n title={getTranslation(Keys.stats.visits)}\n value={stats?.metrics?.siteVisits ?? '0'}\n subtitle={`${stats?.metrics?.conversionRate ?? '0%'} ${getTranslation(Keys.stats.subtitle.conversionRate)}`}\n trendDirection={getTrendDirection(stats?.trend?.siteVisits)}\n trendValue={stats?.trend?.siteVisits}\n testId=\"stats-card-visits\"\n isLoading={isLoading}\n />\n </StatsRow>\n\n <WidgetContainer data-testid=\"widget-container\">\n <TwoColumnGrid data-testid=\"widget-row-1\">\n <TopSellingProductsList\n products={resolvedTopProducts}\n productSort={productSort}\n isLoading={isLoading}\n maxProducts={5}\n onSortChange={onProductSortChange}\n onTitleClick={onProductsTitleClick}\n />\n <SignupsChart\n signupData={resolvedSignupData}\n signupView={signupView}\n isLoading={isLoading}\n onViewChange={onSignupViewChange}\n onTitleClick={onSignupsTitleClick}\n />\n </TwoColumnGrid>\n\n <TwoColumnGrid data-testid=\"widget-row-2\">\n <ConversionRateChart\n conversionData={resolvedConversionData}\n conversionFilter={conversionFilter}\n isLoading={isLoading}\n onFilterChange={onConversionFilterChange}\n onTitleClick={onConversionTitleClick}\n />\n <TopCategoriesPieChart\n categories={resolvedCategories}\n categorySort={categorySort}\n isLoading={isLoading}\n onSortChange={onCategorySortChange}\n onTitleClick={onCategoriesToTitleClick}\n />\n </TwoColumnGrid>\n </WidgetContainer>\n </DashboardContainer>\n );\n};\n\nexport default ShoppingDashboard;\n","import React from 'react';\nimport { ShoppingDashboard } from './ShoppingDashboard';\nimport { ProductsFullView } from './shared/TopProducts/ProductsFullView';\nimport { ConversionRateFullView } from './shared/ConversionRate/ConversionRateFullView';\nimport { SignupsFullView } from './shared/Signups/SignupsFullView';\nimport { CategoriesFullView } from './shared/TopCategories/CategoriesFullView';\nimport { useTranslationResolver } from './TranslationContext';\nimport type { TranslateFn } from './TranslationKeys/translationResolver';\nimport type {\n DashboardStats,\n TopProduct,\n ConversionDataPoint,\n SignupDataPoint,\n CategoryRevenue,\n OrderHistory,\n SignupDetail,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n ProductSortOption,\n SignupViewOption,\n ConversionFilterOption,\n CategorySortOption,\n FullViewWidgetType,\n} from './types.d';\n\ntype ViewMode = 'push' | 'replace';\n\nexport type MysiteDashboardView = 'dashboard' | FullViewWidgetType;\n\nexport interface MysiteDashboardHistoryLocation {\n readonly pathname?: string;\n readonly search?: string;\n readonly hash?: string;\n readonly state?: unknown;\n}\n\nexport interface MysiteDashboardHistoryAdapter {\n readonly location?: MysiteDashboardHistoryLocation;\n push(location: MysiteDashboardHistoryLocation): void;\n replace(location: MysiteDashboardHistoryLocation): void;\n goBack(): void;\n listen(listener: (location: MysiteDashboardHistoryLocation, action: string) => void): () => void;\n}\n\nexport interface MysiteDashboardWithNavigationProps {\n readonly stats?: DashboardStats | null;\n readonly topProducts?: TopProduct[];\n readonly conversionData?: ConversionDataPoint[];\n readonly signupData?: SignupDataPoint[];\n readonly categories?: CategoryRevenue[];\n readonly orders?: OrderHistory[];\n readonly signups?: SignupDetail[];\n readonly isLoading?: boolean;\n readonly error?: string | null;\n readonly shopTitle?: string;\n readonly className?: string;\n\n readonly translate?: TranslateFn;\n\n readonly initialDateRange?: DateRangeOption;\n readonly initialMarket?: MarketOption;\n readonly initialProductSort?: ProductSortOption;\n readonly initialSignupView?: SignupViewOption;\n readonly initialConversionFilter?: ConversionFilterOption;\n readonly initialCategorySort?: CategorySortOption;\n\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n\n readonly historyAdapter?: MysiteDashboardHistoryAdapter;\n readonly historyStateKey?: string;\n readonly resetToDashboardOnMount?: boolean;\n\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onProductSortChange?: (sort: ProductSortOption) => void;\n readonly onSignupViewChange?: (view: SignupViewOption) => void;\n readonly onConversionFilterChange?: (filter: ConversionFilterOption) => void;\n readonly onCategorySortChange?: (sort: CategorySortOption) => void;\n readonly onViewChange?: (view: MysiteDashboardView) => void;\n}\n\nconst DEFAULT_HISTORY_STATE_KEY = 'shoppingDashboardView';\n\nconst EMPTY_TOP_PRODUCTS: TopProduct[] = [];\nconst EMPTY_CONVERSION_DATA: ConversionDataPoint[] = [];\nconst EMPTY_SIGNUP_DATA: SignupDataPoint[] = [];\nconst EMPTY_CATEGORIES: CategoryRevenue[] = [];\nconst EMPTY_ORDERS: OrderHistory[] = [];\nconst EMPTY_SIGNUPS: SignupDetail[] = [];\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nfunction isMysiteDashboardView(value: unknown): value is MysiteDashboardView {\n return (\n value === 'dashboard' ||\n value === 'products' ||\n value === 'conversion-rate' ||\n value === 'signups' ||\n value === 'categories'\n );\n}\n\nfunction readViewFromState(state: unknown, stateKey: string): MysiteDashboardView {\n if (!isRecord(state)) {\n return 'dashboard';\n }\n\n const view = state[stateKey];\n return isMysiteDashboardView(view) ? view : 'dashboard';\n}\n\nfunction buildStateWithView(state: unknown, stateKey: string, view: MysiteDashboardView): Record<string, unknown> {\n const currentState = isRecord(state) ? state : {};\n\n return {\n ...currentState,\n [stateKey]: view,\n };\n}\n\nfunction buildLocationWithState(\n location: MysiteDashboardHistoryLocation | undefined,\n state: Record<string, unknown>,\n): MysiteDashboardHistoryLocation {\n return {\n pathname: location?.pathname,\n search: location?.search,\n hash: location?.hash,\n state,\n };\n}\n\nexport const MysiteDashboardWithNavigation: React.FC<MysiteDashboardWithNavigationProps> = ({\n stats,\n topProducts,\n conversionData,\n signupData,\n categories,\n orders,\n signups,\n isLoading = false,\n error,\n shopTitle,\n className,\n translate,\n initialDateRange = 'last30days',\n initialMarket = 'all',\n initialProductSort = 'units',\n initialSignupView = 'all',\n initialConversionFilter = 'all',\n initialCategorySort = 'revenue',\n markets,\n historyAdapter,\n historyStateKey = DEFAULT_HISTORY_STATE_KEY,\n resetToDashboardOnMount = true,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onSignupViewChange,\n onConversionFilterChange,\n onCategorySortChange,\n onViewChange,\n}) => {\n useTranslationResolver(translate);\n\n const [currentView, setCurrentView] = React.useState<MysiteDashboardView>('dashboard');\n const hasIntraDashboardHistoryRef = React.useRef(false);\n const [dateRange, setDateRange] = React.useState<DateRangeOption>(initialDateRange);\n const [market, setMarket] = React.useState<MarketOption>(initialMarket);\n const [productSort, setProductSort] = React.useState<ProductSortOption>(initialProductSort);\n const [signupView, setSignupView] = React.useState<SignupViewOption>(initialSignupView);\n const [conversionFilter, setConversionFilter] = React.useState<ConversionFilterOption>(initialConversionFilter);\n const [categorySort, setCategorySort] = React.useState<CategorySortOption>(initialCategorySort);\n\n const resolvedTopProducts = topProducts ?? EMPTY_TOP_PRODUCTS;\n const resolvedConversionData = conversionData ?? EMPTY_CONVERSION_DATA;\n const resolvedSignupData = signupData ?? EMPTY_SIGNUP_DATA;\n const resolvedCategories = categories ?? EMPTY_CATEGORIES;\n const resolvedOrders = orders ?? EMPTY_ORDERS;\n const resolvedSignups = signups ?? EMPTY_SIGNUPS;\n\n const updateView = React.useCallback(\n (view: MysiteDashboardView) => {\n setCurrentView(view);\n onViewChange?.(view);\n },\n [onViewChange],\n );\n\n const readCurrentView = React.useCallback((): MysiteDashboardView => {\n if (historyAdapter) {\n return readViewFromState(historyAdapter.location?.state, historyStateKey);\n }\n\n if (typeof window === 'undefined') {\n return 'dashboard';\n }\n\n return readViewFromState(window.history.state, historyStateKey);\n }, [historyAdapter, historyStateKey]);\n\n const writeCurrentView = React.useCallback(\n (view: MysiteDashboardView, mode: ViewMode) => {\n if (historyAdapter) {\n const nextState = buildStateWithView(historyAdapter.location?.state, historyStateKey, view);\n const nextLocation = buildLocationWithState(historyAdapter.location, nextState);\n\n if (mode === 'replace') {\n historyAdapter.replace(nextLocation);\n return;\n }\n\n historyAdapter.push(nextLocation);\n return;\n }\n\n if (typeof window === 'undefined') {\n return;\n }\n\n const nextState = buildStateWithView(window.history.state, historyStateKey, view);\n\n if (mode === 'replace') {\n window.history.replaceState(nextState, '');\n return;\n }\n\n window.history.pushState(nextState, '');\n },\n [historyAdapter, historyStateKey],\n );\n\n React.useEffect(() => {\n if (resetToDashboardOnMount) {\n writeCurrentView('dashboard', 'replace');\n hasIntraDashboardHistoryRef.current = false;\n updateView('dashboard');\n } else {\n updateView(readCurrentView());\n }\n\n if (historyAdapter) {\n return historyAdapter.listen((location, action) => {\n if (action === 'POP') {\n const nextView = readViewFromState(location.state, historyStateKey);\n hasIntraDashboardHistoryRef.current = nextView !== 'dashboard';\n updateView(nextView);\n }\n });\n }\n\n const handlePopState = (event: PopStateEvent) => {\n const nextView = readViewFromState(event.state, historyStateKey);\n hasIntraDashboardHistoryRef.current = nextView !== 'dashboard';\n updateView(nextView);\n };\n\n window.addEventListener('popstate', handlePopState);\n return () => {\n window.removeEventListener('popstate', handlePopState);\n };\n }, [historyAdapter, historyStateKey, readCurrentView, resetToDashboardOnMount, updateView, writeCurrentView]);\n\n const handleOpenFullView = React.useCallback(\n (view: FullViewWidgetType) => {\n hasIntraDashboardHistoryRef.current = true;\n writeCurrentView(view, 'push');\n updateView(view);\n },\n [updateView, writeCurrentView],\n );\n\n const handleBack = React.useCallback(() => {\n if (currentView !== 'dashboard' && hasIntraDashboardHistoryRef.current) {\n if (historyAdapter) {\n historyAdapter.goBack();\n return;\n }\n\n if (typeof window !== 'undefined') {\n window.history.back();\n }\n\n return;\n }\n\n hasIntraDashboardHistoryRef.current = false;\n writeCurrentView('dashboard', 'replace');\n updateView('dashboard');\n }, [currentView, historyAdapter, updateView, writeCurrentView]);\n\n const handleDateRangeChange = React.useCallback(\n (nextDateRange: DateRangeOption) => {\n setDateRange(nextDateRange);\n onDateRangeChange?.(nextDateRange);\n },\n [onDateRangeChange],\n );\n\n const handleMarketChange = React.useCallback(\n (nextMarket: MarketOption) => {\n setMarket(nextMarket);\n onMarketChange?.(nextMarket);\n },\n [onMarketChange],\n );\n\n const handleProductSortChange = React.useCallback(\n (nextProductSort: ProductSortOption) => {\n setProductSort(nextProductSort);\n onProductSortChange?.(nextProductSort);\n },\n [onProductSortChange],\n );\n\n const handleSignupViewChange = React.useCallback(\n (nextSignupView: SignupViewOption) => {\n setSignupView(nextSignupView);\n onSignupViewChange?.(nextSignupView);\n },\n [onSignupViewChange],\n );\n\n const handleConversionFilterChange = React.useCallback(\n (nextFilter: ConversionFilterOption) => {\n setConversionFilter(nextFilter);\n onConversionFilterChange?.(nextFilter);\n },\n [onConversionFilterChange],\n );\n\n const handleCategorySortChange = React.useCallback(\n (nextSort: CategorySortOption) => {\n setCategorySort(nextSort);\n onCategorySortChange?.(nextSort);\n },\n [onCategorySortChange],\n );\n\n const handleProductsTitleClick = React.useCallback(() => {\n handleOpenFullView('products');\n }, [handleOpenFullView]);\n\n const handleConversionTitleClick = React.useCallback(() => {\n handleOpenFullView('conversion-rate');\n }, [handleOpenFullView]);\n\n const handleSignupsTitleClick = React.useCallback(() => {\n handleOpenFullView('signups');\n }, [handleOpenFullView]);\n\n const handleCategoriesTitleClick = React.useCallback(() => {\n handleOpenFullView('categories');\n }, [handleOpenFullView]);\n\n if (currentView === 'products') {\n return (\n <ProductsFullView\n products={resolvedTopProducts}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onProductSortChange={handleProductSortChange}\n />\n );\n }\n\n if (currentView === 'conversion-rate') {\n return (\n <ConversionRateFullView\n conversionData={resolvedConversionData}\n orders={resolvedOrders}\n dateRange={dateRange}\n market={market}\n conversionFilter={conversionFilter}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onConversionFilterChange={handleConversionFilterChange}\n />\n );\n }\n\n if (currentView === 'signups') {\n return (\n <SignupsFullView\n signupData={resolvedSignupData}\n signups={resolvedSignups}\n dateRange={dateRange}\n market={market}\n signupView={signupView}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onSignupViewChange={handleSignupViewChange}\n />\n );\n }\n\n if (currentView === 'categories') {\n return (\n <CategoriesFullView\n categories={resolvedCategories}\n dateRange={dateRange}\n market={market}\n categorySort={categorySort}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onCategorySortChange={handleCategorySortChange}\n />\n );\n }\n\n return (\n <ShoppingDashboard\n stats={stats}\n topProducts={resolvedTopProducts}\n conversionData={resolvedConversionData}\n signupData={resolvedSignupData}\n categories={resolvedCategories}\n isLoading={isLoading}\n error={error}\n shopTitle={shopTitle}\n className={className}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n signupView={signupView}\n conversionFilter={conversionFilter}\n categorySort={categorySort}\n markets={markets}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onProductSortChange={handleProductSortChange}\n onSignupViewChange={handleSignupViewChange}\n onConversionFilterChange={handleConversionFilterChange}\n onCategorySortChange={handleCategorySortChange}\n onProductsTitleClick={handleProductsTitleClick}\n onConversionTitleClick={handleConversionTitleClick}\n onSignupsTitleClick={handleSignupsTitleClick}\n onCategoriesToTitleClick={handleCategoriesTitleClick}\n />\n );\n};\n\nexport default MysiteDashboardWithNavigation;\n","import React, { useState } from 'react';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type { TopProduct, DateRangeOption, MarketOption, MarketFilterOption, ProductSortOption } from '../../types.d';\nimport { FullViewTableSkeleton } from '../LoadingSkeletons';\nimport { PageContainer, EmptyStateText } from '../FullViewComponents.styled';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport {\n ProductInfo,\n ProductName,\n ProductSku,\n MetricValue,\n MobileCardsContainer,\n DesktopTableContainer,\n MobileProductCard,\n MobileCardHeader,\n MobileProductRank,\n MobileProductDetails,\n MobileProductName,\n MobileProductSku,\n MobileMetricsGrid,\n MobileMetricItem,\n MobileMetricLabel,\n MobileMetricValue,\n} from './ProductsFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\ninterface ProductRow {\n rank: number;\n name: string;\n sku: string;\n units: number;\n revenue: number;\n volume: number;\n}\n\nexport interface ProductsFullViewProps {\n readonly products: TopProduct[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly productSort: ProductSortOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n readonly isLoading?: boolean;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onProductSortChange?: (sort: ProductSortOption) => void;\n}\n\nfunction mapProductToRow(product: TopProduct): ProductRow {\n return {\n rank: product.rank,\n name: product.name,\n sku: `${getTranslation(Keys.fullView.products.skuPrefix)}-${product.id.replace('prod-', '').padStart(3, '0')}`,\n units: product.unitsSold,\n revenue: product.revenue,\n volume: product.volume,\n };\n}\n\nexport const ProductsFullView: React.FC<ProductsFullViewProps> = ({\n products,\n dateRange,\n market,\n productSort,\n markets,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const [sortColumn, setSortColumn] = useState<string>(productSort === 'revenue' ? 'revenue' : 'units');\n const [sortDirection, setSortDirection] = useState<'asc' | 'desc'>('desc');\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const marketOptions = useMarketOptions(markets);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'sort',\n label: getTranslation(Keys.filter.productSort.label),\n value: productSort,\n options: [\n { value: 'units', label: getTranslation(Keys.filter.productSort.units) },\n { value: 'revenue', label: getTranslation(Keys.filter.productSort.revenue) },\n { value: 'volume', label: getTranslation(Keys.filter.productSort.volume) },\n ],\n },\n ],\n [dateRange, market, marketOptions, productSort],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value);\n else if (key === 'sort') {\n onProductSortChange?.(value as ProductSortOption);\n setCurrentPage(1);\n }\n },\n [onDateRangeChange, onMarketChange, onProductSortChange],\n );\n\n const handleSort = React.useCallback((columnKey: string, direction: 'asc' | 'desc') => {\n setSortColumn(columnKey);\n setSortDirection(direction);\n setCurrentPage(1);\n }, []);\n\n const productRows = React.useMemo(() => products.map(mapProductToRow), [products]);\n\n const sortedRows = React.useMemo(\n () =>\n [...productRows].sort((a, b) => {\n const aVal = a[sortColumn as keyof ProductRow] as number;\n const bVal = b[sortColumn as keyof ProductRow] as number;\n return sortDirection === 'asc' ? aVal - bVal : bVal - aVal;\n }),\n [productRows, sortColumn, sortDirection],\n );\n\n const { totalPages, pageItems: paginatedRows } = usePaginatedItems(sortedRows, currentPage, itemsPerPage);\n\n const currencyCode = products[0]?.currencyCode;\n\n const columns: ColumnDef<ProductRow>[] = React.useMemo(\n () => [\n { key: 'rank', label: getTranslation(Keys.fullView.products.columns.rank), sortable: true },\n {\n key: 'name',\n label: getTranslation(Keys.fullView.products.columns.product),\n sortable: true,\n render: (_: unknown, row: ProductRow) => (\n <ProductInfo>\n <ProductName>{row.name}</ProductName>\n <ProductSku>{row.sku}</ProductSku>\n </ProductInfo>\n ),\n },\n {\n key: 'units',\n label: getTranslation(Keys.fullView.products.columns.unitsSold),\n sortable: true,\n render: (value: unknown) => <MetricValue>{Number(value).toLocaleString()}</MetricValue>,\n },\n {\n key: 'revenue',\n label: getTranslation(Keys.fullView.products.columns.revenue),\n sortable: true,\n render: (value: unknown) => <MetricValue>{formatMoney(Number(value), currencyCode)}</MetricValue>,\n },\n {\n key: 'volume',\n label: getTranslation(Keys.fullView.products.columns.volume),\n sortable: true,\n render: (value: unknown) => <MetricValue>{Number(value).toLocaleString()}</MetricValue>,\n },\n ],\n [currencyCode],\n );\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"products-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topProducts.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewTableSkeleton />\n </PageContainer>\n );\n }\n\n if (products.length === 0) {\n return (\n <PageContainer data-testid=\"products-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topProducts.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <EmptyStateText data-testid=\"products-fullview-empty\">\n {getTranslation(Keys.fullView.products.noProducts)}\n </EmptyStateText>\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"products-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topProducts.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n {!isMobileView ? (\n <DesktopTableContainer data-testid=\"products-fullview-desktop-table\">\n <DataTable\n columns={columns}\n data={paginatedRows}\n sortable\n onSort={handleSort}\n sortColumn={sortColumn}\n sortDirection={sortDirection}\n getRowKey={(row: ProductRow) => row.rank}\n />\n </DesktopTableContainer>\n ) : (\n <MobileCardsContainer data-testid=\"products-fullview-mobile-cards\">\n {paginatedRows.map((row) => (\n <MobileProductCard key={row.rank}>\n <MobileCardHeader>\n <MobileProductRank>#{row.rank}</MobileProductRank>\n <MobileProductDetails>\n <MobileProductName>{row.name}</MobileProductName>\n <MobileProductSku>{row.sku}</MobileProductSku>\n </MobileProductDetails>\n </MobileCardHeader>\n <MobileMetricsGrid>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.widget.topProducts.units)}\n </MobileMetricLabel>\n <MobileMetricValue>{row.units.toLocaleString()}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.widget.topProducts.revenue)}\n </MobileMetricLabel>\n <MobileMetricValue>{formatMoney(row.revenue, currencyCode)}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.filter.productSort.volume)}\n </MobileMetricLabel>\n <MobileMetricValue>{row.volume.toLocaleString()}</MobileMetricValue>\n </MobileMetricItem>\n </MobileMetricsGrid>\n </MobileProductCard>\n ))}\n </MobileCardsContainer>\n )}\n\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={sortedRows.length}\n />\n )}\n </PageContainer>\n );\n};\n","import React from 'react';\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\nimport CalendarTodayIcon from '@mui/icons-material/CalendarToday';\nimport LanguageIcon from '@mui/icons-material/Language';\nimport {\n PageHeaderWrapper,\n BackButtonWrapper,\n BackButton,\n HeaderContainer,\n LeftSection,\n Title,\n DateRange,\n MobileDateRange,\n FiltersSection,\n FilterWrapper,\n FilterIcon,\n FilterDropdown,\n MobileTitleWrapper,\n MobileTitle,\n} from './PageHeader.styled';\nimport type { FilterConfig } from './types';\nimport type { DateRangeOption, MarketOption, MarketFilterOption } from '../types.d';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport type { FilterConfig } from './types';\n\ntype TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport interface DateRangeMarketKeys {\n readonly filter: {\n readonly dateRange: {\n readonly label: TranslationEntry;\n readonly last7days: TranslationEntry;\n readonly last30days: TranslationEntry;\n readonly last90days: TranslationEntry;\n readonly thisMonth: TranslationEntry;\n };\n readonly market: {\n readonly label: TranslationEntry;\n };\n };\n}\n\nexport function buildDateRangeFilter(dateRange: DateRangeOption, keys: DateRangeMarketKeys): FilterConfig {\n return {\n key: 'dateRange',\n label: getTranslation(keys.filter.dateRange.label),\n value: dateRange,\n icon: 'calendar',\n options: [\n { value: 'last7days', label: getTranslation(keys.filter.dateRange.last7days) },\n { value: 'last30days', label: getTranslation(keys.filter.dateRange.last30days) },\n { value: 'last90days', label: getTranslation(keys.filter.dateRange.last90days) },\n { value: 'thisMonth', label: getTranslation(keys.filter.dateRange.thisMonth) },\n ],\n };\n}\n\nexport function buildMarketFilter(\n market: MarketOption,\n marketOptions: ReadonlyArray<MarketFilterOption>,\n keys: DateRangeMarketKeys,\n): FilterConfig {\n return {\n key: 'market',\n label: getTranslation(keys.filter.market.label),\n value: market,\n icon: 'globe',\n options: marketOptions.map((option) => ({ value: option.value, label: option.label })),\n };\n}\n\nexport interface PageHeaderProps {\n readonly title: string;\n readonly dateRange: string;\n readonly onBack: () => void;\n readonly filters?: FilterConfig[];\n readonly onFilterChange?: (filterKey: string, value: string) => void;\n}\n\nexport const PageHeader: React.FC<PageHeaderProps> = ({ title, dateRange, onBack, filters, onFilterChange }) => {\n const renderFilterIcon = (iconType?: 'calendar' | 'globe') => {\n if (!iconType) return null;\n return (\n <FilterIcon>\n {iconType === 'calendar' && <CalendarTodayIcon />}\n {iconType === 'globe' && <LanguageIcon />}\n </FilterIcon>\n );\n };\n\n return (\n <PageHeaderWrapper data-testid=\"page-header\">\n <BackButtonWrapper>\n <BackButton\n onClick={onBack}\n aria-label={getTranslation(Keys.navigation.backAriaLabel)}\n data-testid=\"page-back-button\"\n type=\"button\"\n >\n <ArrowBackIcon />\n <span>{getTranslation(Keys.navigation.backToDashboard)}</span>\n </BackButton>\n </BackButtonWrapper>\n\n <MobileTitleWrapper>\n <MobileTitle>{title}</MobileTitle>\n </MobileTitleWrapper>\n\n <HeaderContainer>\n <LeftSection>\n <Title data-testid=\"page-header-title\">{title}</Title>\n <DateRange data-testid=\"page-header-date-range\">{dateRange}</DateRange>\n </LeftSection>\n\n {filters && filters.length > 0 && onFilterChange && (\n <FiltersSection data-testid=\"page-header-filters\">\n {filters.map((filter) => (\n <FilterWrapper key={filter.key}>\n {renderFilterIcon(filter.icon)}\n <FilterDropdown\n id={`filter-${filter.key}`}\n value={filter.value}\n onChange={(e) => onFilterChange(filter.key, e.target.value)}\n disabled={filter.disabled}\n aria-label={`${filter.label} ${getTranslation(Keys.ariaLabel.filterSuffix)}`}\n data-testid={`filter-dropdown-${filter.key}`}\n >\n {filter.options.map((option) => (\n <option key={option.value} value={option.value}>\n {filter.label && filter.key === 'customerType'\n ? `${filter.label} ${option.label}`\n : option.label}\n </option>\n ))}\n </FilterDropdown>\n </FilterWrapper>\n ))}\n </FiltersSection>\n )}\n\n <MobileDateRange>{dateRange}</MobileDateRange>\n </HeaderContainer>\n </PageHeaderWrapper>\n );\n};\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const PageHeaderWrapper = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n`;\n\nexport const BackButtonWrapper = styled('div')`\n display: flex;\n align-items: center;\n`;\n\nexport const BackButton = styled('button')`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0;\n border: none;\n background-color: transparent;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n cursor: pointer;\n transition: color 0.2s ease;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n\n &:hover {\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n }\n\n &:focus {\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: 2px;\n border-radius: 4px;\n }\n\n svg {\n font-size: 16px;\n }\n\n span {\n line-height: 1;\n }\n`;\n\nexport const HeaderContainer = styled('div')`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 16px;\n border-bottom: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n gap: 24px;\n\n @media (max-width: 767px) {\n align-items: flex-end;\n gap: 16px;\n }\n`;\n\nexport const LeftSection = styled('div')`\n display: flex;\n align-items: center;\n gap: 16px;\n flex: 1;\n\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const Title = styled('h1')`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`;\n\nexport const DateRange = styled('p')`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n white-space: nowrap;\n`;\n\nexport const MobileDateRange = styled('p')`\n display: none;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n flex-shrink: 0;\n }\n`;\n\nexport const FiltersSection = styled('div')`\n display: flex;\n gap: 24px;\n align-items: center;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n`;\n\nexport const FilterWrapper = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const FilterIcon = styled('span')`\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n svg {\n font-size: 16px;\n }\n`;\n\nexport const FilterDropdown = styled('select')`\n min-width: 120px;\n height: 32px;\n padding: 6px 8px;\n padding-right: 24px;\n background-color: transparent;\n border: none;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: background-color 0.2s ease;\n appearance: none;\n background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><path fill=\"%23667085\" d=\"M6 8L2 4h8L6 8z\"/></svg>');\n background-repeat: no-repeat;\n background-position: right 4px center;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 4px;\n }\n\n &:focus {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 4px;\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n @media (max-width: 767px) {\n min-width: auto;\n width: auto;\n flex: none;\n padding-right: 24px;\n background-position: right 8px center;\n }\n`;\n\nexport const MobileTitleWrapper = styled('div')`\n display: none;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`;\n\nexport const MobileTitle = styled('h1')`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n`;\n","import React from 'react';\nimport ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\nimport {\n TableContainer,\n Table,\n TableHeader,\n TableHeaderCell,\n TableBody,\n TableRow,\n TableCell,\n EmptyTableCell,\n SortIconContainer,\n} from './DataTable.styled';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface ColumnDef<TData = unknown> {\n key: string;\n label: string;\n sortable?: boolean;\n render?: (value: unknown, row: TData) => React.ReactNode;\n align?: 'left' | 'center' | 'right';\n}\n\nexport interface DataTableProps<TData = unknown> {\n readonly columns: ColumnDef<TData>[];\n readonly data: TData[];\n readonly sortable?: boolean;\n readonly onSort?: (columnKey: string, direction: 'asc' | 'desc') => void;\n readonly sortColumn?: string;\n readonly sortDirection?: 'asc' | 'desc';\n readonly getRowKey?: (row: TData, rowIndex: number) => React.Key;\n}\n\nexport const DataTable = <TData,>({\n columns,\n data,\n sortable = false,\n onSort,\n sortColumn,\n sortDirection = 'asc',\n getRowKey,\n}: DataTableProps<TData>) => {\n const handleSort = (columnKey: string) => {\n if (!sortable || !onSort) return;\n const newDirection = sortColumn === columnKey && sortDirection === 'asc' ? 'desc' : 'asc';\n onSort(columnKey, newDirection);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent, columnKey: string) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleSort(columnKey);\n }\n };\n\n const getAriaSort = (columnKey: string): 'ascending' | 'descending' | undefined => {\n if (sortColumn !== columnKey) return undefined;\n return sortDirection === 'asc' ? 'ascending' : 'descending';\n };\n\n return (\n <TableContainer data-testid=\"data-table\">\n <Table>\n <TableHeader>\n <tr>\n {columns.map((column) => (\n <TableHeaderCell\n key={column.key}\n scope=\"col\"\n sortable={sortable && column.sortable}\n onClick={() => column.sortable && handleSort(column.key)}\n onKeyDown={(e) => column.sortable && handleKeyDown(e, column.key)}\n tabIndex={sortable && column.sortable ? 0 : -1}\n aria-sort={getAriaSort(column.key)}\n aria-label={`${column.label}${column.sortable ? getTranslation(Keys.dataTable.sortableColumn) : ''}`}\n data-testid={`table-header-${column.key}`}\n >\n {column.label}\n {sortable && column.sortable && (\n <SortIconContainer isActive={sortColumn === column.key}>\n {sortColumn === column.key && sortDirection === 'desc' ? (\n <ArrowDownwardIcon />\n ) : (\n <ArrowUpwardIcon />\n )}\n </SortIconContainer>\n )}\n </TableHeaderCell>\n ))}\n </tr>\n </TableHeader>\n <TableBody>\n {data.length === 0 ? (\n <TableRow data-testid=\"table-empty-row\">\n <EmptyTableCell colSpan={columns.length}>\n {getTranslation(Keys.dataTable.noDataAvailable)}\n </EmptyTableCell>\n </TableRow>\n ) : (\n data.map((row, rowIndex) => (\n <TableRow\n key={getRowKey ? getRowKey(row, rowIndex) : rowIndex}\n data-testid={`table-row-${rowIndex}`}\n >\n {columns.map((column) => (\n <TableCell key={column.key} data-testid={`table-cell-${column.key}`}>\n {column.render\n ? column.render((row as Record<string, unknown>)[column.key], row)\n : ((row as Record<string, unknown>)[column.key] as React.ReactNode)}\n </TableCell>\n ))}\n </TableRow>\n ))\n )}\n </TableBody>\n </Table>\n </TableContainer>\n );\n};\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const TableContainer = styled('div')`\n width: 100%;\n overflow-x: auto;\n border-radius: 8px;\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n`;\n\nexport const Table = styled('table')`\n width: 100%;\n border-collapse: collapse;\n`;\n\nexport const TableHeader = styled('thead')`\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-bottom: 2px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n`;\n\nexport const TableHeaderCell = styled('th')<{ sortable?: boolean }>`\n padding: 12px 16px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n text-align: left;\n cursor: ${({ sortable }) => (sortable ? 'pointer' : 'default')};\n user-select: none;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n }\n\n &:focus {\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: -2px;\n }\n`;\n\nexport const TableBody = styled('tbody')``;\n\nexport const TableRow = styled('tr')`\n border-bottom: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n }\n\n &:last-child {\n border-bottom: none;\n }\n`;\n\nexport const TableCell = styled('td')`\n padding: 12px 16px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n text-align: left;\n`;\n\nexport const EmptyTableCell = styled(TableCell)`\n text-align: center;\n`;\n\nexport const SortIconContainer = styled('span')<{ isActive?: boolean }>`\n display: inline-flex;\n margin-left: 6px;\n opacity: ${({ isActive }) => (isActive ? 1 : 0.4)};\n transition: opacity 0.2s ease;\n\n svg {\n font-size: 16px;\n }\n`;\n","import React from 'react';\nimport ChevronLeftIcon from '@mui/icons-material/ChevronLeft';\nimport ChevronRightIcon from '@mui/icons-material/ChevronRight';\nimport { PaginationContainer, PageButton, PageInfo, NavButton } from './Pagination.styled';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface PaginationProps {\n readonly currentPage: number;\n readonly totalPages: number;\n readonly onPageChange: (page: number) => void;\n readonly itemsPerPage?: number;\n readonly totalItems?: number;\n}\n\nexport const Pagination: React.FC<PaginationProps> = ({\n currentPage,\n totalPages,\n onPageChange,\n itemsPerPage,\n totalItems,\n}) => {\n const handlePrevious = () => {\n if (currentPage > 1) {\n onPageChange(currentPage - 1);\n }\n };\n\n const handleNext = () => {\n if (currentPage < totalPages) {\n onPageChange(currentPage + 1);\n }\n };\n\n const handleKeyDown = (e: React.KeyboardEvent, action: () => void) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n action();\n }\n };\n\n const getPageNumbers = (): number[] => {\n if (totalPages <= 7) {\n return Array.from({ length: totalPages }, (_, i) => i + 1);\n }\n\n const pages: number[] = [];\n if (currentPage <= 4) {\n pages.push(1, 2, 3, 4, 5);\n } else if (currentPage >= totalPages - 3) {\n pages.push(totalPages - 4, totalPages - 3, totalPages - 2, totalPages - 1, totalPages);\n } else {\n pages.push(currentPage - 1, currentPage, currentPage + 1);\n }\n\n return pages;\n };\n\n const pageNumbers = getPageNumbers();\n const startItem = itemsPerPage ? (currentPage - 1) * itemsPerPage + 1 : null;\n const endItem = itemsPerPage ? Math.min(currentPage * itemsPerPage, totalItems ?? Infinity) : null;\n const goToPageLabel = getTranslation(Keys.pagination.goToPage);\n\n return (\n <PaginationContainer data-testid=\"pagination\">\n <NavButton\n onClick={handlePrevious}\n onKeyDown={(e) => handleKeyDown(e, handlePrevious)}\n disabled={currentPage === 1}\n aria-label={getTranslation(Keys.pagination.previousPage)}\n data-testid=\"pagination-previous\"\n type=\"button\"\n >\n <ChevronLeftIcon />\n </NavButton>\n\n {totalPages > 7 && currentPage > 4 && (\n <>\n <PageButton\n onClick={() => onPageChange(1)}\n isActive={false}\n aria-label={`${goToPageLabel} 1`}\n data-testid=\"pagination-page-1\"\n type=\"button\"\n >\n 1\n </PageButton>\n <PageInfo>...</PageInfo>\n </>\n )}\n\n {pageNumbers.map((page) => (\n <PageButton\n key={page}\n onClick={() => onPageChange(page)}\n isActive={currentPage === page}\n aria-label={`${goToPageLabel} ${page}`}\n aria-current={currentPage === page ? 'page' : undefined}\n data-testid={`pagination-page-${page}`}\n type=\"button\"\n >\n {page}\n </PageButton>\n ))}\n\n {totalPages > 7 && currentPage < totalPages - 3 && (\n <>\n <PageInfo>...</PageInfo>\n <PageButton\n onClick={() => onPageChange(totalPages)}\n isActive={false}\n aria-label={`${goToPageLabel} ${totalPages}`}\n data-testid={`pagination-page-${totalPages}`}\n type=\"button\"\n >\n {totalPages}\n </PageButton>\n </>\n )}\n\n <NavButton\n onClick={handleNext}\n onKeyDown={(e) => handleKeyDown(e, handleNext)}\n disabled={currentPage === totalPages}\n aria-label={getTranslation(Keys.pagination.nextPage)}\n data-testid=\"pagination-next\"\n type=\"button\"\n >\n <ChevronRightIcon />\n </NavButton>\n\n {itemsPerPage && totalItems && (\n <PageInfo as=\"output\" aria-live=\"polite\" data-testid=\"pagination-page-info\">\n {startItem}-{endItem} {getTranslation(Keys.pagination.of)} {totalItems}\n </PageInfo>\n )}\n </PaginationContainer>\n );\n};\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const PaginationContainer = styled('div')`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n margin-top: 24px;\n`;\n\nexport const PageButton = styled('button')<{ isActive?: boolean }>`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({ theme, isActive }) =>\n isActive ? getGenomeColor(theme, 'A80') : getGenomeColor(theme, 'N20')};\n color: ${({ theme, isActive }) => (isActive ? '#ffffff' : getGenomeColor(theme, 'N100'))};\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: ${({ theme, isActive }) =>\n isActive ? getGenomeColor(theme, 'A70') : getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n`;\n\nexport const PageInfo = styled('span')`\n font-size: 14px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n margin: 0 8px;\n`;\n\nexport const NavButton = styled('button')`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background-color 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n\n svg {\n font-size: 18px;\n }\n`;\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const PageContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n box-sizing: border-box;\n\n @media (max-width: 767px) {\n gap: 16px;\n }\n`;\n\nexport const MetricChartCardSection = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${({ theme }) => theme.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n gap: 16px;\n }\n`;\n\nexport const MetricSection = styled(Box)`\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 16px 0;\n gap: 10px;\n flex-wrap: nowrap;\n width: 100%;\n\n @media (max-width: 767px) {\n padding: 8px 0;\n flex-wrap: nowrap;\n align-items: center;\n }\n`;\n\nexport const MetricValue = styled(Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 32px;\n font-weight: 700;\n line-height: 1;\n letter-spacing: 0em;\n color: ${({ theme }) => theme.palette.text.primary};\n margin: 0;\n padding: 0;\n\n @media (max-width: 767px) {\n font-size: 28px;\n line-height: 1;\n }\n`;\n\nexport const MetricTrend = styled(Box)<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 13px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.01em;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return theme.palette.success.main;\n if (direction === 'down') return theme.palette.error.main;\n return theme.palette.text.secondary;\n }};\n flex-wrap: nowrap;\n white-space: nowrap;\n\n svg {\n font-size: 13px;\n flex-shrink: 0;\n width: 13px;\n height: 13px;\n }\n\n span {\n display: inline;\n line-height: 1;\n }\n\n @media (max-width: 767px) {\n font-size: 13px;\n line-height: 1;\n flex-wrap: nowrap;\n\n svg {\n font-size: 13px;\n width: 13px;\n height: 13px;\n }\n }\n`;\n\nexport const ComparisonText = styled(Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n\n @media (max-width: 767px) {\n font-size: 12px;\n line-height: 1.3;\n }\n`;\n\nexport const ChartSection = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 0;\n\n @media (max-width: 767px) {\n gap: 8px;\n }\n`;\n\nexport const ChartTitle = styled('h2')`\n margin: 0;\n font-size: 1.25rem;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.text.primary};\n\n @media (max-width: 767px) {\n font-size: 1.125rem;\n }\n`;\n\nexport const ChartContainer = styled(Box)`\n width: 100%;\n height: 450px;\n margin-bottom: 20px;\n\n @media (max-width: 767px) {\n height: 250px;\n margin-bottom: 16px;\n }\n`;\n\nexport const TableSection = styled(Box)<{ withCard?: boolean }>`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n ${({ withCard = true, theme }) =>\n withCard &&\n `\n padding: 20px;\n background-color: ${getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${theme.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n }\n `}\n`;\n\nexport const LoadingContainer = styled(Box)`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 400px;\n`;\n\nexport const EmptyStateText = styled(Typography)`\n text-align: center;\n color: ${({ theme }) => theme.palette.text.secondary};\n font-size: 1rem;\n padding: 40px 20px;\n\n @media (max-width: 767px) {\n font-size: 0.875rem;\n padding: 32px 16px;\n }\n`;\n\nexport const MobileCardName = styled(Typography)`\n font-weight: 600;\n font-size: 14px;\n`;\n\nexport const MobileCardSubtext = styled(Typography)`\n font-size: 13px;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MobileCardDetail = styled(Typography)`\n font-size: 13px;\n`;\n\nexport const MobileCardStatus = styled(Typography)<{ status: string }>`\n font-size: 13px;\n color: ${({ theme, status }) => (status === 'Active' ? theme.palette.success.main : theme.palette.warning.main)};\n`;\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const ProductInfo = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n`;\n\nexport const ProductName = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const ProductSku = styled(Typography)`\n font-size: 0.75rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MetricValue = styled(Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n\nexport const MobileCardsContainer = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const DesktopTableContainer = styled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const MobileProductCard = styled(Box)`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n`;\n\nexport const MobileCardHeader = styled(Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n`;\n\nexport const MobileProductRank = styled(Typography)`\n font-size: 1rem;\n font-weight: 700;\n color: ${({ theme }) => theme.palette.primary.main};\n min-width: 24px;\n`;\n\nexport const MobileProductDetails = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`;\n\nexport const MobileProductName = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n`;\n\nexport const MobileProductSku = styled(Typography)`\n font-size: 0.75rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MobileMetricsGrid = styled(Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({ theme }) => theme.palette.divider};\n`;\n\nexport const MobileMetricItem = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`;\n\nexport const MobileMetricLabel = styled(Typography)`\n font-size: 0.625rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n text-transform: uppercase;\n`;\n\nexport const MobileMetricValue = styled(Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n","import useMediaQuery from '@mui/material/useMediaQuery';\n\nexport const MOBILE_VIEWPORT_QUERY = '(max-width:767px)';\n\nexport function useIsMobileViewport(): boolean {\n return useMediaQuery(MOBILE_VIEWPORT_QUERY, { noSsr: true });\n}\n","import React, { useState } from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend } from 'recharts';\nimport ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type {\n ConversionDataPoint,\n OrderHistory,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n ConversionFilterOption,\n} from '../../types.d';\nimport type { TrendDirection } from '../types';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport {\n PageContainer,\n MetricChartCardSection,\n MetricSection,\n MetricValue,\n MetricTrend,\n ChartSection,\n ChartTitle,\n ChartContainer,\n TableSection,\n} from '../FullViewComponents.styled';\nimport {\n MobileOrderCard,\n MobileOrderHeader,\n MobileCustomerInfo,\n MobileCustomerName,\n MobileOrderDate,\n MobileOrderId,\n MobileOrderMetrics,\n MobileMetricItem,\n MobileMetricLabel,\n MobileMetricValue,\n MobileOrdersContainer,\n DesktopTableContainer,\n OrderIdColumnCell,\n} from './ConversionRateFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface ConversionRateFullViewProps {\n readonly conversionData: ConversionDataPoint[];\n readonly orders: OrderHistory[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly conversionFilter: ConversionFilterOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n readonly isLoading?: boolean;\n readonly summaryRate?: number;\n readonly summaryChangePct?: number | null;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onConversionFilterChange?: (filter: ConversionFilterOption) => void;\n}\n\nexport const ConversionRateFullView: React.FC<ConversionRateFullViewProps> = ({\n conversionData,\n orders,\n summaryRate,\n summaryChangePct,\n dateRange,\n market,\n conversionFilter,\n markets,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onConversionFilterChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const marketOptions = useMarketOptions(markets);\n\n const currentRate = React.useMemo(() => {\n if (typeof summaryRate === 'number' && Number.isFinite(summaryRate)) return summaryRate;\n return conversionData.at(-1)?.rate ?? 0;\n }, [summaryRate, conversionData]);\n\n const trend = React.useMemo((): { direction: TrendDirection; value: string } => {\n if (summaryChangePct !== undefined) {\n if (summaryChangePct === null)\n return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n let direction: TrendDirection = 'neutral';\n if (summaryChangePct > 0) direction = 'up';\n else if (summaryChangePct < 0) direction = 'down';\n return { direction, value: `${summaryChangePct >= 0 ? '+' : ''}${summaryChangePct.toFixed(1)}%` };\n }\n if (conversionData.length < 2) return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n const latestRate = conversionData.at(-1)?.rate ?? 0;\n const previousRate = conversionData[0].rate;\n if (previousRate === 0) return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n const changePercent = ((latestRate - previousRate) / previousRate) * 100;\n if (Math.abs(changePercent) < 0.1) {\n return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n }\n let direction: TrendDirection = 'neutral';\n if (changePercent > 0) direction = 'up';\n else if (changePercent < 0) direction = 'down';\n return { direction, value: `${changePercent >= 0 ? '+' : ''}${changePercent.toFixed(1)}%` };\n }, [summaryChangePct, conversionData]);\n\n const getConversionFilterLabel = React.useCallback((filter: ConversionFilterOption): string => {\n if (filter === 'standard') return getTranslation(Keys.filter.conversionType.standard);\n if (filter === 'subscription') return getTranslation(Keys.filter.conversionType.subscription);\n return getTranslation(Keys.filter.conversionType.all);\n }, []);\n\n const conversionFilterLabel = React.useMemo(\n () => getConversionFilterLabel(conversionFilter),\n [conversionFilter, getConversionFilterLabel],\n );\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'customerType',\n label: getTranslation(Keys.filter.signupView.label),\n value: conversionFilter,\n options: [\n { value: 'all', label: getTranslation(Keys.filter.conversionType.all) },\n { value: 'standard', label: getTranslation(Keys.filter.conversionType.standard) },\n { value: 'subscription', label: getTranslation(Keys.filter.conversionType.subscription) },\n ],\n },\n ],\n [conversionFilter, dateRange, market, marketOptions],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value);\n else if (key === 'customerType') {\n onConversionFilterChange?.(value as ConversionFilterOption);\n setCurrentPage(1);\n }\n },\n [onConversionFilterChange, onDateRangeChange, onMarketChange],\n );\n\n const filteredOrders = React.useMemo(() => {\n if (conversionFilter === 'all') return orders;\n return orders.filter((order) => order.customerType.toLowerCase() === conversionFilter);\n }, [orders, conversionFilter]);\n\n const { totalPages, pageItems: paginatedOrders } = usePaginatedItems(filteredOrders, currentPage, itemsPerPage);\n\n const columns: ColumnDef<OrderHistory>[] = React.useMemo(\n () => [\n {\n key: 'orderId',\n label: getTranslation(Keys.fullView.conversionRate.columns.orderId),\n sortable: true,\n render: (value) => <OrderIdColumnCell>{value as React.ReactNode}</OrderIdColumnCell>,\n },\n { key: 'date', label: getTranslation(Keys.fullView.conversionRate.columns.date), sortable: true },\n {\n key: 'customerName',\n label: getTranslation(Keys.fullView.conversionRate.columns.customer),\n sortable: true,\n },\n { key: 'customerType', label: getTranslation(Keys.fullView.conversionRate.columns.type), sortable: true },\n { key: 'items', label: getTranslation(Keys.fullView.conversionRate.columns.items), sortable: true },\n {\n key: 'total',\n label: getTranslation(Keys.fullView.conversionRate.columns.total),\n sortable: true,\n render: (value: unknown, row: OrderHistory) =>\n formatMoney(Number(value), row.currencyCode, undefined, 2),\n },\n { key: 'bv', label: getTranslation(Keys.fullView.conversionRate.columns.bv), sortable: true },\n ],\n [],\n );\n\n const getChartColor = React.useCallback(() => {\n if (conversionFilter === 'standard') return '#2e7d32';\n if (conversionFilter === 'subscription') return '#ed6c02';\n return '#1976d2';\n }, [conversionFilter]);\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"conversion-rate-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.conversionRate.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewChartSkeleton />\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"conversion-rate-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.conversionRate.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <MetricChartCardSection data-testid=\"conversion-fullview-metric-chart\">\n <MetricSection>\n <div style={{ display: 'flex', alignItems: 'center', gap: '0px', flexWrap: 'wrap' }}>\n <MetricValue data-testid=\"conversion-rate-value\" style={{ marginRight: '6px' }}>\n {currentRate.toFixed(1)}%\n </MetricValue>\n <MetricTrend direction={trend.direction} data-testid=\"conversion-rate-trend\">\n {trend.direction === 'up' && <ArrowUpwardIcon />}\n {trend.direction === 'down' && <ArrowDownwardIcon />}\n <span\n style={{\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n fontWeight: 600,\n fontSize: '14px',\n lineHeight: '20px',\n letterSpacing: '0em',\n }}\n >\n {trend.value}\n </span>\n <span\n style={{\n marginLeft: '2px',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n fontWeight: 400,\n fontSize: '12px',\n lineHeight: '16px',\n letterSpacing: '0.01em',\n color: '#5F5F5F',\n }}\n >\n compared to this time last month\n </span>\n </MetricTrend>\n </div>\n </MetricSection>\n\n <ChartSection>\n <ChartContainer data-testid=\"conversion-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <LineChart data={conversionData} margin={{ top: 10, right: 120, left: 0, bottom: 60 }}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"date\" />\n <YAxis tickFormatter={(value) => `${value}%`} domain={[0, 'auto']} />\n <Tooltip\n formatter={(value: unknown) => {\n if (typeof value === 'number') return `${value.toFixed(2)}%`;\n if (typeof value === 'string') return value;\n return getTranslation(Keys.fullView.conversionRate.notAvailable);\n }}\n />\n <Legend\n layout=\"vertical\"\n align=\"right\"\n verticalAlign=\"bottom\"\n wrapperStyle={{\n paddingRight: '40px',\n paddingBottom: '40px',\n paddingLeft: '20px',\n paddingTop: '20px',\n fontSize: '14px',\n fontWeight: 500,\n display: 'flex',\n justifyContent: 'flex-end',\n }}\n />\n <Line\n type=\"monotone\"\n dataKey=\"rate\"\n stroke={getChartColor()}\n strokeWidth={2}\n name={`${getTranslation(Keys.widget.conversionRate.title)} (${conversionFilterLabel})`}\n dot={false}\n />\n </LineChart>\n </ResponsiveContainer>\n </ChartContainer>\n </ChartSection>\n </MetricChartCardSection>\n\n <TableSection data-testid=\"conversion-fullview-table-section\">\n <ChartTitle data-testid=\"conversion-fullview-table-title\">\n {getTranslation(Keys.fullView.conversionRate.orderDetailsTitle)} ({filteredOrders.length})\n </ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer data-testid=\"conversion-fullview-desktop-table\">\n <DataTable\n columns={columns}\n data={paginatedOrders}\n getRowKey={(row: OrderHistory) => row.orderId}\n />\n </DesktopTableContainer>\n ) : (\n <MobileOrdersContainer data-testid=\"conversion-fullview-mobile-orders\">\n {paginatedOrders.map((order) => (\n <MobileOrderCard key={order.orderId}>\n <MobileOrderHeader>\n <MobileCustomerInfo>\n <MobileCustomerName>{order.customerName}</MobileCustomerName>\n <MobileOrderDate>{order.date}</MobileOrderDate>\n </MobileCustomerInfo>\n <MobileOrderId>{order.orderId}</MobileOrderId>\n </MobileOrderHeader>\n <MobileOrderMetrics>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.fullView.conversionRate.columns.items)}\n </MobileMetricLabel>\n <MobileMetricValue>{order.items}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.fullView.conversionRate.columns.orderTotal)}\n </MobileMetricLabel>\n <MobileMetricValue>${order.total.toFixed(2)}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.fullView.conversionRate.columns.totalSv)}\n </MobileMetricLabel>\n <MobileMetricValue>{order.bv}</MobileMetricValue>\n </MobileMetricItem>\n </MobileOrderMetrics>\n </MobileOrderCard>\n ))}\n </MobileOrdersContainer>\n )}\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={filteredOrders.length}\n />\n )}\n </TableSection>\n </PageContainer>\n );\n};\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const MobileOrderCard = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n }\n`;\n\nexport const MobileOrderHeader = styled(Box)`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;\n\nexport const MobileCustomerInfo = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n`;\n\nexport const MobileCustomerName = styled(Typography)`\n font-size: 1rem;\n font-weight: 600;\n`;\n\nexport const MobileOrderDate = styled(Typography)`\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MobileOrderId = styled('a')`\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.primary.main};\n text-decoration: none;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n`;\n\nexport const MobileOrderMetrics = styled(Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 16px;\n padding-top: 12px;\n border-top: 1px solid ${({ theme }) => theme.palette.divider};\n`;\n\nexport const MobileMetricItem = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n text-align: center;\n`;\n\nexport const MobileMetricLabel = styled(Typography)`\n font-size: 0.75rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MobileMetricValue = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`;\n\nexport const MobileOrdersContainer = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const DesktopTableContainer = styled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const ComparisonTextMobile = styled(Typography)`\n margin-top: 4px;\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n @media (max-width: 767px) {\n font-size: 0.75rem;\n }\n`;\n\nexport const OrderIdColumnCell = styled('span')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;\n","import React, { useState } from 'react';\nimport { Box } from '@mui/material';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport type {\n SignupDataPoint,\n SignupDetail,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n SignupViewOption,\n} from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport {\n PageContainer,\n MetricChartCardSection,\n MetricSection,\n MetricValue,\n MetricTrend,\n ChartSection,\n ChartTitle,\n TableSection,\n EmptyStateText,\n MobileCardName,\n MobileCardSubtext,\n MobileCardDetail,\n MobileCardStatus,\n} from '../FullViewComponents.styled';\nimport {\n MobileSignupsContainer,\n DesktopTableContainer,\n MobileSignupCard,\n SignupTrendChartContainer,\n ComparisonTextMobile,\n ChartWithLegendWrapper,\n ChartLegendContainer,\n LegendItem,\n NameColumnCell,\n} from './SignupsFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nconst SERIES_COLORS = { total: '#3B82F6', members: '#7B92A8', retail: '#A3B5C7', brandAffiliates: '#5F7388' };\n\nfunction toNumeric(value: unknown): number {\n if (typeof value === 'number') {\n return Number.isFinite(value) ? value : 0;\n }\n\n if (typeof value === 'string') {\n const parsed = Number(value.replace(/,/g, ''));\n return Number.isFinite(parsed) ? parsed : 0;\n }\n\n return 0;\n}\n\n/**\n * Transform API response format to SignupDataPoint array\n * Handles both direct array format and nested API response with 'daily' array\n */\nfunction normalizeSignupDataInput(input: unknown): SignupDataPoint[] {\n // If it's already an array, return it\n if (Array.isArray(input)) {\n return input;\n }\n\n // Handle API response format with 'daily' array\n const apiResponse = input as Record<string, unknown>;\n if (Array.isArray(apiResponse.daily)) {\n return (apiResponse.daily as Array<Record<string, unknown>>).map((item) => ({\n date: String(item.date ?? ''),\n total: toNumeric(item.total),\n members: toNumeric(item.members),\n retail: toNumeric(item.retail),\n brandAffiliates: toNumeric(\n item.brandAffiliates ?? item.brandAffiliate ?? item.brand_affiliates ?? item.brand_affiliate,\n ),\n }));\n }\n\n // Fallback to empty array\n return [];\n}\n\nexport interface SignupsFullViewProps {\n /**\n * Signup data - can be either:\n * 1. Direct array of SignupDataPoint (camelCase format)\n * 2. API response object with 'daily' array (snake_case format)\n */\n readonly signupData: SignupDataPoint[] | { daily?: Array<Record<string, unknown>>; [key: string]: unknown };\n readonly signups: SignupDetail[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly signupView: SignupViewOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n readonly isLoading?: boolean;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onSignupViewChange?: (view: SignupViewOption) => void;\n}\n\nexport const SignupsFullView: React.FC<SignupsFullViewProps> = ({\n signupData,\n signups,\n dateRange,\n market,\n signupView,\n markets,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onSignupViewChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const marketOptions = useMarketOptions(markets);\n\n const normalizedSignupData = React.useMemo(() => {\n // First, transform API response format to array if needed\n const dataArray = normalizeSignupDataInput(signupData);\n\n // Then, normalize field names and values\n return dataArray.map((point) => {\n const rawPoint = point as unknown as Record<string, unknown>;\n const members = toNumeric(rawPoint.members);\n const retail = toNumeric(rawPoint.retail);\n const brandAffiliates = toNumeric(\n rawPoint.brandAffiliates ??\n rawPoint.brandAffiliate ??\n rawPoint.brand_affiliates ??\n rawPoint.brand_affiliate,\n );\n const total = toNumeric(rawPoint.total ?? rawPoint.all ?? rawPoint.signupTotal ?? rawPoint.value);\n\n return {\n ...point,\n total: total > 0 ? total : members + retail + brandAffiliates,\n members,\n retail,\n brandAffiliates,\n };\n });\n }, [signupData]);\n\n const totalSignups = React.useMemo(() => {\n if (normalizedSignupData.length === 0) return 0;\n return normalizedSignupData[normalizedSignupData.length - 1].total;\n }, [normalizedSignupData]);\n\n const trend = React.useMemo((): {\n direction: 'up' | 'down' | 'neutral';\n absoluteChange: number;\n percentageChange: string;\n } => {\n if (normalizedSignupData.length < 2)\n return {\n direction: 'neutral',\n absoluteChange: 0,\n percentageChange: getTranslation(Keys.defaults.zeroTrend),\n };\n const first = normalizedSignupData[0].total;\n const last = normalizedSignupData[normalizedSignupData.length - 1].total;\n if (first <= 0)\n return {\n direction: 'neutral',\n absoluteChange: 0,\n percentageChange: getTranslation(Keys.defaults.zeroTrend),\n };\n const absoluteChange = last - first;\n const percentageChange = (absoluteChange / first) * 100;\n let direction: 'up' | 'down' | 'neutral' = 'neutral';\n if (percentageChange > 0) direction = 'up';\n else if (percentageChange < 0) direction = 'down';\n return {\n direction,\n absoluteChange: Math.round(absoluteChange),\n percentageChange: `${percentageChange >= 0 ? '+' : ''}${percentageChange.toFixed(1)}%`,\n };\n }, [normalizedSignupData, Keys]);\n\n const hasSignupTrendData = normalizedSignupData.length > 0;\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'signupView',\n label: getTranslation(Keys.filter.signupView.label),\n value: signupView,\n options: [\n { value: 'all', label: getTranslation(Keys.filter.signupView.all) },\n { value: 'members', label: getTranslation(Keys.filter.signupView.members) },\n { value: 'retail', label: getTranslation(Keys.filter.signupView.retail) },\n { value: 'brandAffiliates', label: getTranslation(Keys.filter.signupView.brandAffiliates) },\n ],\n },\n ],\n [dateRange, market, marketOptions, signupView],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value);\n else if (key === 'signupView') {\n onSignupViewChange?.(value as SignupViewOption);\n setCurrentPage(1);\n }\n },\n [onDateRangeChange, onMarketChange, onSignupViewChange],\n );\n\n const { totalPages, pageItems: paginatedSignups } = usePaginatedItems(signups, currentPage, itemsPerPage);\n\n const columns: ColumnDef<SignupDetail>[] = React.useMemo(\n () => [\n { key: 'id', label: getTranslation(Keys.fullView.signups.columns.id), sortable: true },\n {\n key: 'name',\n label: getTranslation(Keys.fullView.signups.columns.name),\n sortable: true,\n render: (value) => <NameColumnCell>{value as React.ReactNode}</NameColumnCell>,\n },\n { key: 'date', label: getTranslation(Keys.fullView.signups.columns.date), sortable: true },\n { key: 'type', label: getTranslation(Keys.fullView.signups.columns.type), sortable: true },\n { key: 'email', label: getTranslation(Keys.fullView.signups.columns.email), sortable: true },\n { key: 'status', label: getTranslation(Keys.fullView.signups.columns.status), sortable: true },\n ],\n [],\n );\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"signups-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.signups.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewChartSkeleton />\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"signups-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.signups.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <MetricChartCardSection data-testid=\"signups-fullview-metric-chart\">\n <MetricSection>\n <MetricValue data-testid=\"signups-total\">{totalSignups.toLocaleString()}</MetricValue>\n <MetricTrend direction={trend.direction}>\n {trend.direction === 'up' && <TrendingUpIcon />}\n {trend.direction === 'down' && <TrendingDownIcon />}\n {trend.direction !== 'neutral' && (\n <>\n <span style={{ fontWeight: 600, lineHeight: 1 }}>\n {trend.absoluteChange > 0 ? '+' : ''}\n {trend.absoluteChange}\n </span>\n <span style={{ fontWeight: 400, lineHeight: 1 }}>{trend.percentageChange}</span>\n </>\n )}\n {trend.direction === 'neutral' && <span>{trend.percentageChange}</span>}\n </MetricTrend>\n <ComparisonTextMobile>{getTranslation(Keys.widget.conversionRate.comparison)}</ComparisonTextMobile>\n </MetricSection>\n\n <ChartSection>\n {hasSignupTrendData ? (\n <ChartWithLegendWrapper>\n <SignupTrendChartContainer data-testid=\"signups-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\" minHeight={240}>\n <LineChart data={normalizedSignupData}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"date\" />\n <YAxis />\n <Tooltip />\n {signupView === 'all' && (\n <>\n <Line\n type=\"monotone\"\n dataKey=\"total\"\n stroke={SERIES_COLORS.total}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.total)}\n dot={{ r: 2 }}\n connectNulls\n />\n <Line\n type=\"monotone\"\n dataKey=\"members\"\n stroke={SERIES_COLORS.members}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.members)}\n dot={{ r: 2 }}\n connectNulls\n />\n <Line\n type=\"monotone\"\n dataKey=\"retail\"\n stroke={SERIES_COLORS.retail}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.retail)}\n dot={{ r: 2 }}\n connectNulls\n />\n <Line\n type=\"monotone\"\n dataKey=\"brandAffiliates\"\n stroke={SERIES_COLORS.brandAffiliates}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.brandAffiliates)}\n dot={{ r: 2 }}\n connectNulls\n />\n </>\n )}\n {signupView === 'members' && (\n <Line\n type=\"monotone\"\n dataKey=\"members\"\n stroke={SERIES_COLORS.members}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.members)}\n dot={{ r: 2 }}\n connectNulls\n />\n )}\n {signupView === 'retail' && (\n <Line\n type=\"monotone\"\n dataKey=\"retail\"\n stroke={SERIES_COLORS.retail}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.retail)}\n dot={{ r: 2 }}\n connectNulls\n />\n )}\n {signupView === 'brandAffiliates' && (\n <Line\n type=\"monotone\"\n dataKey=\"brandAffiliates\"\n stroke={SERIES_COLORS.brandAffiliates}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.brandAffiliates)}\n dot={{ r: 2 }}\n connectNulls\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n </SignupTrendChartContainer>\n <Box>\n {signupView === 'all' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.total }}>\n {getTranslation(Keys.widget.signups.total)}\n </LegendItem>\n <LegendItem style={{ color: SERIES_COLORS.members }}>\n {getTranslation(Keys.widget.signups.members)}\n </LegendItem>\n <LegendItem style={{ color: SERIES_COLORS.retail }}>\n {getTranslation(Keys.widget.signups.retail)}\n </LegendItem>\n <LegendItem style={{ color: SERIES_COLORS.brandAffiliates }}>\n {getTranslation(Keys.widget.signups.brandAffiliates)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n {signupView === 'members' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.members }}>\n {getTranslation(Keys.widget.signups.members)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n {signupView === 'retail' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.retail }}>\n {getTranslation(Keys.widget.signups.retail)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n {signupView === 'brandAffiliates' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.brandAffiliates }}>\n {getTranslation(Keys.widget.signups.brandAffiliates)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n </Box>\n </ChartWithLegendWrapper>\n ) : (\n <EmptyStateText data-testid=\"signups-fullview-chart-empty\">\n {getTranslation(Keys.widget.signups.noTrendData)}\n </EmptyStateText>\n )}\n </ChartSection>\n </MetricChartCardSection>\n\n <TableSection data-testid=\"signups-fullview-table-section\">\n <ChartTitle data-testid=\"signups-fullview-table-title\">{`${getTranslation(Keys.fullView.signups.detailsTitle)} (${signups.length})`}</ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer data-testid=\"signups-fullview-desktop-table\">\n <DataTable\n columns={columns}\n data={paginatedSignups}\n getRowKey={(row: SignupDetail) => row.id}\n />\n </DesktopTableContainer>\n ) : (\n <MobileSignupsContainer data-testid=\"signups-fullview-mobile-cards\">\n {paginatedSignups.map((signup) => (\n <MobileSignupCard key={signup.id}>\n <MobileCardName>{signup.name}</MobileCardName>\n <MobileCardSubtext>\n {signup.date} - {signup.type}\n </MobileCardSubtext>\n <MobileCardDetail>{signup.email}</MobileCardDetail>\n <MobileCardStatus status={signup.status}>{signup.status}</MobileCardStatus>\n </MobileSignupCard>\n ))}\n </MobileSignupsContainer>\n )}\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={signups.length}\n />\n )}\n </TableSection>\n </PageContainer>\n );\n};\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\nimport { ChartContainer } from '../FullViewComponents.styled';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const MobileSignupsContainer = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const DesktopTableContainer = styled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const MobileSignupCard = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n }\n`;\n\nexport const SignupTrendChartContainer = styled(ChartContainer)`\n min-height: 320px;\n\n @media (max-width: 767px) {\n min-height: 260px;\n height: 260px;\n }\n`;\n\nexport const ComparisonTextMobile = styled(Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n`;\n\nexport const ChartWithLegendWrapper = styled(Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`;\n\nexport const ChartLegendContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n }\n`;\n\nexport const LegendItem = styled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({ theme }) => theme.palette.text.secondary};\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\n }\n`;\n\nexport const NameColumnCell = styled('span')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;\n","import React, { useState } from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type {\n CategoryRevenue,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n CategorySortOption,\n} from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { PageContainer, TableSection, ChartTitle, EmptyStateText } from '../FullViewComponents.styled';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport {\n SummaryItemRow,\n SummaryItemInfo,\n SummaryItemName,\n SummaryItemSubtext,\n SummaryItemPercentage,\n TopSection,\n ChartWrapper,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n SummaryContainer,\n SummaryItem,\n ColorDot,\n SummaryName,\n SummaryValue,\n SummaryPercentage,\n SummaryTrendIcon,\n DesktopTableContainer,\n MobileCategoriesContainer,\n MobileCategoryCard,\n CategoryNameColumnCell,\n} from './CategoriesFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport { parseTrendPercent, calculateWeightedRevenueTrend } from '../../utils/trendUtils';\n\nexport interface CategoriesFullViewProps {\n readonly categories: CategoryRevenue[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly categorySort: CategorySortOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n readonly isLoading?: boolean;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onCategorySortChange?: (sort: CategorySortOption) => void;\n}\n\nexport const CategoriesFullView: React.FC<CategoriesFullViewProps> = ({\n categories,\n dateRange,\n market,\n categorySort,\n markets,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onCategorySortChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const marketOptions = useMarketOptions(markets);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'sort',\n label: getTranslation(Keys.filter.productSort.label),\n value: categorySort,\n options: [\n { value: 'revenue', label: getTranslation(Keys.filter.categorySort.byRevenue) },\n { value: 'trend', label: getTranslation(Keys.filter.categorySort.byTrend) },\n ],\n },\n ],\n [categorySort, dateRange, market, marketOptions],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value);\n else if (key === 'sort') {\n onCategorySortChange?.(value as CategorySortOption);\n setCurrentPage(1);\n }\n },\n [onCategorySortChange, onDateRangeChange, onMarketChange],\n );\n\n interface CustomLabelProps {\n cx: number;\n cy: number;\n midAngle: number;\n innerRadius: number;\n outerRadius: number;\n percentage: number;\n }\n\n const renderCustomLabel = (props: CustomLabelProps) => {\n // eslint-disable-next-line react/prop-types\n const { cx, cy, midAngle, innerRadius, outerRadius, percentage } = props;\n const RADIAN = Math.PI / 180;\n // Position label more towards center of the donut ring, slightly inward\n const radius = innerRadius + (outerRadius - innerRadius) * 0.45;\n const x = cx + radius * Math.cos(-midAngle * RADIAN);\n const y = cy + radius * Math.sin(-midAngle * RADIAN);\n\n return (\n <text\n x={x}\n y={y}\n fill=\"white\"\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n fontSize=\"12\"\n fontWeight=\"700\"\n fontFamily=\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\"\n letterSpacing=\"0\"\n style={{ lineHeight: '14px', pointerEvents: 'none' }}\n >\n {`${percentage}%`}\n </text>\n );\n };\n\n const getTrendIcon = (direction: 'up' | 'down' | 'neutral') => {\n if (direction === 'up') {\n return <TrendingUpIcon sx={{ fontSize: '16px' }} aria-hidden=\"true\" />;\n }\n if (direction === 'down') {\n return <TrendingDownIcon sx={{ fontSize: '16px' }} aria-hidden=\"true\" />;\n }\n return null;\n };\n\n const resolveTrendDirection = (trendValue?: string): 'up' | 'down' | 'neutral' => {\n if (!trendValue) return 'neutral';\n const parsed = Number.parseFloat(trendValue);\n if (Number.isNaN(parsed)) return 'neutral';\n if (parsed > 0) return 'up';\n if (parsed < 0) return 'down';\n return 'neutral';\n };\n\n const sortedCategories = React.useMemo(\n () =>\n [...categories].sort((a, b) => {\n if (categorySort === 'revenue') return b.revenue - a.revenue;\n return (\n (parseTrendPercent(b.trend?.revenue) ?? -Infinity) -\n (parseTrendPercent(a.trend?.revenue) ?? -Infinity)\n );\n }),\n [categories, categorySort],\n );\n\n const { totalRevenue, totalRevenueTrendDirection, totalRevenueTrend } = React.useMemo(() => {\n const nextTotalRevenue = sortedCategories.reduce((sum, category) => sum + category.revenue, 0);\n\n const { direction, formatted } = calculateWeightedRevenueTrend(\n sortedCategories,\n (category) => category.revenue,\n (category) => category.trend?.revenue,\n );\n\n return {\n totalRevenue: nextTotalRevenue,\n totalRevenueTrendDirection: direction,\n totalRevenueTrend: formatted,\n };\n }, [sortedCategories]);\n\n const topCategories = React.useMemo(() => sortedCategories.slice(0, 5), [sortedCategories]);\n\n const { totalPages, pageItems: paginatedCategories } = usePaginatedItems(\n sortedCategories,\n currentPage,\n itemsPerPage,\n );\n\n const columns: ColumnDef<CategoryRevenue>[] = React.useMemo(\n () => [\n {\n key: 'name',\n label: getTranslation(Keys.fullView.categories.columns.category),\n sortable: true,\n render: (_: unknown, row: CategoryRevenue) => (\n <SummaryItemRow>\n <ColorDot dotColor={row.color} />\n <CategoryNameColumnCell>{row.name}</CategoryNameColumnCell>\n </SummaryItemRow>\n ),\n },\n {\n key: 'revenue',\n label: getTranslation(Keys.fullView.categories.columns.revenue),\n sortable: true,\n render: (value: unknown, row: CategoryRevenue) => formatMoney(Number(value), row.currencyCode),\n },\n {\n key: 'percentage',\n label: getTranslation(Keys.fullView.categories.columns.percentOfTotal),\n sortable: true,\n render: (value: unknown) => `${Number(value)}%`,\n },\n {\n key: 'trend',\n label: getTranslation(Keys.fullView.categories.columns.trend),\n render: (_: unknown, row: CategoryRevenue) =>\n row.trend?.revenue ?? getTranslation(Keys.defaults.noValue),\n },\n ],\n [],\n );\n\n const currencyCode = sortedCategories[0]?.currencyCode;\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"categories-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topCategories.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewChartSkeleton />\n </PageContainer>\n );\n }\n\n if (categories.length === 0) {\n return (\n <PageContainer data-testid=\"categories-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topCategories.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <EmptyStateText data-testid=\"categories-fullview-empty\">\n {getTranslation(Keys.fullView.categories.noCategoryData)}\n </EmptyStateText>\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"categories-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topCategories.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <TopSection data-testid=\"categories-fullview-top-section\">\n <ChartWrapper data-testid=\"categories-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={sortedCategories}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius=\"50%\"\n outerRadius=\"85%\"\n dataKey=\"revenue\"\n nameKey=\"name\"\n paddingAngle={2}\n label={renderCustomLabel}\n labelLine={false}\n >\n {sortedCategories.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"categories-fullview-donut-center\">\n <DonutCenterLabel>{getTranslation(Keys.stats.revenue)}</DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</DonutCenterValue>\n <DonutCenterTrend direction={totalRevenueTrendDirection}>\n {getTrendIcon(totalRevenueTrendDirection)}\n <span>{totalRevenueTrend}</span>\n </DonutCenterTrend>\n </DonutCenterOverlay>\n </ChartWrapper>\n\n <SummaryContainer data-testid=\"categories-fullview-summary\">\n {topCategories.map((category) => (\n <SummaryItem key={category.id}>\n <ColorDot dotColor={category.color} />\n <SummaryName>{category.name}</SummaryName>\n <SummaryValue>{formatMoney(category.revenue, category.currencyCode)}</SummaryValue>\n <SummaryPercentage>({category.percentage}%)</SummaryPercentage>\n {category.trend?.revenue ? (\n <SummaryTrendIcon direction={resolveTrendDirection(category.trend.revenue)}>\n {getTrendIcon(resolveTrendDirection(category.trend.revenue))}\n </SummaryTrendIcon>\n ) : null}\n </SummaryItem>\n ))}\n </SummaryContainer>\n </TopSection>\n\n <TableSection data-testid=\"categories-fullview-table-section\">\n <ChartTitle data-testid=\"categories-fullview-table-title\">\n {getTranslation(Keys.fullView.categories.allCategoriesTitle)} ({sortedCategories.length})\n </ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer>\n <DataTable\n columns={columns}\n data={paginatedCategories}\n sortable\n getRowKey={(row: CategoryRevenue) => row.id}\n />\n </DesktopTableContainer>\n ) : (\n <MobileCategoriesContainer>\n {paginatedCategories.map((category) => (\n <MobileCategoryCard key={category.id}>\n <ColorDot dotColor={category.color} />\n <SummaryItemInfo>\n <SummaryItemName>{category.name}</SummaryItemName>\n <SummaryItemSubtext>\n {formatMoney(category.revenue, category.currencyCode)}\n </SummaryItemSubtext>\n </SummaryItemInfo>\n <SummaryItemPercentage>{category.percentage}%</SummaryItemPercentage>\n </MobileCategoryCard>\n ))}\n </MobileCategoriesContainer>\n )}\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={sortedCategories.length}\n />\n )}\n </TableSection>\n </PageContainer>\n );\n};\n","import { styled, ColorUtils } from '@nuskin/foundation-theme';\nimport { styled as muiStyled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const SummaryItemRow = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const SummaryItemInfo = styled('div')`\n flex: 1;\n`;\n\nexport const SummaryItemName = styled('span')`\n font-weight: 600;\n`;\n\nexport const SummaryItemSubtext = styled('span')`\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const SummaryItemPercentage = styled('span')`\n font-weight: 600;\n`;\n\nexport const TopSection = muiStyled(Box)`\n display: flex;\n gap: 32px;\n padding: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${({ theme }) => theme.shadows[1]};\n align-items: center;\n justify-content: center;\n width: 100%;\n box-sizing: border-box;\n margin: 0 auto;\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n align-items: flex-start;\n justify-content: flex-start;\n }\n`;\n\nexport const ChartWrapper = muiStyled(Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`;\n\nexport const DonutCenterOverlay = muiStyled(Box)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 120px;\n`;\n\nexport const DonutCenterLabel = muiStyled(Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const DonutCenterValue = muiStyled(Typography)`\n margin-top: 2px;\n font-size: 1.25rem;\n line-height: 1.2;\n font-weight: 700;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const DonutCenterTrend = muiStyled(Typography)<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n margin-top: 2px;\n font-size: 0.875rem;\n line-height: 1.2;\n font-weight: 600;\n color: ${({ direction, theme }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return theme.palette.text.secondary;\n }};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`;\n\nexport const SummaryContainer = muiStyled(Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n flex: 0;\n`;\n\nexport const SummaryItem = muiStyled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n white-space: nowrap;\n min-width: 0;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n`;\n\nexport const ColorDot = muiStyled(Box)<{ dotColor: string }>`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ dotColor }) => dotColor};\n flex-shrink: 0;\n`;\n\nexport const SummaryInfo = muiStyled(Box)`\n display: none;\n`;\n\nexport const SummaryName = muiStyled(Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.primary};\n flex-shrink: 0;\n min-width: 0;\n text-overflow: ellipsis;\n overflow: hidden;\n`;\n\nexport const SummaryValue = muiStyled(Typography)`\n font-size: 0.75rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.secondary};\n flex-shrink: 0;\n white-space: nowrap;\n`;\n\nexport const SummaryPercentage = muiStyled(Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n flex-shrink: 0;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const DesktopTableContainer = muiStyled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const MobileCategoriesContainer = muiStyled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const MobileCategoryCard = muiStyled(Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n`;\n\nexport const SummaryTrendIcon = muiStyled('span')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ direction }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return '#757575';\n }};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n\nexport const CategoryNameColumnCell = styled('span')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;\n","import React from 'react';\nimport {\n resolveTranslation,\n setTranslationResolver,\n type TranslateFn,\n type TranslationEntry,\n} from './TranslationKeys/translationResolver';\n\nexport function useTranslationResolver(translate?: TranslateFn): void {\n setTranslationResolver(translate);\n\n React.useEffect(() => {\n setTranslationResolver(translate);\n return () => {\n setTranslationResolver(undefined);\n };\n }, [translate]);\n}\n\nexport interface TranslationProviderProps {\n readonly translate?: TranslateFn;\n readonly children?: React.ReactNode;\n}\n\nexport const TranslationProvider: React.FC<TranslationProviderProps> = ({ translate, children }) => {\n useTranslationResolver(translate);\n return children ?? null;\n};\n\nexport function useTranslation(): (entry: TranslationEntry) => string {\n return React.useCallback((entry: TranslationEntry) => resolveTranslation(entry), []);\n}\n\nexport type { TranslateFn, TranslationEntry };\n","import { styled } from '@nuskin/foundation-theme';\n\nexport const PoDashboardContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n gap: 24px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`;\n\nexport const TopChartsRow = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n }\n`;\n\nexport const StatsCardStack = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n gap: 24px;\n justify-content: flex-start;\n }\n`;\n\nexport const BottomChartsRow = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n }\n`;\n\nexport const ErrorContainer = styled('div')`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;\n","import React from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport { WidgetMenu } from '../WidgetMenu';\nimport {\n CategoriesContainer,\n ChartHeader,\n ChartTitle,\n SortDropdown,\n ChartAndLegendContainer,\n ChartWrapper,\n LegendContainer,\n LegendItem,\n LegendColor,\n LegendInfo,\n LegendName,\n LegendValue,\n LegendPercentage,\n LegendTrend,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n EmptyState,\n EmptyStateText,\n HeaderActionsContainer,\n} from '../TopCategories/TopCategoriesPieChart.styled';\nimport type { TopPerformingOffer, OfferSortOption } from '../../types.d';\nimport { CategoriesPieChartSkeleton } from '../LoadingSkeletons';\nimport {\n getTranslation,\n ProductOfferDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ProductOfferDashboardTranslationKeys';\nimport { getTrendIcon, resolveTrendDirection, calculateWeightedRevenueTrend } from '../../utils/trendUtils';\nimport { formatMoney } from '../../utils/dataUtils';\n\nexport interface TopPerformingOffersPieChartProps {\n readonly offers: TopPerformingOffer[];\n readonly offerSort: OfferSortOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly onSortChange?: (sort: OfferSortOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nconst TopPerformingOffersPieChartComponent: React.FC<TopPerformingOffersPieChartProps> = ({\n offers,\n offerSort,\n isLoading = false,\n title,\n onSortChange,\n onTitleClick,\n}) => {\n const handleSortChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newSort = event.target.value as OfferSortOption;\n onSortChange?.(newSort);\n },\n [onSortChange],\n );\n\n const { sortedOffers, totalRevenue, trendDirection, formattedTrend } = React.useMemo(() => {\n const nextSortedOffers = [...offers].sort((a, b) => {\n if (offerSort === 'revenue') return b.revenue - a.revenue;\n return b.percentage - a.percentage;\n });\n\n const nextTotalRevenue = nextSortedOffers.reduce((sum, offer) => sum + offer.revenue, 0);\n\n const { direction: nextTrendDirection, formatted: nextFormattedTrend } = calculateWeightedRevenueTrend(\n nextSortedOffers,\n (offer) => offer.revenue,\n (offer) => offer.trend?.revenue,\n );\n\n return {\n sortedOffers: nextSortedOffers,\n totalRevenue: nextTotalRevenue,\n trendDirection: nextTrendDirection,\n formattedTrend: nextFormattedTrend,\n };\n }, [offers, offerSort]);\n\n const currencyCode = sortedOffers[0]?.currencyCode;\n\n if (isLoading && offers.length === 0) {\n return (\n <CategoriesContainer data-testid=\"widget-top-offers\">\n <CategoriesPieChartSkeleton />\n </CategoriesContainer>\n );\n }\n\n if (offers.length === 0) {\n return (\n <CategoriesContainer data-testid=\"widget-top-offers\">\n <ChartHeader>\n <ChartTitle>{title ?? getTranslation(Keys.widget.topPerformingOffers.title)}</ChartTitle>\n </ChartHeader>\n <EmptyState data-testid=\"top-offers-empty-state\">\n <EmptyStateText>{getTranslation(Keys.widget.topPerformingOffers.emptyState)}</EmptyStateText>\n </EmptyState>\n </CategoriesContainer>\n );\n }\n\n return (\n <CategoriesContainer\n as=\"section\"\n data-testid=\"widget-top-offers\"\n aria-label={getTranslation(Keys.ariaLabel.topOffers)}\n >\n <ChartHeader>\n <ChartTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.ariaLabel.topOffers)}\n data-testid=\"widget-title-top-offers\"\n >\n {title ?? getTranslation(Keys.widget.topPerformingOffers.title)}\n </ChartTitle>\n <HeaderActionsContainer>\n <SortDropdown\n id=\"offer-sort\"\n data-testid=\"offer-sort-dropdown\"\n value={offerSort}\n onChange={handleSortChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.ariaLabel.topOffers)}\n >\n <option value=\"revenue\">{getTranslation(Keys.filter.offerSort.byRevenue)}</option>\n <option value=\"units\">{getTranslation(Keys.filter.offerSort.byUnits)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-offers\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </ChartHeader>\n\n <ChartAndLegendContainer>\n <ChartWrapper data-testid=\"top-offers-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={sortedOffers}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius=\"55%\"\n outerRadius=\"85%\"\n dataKey=\"revenue\"\n nameKey=\"name\"\n paddingAngle={2}\n >\n {sortedOffers.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"top-offers-donut-center\">\n <DonutCenterLabel>\n {getTranslation(Keys.widget.topPerformingOffers.totalRevenue)}\n </DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</DonutCenterValue>\n <DonutCenterTrend direction={trendDirection}>{formattedTrend}</DonutCenterTrend>\n </DonutCenterOverlay>\n </ChartWrapper>\n\n <LegendContainer data-testid=\"top-offers-legend-container\">\n {sortedOffers.map((offer, index) => {\n const legendTrendDirection = resolveTrendDirection(offer.trend?.revenue);\n return (\n <LegendItem key={offer.id} data-testid={`offer-legend-${index}`}>\n <LegendColor color={offer.color} />\n <LegendInfo>\n <LegendName>{offer.name}</LegendName>\n <LegendValue>{formatMoney(offer.revenue, offer.currencyCode)}</LegendValue>\n </LegendInfo>\n <LegendPercentage>{offer.percentage}%</LegendPercentage>\n {offer.trend?.revenue ? (\n <LegendTrend\n direction={legendTrendDirection}\n data-testid={`offer-legend-trend-${index}`}\n aria-label={offer.trend.revenue}\n >\n {getTrendIcon(legendTrendDirection)}\n </LegendTrend>\n ) : null}\n </LegendItem>\n );\n })}\n </LegendContainer>\n </ChartAndLegendContainer>\n </CategoriesContainer>\n );\n};\n\nexport const TopPerformingOffersPieChart = React.memo(TopPerformingOffersPieChartComponent);\nTopPerformingOffersPieChart.displayName = 'TopPerformingOffersPieChart';\n","import { resolveTranslation } from './translationResolver';\n\ntype TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport const ProductOfferDashboardTranslationKeys = {\n title: { key: 'productOfferDashboard.title', fallback: 'Performance Overview' },\n error: { key: 'productOfferDashboard.error', fallback: 'Failed to load dashboard data. Please try again.' },\n\n stats: {\n revenue: { key: 'productOfferDashboard.stats.revenue', fallback: 'Total Revenue' },\n offersPurchased: { key: 'productOfferDashboard.stats.offersPurchased', fallback: 'Offers Purchased' },\n conversionRate: { key: 'productOfferDashboard.stats.conversionRate', fallback: 'Conversion Rate' },\n trendUp: { key: 'productOfferDashboard.stats.trendUp', fallback: 'Trending up' },\n trendDown: { key: 'productOfferDashboard.stats.trendDown', fallback: 'Trending down' },\n trendNeutral: { key: 'productOfferDashboard.stats.trendNeutral', fallback: 'No change' },\n comparedTo: { key: 'productOfferDashboard.stats.comparedTo', fallback: 'compared to this time last month' },\n },\n\n filter: {\n dateRange: {\n label: { key: 'productOfferDashboard.filter.dateRange.label', fallback: 'Date Range' },\n last7days: { key: 'productOfferDashboard.filter.dateRange.last7days', fallback: 'Last 7 Days' },\n last30days: { key: 'productOfferDashboard.filter.dateRange.last30days', fallback: 'Last 30 Days' },\n last90days: { key: 'productOfferDashboard.filter.dateRange.last90days', fallback: 'Last 90 Days' },\n thisMonth: { key: 'productOfferDashboard.filter.dateRange.thisMonth', fallback: 'This Month' },\n },\n market: {\n label: { key: 'productOfferDashboard.filter.market.label', fallback: 'Market' },\n all: { key: 'productOfferDashboard.filter.market.all', fallback: 'All Markets' },\n },\n offerSort: {\n byRevenue: { key: 'productOfferDashboard.filter.offerSort.byRevenue', fallback: 'Revenue' },\n byUnits: { key: 'productOfferDashboard.filter.offerSort.byUnits', fallback: 'Units' },\n },\n productSort: {\n byUnits: { key: 'productOfferDashboard.filter.productSort.byUnits', fallback: 'Units' },\n byRevenue: { key: 'productOfferDashboard.filter.productSort.byRevenue', fallback: 'Revenue' },\n byVolume: { key: 'productOfferDashboard.filter.productSort.byVolume', fallback: 'Volume' },\n },\n conversionFilter: {\n overall: { key: 'productOfferDashboard.filter.conversionFilter.overall', fallback: 'Overall' },\n },\n },\n\n widget: {\n topProducts: {\n title: { key: 'productOfferDashboard.widget.topProducts.title', fallback: 'Top Selling Products' },\n emptyState: {\n key: 'productOfferDashboard.widget.topProducts.emptyState',\n fallback: 'No products data available',\n },\n },\n conversionRate: {\n title: { key: 'productOfferDashboard.widget.conversionRate.title', fallback: 'Conversion Rate' },\n subtitle: { key: 'productOfferDashboard.widget.conversionRate.subtitle', fallback: 'Orders ÷ Site visits' },\n },\n topPerformingOffers: {\n title: { key: 'productOfferDashboard.widget.topPerformingOffers.title', fallback: 'Top Performing Offers' },\n totalRevenue: {\n key: 'productOfferDashboard.widget.topPerformingOffers.totalRevenue',\n fallback: 'Total revenue',\n },\n emptyState: {\n key: 'productOfferDashboard.widget.topPerformingOffers.emptyState',\n fallback: 'No offers data available',\n },\n },\n menu: {\n fullView: { key: 'productOfferDashboard.widget.menu.fullView', fallback: 'Full View' },\n },\n },\n\n navigation: {\n back: { key: 'productOfferDashboard.navigation.back', fallback: 'Back to Dashboard' },\n },\n\n ariaLabel: {\n dashboard: {\n key: 'productOfferDashboard.ariaLabel.dashboard',\n fallback: 'Product Offer Performance Dashboard',\n },\n statsCard: { key: 'productOfferDashboard.ariaLabel.statsCard', fallback: 'Performance metric' },\n conversionChart: { key: 'productOfferDashboard.ariaLabel.conversionChart', fallback: 'Conversion rate chart' },\n topProducts: { key: 'productOfferDashboard.ariaLabel.topProducts', fallback: 'Top selling products' },\n topOffers: { key: 'productOfferDashboard.ariaLabel.topOffers', fallback: 'Top performing offers chart' },\n widgetMenu: { key: 'productOfferDashboard.ariaLabel.widgetMenu', fallback: 'Widget options menu' },\n filterDateRange: { key: 'productOfferDashboard.ariaLabel.filterDateRange', fallback: 'Filter by date range' },\n filterMarket: { key: 'productOfferDashboard.ariaLabel.filterMarket', fallback: 'Filter by market' },\n backButton: { key: 'productOfferDashboard.ariaLabel.backButton', fallback: 'Back to dashboard overview' },\n },\n\n fullView: {\n topOffers: {\n title: { key: 'productOfferDashboard.fullView.topOffers.title', fallback: 'Top Performing Offers' },\n columnName: { key: 'productOfferDashboard.fullView.topOffers.columnName', fallback: 'Offer Name' },\n columnRevenue: { key: 'productOfferDashboard.fullView.topOffers.columnRevenue', fallback: 'Revenue' },\n columnPercentage: { key: 'productOfferDashboard.fullView.topOffers.columnPercentage', fallback: 'Share' },\n columnTrend: { key: 'productOfferDashboard.fullView.topOffers.columnTrend', fallback: 'Trend' },\n },\n },\n\n defaults: {\n trendZero: { key: 'productOfferDashboard.defaults.trendZero', fallback: '+0%' },\n noData: { key: 'productOfferDashboard.defaults.noData', fallback: '--' },\n },\n} as const;\n\nexport function getTranslation(entry: TranslationEntry): string {\n return resolveTranslation(entry);\n}\n","import React from 'react';\nimport {\n PoDashboardContainer,\n TopChartsRow,\n StatsCardStack,\n BottomChartsRow,\n ErrorContainer,\n} from './ProductOfferDashboard.styled';\nimport { DashboardHeader } from './shared/DashboardHeader';\nimport { StatsCard } from './shared/StatsCard';\nimport { TopSellingProductsList } from './shared/TopProducts/TopSellingProductsList';\nimport { ConversionRateChart } from './shared/ConversionRate/ConversionRateChart';\nimport { TopPerformingOffersPieChart } from './shared/TopPerformingOffers/TopPerformingOffersPieChart';\nimport type { ProductOfferDashboardProps, TopProduct, ConversionDataPoint, TopPerformingOffer } from './types.d';\nimport {\n getTranslation,\n ProductOfferDashboardTranslationKeys as Keys,\n} from './TranslationKeys/ProductOfferDashboardTranslationKeys';\n\nconst EMPTY_TOP_PRODUCTS: TopProduct[] = [];\nconst EMPTY_CONVERSION_DATA: ConversionDataPoint[] = [];\nconst EMPTY_TOP_OFFERS: TopPerformingOffer[] = [];\n\nexport const ProductOfferDashboard: React.FC<ProductOfferDashboardProps> = ({\n stats,\n topProducts,\n conversionData,\n topOffers,\n isLoading = false,\n error,\n dashboardTitle,\n className,\n dateRange = 'last30days',\n market = 'all',\n productSort = 'units',\n conversionFilter = 'all',\n offerSort = 'revenue',\n conversionSummaryRate,\n conversionSummaryChangePct,\n markets,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onConversionFilterChange,\n onOfferSortChange,\n onProductsTitleClick,\n onConversionTitleClick,\n onOffersTitleClick,\n}) => {\n const resolvedTopProducts = topProducts ?? EMPTY_TOP_PRODUCTS;\n const resolvedConversionData = conversionData ?? EMPTY_CONVERSION_DATA;\n const resolvedTopOffers = topOffers ?? EMPTY_TOP_OFFERS;\n\n const getTrendDirection = (trendValue?: string): 'up' | 'down' | 'neutral' => {\n if (!trendValue) return 'neutral';\n if (trendValue.startsWith('+') && trendValue !== '+0%') return 'up';\n if (trendValue.startsWith('-')) return 'down';\n return 'neutral';\n };\n\n if (error) {\n return (\n <PoDashboardContainer as=\"main\" className={className} aria-label={getTranslation(Keys.ariaLabel.dashboard)}>\n <ErrorContainer data-testid=\"dashboard-error\" role=\"alert\" aria-live=\"assertive\">\n <strong>{getTranslation(Keys.error)}:</strong> {error}\n </ErrorContainer>\n </PoDashboardContainer>\n );\n }\n\n return (\n <PoDashboardContainer\n as=\"main\"\n className={className}\n data-testid=\"product-offer-dashboard\"\n aria-label={getTranslation(Keys.ariaLabel.dashboard)}\n aria-busy={isLoading}\n >\n <DashboardHeader\n shopTitle={dashboardTitle ?? getTranslation(Keys.title)}\n dateRange={dateRange}\n market={market}\n isLoading={isLoading}\n markets={markets}\n stats={\n stats\n ? {\n shopTitle: stats.shopTitle ?? '',\n dateRange: stats.dateRange,\n selectedMarket: stats.selectedMarket,\n metrics: {\n revenue: stats.metrics.revenue,\n volume: '',\n siteVisits: '',\n conversionRate: stats.metrics.conversionRate,\n },\n trend: {},\n }\n : undefined\n }\n onDateRangeChange={onDateRangeChange}\n onMarketChange={onMarketChange}\n />\n\n <TopChartsRow data-testid=\"top-charts-row\">\n <ConversionRateChart\n conversionData={resolvedConversionData}\n conversionFilter={conversionFilter}\n isLoading={isLoading}\n summaryRate={conversionSummaryRate}\n summaryChangePct={conversionSummaryChangePct}\n onFilterChange={onConversionFilterChange}\n onTitleClick={onConversionTitleClick}\n />\n <StatsCardStack data-testid=\"stats-card-stack\">\n <StatsCard\n layout=\"split\"\n title={getTranslation(Keys.stats.revenue)}\n value={stats?.metrics?.revenue ?? '$0'}\n trendDirection={getTrendDirection(stats?.trend?.revenue)}\n trendValue={stats?.trend?.revenue}\n caption={getTranslation(Keys.stats.comparedTo)}\n testId=\"stats-card-revenue\"\n isLoading={isLoading}\n />\n <StatsCard\n layout=\"split\"\n title={getTranslation(Keys.stats.offersPurchased)}\n value={stats?.metrics?.offersPurchased ?? '0'}\n trendDirection={getTrendDirection(stats?.trend?.offersPurchased)}\n trendValue={stats?.trend?.offersPurchased}\n caption={getTranslation(Keys.stats.comparedTo)}\n testId=\"stats-card-offers-purchased\"\n isLoading={isLoading}\n />\n </StatsCardStack>\n </TopChartsRow>\n\n <BottomChartsRow data-testid=\"bottom-charts-row\">\n <TopSellingProductsList\n products={resolvedTopProducts}\n productSort={productSort}\n isLoading={isLoading}\n maxProducts={5}\n onSortChange={onProductSortChange}\n onTitleClick={onProductsTitleClick}\n />\n <TopPerformingOffersPieChart\n offers={resolvedTopOffers}\n offerSort={offerSort}\n isLoading={isLoading}\n onSortChange={onOfferSortChange}\n onTitleClick={onOffersTitleClick}\n />\n </BottomChartsRow>\n </PoDashboardContainer>\n );\n};\n\nexport default ProductOfferDashboard;\n","import React from 'react';\nimport { ProductOfferDashboard } from './ProductOfferDashboard';\nimport { ProductsFullView } from './shared/TopProducts/ProductsFullView';\nimport { ConversionRateFullView } from './shared/ConversionRate/ConversionRateFullView';\nimport { TopPerformingOffersFullView } from './shared/TopPerformingOffers/TopPerformingOffersFullView';\nimport { useTranslationResolver } from './TranslationContext';\nimport type {\n TopProduct,\n ConversionDataPoint,\n TopPerformingOffer,\n OrderHistory,\n DateRangeOption,\n MarketOption,\n ProductSortOption,\n ConversionFilterOption,\n OfferSortOption,\n ProductOfferFullViewWidgetType,\n ProductOfferDashboardView,\n PoDashboardWithNavigationProps,\n ProductOfferDashboardHistoryLocation,\n} from './types.d';\n\ntype ViewMode = 'push' | 'replace';\n\nconst DEFAULT_HISTORY_STATE_KEY = 'productOfferDashboardView';\n\nconst EMPTY_TOP_PRODUCTS: TopProduct[] = [];\nconst EMPTY_CONVERSION_DATA: ConversionDataPoint[] = [];\nconst EMPTY_TOP_OFFERS: TopPerformingOffer[] = [];\nconst EMPTY_ORDERS: OrderHistory[] = [];\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nfunction isProductOfferDashboardView(value: unknown): value is ProductOfferDashboardView {\n return value === 'dashboard' || value === 'products' || value === 'conversion-rate' || value === 'top-offers';\n}\n\nfunction readViewFromState(state: unknown, stateKey: string): ProductOfferDashboardView {\n if (!isRecord(state)) {\n return 'dashboard';\n }\n\n const view = state[stateKey];\n return isProductOfferDashboardView(view) ? view : 'dashboard';\n}\n\nfunction buildStateWithView(\n state: unknown,\n stateKey: string,\n view: ProductOfferDashboardView,\n): Record<string, unknown> {\n const currentState = isRecord(state) ? state : {};\n\n return {\n ...currentState,\n [stateKey]: view,\n };\n}\n\nfunction buildLocationWithState(\n location: ProductOfferDashboardHistoryLocation | undefined,\n state: Record<string, unknown>,\n): ProductOfferDashboardHistoryLocation {\n return {\n pathname: location?.pathname,\n search: location?.search,\n hash: location?.hash,\n state,\n };\n}\n\nexport const PoDashboardWithNavigation: React.FC<PoDashboardWithNavigationProps> = ({\n stats,\n topProducts,\n conversionData,\n topOffers,\n isLoading = false,\n error,\n dashboardTitle,\n className,\n allProducts,\n orders,\n allOffers,\n conversionSummaryRate,\n conversionSummaryChangePct,\n conversionFullViewData,\n conversionFullViewRate,\n conversionFullViewChangePct,\n initialDateRange = 'last30days',\n initialMarket = 'all',\n initialProductSort = 'units',\n initialConversionFilter = 'all',\n initialOfferSort = 'revenue',\n markets,\n translate,\n historyAdapter,\n historyStateKey = DEFAULT_HISTORY_STATE_KEY,\n resetToDashboardOnMount = true,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onConversionFilterChange,\n onOfferSortChange,\n onViewChange,\n}) => {\n useTranslationResolver(translate);\n\n const [currentView, setCurrentView] = React.useState<ProductOfferDashboardView>('dashboard');\n const hasIntraDashboardHistoryRef = React.useRef(false);\n const [dateRange, setDateRange] = React.useState<DateRangeOption>(initialDateRange);\n const [market, setMarket] = React.useState<MarketOption>(initialMarket);\n const [productSort, setProductSort] = React.useState<ProductSortOption>(initialProductSort);\n const [conversionFilter, setConversionFilter] = React.useState<ConversionFilterOption>(initialConversionFilter);\n const [offerSort, setOfferSort] = React.useState<OfferSortOption>(initialOfferSort);\n\n const resolvedTopProducts = topProducts ?? EMPTY_TOP_PRODUCTS;\n const resolvedConversionData = conversionData ?? EMPTY_CONVERSION_DATA;\n const resolvedTopOffers = topOffers ?? EMPTY_TOP_OFFERS;\n const resolvedAllProducts = allProducts ?? resolvedTopProducts;\n const resolvedOrders = orders ?? EMPTY_ORDERS;\n const resolvedAllOffers = allOffers ?? resolvedTopOffers;\n\n const updateView = React.useCallback(\n (view: ProductOfferDashboardView) => {\n setCurrentView(view);\n onViewChange?.(view);\n },\n [onViewChange],\n );\n\n const readCurrentView = React.useCallback((): ProductOfferDashboardView => {\n if (historyAdapter) {\n return readViewFromState(historyAdapter.location?.state, historyStateKey);\n }\n\n if (typeof window === 'undefined') {\n return 'dashboard';\n }\n\n return readViewFromState(window.history.state, historyStateKey);\n }, [historyAdapter, historyStateKey]);\n\n const writeCurrentView = React.useCallback(\n (view: ProductOfferDashboardView, mode: ViewMode) => {\n if (historyAdapter) {\n const nextState = buildStateWithView(historyAdapter.location?.state, historyStateKey, view);\n const nextLocation = buildLocationWithState(historyAdapter.location, nextState);\n\n if (mode === 'replace') {\n historyAdapter.replace(nextLocation);\n return;\n }\n\n historyAdapter.push(nextLocation);\n return;\n }\n\n if (typeof window === 'undefined') {\n return;\n }\n\n const nextState = buildStateWithView(window.history.state, historyStateKey, view);\n\n if (mode === 'replace') {\n window.history.replaceState(nextState, '');\n return;\n }\n\n window.history.pushState(nextState, '');\n },\n [historyAdapter, historyStateKey],\n );\n\n React.useEffect(() => {\n if (resetToDashboardOnMount) {\n writeCurrentView('dashboard', 'replace');\n hasIntraDashboardHistoryRef.current = false;\n updateView('dashboard');\n } else {\n updateView(readCurrentView());\n }\n\n if (historyAdapter) {\n return historyAdapter.listen((location, action) => {\n if (action === 'POP') {\n const nextView = readViewFromState(location.state, historyStateKey);\n hasIntraDashboardHistoryRef.current = nextView !== 'dashboard';\n updateView(nextView);\n }\n });\n }\n\n const handlePopState = (event: PopStateEvent) => {\n const nextView = readViewFromState(event.state, historyStateKey);\n hasIntraDashboardHistoryRef.current = nextView !== 'dashboard';\n updateView(nextView);\n };\n\n window.addEventListener('popstate', handlePopState);\n return () => {\n window.removeEventListener('popstate', handlePopState);\n };\n }, [historyAdapter, historyStateKey, readCurrentView, resetToDashboardOnMount, updateView, writeCurrentView]);\n\n const handleOpenFullView = React.useCallback(\n (view: ProductOfferFullViewWidgetType) => {\n hasIntraDashboardHistoryRef.current = true;\n writeCurrentView(view, 'push');\n updateView(view);\n },\n [updateView, writeCurrentView],\n );\n\n const handleBack = React.useCallback(() => {\n if (currentView !== 'dashboard' && hasIntraDashboardHistoryRef.current) {\n if (historyAdapter) {\n historyAdapter.goBack();\n return;\n }\n\n if (typeof window !== 'undefined') {\n window.history.back();\n }\n\n return;\n }\n\n hasIntraDashboardHistoryRef.current = false;\n writeCurrentView('dashboard', 'replace');\n updateView('dashboard');\n }, [currentView, historyAdapter, updateView, writeCurrentView]);\n\n const handleDateRangeChange = React.useCallback(\n (nextDateRange: DateRangeOption) => {\n setDateRange(nextDateRange);\n onDateRangeChange?.(nextDateRange);\n },\n [onDateRangeChange],\n );\n\n const handleMarketChange = React.useCallback(\n (nextMarket: MarketOption) => {\n setMarket(nextMarket);\n onMarketChange?.(nextMarket);\n },\n [onMarketChange],\n );\n\n const handleProductSortChange = React.useCallback(\n (nextProductSort: ProductSortOption) => {\n setProductSort(nextProductSort);\n onProductSortChange?.(nextProductSort);\n },\n [onProductSortChange],\n );\n\n const handleConversionFilterChange = React.useCallback(\n (nextFilter: ConversionFilterOption) => {\n setConversionFilter(nextFilter);\n onConversionFilterChange?.(nextFilter);\n },\n [onConversionFilterChange],\n );\n\n const handleOfferSortChange = React.useCallback(\n (nextSort: OfferSortOption) => {\n setOfferSort(nextSort);\n onOfferSortChange?.(nextSort);\n },\n [onOfferSortChange],\n );\n\n const handleProductsTitleClick = React.useCallback(() => {\n handleOpenFullView('products');\n }, [handleOpenFullView]);\n\n const handleConversionTitleClick = React.useCallback(() => {\n handleOpenFullView('conversion-rate');\n }, [handleOpenFullView]);\n\n const handleOffersTitleClick = React.useCallback(() => {\n handleOpenFullView('top-offers');\n }, [handleOpenFullView]);\n\n if (currentView === 'products') {\n return (\n <ProductsFullView\n products={resolvedAllProducts}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onProductSortChange={handleProductSortChange}\n />\n );\n }\n\n if (currentView === 'conversion-rate') {\n return (\n <ConversionRateFullView\n conversionData={conversionFullViewData ?? resolvedConversionData}\n orders={resolvedOrders}\n summaryRate={conversionFullViewRate ?? conversionSummaryRate}\n summaryChangePct={conversionFullViewChangePct ?? conversionSummaryChangePct}\n dateRange={dateRange}\n market={market}\n conversionFilter={conversionFilter}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onConversionFilterChange={handleConversionFilterChange}\n />\n );\n }\n\n if (currentView === 'top-offers') {\n return (\n <TopPerformingOffersFullView\n offers={resolvedAllOffers}\n dateRange={dateRange}\n market={market}\n offerSort={offerSort}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onOfferSortChange={handleOfferSortChange}\n />\n );\n }\n\n return (\n <ProductOfferDashboard\n stats={stats}\n topProducts={resolvedTopProducts}\n conversionData={resolvedConversionData}\n topOffers={resolvedTopOffers}\n isLoading={isLoading}\n error={error}\n dashboardTitle={dashboardTitle}\n className={className}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n conversionFilter={conversionFilter}\n offerSort={offerSort}\n conversionSummaryRate={conversionSummaryRate}\n conversionSummaryChangePct={conversionSummaryChangePct}\n markets={markets}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onProductSortChange={handleProductSortChange}\n onConversionFilterChange={handleConversionFilterChange}\n onOfferSortChange={handleOfferSortChange}\n onProductsTitleClick={handleProductsTitleClick}\n onConversionTitleClick={handleConversionTitleClick}\n onOffersTitleClick={handleOffersTitleClick}\n />\n );\n};\n\nexport default PoDashboardWithNavigation;\n","import React, { useState } from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type {\n TopPerformingOffer,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n OfferSortOption,\n} from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport { PageContainer, TableSection, ChartTitle, EmptyStateText } from '../FullViewComponents.styled';\nimport { SummaryItemRow } from '../TopCategories/CategoriesFullView.styled';\nimport {\n TopSection,\n ChartWrapper,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n SummaryContainer,\n SummaryItem,\n ColorDot,\n SummaryInfo,\n SummaryName,\n SummaryValue,\n SummaryPercentage,\n SummaryTrend,\n TableTrendCell,\n DesktopTableContainer,\n MobileOffersContainer,\n MobileOfferCard,\n MobileOfferHeader,\n MobileOfferName,\n MobileOfferMetricsGrid,\n MobileOfferMetricItem,\n MobileOfferMetricLabel,\n MobileOfferMetricValue,\n MobileOfferTrendValue,\n} from './TopPerformingOffersFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ProductOfferDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ProductOfferDashboardTranslationKeys';\nimport {\n getTrendIcon,\n parseTrendPercent,\n resolveTrendDirection,\n calculateWeightedRevenueTrend,\n} from '../../utils/trendUtils';\n\nexport interface TopPerformingOffersFullViewProps {\n readonly offers: TopPerformingOffer[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly offerSort: OfferSortOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n readonly isLoading?: boolean;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onOfferSortChange?: (sort: OfferSortOption) => void;\n}\n\nexport const TopPerformingOffersFullView: React.FC<TopPerformingOffersFullViewProps> = ({\n offers,\n dateRange,\n market,\n offerSort,\n markets,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onOfferSortChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const marketOptions = useMarketOptions(markets);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'sort',\n label: getTranslation(Keys.filter.offerSort.byRevenue),\n value: offerSort,\n options: [\n { value: 'revenue', label: getTranslation(Keys.filter.offerSort.byRevenue) },\n { value: 'units', label: getTranslation(Keys.filter.offerSort.byUnits) },\n ],\n },\n ],\n [dateRange, market, marketOptions, offerSort],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value);\n else if (key === 'sort') {\n onOfferSortChange?.(value as OfferSortOption);\n setCurrentPage(1);\n }\n },\n [onOfferSortChange, onDateRangeChange, onMarketChange],\n );\n\n const sortedOffers = React.useMemo(\n () =>\n [...offers].sort((a, b) => {\n if (offerSort === 'revenue') return b.revenue - a.revenue;\n return b.percentage - a.percentage;\n }),\n [offers, offerSort],\n );\n\n const { totalRevenue, totalRevenueTrendDirection, totalRevenueTrend } = React.useMemo(() => {\n const nextTotalRevenue = sortedOffers.reduce((sum, offer) => sum + offer.revenue, 0);\n\n const { direction, formatted } = calculateWeightedRevenueTrend(\n sortedOffers,\n (offer) => offer.revenue,\n (offer) => offer.trend?.revenue,\n );\n\n return {\n totalRevenue: nextTotalRevenue,\n totalRevenueTrendDirection: direction,\n totalRevenueTrend: formatted,\n };\n }, [sortedOffers]);\n\n const topOffers = React.useMemo(() => sortedOffers.slice(0, 5), [sortedOffers]);\n\n const { totalPages, pageItems: paginatedOffers } = usePaginatedItems(sortedOffers, currentPage, itemsPerPage);\n\n const columns: ColumnDef<TopPerformingOffer>[] = React.useMemo(\n () => [\n {\n key: 'name',\n label: getTranslation(Keys.fullView.topOffers.columnName),\n sortable: true,\n render: (_: unknown, row: TopPerformingOffer) => (\n <SummaryItemRow>\n <ColorDot dotColor={row.color} />\n <span>{row.name}</span>\n </SummaryItemRow>\n ),\n },\n {\n key: 'revenue',\n label: getTranslation(Keys.fullView.topOffers.columnRevenue),\n sortable: true,\n render: (value: unknown, row: TopPerformingOffer) => formatMoney(Number(value), row.currencyCode),\n },\n {\n key: 'percentage',\n label: getTranslation(Keys.fullView.topOffers.columnPercentage),\n sortable: true,\n render: (value: unknown) => `${Number(value)}%`,\n },\n {\n key: 'trend',\n label: getTranslation(Keys.fullView.topOffers.columnTrend),\n render: (_: unknown, row: TopPerformingOffer) => {\n if (!row.trend?.revenue) return getTranslation(Keys.defaults.noData);\n const columnTrendDirection = resolveTrendDirection(row.trend.revenue);\n return (\n <TableTrendCell direction={columnTrendDirection}>\n {getTrendIcon(columnTrendDirection)}\n <span>{row.trend.revenue}</span>\n </TableTrendCell>\n );\n },\n },\n ],\n [],\n );\n\n const currencyCode = sortedOffers[0]?.currencyCode;\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"top-offers-full-view\">\n <PageHeader\n title={getTranslation(Keys.fullView.topOffers.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewChartSkeleton />\n </PageContainer>\n );\n }\n\n if (offers.length === 0) {\n return (\n <PageContainer data-testid=\"top-offers-full-view\">\n <PageHeader\n title={getTranslation(Keys.fullView.topOffers.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <EmptyStateText data-testid=\"top-offers-fullview-empty\">\n {getTranslation(Keys.widget.topPerformingOffers.emptyState)}\n </EmptyStateText>\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"top-offers-full-view\">\n <PageHeader\n title={getTranslation(Keys.fullView.topOffers.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <TopSection data-testid=\"top-offers-fullview-top-section\">\n <ChartWrapper data-testid=\"top-offers-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={sortedOffers}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius=\"50%\"\n outerRadius=\"85%\"\n dataKey=\"revenue\"\n nameKey=\"name\"\n paddingAngle={2}\n >\n {sortedOffers.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"top-offers-fullview-donut-center\">\n <DonutCenterLabel>\n {getTranslation(Keys.widget.topPerformingOffers.totalRevenue)}\n </DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</DonutCenterValue>\n <DonutCenterTrend direction={totalRevenueTrendDirection}>{totalRevenueTrend}</DonutCenterTrend>\n </DonutCenterOverlay>\n </ChartWrapper>\n\n <SummaryContainer data-testid=\"top-offers-fullview-summary\">\n {topOffers.map((offer) => {\n const summaryTrendDirection = resolveTrendDirection(offer.trend?.revenue);\n return (\n <SummaryItem key={offer.id}>\n <ColorDot dotColor={offer.color} />\n <SummaryInfo>\n <SummaryName>{offer.name}</SummaryName>\n <SummaryValue>{formatMoney(offer.revenue, offer.currencyCode)}</SummaryValue>\n </SummaryInfo>\n <SummaryPercentage>{offer.percentage}%</SummaryPercentage>\n {offer.trend?.revenue ? (\n <SummaryTrend direction={summaryTrendDirection} aria-label={offer.trend.revenue}>\n {getTrendIcon(summaryTrendDirection)}\n </SummaryTrend>\n ) : null}\n </SummaryItem>\n );\n })}\n </SummaryContainer>\n </TopSection>\n\n <TableSection data-testid=\"top-offers-table\">\n <ChartTitle data-testid=\"top-offers-fullview-table-title\">\n {getTranslation(Keys.fullView.topOffers.title)} ({sortedOffers.length})\n </ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer>\n <DataTable\n columns={columns}\n data={paginatedOffers}\n sortable\n getRowKey={(row: TopPerformingOffer) => row.id}\n />\n </DesktopTableContainer>\n ) : (\n <MobileOffersContainer>\n {paginatedOffers.map((offer) => {\n const trendPercent = parseTrendPercent(offer.trend?.revenue);\n let trendDirection: 'up' | 'down' | 'neutral' = 'neutral';\n if (trendPercent !== null && trendPercent > 0) trendDirection = 'up';\n else if (trendPercent !== null && trendPercent < 0) trendDirection = 'down';\n\n return (\n <MobileOfferCard key={offer.id}>\n <MobileOfferHeader>\n <ColorDot dotColor={offer.color} />\n <MobileOfferName>{offer.name}</MobileOfferName>\n </MobileOfferHeader>\n <MobileOfferMetricsGrid>\n <MobileOfferMetricItem>\n <MobileOfferMetricLabel>\n {getTranslation(Keys.fullView.topOffers.columnRevenue)}\n </MobileOfferMetricLabel>\n <MobileOfferMetricValue>\n {formatMoney(offer.revenue, offer.currencyCode)}\n </MobileOfferMetricValue>\n </MobileOfferMetricItem>\n <MobileOfferMetricItem>\n <MobileOfferMetricLabel>\n {getTranslation(Keys.fullView.topOffers.columnPercentage)}\n </MobileOfferMetricLabel>\n <MobileOfferMetricValue>{offer.percentage}%</MobileOfferMetricValue>\n </MobileOfferMetricItem>\n <MobileOfferMetricItem>\n <MobileOfferMetricLabel>\n {getTranslation(Keys.fullView.topOffers.columnTrend)}\n </MobileOfferMetricLabel>\n <MobileOfferTrendValue direction={trendDirection}>\n {offer.trend?.revenue ? (\n <>\n {getTrendIcon(trendDirection)}\n <span>{offer.trend.revenue}</span>\n </>\n ) : (\n getTranslation(Keys.defaults.noData)\n )}\n </MobileOfferTrendValue>\n </MobileOfferMetricItem>\n </MobileOfferMetricsGrid>\n </MobileOfferCard>\n );\n })}\n </MobileOffersContainer>\n )}\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={sortedOffers.length}\n data-testid=\"top-offers-pagination\"\n />\n )}\n </TableSection>\n </PageContainer>\n );\n};\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\nimport type { TrendDirection } from '../types';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const TopSection = styled(Box)`\n display: flex;\n gap: 24px;\n padding: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${({ theme }) => theme.shadows[1]};\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n }\n`;\n\nexport const ChartWrapper = styled(Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`;\n\nexport const DonutCenterOverlay = styled(Box)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 120px;\n`;\n\nexport const DonutCenterLabel = styled(Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const DonutCenterValue = styled(Typography)`\n margin-top: 2px;\n font-size: 1.25rem;\n line-height: 1.2;\n font-weight: 700;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const DonutCenterTrend = styled(Typography)<{ direction: TrendDirection }>`\n margin-top: 2px;\n font-size: 0.875rem;\n line-height: 1.2;\n font-weight: 600;\n color: ${({ direction, theme }) => {\n if (direction === 'up') return theme.palette.success.main;\n if (direction === 'down') return theme.palette.error.main;\n return theme.palette.text.secondary;\n }};\n`;\n\nexport const SummaryContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex: 1;\n`;\n\nexport const SummaryItem = styled(Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 12px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n`;\n\nexport const ColorDot = styled(Box)<{ dotColor: string }>`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ dotColor }) => dotColor};\n flex-shrink: 0;\n`;\n\nexport const SummaryInfo = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`;\n\nexport const SummaryName = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`;\n\nexport const SummaryValue = styled(Typography)`\n font-size: 0.75rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const SummaryPercentage = styled(Typography)`\n font-size: 1rem;\n font-weight: 600;\n flex-shrink: 0;\n`;\n\nexport const SummaryTrend = styled(Box)<{ direction: TrendDirection }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return theme.palette.success.main;\n if (direction === 'down') return theme.palette.error.main;\n return theme.palette.text.secondary;\n }};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`;\n\nexport const TableTrendCell = styled(Box)<{ direction: TrendDirection }>`\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-weight: 600;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return theme.palette.success.main;\n if (direction === 'down') return theme.palette.error.main;\n return theme.palette.text.secondary;\n }};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`;\n\nexport const DesktopTableContainer = styled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const MobileOffersContainer = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const MobileOfferCard = styled(Box)`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n`;\n\nexport const MobileOfferHeader = styled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const MobileOfferName = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.text.primary};\n word-break: break-word;\n`;\n\nexport const MobileOfferMetricsGrid = styled(Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({ theme }) => theme.palette.divider};\n`;\n\nexport const MobileOfferMetricItem = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`;\n\nexport const MobileOfferMetricLabel = styled(Typography)`\n font-size: 0.625rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n text-transform: uppercase;\n`;\n\nexport const MobileOfferMetricValue = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const MobileOfferTrendValue = styled(Typography)<{ direction: TrendDirection }>`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n font-size: 0.875rem;\n font-weight: 600;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return theme.palette.success.main;\n if (direction === 'down') return theme.palette.error.main;\n return theme.palette.text.secondary;\n }};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const FilterContainer = styled('div')`\n display: flex;\n gap: 12px;\n margin-bottom: 24px;\n flex-wrap: wrap;\n`;\n\nexport const FilterDropdown = styled('select')`\n min-width: 160px;\n height: 40px;\n padding: 8px 12px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 8px;\n font-size: 14px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n`;\n\nexport const FilterLabel = styled('label')`\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n","import React from 'react';\nimport { FilterContainer, FilterDropdown, FilterLabel } from './FilterBar.styled';\nimport type { FilterConfig } from './types';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface FilterBarProps {\n readonly filters: FilterConfig[];\n readonly onChange: (filterKey: string, value: string) => void;\n}\n\nexport const FilterBar: React.FC<FilterBarProps> = ({ filters, onChange }) => {\n return (\n <FilterContainer data-testid=\"filter-bar\">\n {filters.map((filter) => (\n <FilterLabel key={filter.key} htmlFor={`filter-${filter.key}`}>\n {filter.label}\n <FilterDropdown\n id={`filter-${filter.key}`}\n value={filter.value}\n onChange={(e) => onChange(filter.key, e.target.value)}\n disabled={filter.disabled}\n aria-label={`${filter.label} ${getTranslation(Keys.ariaLabel.filterSuffix)}`}\n data-testid={`filter-dropdown-${filter.key}`}\n >\n {filter.options.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </FilterDropdown>\n </FilterLabel>\n ))}\n </FilterContainer>\n );\n};\n","import type {\n DashboardStats,\n TopProduct,\n ConversionDataPoint,\n SignupDataPoint,\n CategoryRevenue,\n OrderHistory,\n SignupDetail,\n} from '../types.d';\n\nexport const mockStats: DashboardStats = {\n shopTitle: 'My NuSkin Shop',\n dateRange: {\n start: '2026-03-01',\n end: '2026-03-31',\n label: 'Mar 1 - Mar 31',\n },\n selectedMarket: 'all',\n metrics: {\n revenue: '$9,453',\n volume: '1,211',\n siteVisits: '17,935',\n conversionRate: '4.2%',\n },\n trend: {\n revenue: '+12.5%',\n volume: '+8.3%',\n siteVisits: '-2.1%',\n },\n};\n\nexport const mockTopProducts: TopProduct[] = [\n {\n id: 'prod-001',\n rank: 1,\n name: 'ageLOC LumiSpa',\n imageUrl: '',\n unitsSold: 342,\n revenue: 29580,\n volume: 245,\n trend: { units: '+15%', revenue: '+12%', volume: '+8%' },\n },\n {\n id: 'prod-002',\n rank: 2,\n name: 'Pharmanex LifePak',\n imageUrl: '',\n unitsSold: 287,\n revenue: 24395,\n volume: 198,\n trend: { units: '+8%', revenue: '+10%', volume: '+5%' },\n },\n {\n id: 'prod-003',\n rank: 3,\n name: 'ageLOC Meta',\n imageUrl: '',\n unitsSold: 256,\n revenue: 21760,\n volume: 176,\n trend: { units: '-3%', revenue: '-1%', volume: '-2%' },\n },\n {\n id: 'prod-004',\n rank: 4,\n name: 'Nu Skin 180 System',\n imageUrl: '',\n unitsSold: 198,\n revenue: 17820,\n volume: 142,\n trend: { units: '+22%', revenue: '+18%', volume: '+15%' },\n },\n {\n id: 'prod-005',\n rank: 5,\n name: 'Epoch Baobab Body Butter',\n imageUrl: '',\n unitsSold: 176,\n revenue: 8800,\n volume: 88,\n trend: { units: '+5%', revenue: '+3%', volume: '+2%' },\n },\n];\n\nexport const mockConversionData: ConversionDataPoint[] = Array.from({ length: 30 }, (_, i) => {\n const date = new Date('2026-03-01');\n date.setDate(date.getDate() + i);\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n return {\n date: `${months[date.getMonth()]} ${date.getDate()}`,\n rate: Number((4 + (i % 15) * 0.1).toFixed(2)),\n orders: 200 + ((i * 13) % 100),\n siteVisits: 4000 + ((i * 97) % 2000),\n };\n});\n\nexport const mockConversionDataStandard: ConversionDataPoint[] = mockConversionData.map((point) => ({\n ...point,\n rate: Number((point.rate * 1.35).toFixed(2)),\n orders: Math.round(point.orders * 0.7),\n}));\n\nexport const mockConversionDataSubscription: ConversionDataPoint[] = mockConversionData.map((point) => ({\n ...point,\n rate: Number((point.rate * 0.55).toFixed(2)),\n orders: Math.round(point.orders * 0.3),\n}));\n\nexport const mockSignupData: SignupDataPoint[] = Array.from({ length: 30 }, (_, i) => {\n const date = new Date('2026-03-01');\n date.setDate(date.getDate() + i);\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n const total = 80 + ((i * 11) % 40);\n const members = Math.floor(total * 0.4);\n const retail = Math.floor(total * 0.35);\n const brandAffiliates = total - members - retail;\n return {\n date: `${months[date.getMonth()]} ${date.getDate()}`,\n total,\n members,\n retail,\n brandAffiliates,\n };\n});\n\nexport const mockCategories: CategoryRevenue[] = [\n {\n id: 'cat-001',\n name: 'Favorites',\n revenue: 45200,\n percentage: 29,\n color: '#C95D63',\n trend: { revenue: '+8%', units: '+10%' },\n },\n {\n id: 'cat-002',\n name: 'Daily Routine',\n revenue: 42100,\n percentage: 27,\n color: '#6C7A9B',\n trend: { revenue: '+12%', units: '+15%' },\n },\n {\n id: 'cat-003',\n name: 'Fit & Trim Body',\n revenue: 34300,\n percentage: 22,\n color: '#E8975E',\n trend: { revenue: '-3%', units: '-1%' },\n },\n {\n id: 'cat-004',\n name: 'Dull Skin',\n revenue: 24900,\n percentage: 16,\n color: '#5F8FC4',\n trend: { revenue: '+5%', units: '+7%' },\n },\n {\n id: 'cat-005',\n name: 'Acne',\n revenue: 9400,\n percentage: 6,\n color: '#A2C3B3',\n trend: { revenue: '+2%', units: '+3%' },\n },\n];\n\nexport const mockOrders: OrderHistory[] = Array.from({ length: 50 }, (_, i) => {\n const firstNames = ['Sarah', 'John', 'Emma', 'Michael', 'Olivia', 'William', 'Ava', 'James'];\n const lastNames = ['Smith', 'Johnson', 'Williams', 'Brown', 'Jones', 'Garcia', 'Miller', 'Davis'];\n const date = new Date('2026-03-31');\n date.setDate(date.getDate() - (i % 30));\n return {\n orderId: `ORD-${String(10000 + i).padStart(5, '0')}`,\n date: date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }),\n customerName: `${firstNames[i % firstNames.length]} ${lastNames[i % lastNames.length]}`,\n customerType: i % 3 === 0 ? 'Subscription' : 'Standard',\n items: (i % 5) + 1,\n total: Number((50 + ((i * 17) % 200) + (i % 10) * 0.1).toFixed(2)),\n bv: 30 + ((i * 9) % 150),\n };\n});\n\nexport const mockSignupDetails: SignupDetail[] = Array.from({ length: 30 }, (_, i) => {\n const firstNames = ['Alice', 'Bob', 'Carol', 'David', 'Eva', 'Frank', 'Grace', 'Henry'];\n const lastNames = ['Anderson', 'Baker', 'Clark', 'Davis', 'Evans', 'Fisher', 'Grant', 'Hall'];\n const types: ('Member' | 'Retail' | 'Brand Affiliate')[] = ['Member', 'Retail', 'Brand Affiliate'];\n const date = new Date('2026-03-31');\n date.setDate(date.getDate() - (i % 30));\n return {\n id: `SU-${String(1000 + i).padStart(4, '0')}`,\n name: `${firstNames[i % firstNames.length]} ${lastNames[i % lastNames.length]}`,\n date: date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }),\n type: types[i % types.length],\n email: `${firstNames[i % firstNames.length].toLowerCase()}.${lastNames[i % lastNames.length].toLowerCase()}@example.com`,\n status: i % 4 === 0 ? 'Pending' : 'Active',\n };\n});\n","import type { ProductOfferDashboardStats, TopPerformingOffer } from '../types.d';\n\nexport { mockTopProducts, mockConversionData, mockOrders } from './mockDashboardData';\n\nexport const mockProductOfferStats: ProductOfferDashboardStats = {\n shopTitle: 'Performance Overview',\n dateRange: {\n start: '2026-03-01',\n end: '2026-03-31',\n label: 'Mar 1 - Mar 31',\n },\n selectedMarket: 'all',\n metrics: {\n revenue: '$5,208',\n offersPurchased: '285',\n conversionRate: '4.2%',\n },\n trend: {\n revenue: '+2.3%',\n offersPurchased: '+3.7%',\n },\n};\n\nexport const mockProductOfferStatsPositiveTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '+5.1%',\n offersPurchased: '+12.5%',\n },\n};\n\nexport const mockProductOfferStatsNegativeTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '-1.8%',\n offersPurchased: '-3.7%',\n },\n};\n\nexport const mockProductOfferStatsNeutralTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '+0%',\n offersPurchased: '+0%',\n },\n};\n\nexport const mockProductOfferStatsZeroOffers: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n metrics: {\n ...mockProductOfferStats.metrics,\n offersPurchased: '0',\n },\n trend: {\n revenue: '+0%',\n offersPurchased: '+0%',\n },\n};\n\nexport const mockTopOffers: TopPerformingOffer[] = [\n {\n id: 'offer-1',\n name: 'Winter Skincare Bundle',\n revenue: 2800,\n percentage: 29,\n color: '#6B8E7B',\n trend: { revenue: '-4.2%' },\n },\n {\n id: 'offer-2',\n name: 'Supplement Starter Pack',\n revenue: 2500,\n percentage: 27,\n color: '#E8915A',\n trend: { revenue: '+3.1%' },\n },\n {\n id: 'offer-3',\n name: 'Holiday Special Bundle',\n revenue: 2100,\n percentage: 22,\n color: '#C75B5B',\n trend: { revenue: '-1.5%' },\n },\n {\n id: 'offer-4',\n name: 'LumiSpa Cleansing Kit',\n revenue: 1500,\n percentage: 16,\n color: '#5B8EC7',\n trend: { revenue: '+2.8%' },\n },\n {\n id: 'offer-5',\n name: 'Daily Wellness Bundle',\n revenue: 529,\n percentage: 6,\n color: '#9B8EC7',\n trend: { revenue: '+7.2%' },\n },\n];\n"]}
|
|
1
|
+
{"version":3,"sources":["/gitlab-runner-data/builds/nextgen-development/mysite/npm/react-mysite-elements/dist/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/index.js","../src/index.ts","../src/common/card/NsProductCard.tsx","../src/common/card/styles/NsProductCard.Styled.tsx","../src/common/carousel/NsProductCarousel.tsx","../src/common/carousel/NsProductCarousel.styled.ts","../src/common/carousel/ProductTabCarousel.tsx","../src/common/Nav-Category-Navigation/NsCategoryNavigation.tsx","../src/common/Nav-Category-Navigation/NsCategoryNavigation.styled.tsx","../src/common/carousel/ProductTabCarousel.styled.tsx","../src/common/headers/MysiteHero.tsx","../src/common/headers/MysiteHero.styled.tsx","../src/common/icon/icons/PlaceholderImage.tsx","../src/common/icon/icons/ArrowDownIcon.tsx","../src/common/utils/gtmTracking.ts","../src/common/shopping-dashboard/ShoppingDashboard.styled.tsx","../src/common/shopping-dashboard/shared/DashboardHeader.tsx","../src/common/shopping-dashboard/shared/DashboardHeader.styled.tsx","../src/common/shopping-dashboard/TranslationKeys/translationResolver.ts","../src/common/shopping-dashboard/TranslationKeys/ShoppingDashboardTranslationKeys.ts","../src/common/shopping-dashboard/utils/marketOptions.ts","../src/common/shopping-dashboard/shared/StatsCard.tsx","../src/common/shopping-dashboard/shared/StatsCard.styled.tsx","../src/common/shopping-dashboard/shared/LoadingSkeletons.tsx","../src/common/shopping-dashboard/shared/LoadingSkeletons.styled.tsx","../src/common/shopping-dashboard/shared/TopProducts/TopSellingProductsList.tsx","../src/common/shopping-dashboard/utils/trendUtils.tsx","../src/common/shopping-dashboard/utils/dataUtils.ts","../src/common/shopping-dashboard/shared/TopProducts/TopSellingProductsList.styled.tsx","../src/common/shopping-dashboard/shared/WidgetMenu.tsx","../src/common/shopping-dashboard/shared/WidgetMenu.styled.tsx","../src/common/shopping-dashboard/shared/ConversionRate/ConversionRateChart.tsx","../src/common/shopping-dashboard/shared/ConversionRate/ConversionRateChart.styled.tsx","../src/common/shopping-dashboard/utils/dateConstants.ts","../src/common/shopping-dashboard/utils/dateFormat.ts","../src/common/shopping-dashboard/shared/Signups/SignupsChart.tsx","../src/common/shopping-dashboard/shared/Signups/SignupsChart.styled.tsx","../src/common/shopping-dashboard/shared/TopCategories/TopCategoriesPieChart.tsx","../src/common/shopping-dashboard/shared/TopCategories/TopCategoriesPieChart.styled.tsx","../src/common/shopping-dashboard/ShoppingDashboard.tsx","../src/common/shopping-dashboard/MysiteDashboardWithNavigation.tsx","../src/common/shopping-dashboard/shared/TopProducts/ProductsFullView.tsx","../src/common/shopping-dashboard/shared/PageHeader.tsx","../src/common/shopping-dashboard/shared/PageHeader.styled.tsx","../src/common/shopping-dashboard/shared/DataTable.tsx","../src/common/shopping-dashboard/shared/DataTable.styled.tsx","../src/common/shopping-dashboard/shared/Pagination.tsx","../src/common/shopping-dashboard/shared/Pagination.styled.tsx","../src/common/shopping-dashboard/shared/FullViewComponents.styled.tsx","../src/common/shopping-dashboard/shared/TopProducts/ProductsFullView.styled.tsx","../src/common/shopping-dashboard/shared/useViewport.ts","../src/common/shopping-dashboard/shared/ConversionRate/ConversionRateFullView.tsx","../src/common/shopping-dashboard/shared/ConversionRate/ConversionRateFullView.styled.tsx","../src/common/shopping-dashboard/shared/Signups/SignupsFullView.tsx","../src/common/shopping-dashboard/shared/Signups/SignupsFullView.styled.tsx","../src/common/shopping-dashboard/shared/TopCategories/CategoriesFullView.tsx","../src/common/shopping-dashboard/shared/TopCategories/CategoriesFullView.styled.tsx","../src/common/shopping-dashboard/TranslationContext.tsx","../src/common/shopping-dashboard/ProductOfferDashboard.styled.tsx","../src/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersPieChart.tsx","../src/common/shopping-dashboard/TranslationKeys/ProductOfferDashboardTranslationKeys.ts","../src/common/shopping-dashboard/ProductOfferDashboard.tsx","../src/common/shopping-dashboard/PoDashboardWithNavigation.tsx","../src/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersFullView.tsx","../src/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersFullView.styled.tsx","../src/common/shopping-dashboard/shared/FilterBar.styled.tsx","../src/common/shopping-dashboard/shared/FilterBar.tsx","../src/common/shopping-dashboard/fixtures/mockDashboardData.ts","../src/common/shopping-dashboard/fixtures/mockProductOfferData.ts"],"names":["ic","Object","create","qo","defineProperty","lc","getOwnPropertyDescriptor","sc","getOwnPropertyNames","dc","getPrototypeOf","pc","prototype","hasOwnProperty","fa","e","t","exports","cc","o","get","enumerable","nn","n","i","call","M","__esModule","value","uc","require_ReactPropTypesSecret","__commonJSMin","module","ReactPropTypesSecret","require_factoryWithThrowingShims","emptyFunction","emptyFunctionWithReset","Nn","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","name","isRequired","getShim","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require_prop_types","Bn","ReactIs","throwOnDirectAccess","index_exports","__export","CategoriesFullView","ConversionRateChart","ConversionRateFullView","DATE_RANGE_LABELS","DAYS_MAP","DashboardHeader","DataTable","FilterBar","MysiteDashboardWithNavigation","MysiteHero","NsCategoryNavigation","NsProductCard","NsProductCard_default","PageHeader","Pagination","PoDashboardWithNavigation","ProductCarousel","ProductCardCarousel","ProductOfferDashboard","ProductOfferDashboardTranslationKeys","ProductTabCarousel","ProductTabCarousel_default","ProductsFullView","ShoppingDashboard","ShoppingDashboardTranslationKeys","SignupsChart","SignupsFullView","StatsCard","TopCategoriesPieChart","TopPerformingOffersFullView","TopPerformingOffersPieChart","TopSellingProductsList","TranslationProvider","WidgetMenu","buildDefaultMarketOptions","calculatePercentage","calculateTotalPages","formatDateRange","formatDateRangeLabel","formatDisplayDate","formatISODate","formatShortDate","getDateRangeLabel","getDaysFromDateRange","getTranslation","getTranslationResolver","getTrendColor","getTrendIcon","mockCategories","mockConversionData","mockOrders","mockProductOfferStats","mockSignupData","mockSignupDetails","mockStats","mockTopOffers","mockTopProducts","paginateItems","resolveMarketOptions","resolveTranslation","setTranslationResolver","sortByNumericProperty","useTranslation","useTranslationResolver","__toCommonJS","import_react","require","import_foundation_ui_components","import_foundation_theme","PriceComponent","Et","styled","ProductCardContainer","isMobile","ImageContainer","bgColor","DefaultImage","ProductTitle","ProductBadgeContainer","AddToCartButton","disabled","isHovered","CartIcon","import_material","import_jsx_runtime","productTitle","imageDetails","className","button","onCardClick","productStatusBadge","directSellerBadge","mySitePriceComponent","testId","fn","useState","isButtonHovered","setIsButtonHovered","hn","useMediaQuery","handleImageError","target","noImageFallback","fallbackImage","src","Ke","jsxs","onClick","tabIndex","children","jsx","onError","imageSrc","mn","NsImage","alt","imageAlt","areaLabel","width","title","showButton","buttonText","stopPropagation","onMouseEnter","onMouseLeave","height","viewBox","fill","xmlns","fillRule","clipRule","d","import_react_slick","import_useMediaQuery","import_Box","SlickContainer","Be","uo","Box","ScrollableContainer","CardList","ControlsContainer","ViewAllWrapper","$isMobile","ProductCountWrapper","ArrowsWrapper","$isDisabled","Scrollablewrapper","CustomTypography","xn","NsTypography","ViewAllLink","$disabled","EmptyProductCategories","ControlsHeaderRow","ProductInfoWrapper","CategoryNameWrapper","entries","renderEntry","settings","showControlButtons","allEntryLabel","allEntryLink","categoryName","emptyProductMessage","productsCountLabel","isInitialDataLoading","history","sliderRef","Ao","useRef","Ln","prev","useCallback","current","slickPrev","next","slickNext","renderProductEntry","entry","index","we","directSeller","sliderSettings","dots","infinite","speed","slidesToShow","Math","min","length","slidesToScroll","swipe","draggable","arrows","responsive","breakpoint","shouldShowNavigation","renderCarouselContent","map","Fn","Slider","ref","variant","preventDefault","push","$n","NsCarouselControl","viewAllLabel","viewAllUrl","React","import_Tabs","import_Tab","import_prop_types","Hn","NsCategoryNavigationContainer","Wn","div","TabPanel","other","Ht","role","hidden","id","ha","propTypes","Xo","itemArray","controlledValue","onChange","Un","internalValue","setInternalValue","jn","Kn","Tabs","orientation","event","newValue","item","Gn","Tab","label","categoryId","findIndex","content","getMinHeight","$hasCategories","ProductTabCarouselContainer","oo","TabsContainer","ContentContainer","LoadingContainer","NoTabsContainer","SpinnerContainer","fetchCategories","fetchProducts","showCustomCategory","emptyProductTabs","getCategoryId","categories","ei","Ge","isLoadingInitialData","setIsLoadingInitialData","setCategories","isCategoriesLoaded","setIsCategoriesLoaded","selectedTab","setSelectedTab","products","setProducts","loading","setLoading","shouldShowSpinner","setShouldShowSpinner","checkForExistingSpinners","existingSpinners","document","querySelectorAll","useEffect","then","data","finally","cat","bt","_","ti","NsSpinner","getContactTextStyles","hasWhiteBackground","fontSize","fontStyle","fontWeight","lineHeight","letterSpacing","color","textDecoration","getSocialTitleStyles","textTransform","paddingLeft","getSocialIconsStyles","display","flexDirection","gap","alignItems","getContactTextMobileStyles","paddingBottom","wordBreak","overflowWrap","getSocialTitleMobileStyles","marginBottom","transition","opacity","transform","MysiteHeroContainer","yt","tr","go","bannerProps","isCircularImage","backgroundClip","background","backgroundColor","position","overflow","willChange","backfaceVisibility","top","left","right","boxShadow","paddingTop","justifyContent","fontFamily","headlineFont","padding","objectFit","objectPosition","marginLeft","marginRight","boxSizing","whiteSpace","textOverflow","paragraphFont","WebkitBoxOrient","WebkitLineClamp","MysiteHeroContainerMobile","paddingRight","maxHeight","bottom","pointerEvents","BadgeContainer","Badge","backdropFilter","borderRadius","border","minHeight","ToggleButtonMobile","cursor","margin","StyledSpan","ImgTabIndex","ContactLink","BadgeValue","PlaceholderImage","wt","gi","sx","ArrowDownIcon","wa","trackGTMEvent","eventData","window","url","href","updatedEventData","prefix","includes","dataLayer","console","error","renderImageContent","placeholderClass","B","Bo","pe","renderBadges","showBadges","expirationDate","totalSavings","badgeClass","renderMobileContent","isScrolled","renderSocialMediaIcons","shopTitle","socialTitleText","email","phone","Typography","component","trim","Fragment","renderContactLink","renderDesktopContent","shopDescription","Tooltip","arrow","checkIfImageIsCircular","Promise","resolve","reject","imageContext","Image","crossOrigin","onload","canvas","createElement","context","getContext","drawImage","isCircular","getImageData","every","corner","Array","slice","onerror","isWhiteOrNearWhite","hex","replace","toLowerCase","test","fullHex","split","char","join","r","Number","parseInt","substring","g","b","threshold","createContactClickHandler","contactType","contactValue","contact_type","contact_value","click_element","onKeyDown","key","globalThis","protocol","handlers","socialIcons","gt","setIsScrolled","isDescriptionExpanded","setIsDescriptionExpanded","setHasWhiteBackground","isImageCircular","setIsImageCircular","toggleDescription","debounceTimeout","lastScrollY","scrollY","currentScrollState","isTransitioning","lastUpdateTime","updateScrollState","newState","now","Date","clearTimeout","setTimeout","scrollTo","behavior","handleScroll","currentScrollY","abs","scrollingDown","scrollDownThreshold","scrollUpThreshold","initializeState","initialScrollY","shouldStartCompact","rafId","lastRafTime","throttledScrollHandler","requestAnimationFrame","addEventListener","passive","removeEventListener","cancelAnimationFrame","useMemo","icon","social_platform","type","social_url","open","NsLink","containerClass","getCharacterLimit","innerWidth","shouldShowToggle","DashboardContainer","fo","StatsRow","WidgetContainer","TwoColumnGrid","ErrorContainer","import_CalendarToday","import_Public","Ee","ColorUtils","getGenomeColor","HeaderContainer","theme","TitleSection","ShopTitle","DateRangeLabel","FiltersSection","FilterDropdownContainer","FilterLabel","StyledSelect","FilterIcon","LoadingIndicatorContainer","DesktopFiltersContainer","StyledCircularProgress","activeResolver","resolver","fallback","result","stats","revenue","volume","visits","subtitle","dcSv","conversionRate","trend","increased","decreased","unchanged","details","filter","dateRange","last7days","last30days","last90days","thisMonth","market","all","productSort","units","byUnits","byRevenue","byVolume","signupView","members","retail","brandAffiliates","showAll","showMembers","showRetail","showBrandAffiliates","conversionType","standard","subscription","categorySort","byTrend","widget","topProducts","viewAll","empty","ariaLabel","titleAriaLabel","sortAriaLabel","noImageAriaLabel","unitsSuffix","revenueSuffix","dcSvSuffix","rank","formula","comparison","chartAriaLabel","filterAriaLabel","noData","noChange","tooltipOrders","tooltipVisits","ordersPerSiteVisits","signups","total","totalSignupsInPeriod","noTrendData","topCategories","menu","fullView","navigation","backToDashboard","backAriaLabel","dashboard","statsRow","dashboardFilters","loadingDashboard","dateRangeFilter","marketFilter","filterSuffix","columns","date","status","detailsTitle","orderId","customer","items","bv","totalSv","orderDetailsTitle","notAvailable","product","unitsSold","skuPrefix","noProducts","category","percentOfTotal","allCategoriesTitle","noCategoryData","dataTable","noDataAvailable","sortableColumn","pagination","previousPage","nextPage","goToPage","of","defaults","zeroTrend","noValue","markets","useMarketOptions","Mi","dateRangeLabel","dateRangeLabelProp","isLoading","onDateRangeChange","onMarketChange","marketOptions","handleDateRangeChange","newDateRange","handleMarketChange","newMarket","handleFilterKeyDown","blur","getDateRangeLabelText","ae","as","Li","htmlFor","Oi","CalendarTodayIcon","Fi","PublicIcon","find","opt","String","option","import_ShowChart","import_TrendingUp","import_TrendingDown","Ce","StatsCardContainer","$layout","SplitTitle","SplitRow","LegendColumn","SplitTrend","direction","LegendCaption","StatsTitle","StatsValueContainer","StatsValue","ValueSubtitleWrapper","StatsSubtitle","TrendContainer","TrendIcon","TrendText","StatsCardHeader","import_Skeleton","SkeletonCard","Z","SkeletonHeader","SkeletonRow","StatsCardWrapper","StatsCardHeaderRow","StatsCardBody","StatsCardSubtitle","xo","Skeleton","ProductRowInfo","ProductRowMetrics","ChartMetricRow","ChartMetricTrend","ChartAreaSkeleton","PieChartLayout","PieCircleSkeleton","LegendList","LegendRowWrapper","LegendRowInfo","DashboardLayout","DashboardHeaderRow","DashboardFilterGroup","StatsGrid","WidgetGrid","FullViewLayout","FullViewMetricCard","FullViewMetricCenter","FullViewChartArea","FullViewTableCard","FullViewTableRow","SummaryCardsGrid","StatsCardSkeleton","T","ee","ProductRowSkeleton","ProductsListSkeleton","rowKey","ChartWidgetSkeleton","LegendRowSkeleton","CategoriesPieChartSkeleton","FullViewChartSkeleton","FullViewTableSkeleton","StatsCardComponent","caption","layout","trendDirection","trendValue","le","getTrendAriaLabel","directionText","getTrendChartIcon","iconSize","gl","TrendingUpIcon","fl","TrendingDownIcon","ul","ShowChartIcon","cl","memo","displayName","import_ShoppingCart","import_ArrowUpward","import_ArrowDownward","import_Remove","parseTrendPercent","cleanedValue","parsedValue","isFinite","resolveTrendDirection","calculateWeightedRevenueTrend","getRevenue","getTrend","reduce","accumulator","weightedSum","weight","average","formatted","toFixed","getTrendDirectionLabel","cr","ml","ArrowUpwardIcon","hl","ArrowDownwardIcon","xl","RemoveIcon","itemsPerPage","ceil","currentPage","startIndex","endIndex","sort","a","aVal","bVal","decimalPlaces","usePaginatedItems","totalPages","Ia","pageItems","formatMoney","currencyCode","locale","fractionDigits","amount","Intl","NumberFormat","style","currency","minimumFractionDigits","maximumFractionDigits","format","toLocaleString","ue","ProductsListContainer","WidgetHeader","HeaderActionsContainer","WidgetTitle","SortDropdown","ProductsList","ProductItem","ProductRank","ProductImage","ProductImagePlaceholder","ProductInfo","ProductName","ProductSubtitle","ProductMetrics","ProductValue","ProductTrend","EmptyState","EmptyStateText","import_Menu","import_MenuItem","import_ListItemIcon","import_ListItemText","import_MoreVert","import_Visibility","import_IconButton","StyledIconButton","Al","Vl","IconButton","widgetId","onFullView","Bl","anchorEl","setAnchorEl","buttonId","menuId","handleClick","currentTarget","handleClose","handleFullView","at","size","Ul","MoreVertIcon","El","Menu","onClose","MenuListProps","anchorOrigin","vertical","horizontal","transformOrigin","Hl","MenuItem","Wl","ListItemIcon","Kl","VisibilityIcon","_l","ListItemText","TopSellingProductsListComponent","maxProducts","onSortChange","onTitleClick","handleSortChange","newSort","formatValue","sortBy","getSubtitle","getTrendValue","getTrendDirection","startsWith","j","Jl","Zl","Yl","displayedProducts","rankLabel","trendLabel","jl","ShoppingCartIcon","imageUrl","toUpperCase","Gl","import_recharts","ve","ConversionRateContainer","ChartHeader","TitleRow","ChartTitle","FilterDropdown","MetricDisplay","MetricValue","MetricTrend","FormulaDisplay","ChartContainer","TooltipContainer","TooltipLabel","TooltipValue","TooltipDetails","getMonth","getDate","AXIS_MONTH_MAP","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","formatAxisDate","dateStr","parts","start","end","toISOString","calculateDateRangeFromOption","dateRangeOption","today","year","getFullYear","month","startDate","endDate","CHART_MARGIN","AXIS_TICK","LINE_DOT","ACTIVE_DOT","rateTickFormatter","CustomTooltip","active","payload","G","rate","orders","siteVisits","ConversionRateChartComponent","conversionData","conversionFilter","summaryRate","summaryChangePct","onFilterChange","handleFilterChange","yo","newFilter","noDataText","noChangeText","currentRate","trendInfo","latestRate","previousRate","change","percentageChange","formattedChange","formattedData","shortDate","je","ResponsiveContainer","LineChart","CartesianGrid","strokeDasharray","XAxis","dataKey","tick","tickLine","interval","YAxis","tickFormatter","domain","Line","stroke","strokeWidth","dot","activeDot","Ae","SignupsContainer","Legend","LegendItem","LegendColor","LegendLabel","SERIES_COLORS","SignupsChartComponent","signupData","onViewChange","handleViewChange","Co","newView","totalSignups","latestTotal","previousTotal","totalLabel","membersLabel","retailLabel","brandAffiliatesLabel","L","xe","oe","CategoriesContainer","ChartAndLegendContainer","ChartWrapper","DonutCenterOverlay","DonutCenterLabel","DonutCenterValue","DonutCenterTrend","LegendContainer","LegendInfo","LegendName","LegendValue","LegendPercentage","LegendValueWrapper","LegendTrendInline","LegendTrend","TopCategoriesPieChartComponent","sortedCategories","$r","nextSortedCategories","nextTotalRevenue","sum","nextTrendDirection","nextFormattedTrend","totalRevenue","formattedTrend","getTrendGraphIcon","E","Rs","Ms","renderCustomLabel","cx","cy","midAngle","innerRadius","outerRadius","percentage","RADIAN","PI","radius","x","cos","y","sin","textAnchor","dominantBaseline","leadingTrim","St","PieChart","Pie","nameKey","paddingAngle","labelLine","Cell","formatter","charAt","EMPTY_TOP_PRODUCTS","EMPTY_CONVERSION_DATA","EMPTY_SIGNUP_DATA","EMPTY_CATEGORIES","onProductSortChange","onSignupViewChange","onConversionFilterChange","onCategorySortChange","onProductsTitleClick","onConversionTitleClick","onSignupsTitleClick","onCategoriesToTitleClick","resolvedTopProducts","resolvedConversionData","resolvedSignupData","resolvedCategories","Te","metrics","import_ArrowBack","import_Language","$e","PageHeaderWrapper","BackButtonWrapper","BackButton","LeftSection","Title","DateRange","MobileDateRange","FilterWrapper","MobileTitleWrapper","MobileTitle","buildDateRangeFilter","keys","options","buildMarketFilter","onBack","filters","renderFilterIcon","iconType","fe","Ks","Gs","LanguageIcon","Us","ArrowBackIcon","it","TableContainer","Table","TableHeader","TableHeaderCell","sortable","TableBody","TableRow","TableCell","EmptyTableCell","SortIconContainer","isActive","onSort","sortColumn","sortDirection","getRowKey","handleSort","columnKey","handleKeyDown","getAriaSort","He","column","scope","td","ed","colSpan","row","rowIndex","render","import_ChevronLeft","import_ChevronRight","no","PaginationContainer","PageButton","PageInfo","NavButton","onPageChange","totalItems","handlePrevious","handleNext","action","pageNumbers","from","pages","startItem","endItem","goToPageLabel","De","rd","ChevronLeftIcon","page","ad","ChevronRightIcon","import_styles","nd","PageContainer","Ie","Ne","MetricChartCardSection","shadows","MetricSection","palette","text","primary","success","main","secondary","ComparisonText","ChartSection","TableSection","withCard","MobileCardName","MobileCardSubtext","MobileCardDetail","MobileCardStatus","warning","cd","Ve","Re","ProductSku","MobileCardsContainer","DesktopTableContainer","MobileProductCard","divider","MobileCardHeader","MobileProductRank","MobileProductDetails","MobileProductName","MobileProductSku","MobileMetricsGrid","MobileMetricItem","MobileMetricLabel","MobileMetricValue","MOBILE_VIEWPORT_QUERY","useIsMobileViewport","Sd","noSsr","mapProductToRow","sku","padStart","dt","setCurrentPage","setSortColumn","setSortDirection","isMobileView","handleBack","productRows","sortedRows","paginatedRows","U","Td","ConversionTrendChartContainer","be","Me","MobileOrderCard","MobileOrderHeader","MobileCustomerInfo","MobileCustomerName","MobileOrderDate","MobileOrderId","MobileOrderMetrics","MobileOrdersContainer","ChartWithLegendWrapper","ChartLegendContainer","ComparisonTextMobile","OrderIdColumnCell","qe","changePercent","getConversionFilterLabel","conversionFilterLabel","filteredOrders","order","customerType","paginatedOrders","$","getChartColor","flexWrap","Ed","Hd","Ye","customerName","Wd","MobileSignupsContainer","Mt","Ot","MobileSignupCard","SignupTrendChartContainer","NameColumnCell","toNumeric","parsed","normalizeSignupDataInput","input","isArray","apiResponse","daily","brandAffiliate","brand_affiliates","brand_affiliate","Ft","normalizedSignupData","point","rawPoint","signupTotal","absoluteChange","first","last","round","hasSignupTrendData","paginatedSignups","P","qd","Qd","he","connectNulls","Zd","signup","_t","SummaryItemRow","SummaryItemInfo","SummaryItemName","SummaryItemSubtext","SummaryItemPercentage","TopSection","Oe","muiStyled","Fe","SummaryContainer","SummaryItem","ColorDot","dotColor","SummaryInfo","SummaryName","SummaryValue","SummaryPercentage","MobileCategoriesContainer","MobileCategoryCard","SummaryTrendIcon","CategoryNameColumnCell","Lt","N","yp","wp","parseFloat","isNaN","totalRevenueTrendDirection","totalRevenueTrend","paginatedCategories","$t","translate","Za","DEFAULT_HISTORY_STATE_KEY","EMPTY_ORDERS","EMPTY_SIGNUPS","isRecord","isMysiteDashboardView","readViewFromState","state","stateKey","view","buildStateWithView","buildLocationWithState","pathname","search","hash","initialDateRange","initialMarket","initialProductSort","initialSignupView","initialConversionFilter","initialCategorySort","historyAdapter","historyStateKey","resetToDashboardOnMount","ne","currentView","setCurrentView","hasIntraDashboardHistoryRef","setDateRange","setMarket","setProductSort","setSignupView","setConversionFilter","setCategorySort","resolvedOrders","resolvedSignups","updateView","readCurrentView","writeCurrentView","mode","nextState","nextLocation","replaceState","pushState","listen","nextView","handlePopState","handleOpenFullView","goBack","back","nextDateRange","nextMarket","handleProductSortChange","nextProductSort","handleSignupViewChange","nextSignupView","handleConversionFilterChange","nextFilter","handleCategorySortChange","nextSort","handleProductsTitleClick","handleConversionTitleClick","handleSignupsTitleClick","handleCategoriesTitleClick","Do","PoDashboardContainer","Po","TopChartsRow","StatsCardStack","BottomChartsRow","offersPurchased","trendUp","trendDown","trendNeutral","comparedTo","offerSort","overall","emptyState","topPerformingOffers","statsCard","conversionChart","topOffers","widgetMenu","filterDateRange","filterMarket","backButton","columnName","columnRevenue","columnPercentage","columnTrend","trendZero","TopPerformingOffersPieChartComponent","offers","sortedOffers","ea","nextSortedOffers","offer","K","It","legendTrendDirection","EMPTY_TOP_OFFERS","dashboardTitle","conversionSummaryRate","conversionSummaryChangePct","onOfferSortChange","onOffersTitleClick","resolvedTopOffers","We","selectedMarket","Op","re","te","SummaryTrend","TableTrendCell","MobileOffersContainer","MobileOfferCard","MobileOfferHeader","MobileOfferName","MobileOfferMetricsGrid","MobileOfferMetricItem","MobileOfferMetricLabel","MobileOfferMetricValue","MobileOfferTrendValue","Nt","paginatedOffers","O","columnTrendDirection","Vt","summaryTrendDirection","trendPercent","isProductOfferDashboardView","allProducts","allOffers","conversionFullViewData","conversionFullViewRate","conversionFullViewChangePct","initialOfferSort","ce","setOfferSort","resolvedAllProducts","resolvedAllOffers","handleOfferSortChange","handleOffersTitleClick","Yo","Ro","FilterContainer","Mo","setDate","mockConversionDataStandard","mockConversionDataSubscription","months","floor","firstNames","lastNames","toLocaleDateString","day","types","mockProductOfferStatsPositiveTrend","mockProductOfferStatsNegativeTrend","mockProductOfferStatsNeutralTrend","mockProductOfferStatsZeroOffers"],"mappings":"AAAA,guwFAAa,IAAIA,GAAGC,OAAOC,MAAM,CAAC,IAAIC,GAAGF,OAAOG,cAAc,CAAC,IAAIC,GA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f,WAAY,GACZ5uB,MAAO,UACPqP,MAAO,CAAEN,QAAS,OAAQ,CAC9B,EACA,CACIxT,GAAI,UACJ9P,KAAM,0BACNsjB,QAAS,KACT6f,WAAY,GACZ5uB,MAAO,UACPqP,MAAO,CAAEN,QAAS,OAAQ,CAC9B,EACA,CACIxT,GAAI,UACJ9P,KAAM,yBACNsjB,QAAS,KACT6f,WAAY,GACZ5uB,MAAO,UACPqP,MAAO,CAAEN,QAAS,OAAQ,CAC9B,EACA,CACIxT,GAAI,UACJ9P,KAAM,wBACNsjB,QAAS,KACT6f,WAAY,GACZ5uB,MAAO,UACPqP,MAAO,CAAEN,QAAS,OAAQ,CAC9B,EACA,CACIxT,GAAI,UACJ9P,KAAM,wBACNsjB,QAAS,IACT6f,WAAY,EACZ5uB,MAAO,UACPqP,MAAO,CAAEN,QAAS,OAAQ,CAC9B,EACJ","sourcesContent":["\"use strict\";var ic=Object.create;var qo=Object.defineProperty;var lc=Object.getOwnPropertyDescriptor;var sc=Object.getOwnPropertyNames;var dc=Object.getPrototypeOf,pc=Object.prototype.hasOwnProperty;var fa=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),cc=(e,t)=>{for(var o in t)qo(e,o,{get:t[o],enumerable:!0})},nn=(e,t,o,n)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let i of sc(t))!pc.call(e,i)&&i!==o&&qo(e,i,{get:()=>t[i],enumerable:!(n=lc(t,i))||n.enumerable});return e};var M=(e,t,o)=>(o=e!=null?ic(dc(e)):{},nn(t||!e||!e.__esModule?qo(o,\"default\",{value:e,enumerable:!0}):o,e)),uc=e=>nn(qo({},\"__esModule\",{value:!0}),e);var Nn=fa((Wu,In)=>{\"use strict\";var fc=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\";In.exports=fc});var Bn=fa((_u,zn)=>{\"use strict\";var mc=Nn();function Vn(){}function An(){}An.resetWarningCache=Vn;zn.exports=function(){function e(n,i,s,d,p,w){if(w!==mc){var C=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw C.name=\"Invariant Violation\",C}}e.isRequired=e;function t(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:An,resetWarningCache:Vn};return o.PropTypes=o,o}});var Hn=fa((Gu,En)=>{\"use strict\";En.exports=Bn()();var Uu,Ku});var wu={};cc(wu,{CategoriesFullView:()=>Qr,ConversionRateChart:()=>ao,ConversionRateFullView:()=>To,DATE_RANGE_LABELS:()=>Ha,DAYS_MAP:()=>Ea,DashboardHeader:()=>ho,DataTable:()=>lt,FilterBar:()=>ac,MysiteDashboardWithNavigation:()=>Tp,MysiteHero:()=>Ca,NsCategoryNavigation:()=>er,NsProductCard:()=>Qo,PageHeader:()=>me,Pagination:()=>st,PoDashboardWithNavigation:()=>ec,ProductCarousel:()=>zo,ProductOfferDashboard:()=>ta,ProductOfferDashboardTranslationKeys:()=>z,ProductTabCarousel:()=>oi,ProductsFullView:()=>So,ShoppingDashboard:()=>Ir,ShoppingDashboardTranslationKeys:()=>r,SignupsChart:()=>Uo,SignupsFullView:()=>Jr,StatsCard:()=>Ct,TopCategoriesPieChart:()=>Ko,TopPerformingOffersFullView:()=>na,TopPerformingOffersPieChart:()=>jo,TopSellingProductsList:()=>ro,TranslationProvider:()=>Cp,WidgetMenu:()=>nt,buildDefaultMarketOptions:()=>Ra,calculatePercentage:()=>wl,calculateTotalPages:()=>Na,formatDateRange:()=>_a,formatDateRangeLabel:()=>us,formatDisplayDate:()=>fr,formatISODate:()=>mr,formatShortDate:()=>Wa,getDateRangeLabel:()=>gr,getDaysFromDateRange:()=>cs,getTranslation:()=>a,getTranslationResolver:()=>Ri,getTrendColor:()=>bl,getTrendIcon:()=>rt,mockCategories:()=>on,mockConversionData:()=>Oo,mockOrders:()=>sa,mockProductOfferStats:()=>so,mockSignupData:()=>tn,mockSignupDetails:()=>rn,mockStats:()=>en,mockTopOffers:()=>nc,mockTopProducts:()=>la,paginateItems:()=>Va,resolveMarketOptions:()=>Ma,resolveTranslation:()=>Ut,setTranslationResolver:()=>mo,sortByNumericProperty:()=>yl,useTranslation:()=>vp,useTranslationResolver:()=>io});module.exports=uc(wu);var fn=require(\"react\"),mn=require(\"@nuskin/foundation-ui-components\");var Et=require(\"@nuskin/foundation-theme\"),ln=(0,Et.styled)(\"div\")`\n width: 200px;\n text-align: left;\n margin-bottom: 5px;\n`,sn=(0,Et.styled)(\"button\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n width: 240px;\n height: ${e=>e.isMobile?\"410px\":\"513px\"};\n overflow: hidden;\n cursor: pointer;\n border: 1px solid #ededed;\n background: var(--color-primary-n-10-primary-white, #fff);\n`,dn=(0,Et.styled)(\"div\")`\n width: '240px';\n height: '240px';\n background: ${e=>e.bgColor??\"#f5f5f5\"};\n border-radius: 8px;\n overflow: hidden;\n margin-bottom: 0;\n display: flex;\n align-items: normal;\n justify-content: center;\n position: relative;\n @media (max-width: 560px) {\n width: 200px;\n height: 200px;\n align-items: unset;\n }\n`,pn=(0,Et.styled)(\"img\")`\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n display: block;\n`,cn=(0,Et.styled)(\"div\")`\n width: 200px;\n margin-top: 16px;\n max-height: 66px;\n text-align: left;\n font-size: 16px;\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n line-height: 22px;\n overflow: hidden;\n color: #666;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n @media (max-width: 560px) {\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n margin-top: 5px;\n max-height: 54px;\n line-height: 18px;\n }\n`,ma=(0,Et.styled)(\"div\")`\n width: 200px;\n text-align: left;\n margin-bottom: 12px;\n @media (max-width: 560px) {\n margin-bottom: 8px;\n }\n`,un=(0,Et.styled)(\"button\")`\n width: 200px;\n height: 40px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n gap: 10px;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0.14px;\n text-transform: none;\n justify-content: flex-start;\n padding-left: 31px;\n overflow: hidden;\n white-space: normal;\n word-break: break-word;\n overflow-wrap: break-word;\n text-overflow: ellipsis;\n margin-top: 8px;\n margin-bottom: 10px;\n -webkit-appearance: none;\n -webkit-tap-highlight-color: transparent;\n\n color: ${e=>e.disabled?\"#999\":\"#fff\"};\n background-color: ${e=>e.disabled?\"#e0e0e0\":!e.isMobile&&e.isHovered?\"#888\":\"#000\"};\n border: ${e=>e.disabled?\"1px solid #ccc\":\"none\"};\n cursor: ${e=>e.disabled?\"not-allowed\":\"pointer\"};\n opacity: ${e=>e.disabled?.6:1};\n transition: ${e=>e.isMobile?\"none\":\"all 0.3s ease\"};\n\n @media (max-width: 560px) {\n margin: 5px 0;\n }\n`,gn=(0,Et.styled)(\"span\")`\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n display: inline-block;\n background: none;\n transition: all 0.3s ease;\n opacity: ${e=>e.disabled?.5:1};\n`;var hn=require(\"@mui/material\"),Ke=require(\"react/jsx-runtime\"),gc=({productTitle:e,imageDetails:t,className:o,button:n,onCardClick:i,productStatusBadge:s,directSellerBadge:d,mySitePriceComponent:p,testId:w})=>{let[C,u]=(0,fn.useState)(!1),x=(0,hn.useMediaQuery)(\"(max-width: 560px)\"),g=b=>{let f=b.target,c=t?.fallbackImage;c&&f.src!==c&&(f.src=c)};return(0,Ke.jsxs)(sn,{className:o,onClick:i,tabIndex:0,\"data-testid\":\"product-card\",isMobile:x,children:[(0,Ke.jsx)(dn,{bgColor:t?.bgColor,onError:g,children:t?.imageSrc?(0,Ke.jsx)(mn.NsImage,{\"data-testid\":w??\"test-product-image\",className:t.className??\"\",src:t.imageSrc,alt:t.imageAlt,\"aria-label\":t.areaLabel??t.imageAlt,width:\"100%\"}):(0,Ke.jsx)(pn,{alt:\"\"})}),(0,Ke.jsx)(cn,{title:e,\"data-testid\":\"product-title\",children:e}),d&&(0,Ke.jsx)(ma,{children:d}),(0,Ke.jsx)(ma,{children:s}),(0,Ke.jsx)(ln,{children:p}),n?.showButton&&(0,Ke.jsxs)(un,{tabIndex:0,\"aria-roledescription\":\":\",\"aria-label\":n.buttonText||\"ADD TO CART\",\"data-testid\":\"add-to-cart-button\",disabled:n?.disabled??!1,isMobile:x,isHovered:C,onClick:b=>{b.stopPropagation(),n?.disabled||n.onClick?.()},onMouseEnter:()=>{!x&&!n?.disabled&&u(!0)},onMouseLeave:()=>{x||u(!1)},children:[(0,Ke.jsx)(gn,{className:\"cart-icon\",disabled:n?.disabled,children:(0,Ke.jsx)(\"svg\",{width:\"24\",height:\"22\",viewBox:\"0 0 24 22\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:(0,Ke.jsx)(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M0 1.86358C0 1.26109 0.488416 0.772675 1.09091 0.772675H3.48173C4.51054 0.772675 5.39955 1.49136 5.61511 2.49733L5.71309 2.95456H22.9091C23.245 2.95456 23.5622 3.10933 23.7689 3.37411C23.9757 3.63889 24.0489 3.98415 23.9674 4.31005L22.4053 10.5583C21.9197 12.5009 20.1743 13.8636 18.172 13.8636H8.05068L8.28444 14.9546H20.7273C21.3298 14.9546 21.8182 15.443 21.8182 16.0455C21.8182 16.648 21.3298 17.1364 20.7273 17.1364H19.6364H8.18182H7.40252C6.88811 17.1364 6.4436 16.777 6.33582 16.274L3.76449 4.27405L3.48173 2.95449H1.09091C0.488416 2.95449 0 2.46608 0 1.86358ZM8.18182 17.1364C6.97683 17.1364 6 18.1132 6 19.3182C6 20.5232 6.97683 21.5 8.18182 21.5C9.3868 21.5 10.3636 20.5232 10.3636 19.3182C10.3636 18.1132 9.3868 17.1364 8.18182 17.1364ZM19.6364 17.1364C18.4314 17.1364 17.4545 18.1132 17.4545 19.3182C17.4545 20.5232 18.4314 21.5 19.6364 21.5C20.8413 21.5 21.8182 20.5232 21.8182 19.3182C21.8182 18.1132 20.8413 17.1364 19.6364 17.1364ZM7.58317 11.6818H18.172C19.1732 11.6818 20.0459 11.0005 20.2887 10.0292L21.5119 5.13638H6.18062L7.58317 11.6818Z\",fill:n?.disabled?\"#999\":\"#ffffff\"})})}),n.buttonText||\"ADD TO CART\"]})]})},Qo=gc;var Ao=require(\"react\"),Fn=M(require(\"react-slick\")),Ln=M(require(\"@mui/material/useMediaQuery\"));var $n=require(\"@nuskin/foundation-ui-components\");var Be=require(\"@nuskin/foundation-theme\"),uo=M(require(\"@mui/material/Box\")),xn=require(\"@nuskin/foundation-ui-components\"),bn=(0,Be.styled)(uo.default)`\n padding: 30px 0 60px;\n width: 100%;\n margin: auto;\n margin-top: 50px;\n position: relative;\n\n .slick-list {\n padding-left: 24px;\n padding-right: 24px;\n }\n .slick-slide {\n display: flex;\n justify-content: center;\n padding: 0 12px;\n box-sizing: border-box;\n }\n .slick-prev,\n .slick-next {\n display: none !important;\n }\n\n @media (max-width: 1200px) {\n max-width: 1024px;\n .slick-list {\n padding-left: 12px;\n padding-right: 12px;\n }\n .slick-slide {\n padding: 0 6px;\n }\n }\n @media (max-width: 700px) {\n max-width: 100vw;\n padding: 10px 0 50px;\n .slick-list {\n padding-left: 4px;\n padding-right: 4px;\n }\n .slick-slide {\n padding: 0 2px;\n }\n }\n @media (max-width: 560px) {\n padding: 10px 0 10px;\n margin-top: 25px;\n }\n`,yn=(0,Be.styled)(\"div\")`\n overflow-x: auto;\n display: flex;\n scroll-snap-type: x mandatory;\n -webkit-overflow-scrolling: touch;\n gap: 16px;\n padding: 0 8px 16px;\n width: 100%;\n box-sizing: border-box;\n\n &::-webkit-scrollbar {\n height: 6px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #007bff;\n border-radius: 10px;\n }\n`,wn=(0,Be.styled)(\"div\")`\n display: flex;\n scroll-snap-align: start;\n justify-content: center;\n gap: 15px;\n`,Cn=(0,Be.styled)(uo.default)`\n position: absolute;\n bottom: calc(100% + 1px);\n right: 1px;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n`,vn=(0,Be.styled)(uo.default)`\n display: flex;\n align-items: center;\n margin-left: auto;\n margin-right: ${({$isMobile:e})=>e?0:\"24px\"};\n\n @media (max-width: 560px) {\n margin-left: 0;\n order: 2;\n }\n`,kn=(0,Be.styled)(uo.default)`\n display: none;\n\n @media (max-width: 560px) {\n color: #666666;\n font-family: Inter;\n font-size: 14px !important;\n font-style: normal;\n font-weight: 600;\n line-height: 18px;\n display: flex;\n align-items: center;\n order: 1;\n }\n`,Sn=(0,Be.styled)(uo.default)`\n display: flex;\n align-items: center;\n opacity: ${({$isDisabled:e})=>e?.3:1};\n pointer-events: ${({$isDisabled:e})=>e?\"none\":\"auto\"};\n transition: opacity 0.3s ease;\n\n .carousal-prev-button,\n .carousal-next-button {\n transition: all 0.3s ease;\n border: 2px solid #000000;\n border-radius: 3px;\n padding: 9px;\n cursor: pointer;\n\n svg {\n transition: all 0.3s ease;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n\n &:hover {\n background-color: #f5f5f5;\n border: 2px solid #ddd;\n\n svg {\n opacity: 0.5;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n }\n }\n\n @media (max-width: 560px) {\n display: none;\n }\n`,Lu=(0,Be.styled)(\"div\")`\n @media (max-width: 560px) {\n overflow-y: hidden;\n scrollbar-width: thin;\n scrollbar-color: #007bff #eee;\n &::-webkit-scrollbar {\n width: 8px;\n }\n &::-webkit-scrollbar-track {\n background: #eee;\n }\n &::-webkit-scrollbar-thumb {\n background-color: red;\n border-radius: 8px;\n border: 2px solid #eee;\n }\n }\n`,Tn=(0,Be.styled)(xn.NsTypography)`\n color: #666666;\n font-family: Inter;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 22px;\n @media (max-width: 560px) {\n margin: 0 3px;\n }\n`,Dn=(0,Be.styled)(\"a\")`\n color: ${({$disabled:e})=>e?\"#999999\":\"#000000\"};\n font-family: Inter, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 22px;\n text-decoration: none;\n border-bottom: 1px solid ${({$disabled:e})=>e?\"#999999\":\"#000000\"};\n padding-bottom: 4px;\n transition: all 0.3s ease;\n cursor: ${({$disabled:e})=>e?\"not-allowed\":\"pointer\"};\n pointer-events: ${({$disabled:e})=>e?\"none\":\"auto\"};\n opacity: ${({$disabled:e})=>e?.5:1};\n\n @media (max-width: 560px) {\n font-size: 14px;\n line-height: 18px;\n }\n\n &:hover {\n color: ${({$disabled:e})=>e?\"#999999\":\"#666666\"};\n border-bottom: 1px solid ${({$disabled:e})=>e?\"#999999\":\"#666666\"};\n cursor: ${({$disabled:e})=>e?\"not-allowed\":\"pointer\"};\n }\n`,Pn=(0,Be.styled)(\"div\")`\n padding-top: 20px;\n font-size: 20px;\n text-align: center;\n`,Rn=(0,Be.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`,Mn=(0,Be.styled)(\"div\")`\n display: flex;\n align-items: center;\n flex: 1;\n min-width: 0;\n`,On=(0,Be.styled)(\"div\")`\n font-family: 'Lora';\n font-weight: 400;\n font-size: 22px;\n margin-left: 16px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 13px;\n`;var we=require(\"react/jsx-runtime\");function zo({entries:e,renderEntry:t,settings:o={},showControlButtons:n=!0,allEntryLabel:i=\"View All\",allEntryLink:s=\"\",categoryName:d,emptyProductMessage:p=\"No Products Available For The Selected Category\",productsCountLabel:w=\"Products\",isInitialDataLoading:C,history:u}){let x=(0,Ao.useRef)(null),g=(0,Ln.default)(\"(max-width: 560px)\"),b=(0,Ao.useCallback)(()=>{x.current?.slickPrev()},[]),f=(0,Ao.useCallback)(()=>{x.current?.slickNext()},[]),c=t??((h,F)=>(0,we.jsx)(Qo,{productTitle:h.productTitle,imageDetails:h.imageDetails,button:h.button,onCardClick:h.onCardClick,productStatusBadge:h.productStatusBadge,directSellerBadge:h.directSeller,mySitePriceComponent:h.mySitePriceComponent},`${h.productTitle}-${F}`)),v={dots:!0,infinite:!0,speed:500,slidesToShow:Math.min(e?.length??0,4),slidesToScroll:4,swipe:!0,draggable:!0,arrows:!0,responsive:[{breakpoint:1320,settings:{slidesToShow:Math.min(e?.length??0,3),slidesToScroll:3}},{breakpoint:900,settings:{slidesToShow:Math.min(e?.length??0,2),slidesToScroll:2}},{breakpoint:600,settings:{slidesToShow:1,slidesToScroll:1,arrows:!1}}],...o},y=(e?.length??0)>v.slidesToShow,D=()=>e?.length===0&&!C?(0,we.jsx)(Pn,{children:p}):g?(0,we.jsx)(yn,{children:(0,we.jsx)(wn,{children:e.map((h,F)=>h&&c(h,F))})}):(0,we.jsx)(Fn.default,{...v,ref:x,children:e.map((h,F)=>h&&c(h,F))});return(0,we.jsxs)(bn,{children:[n&&(0,we.jsxs)(Cn,{children:[(0,we.jsxs)(Rn,{children:[(0,we.jsxs)(Mn,{children:[(0,we.jsx)(kn,{children:(0,we.jsxs)(Tn,{variant:\"body-m\",children:[e?.length??0,\" \",w]})}),!g&&d&&(0,we.jsx)(On,{children:d})]}),(0,we.jsx)(vn,{$isMobile:g,children:(0,we.jsx)(Dn,{$disabled:(e?.length??0)===0,onClick:h=>{h.preventDefault(),(e?.length??0)>0&&u&&u.push(s)},children:i})})]}),!g&&(0,we.jsx)(Sn,{$isDisabled:!y,children:(0,we.jsx)($n.NsCarouselControl,{prev:b,next:f,viewAllLabel:\"\",viewAllUrl:\"\"})})]}),D()]})}var Ge=require(\"react\"),ei=require(\"@mui/material\");var Un=M(require(\"react\")),Kn=M(require(\"@mui/material/Tabs\")),Gn=M(require(\"@mui/material/Tab\")),ha=M(require(\"@mui/material/Box\")),Xo=M(Hn());var Wn=require(\"@nuskin/foundation-theme\"),_n=Wn.styled.div`\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n width: 100%;\n height: 100%;\n background-color: #fff;\n .tabsStyle {\n display: flex;\n padding-top: 8.533px;\n flex-direction: column;\n align-items: flex-start;\n gap: 12.8px;\n border-right: 1px;\n border-color: divider;\n width: 200px;\n & .Mui-selected {\n font-weight: 700;\n font-size: 14px;\n font-family: 'inter', sans-serif;\n font-style: normal;\n font-height: 20px;\n border-radius: 4px;\n }\n & .MuiTabs-indicator {\n left: 0;\n background-color: #5b81a5;\n color: #5b81a5;\n\n @media (max-width: 768px) {\n display: none;\n }\n }\n }\n\n .tabContainer {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n min-width: 100%;\n background-color: #fff;\n @media (max-width: 768px) {\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n }\n\n .tabStyle {\n align-items: flex-start;\n display: flex;\n text-align: left;\n font-size: 14px;\n font-family: 'inter' sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n min-height: 20px;\n padding: 1px;\n padding-left: 10px;\n margin-bottom: 10px;\n cursor: pointer;\n text-transform: none;\n }\n @media (max-width: 768px) {\n flex-direction: row;\n\n .tabsStyle {\n width: 100%;\n border-right: none;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding-top: 0px;\n }\n\n .tabStyle {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 70px;\n padding: 8px 16px;\n text-align: center;\n margin: 4px;\n background-color: #fff;\n cursor: pointer;\n color: black;\n font-family: Inter;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n }\n\n .tabStyle.Mui-selected {\n background-color: #5b81a5;\n color: #ffffff !important;\n font-weight: 700;\n border-radius: 70px;\n }\n }\n .tabPanel {\n padding: 8px;\n text-align: left;\n }\n`;var jn=require(\"@mui/material\"),Ht=require(\"react/jsx-runtime\");function Yn(e){let{children:t,value:o,index:n,...i}=e;return(0,Ht.jsx)(\"div\",{role:\"tabpanel\",hidden:o!==n,id:`vertical-tabpanel-${n}`,\"aria-labelledby\":`vertical-tab-${n}`,...i,children:o===n&&(0,Ht.jsx)(ha.default,{className:\"tabPanel\",children:t})})}Yn.propTypes={children:Xo.default.node,index:Xo.default.number.isRequired,value:Xo.default.number.isRequired};var er=({itemArray:e,value:t,onChange:o})=>{let[n,i]=Un.useState(0),s=(0,jn.useMediaQuery)(\"(max-width:768px)\"),d=t??n;return(0,Ht.jsx)(_n,{children:(0,Ht.jsxs)(ha.default,{className:\"tabContainer\",children:[(0,Ht.jsx)(Kn.default,{orientation:s?\"horizontal\":\"vertical\",variant:\"scrollable\",value:d,onChange:(w,C)=>{o?o(w,C):i(C)},\"aria-label\":\"Vertical tabs example\",className:\"tabsStyle\",children:e.map(w=>(0,Ht.jsx)(Gn.default,{label:w.label,className:\"tabStyle\"},w.categoryId))}),e.map(w=>(0,Ht.jsx)(Yn,{value:d,index:e.findIndex(C=>C.categoryId===w.categoryId),children:w.content},w.categoryId))]})})};var ti=require(\"@nuskin/foundation-ui-components\");var oo=require(\"@nuskin/foundation-theme\"),hc=({isMobile:e,$hasCategories:t})=>e?\"auto\":t?\"800px\":\"auto\",Jn=(0,oo.styled)(\"div\")`\n display: flex;\n flex-direction: ${({isMobile:e})=>e?\"column\":\"row\"};\n align-items: ${({isMobile:e})=>e?\"stretch\":\"flex-start\"};\n width: 100%;\n max-width: 1920px;\n min-height: ${hc};\n margin: 0 auto;\n box-sizing: border-box;\n overflow: visible;\n background: #fff;\n padding: ${({isMobile:e})=>e?\"10px 16px 0px 16px\":\"50px 60px 0px 60px\"};\n\n @media (max-width: 768px) {\n padding: 10px 16px 0px 16px;\n min-height: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n padding: 30px 40px 0px 40px;\n gap: 20px;\n }\n\n transform: translateZ(0);\n will-change: auto;\n`,Zn=(0,oo.styled)(\"div\")`\n min-width: ${({isMobile:e})=>e?\"100%\":\"auto\"};\n height: ${({isMobile:e})=>e?\"auto\":\"100%\"};\n flex-shrink: 0;\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n\n overflow-x: auto;\n overflow-y: visible;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: none;\n -ms-overflow-style: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-width: 200px;\n margin-right: 20px;\n }\n`,qn=(0,oo.styled)(\"div\")`\n flex: 1;\n min-width: 0;\n height: ${({isMobile:e})=>e?\"auto\":\"100%\"};\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n min-height: 300px;\n\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-height: 400px;\n }\n\n contain: layout style paint;\n transform: translateZ(0);\n`,Qu=(0,oo.styled)(\"div\")`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 200px;\n padding: 20px;\n\n @media (max-width: 768px) {\n min-height: 150px;\n padding: 16px;\n }\n`,Qn=(0,oo.styled)(\"div\")`\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 40px 20px;\n color: #666;\n font-size: 16px;\n\n @media (max-width: 768px) {\n padding: 20px 16px;\n font-size: 14px;\n }\n`,Xn=(0,oo.styled)(\"div\")`\n padding: 10px;\n display: flex;\n justify-content: center;\n`;var bt=require(\"react/jsx-runtime\"),xc=({allEntryLabel:e,allEntryLink:t,renderEntry:o,settings:n,showControlButtons:i=!0,fetchCategories:s,fetchProducts:d,showCustomCategory:p=!1,emptyProductTabs:w=\"No tabs available\",emptyProductMessage:C,productsCountLabel:u,getCategoryId:x,history:g})=>{let b=(0,ei.useMediaQuery)(\"(max-width:768px)\"),[f,c]=(0,Ge.useState)(!0),[v,y]=(0,Ge.useState)([]),[D,h]=(0,Ge.useState)(!1),[F,V]=(0,Ge.useState)(0),[Y,A]=(0,Ge.useState)([]),[H,Q]=(0,Ge.useState)(!1),[I,m]=(0,Ge.useState)(!0),k=(0,Ge.useCallback)(()=>{let l=document.querySelectorAll('[data-testid*=\"spinner\"], .ns-spinner, [class*=\"spinner\"]');m(l.length===0)},[]);(0,Ge.useEffect)(()=>{H&&k()},[H,k]),(0,Ge.useEffect)(()=>{s().then(l=>{y(l),h(!0)})},[s]),(0,Ge.useEffect)(()=>{if(D)if(v.length>0){let l=v[F]?.categoryId;x&&x(l),Q(!0),d(l).then(A).finally(()=>{Q(!1),c(!1)})}else Q(!1)},[v,F,d,D]);let S=v.map(l=>({label:l.label,content:\"\",categoryId:l.categoryId}));return(0,bt.jsxs)(Jn,{isMobile:b,$hasCategories:v.length>0,children:[p&&(S.length>0?(0,bt.jsx)(Zn,{isMobile:b,children:(0,bt.jsx)(er,{itemArray:S,value:F,onChange:(l,R)=>V(R)})}):(0,bt.jsx)(Qn,{children:w})),(0,bt.jsx)(qn,{isMobile:b,children:H?(0,bt.jsx)(Xn,{children:I&&(0,bt.jsx)(ti.NsSpinner,{})}):(0,bt.jsx)(zo,{isInitialDataLoading:f,entries:Y,allEntryLabel:e,allEntryLink:t,renderEntry:o?l=>o({...l,productStatusBadge:l.productStatusBadge}):void 0,settings:n,showControlButtons:i,categoryName:v[F]?.label,emptyProductMessage:C,productsCountLabel:u,history:g})})]})},oi=xc;var gt=require(\"react\"),pe=require(\"@mui/material\"),Bo=require(\"@nuskin/foundation-ui-components\");var yt=require(\"@nuskin/foundation-theme\"),go=require(\"@mui/material\"),tr=require(\"react/jsx-runtime\"),xa=e=>({fontSize:\"12px\",fontStyle:\"normal\",fontWeight:\"600\",lineHeight:\"16px\",letterSpacing:\"0.12px\",color:e?\"#000000\":\"#FFFFFF\",\"& a\":{color:\"inherit\",textDecoration:\"none\",\"&:hover\":{textDecoration:\"underline\"}}}),ai=e=>({fontSize:\"12px\",fontStyle:\"normal\",fontWeight:\"700\",lineHeight:\"16px\",letterSpacing:\"0.48px\",color:e?\"#000000\":\"#FFFFFF\",textTransform:\"uppercase\",paddingLeft:\"5px\"}),ni=()=>({display:\"flex\",flexDirection:\"row\",gap:\"10px\",alignItems:\"center\"}),ri=e=>({...xa(e),paddingBottom:\"11px\",wordBreak:\"break-all\",overflowWrap:\"break-word\",paddingLeft:\"5px\",\"& a\":{color:\"inherit\",textDecoration:\"none\"},\"@media (max-width: 420px)\":{fontSize:\"11px\",lineHeight:\"15px\",paddingBottom:\"8px\"},\"@media (max-width: 400px)\":{fontSize:\"10px\",lineHeight:\"14px\",paddingBottom:\"6px\"},\"@media (max-width: 375px)\":{fontSize:\"8px\",lineHeight:\"12px\",paddingBottom:\"4px\"}}),bc=e=>({...ai(e),marginBottom:\"11px\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\",\"@media (max-width: 420px)\":{fontSize:\"11px\",lineHeight:\"14px\",marginBottom:\"8px\"},\"@media (max-width: 400px)\":{fontSize:\"10px\",lineHeight:\"12px\",marginBottom:\"5px\"},\"@media (max-width: 375px)\":{fontSize:\"8px\",lineHeight:\"11px\",marginBottom:\"4px\"}}),ii=(0,yt.styled)(e=>(0,tr.jsx)(go.Box,{...e}))(({bannerProps:e,isCircularImage:t,hasWhiteBackground:o})=>({backgroundClip:\"border-box\",display:\"flex\",background:e?.backgroundColor??\"#383838\",position:\"relative\",overflow:\"hidden\",width:\"100%\",height:\"auto\",flexDirection:\"row\",alignItems:\"center\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"transform, opacity\",transform:\"translateZ(0)\",backfaceVisibility:\"hidden\",\"&.scrolled\":{top:0,left:0,right:0,boxShadow:\"0 2px 8px rgba(0,0,0,0.2)\",\".content\":{paddingTop:\"0\",justifyContent:\"center\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".body-title\":{fontSize:\"26px\",lineHeight:\"34px\",marginBottom:\"0\",fontStyle:\"normal\",fontWeight:\"400\",fontFamily:e?.headlineFont??\"Lora\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".bg-image\":{width:\"90px\",height:\"90px\",padding:t?\"2px\":\"0px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",objectFit:\"cover\",objectPosition:\"center\"},\".placeholder-image\":{\"& > div\":{width:\"90px\",height:\"90px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"}}},\".content\":{width:\"70%\",height:\"100%\",marginLeft:\"2%\",marginRight:\"auto\",display:\"flex\",flexDirection:\"column\",position:\"relative\",boxSizing:\"border-box\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".bg-image\":{width:\"252px\",height:\"252px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",padding:t?\"3px\":\"0px\",objectFit:\"cover\",objectPosition:\"center\"},\".placeholder-image\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",\"& > div\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"}},\".body-title\":{fontSize:\"32px\",lineHeight:\"38px\",marginBottom:\"8px\",fontWeight:\"400\",color:o?\"#000000\":\"#FFFFFF\",overflow:\"hidden\",whiteSpace:\"nowrap\",textOverflow:\"ellipsis\",fontFamily:e?.headlineFont??\"Lora\",paddingLeft:\"5px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".body-text\":{fontSize:\"16px\",marginBottom:\"12px\",fontStyle:\"normal\",fontWeight:\"400\",lineHeight:\"22px\",color:o?\"#000000\":\"#FFFFFF\",fontFamily:e?.paragraphFont??\"inherit\",display:\"-webkit-box\",WebkitBoxOrient:\"vertical\",overflow:\"hidden\",WebkitLineClamp:3,textOverflow:\"ellipsis\",paddingLeft:\"5px\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\"},\".social-media\":{display:\"flex\",flexDirection:\"column\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\"},\".email-text\":xa(o),\".phone-text\":xa(o),\".social-title-text\":{...ai(o),marginBottom:\"8px\"},\".social-icons\":{...ni(),paddingBottom:\"8px\"}})),li=(0,yt.styled)(e=>(0,tr.jsx)(go.Box,{...e}))(({bannerProps:e,isCircularImage:t,hasWhiteBackground:o})=>({backgroundClip:\"border-box\",display:\"flex\",background:e?.backgroundColor??\"#383838\",position:\"relative\",overflow:\"hidden\",width:\"100%\",flexDirection:\"column\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"transform, opacity\",transform:\"translateZ(0)\",backfaceVisibility:\"hidden\",\"&.scrolled\":{top:0,left:0,right:0,boxShadow:\"0 2px 8px rgba(0,0,0,0.2)\",\".content-mobile\":{paddingTop:\"5px\",width:\"60%\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".body-title-mobile\":{fontSize:\"18px\",lineHeight:\"28px\",marginBottom:\"0\",fontStyle:\"normal\",fontWeight:\"400\",fontFamily:e?.headlineFont??\"Lora\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".bg-image-mobile\":{width:\"75px\",height:\"75px\",padding:t?\"2px\":\"0px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",objectFit:\"cover\",objectPosition:\"center\"},\".placeholder-image-mobile\":{\"& > div\":{width:\"75px !important\",height:\"75px !important\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"}}},\".image-content-mobile\":{display:\"flex\",flexDirection:\"row\",width:\"100%\",justifyContent:\"center\",alignItems:\"center\"},\".content-mobile\":{width:\"55%\",height:\"100%\",paddingTop:\"10px\",paddingRight:\"10px\",marginLeft:\"8px\",marginRight:\"auto\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",position:\"relative\",boxSizing:\"border-box\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",\"@media (max-width: 420px)\":{paddingTop:\"8px\",width:\"100%\"},\"@media (max-width: 400px)\":{paddingTop:\"6px\",width:\"100%\",height:\"100%\"},\"@media (max-width: 375px)\":{paddingTop:\"4px\",width:\"100%\",height:\"100%\"}},\".bg-image-mobile\":{width:\"144px\",height:\"144px\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",objectFit:\"cover\",objectPosition:\"center\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",padding:t?\"2px\":\"0px\",\"@media (max-width: 420px)\":{width:\"120px\",height:\"120px\"},\"@media (max-width: 400px)\":{width:\"112px\",height:\"112px\"},\"@media (max-width: 375px)\":{width:\"90px\",height:\"90px\"}},\".placeholder-image-mobile\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",\"& > div\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",width:\"144px\",height:\"144px\",\"@media (max-width: 420px)\":{width:\"120px\",height:\"120px\"},\"@media (max-width: 400px)\":{width:\"110px !important\",height:\"110px !important\"},\"@media (max-width: 375px)\":{width:\"90px\",height:\"90px\"}}},\".body-title-mobile\":{fontSize:\"22px\",lineHeight:\"28px\",marginBottom:\"13px\",fontWeight:\"400\",color:o?\"#000000\":\"#FFFFFF\",fontStyle:\"normal\",overflow:\"hidden\",whiteSpace:\"nowrap\",textOverflow:\"ellipsis\",fontFamily:e?.headlineFont??\"Lora\",paddingLeft:\"5px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",\"@media (max-width: 420px)\":{fontSize:\"16px\",lineHeight:\"24px\",marginBottom:\"8px\"},\"@media (max-width: 400px)\":{fontSize:\"16px\",lineHeight:\"22px\",marginBottom:\"6px\"},\"@media (max-width: 375px)\":{fontSize:\"14px\",lineHeight:\"20px\",marginBottom:\"4px\"}},\".body-text-mobile\":{fontSize:\"14px\",padding:\"20px 25px 20px 25px\",fontStyle:\"normal\",fontWeight:\"400\",lineHeight:\"20px\",color:\"#252525\",backgroundColor:\"#E0E0E0\",fontFamily:e?.paragraphFont??\"inherit\",transition:\"all 0.25s cubic-bezier(0.4, 0, 0.2, 1)\",opacity:1,transform:\"translateY(0)\"},\".expandable-description-mobile\":{backgroundColor:\"#E0E0E0\",position:\"relative\"},\".description-content-mobile\":{fontSize:\"14px\",padding:\"10px 15px\",fontStyle:\"normal\",fontWeight:\"400\",lineHeight:\"20px\",color:\"#252525\",fontFamily:e?.paragraphFont??\"inherit\",transition:\"max-height 0.3s ease-in-out, opacity 0.3s ease-in-out\",overflow:\"hidden\",position:\"relative\",\"&.collapsed\":{maxHeight:\"50px\",display:\"-webkit-box\",WebkitLineClamp:2,WebkitBoxOrient:\"vertical\",\"&::after\":{content:'\"\"',position:\"absolute\",bottom:0,left:0,right:0,height:\"20px\",background:\"linear-gradient(transparent, rgba(224, 224, 224, 0.8), #E0E0E0)\",pointerEvents:\"none\"}},\"&.expanded\":{maxHeight:\"none\",whiteSpace:\"normal\",display:\"block\",\"&::after\":{display:\"none\"}}},\".email-text-mobile\":ri(o),\".phone-text-mobile\":ri(o),\".social-title-text-mobile\":bc(o),\".social-icons-mobile\":{...ni(),paddingBottom:\"10px\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\",\"& img\":{width:\"24px\",height:\"24px\",\"@media (max-width: 400px)\":{width:\"20px\",height:\"20px\"},\"@media (max-width: 375px)\":{width:\"18px\",height:\"18px\"}},\"@media (max-width: 420px)\":{paddingBottom:\"8px\"},\"@media (max-width: 400px)\":{paddingBottom:\"4px\"},\"@media (max-width: 375px)\":{paddingBottom:\"3px\"}}})),si=(0,yt.styled)(go.Box)({display:\"flex\",gap:\"12px\",marginBottom:\"16px\",paddingLeft:\"5px\",\"&.mobile-badges\":{flexDirection:\"column\",gap:\"8px\",marginBottom:\"12px\"},\"&.tablet-badges\":{flexDirection:\"row\",gap:\"12px\",marginBottom:\"8px\"}}),ba=(0,yt.styled)(e=>(0,tr.jsx)(go.Box,{...e}))(({hasWhiteBackground:e})=>({backgroundColor:\"rgba(255, 255, 255, 0.2)\",backdropFilter:\"blur(10px)\",borderRadius:\"20px\",padding:\"8px 16px\",display:\"flex\",alignItems:\"center\",gap:\"4px\",border:\"1px solid rgba(255, 255, 255, 0.3)\",transition:\"all 0.3s ease\",\"&.mobile-badge\":{padding:\"6px 12px\",borderRadius:\"16px\",fontSize:\"12px\"},\"&.tablet-badge\":{padding:\"8px 16px\",borderRadius:\"20px\",fontSize:\"14px\"},\"&.total-savings-badge\":{backgroundColor:\"#4A6987\",border:\"none\",borderRadius:\"8px\",padding:\"8px 16px\",gap:\"4px\",minHeight:\"32px\",backdropFilter:\"none\",\".badge-value\":{color:\"#FFFFFF\"},\"&:hover\":{backgroundColor:\"#4A6987\",transform:\"none\",boxShadow:\"none\"}},\"&.expiration-badge\":{borderRadius:\"8px\",padding:\"8px 16px\",gap:\"4px\",minHeight:\"32px\"},\"&:hover\":{backgroundColor:\"rgba(255, 255, 255, 0.3)\",transform:\"translateY(-1px)\",boxShadow:\"0 4px 12px rgba(0, 0, 0, 0.1)\"},\".badge-text\":{color:e?\"#000000\":\"#FFFFFF\",fontWeight:\"400\",opacity:.9},\".badge-value\":{color:e?\"#000000\":\"#FFFFFF\",fontWeight:\"600\"}})),di=(0,yt.styled)(\"button\")({backgroundColor:\"#E0E0E0\",border:\"1px solid #252525\",borderRadius:\"10px\",cursor:\"pointer\",width:\"40px\",height:\"20px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",margin:\"10px auto 5px auto\",transition:\"all 0.2s ease\",\"& .arrow-icon-mobile\":{transition:\"transform 0.3s ease\",\"&.expanded\":{transform:\"rotate(180deg)\"}}}),pi=(0,yt.styled)(go.Box)`\n background: none;\n border: 2px solid transparent;\n cursor: pointer;\n padding: 2px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n transition: all 0.3s ease;\n\n &:hover {\n transform: scale(1.1);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n\n &:focus,\n &:focus-within {\n outline: none;\n border-color: #007bff;\n box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);\n }\n\n &:hover svg {\n fill: #ffffff;\n }\n`,ci=(0,yt.styled)(\"span\")`\n line-height: 0.5;\n`,ui=(0,yt.styled)(\"a\")({fontSize:\"inherit\",fontFamily:\"inherit\",fontWeight:\"inherit\",lineHeight:\"inherit\",letterSpacing:\"inherit\",color:\"inherit\",textDecoration:\"none\",\"&:hover\":{textDecoration:\"underline\"}}),ya=(0,yt.styled)(\"span\")({});var gi=require(\"@mui/material\"),wt=require(\"react/jsx-runtime\"),fi=({width:e,height:t,backgroundColor:o})=>(0,wt.jsx)(gi.Box,{sx:{width:e,height:t,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",backgroundColor:o},\"data-testid\":\"placeholder-image\",children:(0,wt.jsx)(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"128\",height:\"129\",viewBox:\"0 0 128 129\",fill:\"none\",children:(0,wt.jsxs)(\"g\",{id:\"ns_logomark\",children:[(0,wt.jsx)(\"path\",{id:\"Vector\",d:\"M127.495 52.1946C125.663 47.9538 122.999 44.1171 119.661 40.9073C112.565 34.2835 102.562 31.7037 93.1175 34.0622C83.6733 36.4206 76.0882 43.3926 72.991 52.5619C71.4142 56.8414 70.6063 61.3627 70.6039 65.9196C70.6039 85.8227 70.6039 105.737 70.6039 125.662C70.6039 129.001 70.6039 129.001 66.9051 128.834C66.9051 128.2 66.9051 127.499 66.9051 126.831C66.9051 104.323 66.9051 81.8263 66.9051 59.3409C66.3415 45.3064 74.9302 32.5039 88.1888 27.6164C89.79 27.0612 91.4307 26.6259 93.0981 26.314C94.7114 25.98 96.4605 25.8465 98.0738 25.6461C96.0231 16.3291 78.9419 5.60953 65.0889 4.97504C50.3084 4.62252 36.6074 12.6365 29.7509 25.6461C31.331 25.8465 32.8779 25.9466 34.3569 26.2138C48.0999 28.544 58.7086 39.4998 60.5168 53.2298C60.8904 55.7285 61.0812 58.2508 61.0877 60.7769C61.0877 82.7507 61.0877 104.724 61.0877 126.697C61.0877 128.434 60.6842 129.169 58.8016 128.968C56.9183 128.768 57.1204 128.2 57.1204 126.965C57.1204 119.985 57.1204 113.006 57.1204 105.993C57.1204 92.1674 57.1204 78.3423 57.1204 64.5171C57.2385 56.3928 54.2457 48.5271 48.7477 42.5103C42.2429 35.5282 32.6539 32.2371 23.1959 33.7401C13.7379 35.243 5.66194 41.3411 1.67448 49.9906C1.23781 50.8254 0.867444 51.6937 0.262573 52.9293C5.79294 22.3996 32.4752 0.139867 63.7085 0.000656323C94.9411 -0.138555 121.824 21.8824 127.629 52.3616\",fill:\"#252525\"}),(0,wt.jsx)(\"path\",{id:\"Vector_2\",d:\"M86.0995 124.927C86.0995 124.293 86.0995 123.858 86.0995 123.425C86.0995 111.669 86.0995 100.049 86.0995 88.1269C85.8836 82.4231 88.0775 76.89 92.1523 72.8653C97.3131 67.9567 104.984 66.7091 111.452 69.7263C117.892 72.1185 122.166 78.225 122.178 85.0541C122.372 92.1747 119.781 99.0921 114.949 104.356C107.882 113.237 98.6134 120.141 88.05 124.392C87.4217 124.616 86.782 124.805 86.1335 124.96\",fill:\"#252525\"}),(0,wt.jsx)(\"path\",{id:\"Vector_3\",d:\"M41.8183 125.395C37.6149 123.224 33.6477 121.487 29.9828 119.25C21.5405 114.299 14.4778 107.331 9.43828 98.9796C6.53442 94.3985 5.34408 88.9493 6.07591 83.5852C7.056 75.2882 13.8859 68.8841 22.2829 68.3905C31.1231 67.2473 39.3527 73.0751 41.1455 81.7484C41.76 84.263 42.0762 86.8411 42.0868 89.4287C42.0868 100.516 42.0868 111.636 42.0868 122.823C42.0868 123.457 42.0867 124.059 41.8854 125.294\",fill:\"#252525\"}),(0,wt.jsx)(\"path\",{id:\"Vector_4\",d:\"M51.3337 127.431C47.9713 127.431 47.6681 127.198 47.6681 124.326V76.6386C48.1096 67.937 42.9747 59.906 34.8574 56.602C25.8992 52.8557 15.5485 54.8615 8.66523 61.6779C4.28638 66.6086 1.89197 72.9696 1.94049 79.5438C1.95423 80.2444 1.78037 80.9357 1.43588 81.5476C1.06552 79.9446 0.62885 78.2081 0.426687 76.7387C-0.724024 70.4463 0.471163 63.9529 3.78906 58.472C6.09291 54.6111 9.65016 51.6434 13.8762 50.0567C22.8587 46.555 32.9393 47.1785 41.4148 51.7598C47.6592 54.8694 51.5262 61.2882 51.3337 68.2232C51.5019 87.6249 51.3337 107.027 51.3337 126.396C51.3337 126.797 51.3337 127.164 51.3337 127.532\",fill:\"#252525\"}),(0,wt.jsx)(\"path\",{id:\"Vector_5\",d:\"M76.287 127.499V125.094C76.287 107.196 76.4883 89.2963 76.287 71.3966C76.0848 56.9034 84.2554 50.6588 95.7553 48.3545C101.535 47.2005 107.524 47.6393 113.071 49.6235C122.914 53.3319 128.994 63.1725 127.866 73.5672C127.631 76.2831 127.17 78.975 126.487 81.6151C125.916 78.2758 125.68 74.9364 124.772 71.597C122.808 64.3002 117.377 58.4174 110.228 55.8421C103.078 53.2668 95.1132 54.3239 88.8955 58.6734C83.0441 62.6207 79.7011 69.3237 80.086 76.3389C80.086 92.2349 80.086 108.131 80.086 124.026C80.086 127.366 80.086 127.366 76.2198 127.366\",fill:\"#252525\"})]})})});var wa=require(\"react/jsx-runtime\"),mi=({width:e=16,height:t=16,className:o=\"\"})=>(0,wa.jsx)(\"svg\",{width:e,height:t,viewBox:\"0 0 24 24\",fill:\"currentColor\",className:o,\"data-testid\":\"arrow-down-icon\",children:(0,wa.jsx)(\"path\",{d:\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\"})});function or(e){if(typeof window>\"u\")return;let t=window.location.href,o={...e},n=t.includes(\"personal-offer\")?\"postorefront_\":\"mysite_\";o.event=n+e.event;try{window.dataLayer||(console.error(\"GTM dataLayer not available, but event logged\"),window.dataLayer=[]),window.dataLayer.push(o)}catch(i){console.error(\"Failed to track GTM event:\",i)}}var B=require(\"react/jsx-runtime\"),hi=(e,t,o)=>{let n=o.includes(\"mobile\")?\"placeholder-image-mobile\":\"placeholder-image\";return e?.imageSrc?(0,B.jsx)(ci,{tabIndex:0,children:(0,B.jsx)(Bo.NsImage,{className:o,src:e.imageSrc,alt:e.imageAlt})}):(0,B.jsx)(pe.Box,{className:n,children:(0,B.jsx)(fi,{width:o.includes(\"mobile\")?\"144px\":\"246px\",height:o.includes(\"mobile\")?\"144px\":\"246px\",backgroundColor:t?.backgroundColor??\"#5F5F5F\"})})},xi=(e,t,o,n,i)=>{if(!e||!t&&!i)return null;let s=o?\"mobile-badge\":\"tablet-badge\";return(0,B.jsxs)(si,{className:o?\"mobile-badges\":\"tablet-badges\",children:[i&&(0,B.jsx)(ba,{className:`${s} total-savings-badge`,hasWhiteBackground:n,tabIndex:0,children:(0,B.jsx)(ya,{className:\"badge-value\",children:i})}),t&&(0,B.jsx)(ba,{className:`${s} expiration-badge`,hasWhiteBackground:n,tabIndex:0,children:(0,B.jsx)(ya,{className:\"badge-value\",children:t})})]})},yc=(e,t,o,n,i)=>{let{shopTitle:s,socialTitleText:d,email:p,showBadges:w,expirationDate:C,phone:u,totalSavings:x}=e;return(0,B.jsxs)(pe.Box,{className:\"content-mobile\",children:[(0,B.jsx)(pe.Typography,{component:\"h1\",tabIndex:s?.trim()?0:-1,className:\"body-title-mobile\",children:s}),!t&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(pe.Typography,{tabIndex:d?.trim()?0:-1,className:\"social-title-text-mobile\",children:d}),p?.trim()&&rr(\"email\",p,\"email-text-mobile\"),u?.trim()&&rr(\"phone\",u,\"phone-text-mobile\"),(0,B.jsx)(pe.Box,{className:\"social-icons-mobile\",children:o}),xi(w,C??\"\",n,i,x)]})]})},wc=(e,t,o,n,i)=>{let{shopTitle:s,shopDescription:d,socialTitleText:p,email:w,phone:C,showBadges:u,expirationDate:x,totalSavings:g}=e;return(0,B.jsxs)(pe.Box,{className:\"content\",children:[(0,B.jsx)(pe.Typography,{component:\"h1\",tabIndex:s?.trim()?0:-1,className:\"body-title\",children:s}),!t&&(0,B.jsxs)(B.Fragment,{children:[d?.length>480?(0,B.jsx)(pe.Tooltip,{title:d,arrow:!0,children:(0,B.jsx)(pe.Typography,{tabIndex:d?.trim()?0:-1,className:\"body-text\",children:d})}):(0,B.jsx)(pe.Typography,{tabIndex:d?.trim()?0:-1,className:\"body-text\",children:d}),(0,B.jsxs)(pe.Box,{className:\"social-media\",children:[(0,B.jsx)(pe.Typography,{tabIndex:p?.trim()?0:-1,className:\"social-title-text\",children:p}),(0,B.jsxs)(pe.Box,{className:\"social-icons\",children:[o,w?.trim()&&rr(\"email\",w,\"email-text\"),C?.trim()&&rr(\"phone\",C,\"phone-text\")]})]}),xi(u,x??\"\",n,i,g)]})]})},Cc=e=>new Promise((t,o)=>{let n=new Image;n.crossOrigin=\"anonymous\",n.src=e,n.onload=()=>{let i=document.createElement(\"canvas\"),s=i.getContext(\"2d\");if(!s)return o(new Error(\"Canvas not supported\"));i.width=n.width,i.height=n.height,s.drawImage(n,0,0);let p=[s.getImageData(0,0,1,1).data,s.getImageData(n.width-1,0,1,1).data,s.getImageData(0,n.height-1,1,1).data,s.getImageData(n.width-1,n.height-1,1,1).data].every(w=>Array.prototype.slice.call(w)[3]<10);t(p)},n.onerror=()=>o(new Error(\"Failed to load image\"))}),vc=e=>{if(!e)return!1;let t=e.replace(\"#\",\"\").toLowerCase();if(!/^[0-9a-f]{3,4}$|^[0-9a-f]{6}$|^[0-9a-f]{8}$/i.test(t))return!1;let o=t;(t.length===3||t.length===4)&&(o=t.split(\"\").map(p=>p+p).join(\"\"));let n=Number.parseInt(o.substring(0,2),16),i=Number.parseInt(o.substring(2,4),16),s=Number.parseInt(o.substring(4,6),16),d=220;return n>=d&&i>=d&&s>=d},kc=(e,t)=>({onClick:()=>{or({event:\"contact_click\",contact_type:e,contact_value:t,click_element:`${e}_link`})},onKeyDown:o=>{(o.key===\"Enter\"||o.key===\" \")&&(o.preventDefault(),or({event:\"contact_click\",contact_type:e,contact_value:t,click_element:`${e}_link`}),globalThis.location.href=`${e===\"email\"?\"mailto\":\"tel\"}:${t}`)}}),rr=(e,t,o)=>{let n=e===\"email\"?\"mailto:\":\"tel:\",i=kc(e,t);return(0,B.jsx)(pe.Typography,{className:o,children:(0,B.jsx)(ui,{href:`${n}${t}`,...i,children:t})})};function Ca({className:e,shopTitle:t,shopDescription:o,socialTitleText:n,imageDetails:i,email:s,phone:d,bannerProps:p,socialIcons:w,expirationDate:C,showBadges:u=!1,totalSavings:x}){let g=(0,pe.useMediaQuery)(\"(max-width: 560px)\"),[b,f]=(0,gt.useState)(!1),[c,v]=(0,gt.useState)(!1),[y,D]=(0,gt.useState)(!1),[h,F]=(0,gt.useState)(!1),V=()=>{v(!c)};(0,gt.useEffect)(()=>{(async()=>{if(i?.imageSrc){let k=await Cc(i.imageSrc);F(k)}else F(!1)})()},[i?.imageSrc]),(0,gt.useEffect)(()=>{D(vc(p?.backgroundColor))},[p?.backgroundColor]),(0,gt.useEffect)(()=>{let m,k=window.scrollY,S=!1,l=!1,R=0,J=ie=>{let pt=Date.now();if(S!==ie&&!l){if(pt-R<100)return;l=!0,S=ie,R=pt,ie&&v(!1),clearTimeout(m),f(ie),m=setTimeout(()=>{l=!1,ie&&window.scrollY<15&&window.scrollTo({top:g?20:30,behavior:\"smooth\"})},300)}},ye=()=>{let ie=window.scrollY;if(l){k=ie;return}if(Math.abs(ie-k)<.5)return;let Xe=ie>k,po=g?15:25,co=g?8:12;Xe&&ie>po&&!S?J(!0):!Xe&&ie<co&&S&&J(!1),k=ie},de=()=>{let ie=window.scrollY,Xe=ie>(g?5:10);S=Xe,f(Xe),k=ie,R=Date.now()},_e=null,At=0,Qe=()=>{_e||Date.now()-At<16||(_e=requestAnimationFrame(()=>{ye(),At=Date.now(),_e=null}))};return de(),window.addEventListener(\"scroll\",Qe,{passive:!0}),()=>{window.removeEventListener(\"scroll\",Qe),_e&&cancelAnimationFrame(_e),clearTimeout(m)}},[g]);let Y=(0,gt.useMemo)(()=>w?.map((m,k)=>(0,B.jsx)(pi,{onClick:l=>{l.preventDefault(),or({event:\"social_click\",social_platform:m.type,social_url:m.url,click_element:\"social_icon\"}),window.open(m.url,\"_blank\")},children:(0,B.jsx)(Bo.NsLink,{href:m.url,target:\"_blank\",children:(0,B.jsx)(Bo.NsImage,{src:`https://www.google.com/s2/favicons?domain=${m?.url}&sz=24`,alt:`${m.type} icon`,width:\"24\",height:\"24\"},m?.type+k)})},m?.type+k)),[w]),A=`${e} ${b?\"scrolled\":\"\"}`,H={shopTitle:t,shopDescription:o,socialTitleText:n,email:s,phone:d,showBadges:u,expirationDate:C,totalSavings:x},Q=()=>window.innerWidth<=380?50:window.innerWidth<=415?56:window.innerWidth<=460?62:80,I=g&&o&&o.length>Q();return g?(0,B.jsxs)(li,{className:A,\"data-testid\":\"my-site-shop-header\",bannerProps:p,isCircularImage:h,hasWhiteBackground:y,children:[(0,B.jsxs)(pe.Box,{className:\"image-content-mobile\",children:[hi(i,p??{},\"bg-image-mobile\"),yc(H,b,Y,g,y)]}),!b&&(0,B.jsxs)(pe.Box,{className:\"expandable-description-mobile\",children:[(0,B.jsx)(pe.Typography,{className:`description-content-mobile ${c||!I?\"expanded\":\"collapsed\"}`,children:o}),I&&(0,B.jsx)(di,{onClick:V,children:(0,B.jsx)(mi,{width:16,height:16,className:`arrow-icon-mobile ${c?\"expanded\":\"\"}`})})]})]}):(0,B.jsxs)(ii,{className:A,\"data-testid\":\"my-site-shop-header\",bannerProps:p,isCircularImage:h,hasWhiteBackground:y,children:[hi(i,p??{},\"bg-image\"),wc(H,b,Y,g,y)]})}var fo=require(\"@nuskin/foundation-theme\"),va=(0,fo.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 20px;\n width: 100%;\n box-sizing: border-box;\n padding: 16px;\n\n @media (min-width: 768px) {\n gap: 24px;\n padding: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n padding: 24px;\n }\n`,bi=(0,fo.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`,yi=(0,fo.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n gap: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`,ka=(0,fo.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: repeat(2, 1fr);\n gap: 24px;\n }\n`,wi=(0,fo.styled)(\"div\")`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;var Oi=M(require(\"@mui/icons-material/CalendarToday\")),Fi=M(require(\"@mui/icons-material/Public\")),Li=require(\"@nuskin/foundation-ui-components\");var Ee=require(\"@nuskin/foundation-theme\"),{getGenomeColor:ft}=Ee.ColorUtils,Ci=(0,Ee.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px 16px;\n background-color: ${({theme:e})=>ft(e,\"N20\")};\n border-radius: 12px;\n min-height: auto;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n gap: 16px;\n }\n\n @media (min-width: 1080px) {\n padding: 16px 24px;\n gap: 20px;\n }\n`,vi=(0,Ee.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: baseline;\n gap: 12px;\n flex-wrap: wrap;\n`,ki=(0,Ee.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({theme:e})=>ft(e,\"N100\")};\n margin: 0;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n\n @media (min-width: 1080px) {\n font-size: 16px;\n }\n`,Si=(0,Ee.styled)(\"div\")`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({theme:e})=>ft(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`,Ti=(0,Ee.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n gap: 12px;\n width: 100%;\n overflow-x: auto;\n\n @media (min-width: 768px) {\n width: auto;\n gap: 16px;\n }\n`,Sa=(0,Ee.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n position: relative;\n`,Ta=(0,Ee.styled)(\"label\")`\n font-size: 14px;\n font-weight: 500;\n line-height: 1.4;\n color: ${({theme:e})=>ft(e,\"N80\")};\n white-space: nowrap;\n display: none;\n margin-bottom: 0;\n\n @media (min-width: 768px) {\n display: block;\n }\n`,Da=(0,Ee.styled)(\"select\")`\n height: 40px;\n padding: 8px 32px 8px 12px;\n background-color: transparent;\n border: none;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ${({theme:e})=>ft(e,\"N70\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n appearance: none;\n background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3e%3cpath d=\"M5.625 7.3125L9 10.6875L12.375 7.3125\" stroke=\"%235f5f5f\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/%3e%3c/svg%3e');\n background-repeat: no-repeat;\n background-position: right 8px center;\n min-width: 100px;\n max-width: 100%;\n white-space: nowrap;\n flex-shrink: 0;\n\n &:hover {\n background-color: ${({theme:e})=>ft(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>ft(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>ft(e,\"A20\")};\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n @media (min-width: 768px) {\n min-width: 140px;\n }\n\n @media (min-width: 1080px) {\n background-color: ${({theme:e})=>ft(e,\"N10\")};\n border: 1px solid ${({theme:e})=>ft(e,\"N40\")};\n border-radius: 8px;\n min-width: 160px;\n }\n`,Pa=(0,Ee.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: ${({theme:e})=>ft(e,\"N70\")};\n\n svg {\n width: 16px;\n height: 16px;\n }\n`,Di=(0,Ee.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n overflow: hidden;\n\n svg,\n img,\n > * {\n width: 28px !important;\n height: 28px !important;\n max-width: 28px;\n max-height: 28px;\n }\n`,Pi=(0,Ee.styled)(\"div\")`\n display: flex;\n flex-wrap: nowrap;\n gap: 12px;\n align-items: center;\n width: 100%;\n overflow-x: auto;\n\n @media (min-width: 768px) {\n width: auto;\n gap: 16px;\n overflow-x: visible;\n }\n\n @media (min-width: 1080px) {\n gap: 20px;\n }\n`,Sg=(0,Ee.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n`;var ar;function mo(e){ar=e}function Ri(){return ar}function Ut(e){if(!ar)return e.fallback;let t;try{t=ar(e.key,e.fallback)}catch{t=void 0}return typeof t==\"string\"&&t.length>0?t:e.fallback}var r={title:{key:\"shoppingDashboard.title\",fallback:\"Shop Performance\"},error:{key:\"shoppingDashboard.error\",fallback:\"Error loading dashboard\"},stats:{revenue:{key:\"shoppingDashboard.stats.revenue\",fallback:\"Total Revenue\"},volume:{key:\"shoppingDashboard.stats.volume\",fallback:\"Volume\"},visits:{key:\"shoppingDashboard.stats.visits\",fallback:\"Site Visits\"},subtitle:{dcSv:{key:\"shoppingDashboard.stats.subtitle.dcSv\",fallback:\"DC-SV\"},conversionRate:{key:\"shoppingDashboard.stats.subtitle.conversionRate\",fallback:\"Conversion Rate\"}},trend:{increased:{key:\"shoppingDashboard.stats.trend.increased\",fallback:\"increased\"},decreased:{key:\"shoppingDashboard.stats.trend.decreased\",fallback:\"decreased\"},unchanged:{key:\"shoppingDashboard.stats.trend.unchanged\",fallback:\"unchanged\"}},details:{key:\"shoppingDashboard.stats.details\",fallback:\"details\"}},filter:{dateRange:{label:{key:\"shoppingDashboard.filter.dateRange.label\",fallback:\"Date Range\"},last7days:{key:\"shoppingDashboard.filter.dateRange.last7days\",fallback:\"Last 7 Days\"},last30days:{key:\"shoppingDashboard.filter.dateRange.last30days\",fallback:\"Last 30 Days\"},last90days:{key:\"shoppingDashboard.filter.dateRange.last90days\",fallback:\"Last 90 Days\"},thisMonth:{key:\"shoppingDashboard.filter.dateRange.thisMonth\",fallback:\"This Month\"}},market:{label:{key:\"shoppingDashboard.filter.market.label\",fallback:\"Market\"},all:{key:\"shoppingDashboard.filter.market.all\",fallback:\"All Markets\"}},productSort:{label:{key:\"shoppingDashboard.filter.productSort.label\",fallback:\"Sort By\"},units:{key:\"shoppingDashboard.filter.productSort.units\",fallback:\"Units\"},revenue:{key:\"shoppingDashboard.filter.productSort.revenue\",fallback:\"Revenue\"},volume:{key:\"shoppingDashboard.filter.productSort.volume\",fallback:\"Volume\"},byUnits:{key:\"shoppingDashboard.filter.productSort.byUnits\",fallback:\"By: Units\"},byRevenue:{key:\"shoppingDashboard.filter.productSort.byRevenue\",fallback:\"By: Revenue\"},byVolume:{key:\"shoppingDashboard.filter.productSort.byVolume\",fallback:\"By: Volume\"}},signupView:{label:{key:\"shoppingDashboard.filter.signupView.label\",fallback:\"Show\"},all:{key:\"shoppingDashboard.filter.signupView.all\",fallback:\"All\"},members:{key:\"shoppingDashboard.filter.signupView.members\",fallback:\"Members\"},retail:{key:\"shoppingDashboard.filter.signupView.retail\",fallback:\"Retail\"},brandAffiliates:{key:\"shoppingDashboard.filter.signupView.brandAffiliates\",fallback:\"Brand Affiliates\"},showAll:{key:\"shoppingDashboard.filter.signupView.showAll\",fallback:\"Show: All\"},showMembers:{key:\"shoppingDashboard.filter.signupView.showMembers\",fallback:\"Show: Members\"},showRetail:{key:\"shoppingDashboard.filter.signupView.showRetail\",fallback:\"Show: Retail\"},showBrandAffiliates:{key:\"shoppingDashboard.filter.signupView.showBrandAffiliates\",fallback:\"Show: Brand Affiliates\"}},conversionType:{all:{key:\"shoppingDashboard.filter.conversionType.all\",fallback:\"All\"},standard:{key:\"shoppingDashboard.filter.conversionType.standard\",fallback:\"Standard\"},subscription:{key:\"shoppingDashboard.filter.conversionType.subscription\",fallback:\"Subscription\"}},categorySort:{byRevenue:{key:\"shoppingDashboard.filter.categorySort.byRevenue\",fallback:\"By: Revenue\"},byTrend:{key:\"shoppingDashboard.filter.categorySort.byTrend\",fallback:\"By: Trend\"}}},widget:{topProducts:{title:{key:\"shoppingDashboard.widget.topProducts.title\",fallback:\"Top Selling Products\"},viewAll:{key:\"shoppingDashboard.widget.topProducts.viewAll\",fallback:\"View All Products\"},units:{key:\"shoppingDashboard.widget.topProducts.units\",fallback:\"Units\"},revenue:{key:\"shoppingDashboard.widget.topProducts.revenue\",fallback:\"Revenue\"},loading:{key:\"shoppingDashboard.widget.topProducts.loading\",fallback:\"Loading products...\"},empty:{key:\"shoppingDashboard.widget.topProducts.empty\",fallback:\"No products available\"},ariaLabel:{key:\"shoppingDashboard.widget.topProducts.ariaLabel\",fallback:\"Top Selling Products widget\"},titleAriaLabel:{key:\"shoppingDashboard.widget.topProducts.titleAriaLabel\",fallback:\"Click to view full top products details page\"},sortAriaLabel:{key:\"shoppingDashboard.widget.topProducts.sortAriaLabel\",fallback:\"Sort products by\"},noImageAriaLabel:{key:\"shoppingDashboard.widget.topProducts.noImageAriaLabel\",fallback:\"No image available\"},unitsSuffix:{key:\"shoppingDashboard.widget.topProducts.unitsSuffix\",fallback:\"units\"},revenueSuffix:{key:\"shoppingDashboard.widget.topProducts.revenueSuffix\",fallback:\"revenue\"},dcSvSuffix:{key:\"shoppingDashboard.widget.topProducts.dcSvSuffix\",fallback:\"DC-SV\"},rank:{key:\"shoppingDashboard.widget.topProducts.rank\",fallback:\"Rank\"},trend:{key:\"shoppingDashboard.widget.topProducts.trend\",fallback:\"Trend\"}},conversionRate:{title:{key:\"shoppingDashboard.widget.conversionRate.title\",fallback:\"Conversion Rate\"},formula:{key:\"shoppingDashboard.widget.conversionRate.formula\",fallback:\"Orders \\xF7 Site visits\"},comparison:{key:\"shoppingDashboard.widget.conversionRate.comparison\",fallback:\"compared to this time last month\"},chartAriaLabel:{key:\"shoppingDashboard.widget.conversionRate.chartAriaLabel\",fallback:\"Conversion Rate chart showing daily rates\"},titleAriaLabel:{key:\"shoppingDashboard.widget.conversionRate.titleAriaLabel\",fallback:\"Click to view full conversion rate details page\"},filterAriaLabel:{key:\"shoppingDashboard.widget.conversionRate.filterAriaLabel\",fallback:\"Filter conversion rate by customer type\"},noData:{key:\"shoppingDashboard.widget.conversionRate.noData\",fallback:\"No data\"},noChange:{key:\"shoppingDashboard.widget.conversionRate.noChange\",fallback:\"No change\"},tooltipOrders:{key:\"shoppingDashboard.widget.conversionRate.tooltipOrders\",fallback:\"orders\"},tooltipVisits:{key:\"shoppingDashboard.widget.conversionRate.tooltipVisits\",fallback:\"visits\"},ordersPerSiteVisits:{key:\"shoppingDashboard.widget.conversionRate.ordersPerSiteVisits\",fallback:\"Orders / Site Visits\"}},signups:{title:{key:\"shoppingDashboard.widget.signups.title\",fallback:\"Sign-ups\"},total:{key:\"shoppingDashboard.widget.signups.total\",fallback:\"Total\"},members:{key:\"shoppingDashboard.widget.signups.members\",fallback:\"Members\"},retail:{key:\"shoppingDashboard.widget.signups.retail\",fallback:\"Retail\"},brandAffiliates:{key:\"shoppingDashboard.widget.signups.brandAffiliates\",fallback:\"Brand Affiliates\"},chartAriaLabel:{key:\"shoppingDashboard.widget.signups.chartAriaLabel\",fallback:\"Signups multi-line chart showing Total, Members, Retail, and Brand Affiliates\"},titleAriaLabel:{key:\"shoppingDashboard.widget.signups.titleAriaLabel\",fallback:\"Click to view full signups details page\"},filterAriaLabel:{key:\"shoppingDashboard.widget.signups.filterAriaLabel\",fallback:\"Filter signups view\"},noData:{key:\"shoppingDashboard.widget.signups.noData\",fallback:\"No data\"},noChange:{key:\"shoppingDashboard.widget.signups.noChange\",fallback:\"No change\"},totalSignupsInPeriod:{key:\"shoppingDashboard.widget.signups.totalSignupsInPeriod\",fallback:\"Total sign-ups in period\"},noTrendData:{key:\"shoppingDashboard.widget.signups.noTrendData\",fallback:\"No sign-up trend data available.\"}},topCategories:{title:{key:\"shoppingDashboard.widget.topCategories.title\",fallback:\"Top Categories\"},revenue:{key:\"shoppingDashboard.widget.topCategories.revenue\",fallback:\"Revenue\"},units:{key:\"shoppingDashboard.widget.topCategories.units\",fallback:\"Units\"},empty:{key:\"shoppingDashboard.widget.topCategories.empty\",fallback:\"No category data available\"},chartAriaLabel:{key:\"shoppingDashboard.widget.topCategories.chartAriaLabel\",fallback:\"Top Categories donut chart showing revenue distribution by category\"},titleAriaLabel:{key:\"shoppingDashboard.widget.topCategories.titleAriaLabel\",fallback:\"Click to view full categories details page\"},sortAriaLabel:{key:\"shoppingDashboard.widget.topCategories.sortAriaLabel\",fallback:\"Sort categories by\"}},menu:{ariaLabel:{key:\"shoppingDashboard.widget.menu.ariaLabel\",fallback:\"widget options\"},fullView:{key:\"shoppingDashboard.widget.menu.fullView\",fallback:\"Full View\"}}},navigation:{backToDashboard:{key:\"shoppingDashboard.navigation.backToDashboard\",fallback:\"Back to Dashboard\"},backAriaLabel:{key:\"shoppingDashboard.navigation.backAriaLabel\",fallback:\"Back to dashboard\"}},ariaLabel:{dashboard:{key:\"shoppingDashboard.ariaLabel.dashboard\",fallback:\"Shopping Dashboard\"},statsRow:{key:\"shoppingDashboard.ariaLabel.statsRow\",fallback:\"Key performance metrics\"},dashboardFilters:{key:\"shoppingDashboard.ariaLabel.dashboardFilters\",fallback:\"Dashboard filters\"},loadingDashboard:{key:\"shoppingDashboard.ariaLabel.loadingDashboard\",fallback:\"Loading dashboard data\"},dateRangeFilter:{key:\"shoppingDashboard.ariaLabel.dateRangeFilter\",fallback:\"Date range filter, currently selected:\"},marketFilter:{key:\"shoppingDashboard.ariaLabel.marketFilter\",fallback:\"Market filter, currently selected:\"},filterSuffix:{key:\"shoppingDashboard.ariaLabel.filterSuffix\",fallback:\"filter\"}},fullView:{signups:{columns:{id:{key:\"shoppingDashboard.fullView.signups.columns.id\",fallback:\"ID\"},name:{key:\"shoppingDashboard.fullView.signups.columns.name\",fallback:\"Name\"},date:{key:\"shoppingDashboard.fullView.signups.columns.date\",fallback:\"Date\"},type:{key:\"shoppingDashboard.fullView.signups.columns.type\",fallback:\"Type\"},email:{key:\"shoppingDashboard.fullView.signups.columns.email\",fallback:\"Email\"},status:{key:\"shoppingDashboard.fullView.signups.columns.status\",fallback:\"Status\"}},detailsTitle:{key:\"shoppingDashboard.fullView.signups.detailsTitle\",fallback:\"Signup Details\"}},conversionRate:{columns:{orderId:{key:\"shoppingDashboard.fullView.conversionRate.columns.orderId\",fallback:\"Order ID\"},date:{key:\"shoppingDashboard.fullView.conversionRate.columns.date\",fallback:\"Date\"},customer:{key:\"shoppingDashboard.fullView.conversionRate.columns.customer\",fallback:\"Customer\"},type:{key:\"shoppingDashboard.fullView.conversionRate.columns.type\",fallback:\"Type\"},items:{key:\"shoppingDashboard.fullView.conversionRate.columns.items\",fallback:\"Items\"},total:{key:\"shoppingDashboard.fullView.conversionRate.columns.total\",fallback:\"Order Total\"},bv:{key:\"shoppingDashboard.fullView.conversionRate.columns.bv\",fallback:\"BV\"},totalSv:{key:\"shoppingDashboard.fullView.conversionRate.columns.totalSv\",fallback:\"Total SV\"}},orderDetailsTitle:{key:\"shoppingDashboard.fullView.conversionRate.orderDetailsTitle\",fallback:\"Order Details\"},notAvailable:{key:\"shoppingDashboard.fullView.conversionRate.notAvailable\",fallback:\"N/A\"}},products:{columns:{rank:{key:\"shoppingDashboard.fullView.products.columns.rank\",fallback:\"#\"},product:{key:\"shoppingDashboard.fullView.products.columns.product\",fallback:\"Product\"},unitsSold:{key:\"shoppingDashboard.fullView.products.columns.unitsSold\",fallback:\"Units Sold\"},revenue:{key:\"shoppingDashboard.fullView.products.columns.revenue\",fallback:\"Revenue\"},volume:{key:\"shoppingDashboard.fullView.products.columns.volume\",fallback:\"Volume (DC-SV)\"}},skuPrefix:{key:\"shoppingDashboard.fullView.products.skuPrefix\",fallback:\"SKU\"},noProducts:{key:\"shoppingDashboard.fullView.products.noProducts\",fallback:\"No products available.\"}},categories:{columns:{category:{key:\"shoppingDashboard.fullView.categories.columns.category\",fallback:\"Category\"},revenue:{key:\"shoppingDashboard.fullView.categories.columns.revenue\",fallback:\"Revenue\"},percentOfTotal:{key:\"shoppingDashboard.fullView.categories.columns.percentOfTotal\",fallback:\"% of Total\"},trend:{key:\"shoppingDashboard.fullView.categories.columns.trend\",fallback:\"Trend\"}},allCategoriesTitle:{key:\"shoppingDashboard.fullView.categories.allCategoriesTitle\",fallback:\"All Categories\"},noCategoryData:{key:\"shoppingDashboard.fullView.categories.noCategoryData\",fallback:\"No category data available.\"}}},dataTable:{noDataAvailable:{key:\"shoppingDashboard.dataTable.noDataAvailable\",fallback:\"No data available\"},sortableColumn:{key:\"shoppingDashboard.dataTable.sortableColumn\",fallback:\", sortable column\"}},pagination:{previousPage:{key:\"shoppingDashboard.pagination.previousPage\",fallback:\"Previous page\"},nextPage:{key:\"shoppingDashboard.pagination.nextPage\",fallback:\"Next page\"},goToPage:{key:\"shoppingDashboard.pagination.goToPage\",fallback:\"Go to page\"},of:{key:\"shoppingDashboard.pagination.of\",fallback:\"of\"}},defaults:{zeroTrend:{key:\"shoppingDashboard.defaults.zeroTrend\",fallback:\"+0%\"},noValue:{key:\"shoppingDashboard.defaults.noValue\",fallback:\"--\"}}};function a(e){return Ut(e)}var Mi=require(\"react\");function Ra(){return[{value:\"all\",label:a(r.filter.market.all)}]}function Ma(e){return e&&e.length>0?e:Ra()}function ot(e){return(0,Mi.useMemo)(()=>Ma(e),[e])}var ae=require(\"react/jsx-runtime\"),ho=({shopTitle:e,dateRange:t,market:o,dateRangeLabel:n,isLoading:i=!1,stats:s,markets:d,onDateRangeChange:p,onMarketChange:w})=>{let C=ot(d),u=f=>{let c=f.target.value;p?.(c)},x=f=>{let c=f.target.value;w?.(c)},g=f=>{f.key===\"Escape\"&&f.target.blur()},b=()=>n||(s?.dateRange?s.dateRange.label:a(r.filter.dateRange.last30days));return(0,ae.jsxs)(Ci,{as:\"header\",\"data-testid\":\"dashboard-header\",children:[(0,ae.jsxs)(vi,{children:[(0,ae.jsx)(ki,{\"data-testid\":\"dashboard-shop-title\",children:e??s?.shopTitle??a(r.title)}),(0,ae.jsx)(Si,{\"aria-live\":\"polite\",\"data-testid\":\"dashboard-date-range-label\",children:b()})]}),(0,ae.jsx)(Ti,{\"aria-label\":a(r.ariaLabel.dashboardFilters),\"data-testid\":\"dashboard-filters-section\",children:(0,ae.jsxs)(Pi,{children:[i&&(0,ae.jsx)(Di,{as:\"output\",\"aria-live\":\"polite\",\"aria-label\":a(r.ariaLabel.loadingDashboard),\"data-testid\":\"dashboard-loading-indicator\",children:(0,ae.jsx)(Li.NsSpinner,{})}),(0,ae.jsxs)(Sa,{children:[(0,ae.jsx)(Ta,{htmlFor:\"filter-date-range\",children:a(r.filter.dateRange.label)}),(0,ae.jsx)(Pa,{\"aria-hidden\":\"true\",children:(0,ae.jsx)(Oi.default,{})}),(0,ae.jsxs)(Da,{id:\"filter-date-range\",\"data-testid\":\"filter-date-range\",value:t,onChange:u,onKeyDown:g,disabled:i,\"aria-label\":`${a(r.ariaLabel.dateRangeFilter)} ${a(r.filter.dateRange[t])}`,children:[(0,ae.jsx)(\"option\",{value:\"last7days\",children:a(r.filter.dateRange.last7days)}),(0,ae.jsx)(\"option\",{value:\"last30days\",children:a(r.filter.dateRange.last30days)}),(0,ae.jsx)(\"option\",{value:\"last90days\",children:a(r.filter.dateRange.last90days)}),(0,ae.jsx)(\"option\",{value:\"thisMonth\",children:a(r.filter.dateRange.thisMonth)})]})]}),(0,ae.jsxs)(Sa,{children:[(0,ae.jsx)(Ta,{htmlFor:\"filter-market\",children:a(r.filter.market.label)}),(0,ae.jsx)(Pa,{\"aria-hidden\":\"true\",children:(0,ae.jsx)(Fi.default,{})}),(0,ae.jsx)(Da,{id:\"filter-market\",\"data-testid\":\"filter-market\",value:o,onChange:x,onKeyDown:g,disabled:i,\"aria-label\":`${a(r.ariaLabel.marketFilter)} ${C.find(f=>f.value===o)?.label??String(o)}`,children:C.map(f=>(0,ae.jsx)(\"option\",{value:f.value,children:f.label},f.value))})]})]})})]})};var cl=M(require(\"react\")),ul=M(require(\"@mui/icons-material/ShowChart\")),gl=M(require(\"@mui/icons-material/TrendingUp\")),fl=M(require(\"@mui/icons-material/TrendingDown\"));var Ce=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Wt}=Ce.ColorUtils,nr=(0,Ce.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n box-sizing: border-box;\n gap: ${({$layout:e})=>e===\"split\"?\"8px\":\"0\"};\n padding: ${({$layout:e})=>e===\"split\"?\"12px\":\"10px\"};\n background-color: ${({theme:e})=>Wt(e,\"N20\")};\n border: 1px solid ${({theme:e})=>Wt(e,\"N30\")};\n border-radius: 8px;\n min-height: ${({$layout:e})=>e===\"split\"?\"110px\":\"auto\"};\n transition: box-shadow 0.2s ease;\n\n &:hover {\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);\n }\n\n @media (min-width: 768px) {\n padding: ${({$layout:e})=>e===\"split\"?\"16px\":\"12px\"};\n min-height: ${({$layout:e})=>e===\"split\"?\"110px\":\"auto\"};\n }\n\n @media (min-width: 1080px) {\n padding: ${({$layout:e})=>e===\"split\"?\"16px\":\"14px\"};\n min-height: ${({$layout:e})=>e===\"split\"?\"110px\":\"auto\"};\n }\n`,$i=(0,Ce.styled)(\"div\")`\n width: 100%;\n font-size: 16px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>Wt(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`,Ii=(0,Ce.styled)(\"div\")`\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n`,Ni=(0,Ce.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;\n gap: 2px;\n`,Vi=(0,Ce.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n flex-shrink: 0;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#9b131a\":Wt(e,\"N70\")};\n\n svg {\n width: 24px;\n height: 24px;\n }\n`,Ai=(0,Ce.styled)(\"div\")`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n letter-spacing: 0.12px;\n text-align: right;\n color: ${({theme:e})=>Wt(e,\"N70\")};\n`,zi=(0,Ce.styled)(\"div\")`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.2;\n letter-spacing: 0;\n color: ${({theme:e})=>Wt(e,\"N100\")};\n margin-bottom: 2px;\n text-transform: capitalize;\n\n @media (min-width: 768px) {\n font-size: 14px;\n margin-bottom: 4px;\n }\n\n @media (min-width: 1080px) {\n font-size: 14px;\n }\n`,Bi=(0,Ce.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n justify-content: space-between;\n gap: 2px;\n margin-top: 10px;\n width: 100%;\n @media (min-width: 768px) {\n margin-top: 5px;\n }\n`,Oa=(0,Ce.styled)(\"div\")`\n font-size: 20px;\n font-weight: 700;\n line-height: 1;\n color: ${({theme:e})=>Wt(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 24px;\n }\n\n @media (min-width: 1080px) {\n font-size: 28px;\n }\n`,Ei=(0,Ce.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n`,Hi=(0,Ce.styled)(\"div\")`\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n color: ${({theme:e})=>Wt(e,\"N70\")};\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`,Wi=(0,Ce.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n flex-shrink: 0;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#22C55E\":t===\"down\"?\"#DC2626\":Wt(e,\"N70\")};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 14px;\n\n svg {\n width: 18px;\n height: 18px;\n }\n }\n`,Ng=(0,Ce.styled)(\"span\")`\n display: flex;\n align-items: center;\n justify-content: center;\n`,Fa=(0,Ce.styled)(\"span\")`\n white-space: nowrap;\n`,_i=(0,Ce.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;var ee=M(require(\"@mui/material/Skeleton\"));var Z=require(\"@nuskin/foundation-theme\"),xo=M(require(\"@mui/material/Skeleton\")),ir=(0,Z.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,lr=(0,Z.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 12px;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,Ui=(0,Z.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 0;\n\n @media (min-width: 768px) {\n gap: 14px;\n padding: 14px 0;\n }\n`,Ki=(0,Z.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 12px;\n border-radius: 8px;\n min-height: 120px;\n\n @media (min-width: 600px) {\n padding: 20px;\n min-height: 140px;\n }\n @media (min-width: 900px) {\n padding: 24px;\n min-height: 160px;\n }\n`,Gi=(0,Z.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`,ji=(0,Z.styled)(\"div\")`\n margin-top: 8px;\n`,Yi=(0,Z.styled)(xo.default)`\n margin-top: 4px;\n`,Ji=(0,Z.styled)(\"div\")`\n flex: 1;\n min-width: 0;\n`,Zi=(0,Z.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n`,qi=(0,Z.styled)(\"div\")`\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin-bottom: 16px;\n`,Qi=(0,Z.styled)(\"div\")`\n padding-top: 4px;\n`,Xi=(0,Z.styled)(xo.default)`\n border-radius: 8px;\n height: 220px;\n\n @media (min-width: 600px) {\n height: 280px;\n }\n @media (min-width: 900px) {\n height: 340px;\n }\n`,el=(0,Z.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media (min-width: 600px) {\n flex-direction: row;\n gap: 24px;\n }\n`,tl=(0,Z.styled)(xo.default)`\n width: 100%;\n height: 200px;\n border-radius: 8px;\n flex-shrink: 0;\n\n @media (min-width: 600px) {\n width: 200px;\n border-radius: 50%;\n }\n`,ol=(0,Z.styled)(\"div\")`\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n`,rl=(0,Z.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px;\n`,al=(0,Z.styled)(\"div\")`\n flex: 1;\n`,Sc=(0,Z.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n @media (min-width: 600px) {\n gap: 32px;\n }\n @media (min-width: 900px) {\n gap: 40px;\n }\n`,Tc=(0,Z.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n`,Dc=(0,Z.styled)(\"div\")`\n display: flex;\n gap: 16px;\n`,Pc=(0,Z.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 600px) {\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n }\n @media (min-width: 900px) {\n gap: 24px;\n }\n`,Rc=(0,Z.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 900px) {\n grid-template-columns: repeat(2, 1fr);\n gap: 24px;\n }\n`,La=(0,Z.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 24px;\n`,nl=(0,Z.styled)(\"div\")`\n padding: 24px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 24px;\n`,il=(0,Z.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 16px 0;\n gap: 8px;\n`,ll=(0,Z.styled)(xo.default)`\n border-radius: 8px;\n height: 260px;\n\n @media (min-width: 600px) {\n height: 320px;\n }\n @media (min-width: 900px) {\n height: 400px;\n }\n`,$a=(0,Z.styled)(\"div\")`\n padding: 20px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n`,sr=(0,Z.styled)(xo.default)`\n border-radius: 4px;\n`,sl=(0,Z.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 600px) {\n grid-template-columns: repeat(3, 1fr);\n }\n`;var T=require(\"react/jsx-runtime\"),Eo=()=>(0,T.jsxs)(Ki,{\"data-testid\":\"skeleton-stats-card\",children:[(0,T.jsxs)(Gi,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:80,height:18}),(0,T.jsx)(ee.default,{variant:\"text\",width:48,height:16})]}),(0,T.jsxs)(ji,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:120,height:36}),(0,T.jsx)(Yi,{variant:\"text\",width:100,height:16})]})]}),Mc=()=>(0,T.jsxs)(Ui,{children:[(0,T.jsx)(ee.default,{variant:\"rounded\",width:28,height:28}),(0,T.jsx)(ee.default,{variant:\"rounded\",width:50,height:50}),(0,T.jsxs)(Ji,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:\"70%\",height:18}),(0,T.jsx)(ee.default,{variant:\"text\",width:\"50%\",height:14})]}),(0,T.jsxs)(Zi,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:80,height:18}),(0,T.jsx)(ee.default,{variant:\"text\",width:48,height:14})]})]}),dl=()=>(0,T.jsxs)(ir,{\"data-testid\":\"skeleton-products-list\",children:[(0,T.jsxs)(lr,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:160,height:22}),(0,T.jsx)(ee.default,{variant:\"rounded\",width:100,height:32})]}),[\"product-1\",\"product-2\",\"product-3\",\"product-4\",\"product-5\"].map(e=>(0,T.jsx)(Mc,{},e))]}),dr=()=>(0,T.jsxs)(ir,{\"data-testid\":\"skeleton-chart-widget\",children:[(0,T.jsxs)(lr,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:140,height:22}),(0,T.jsx)(ee.default,{variant:\"rounded\",width:110,height:32})]}),(0,T.jsxs)(qi,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:100,height:36}),(0,T.jsxs)(Qi,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:60,height:18}),(0,T.jsx)(ee.default,{variant:\"text\",width:140,height:14})]})]}),(0,T.jsx)(Xi,{variant:\"rounded\",width:\"100%\"})]}),Oc=()=>(0,T.jsxs)(rl,{children:[(0,T.jsx)(ee.default,{variant:\"circular\",width:12,height:12}),(0,T.jsxs)(al,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:\"60%\",height:16}),(0,T.jsx)(ee.default,{variant:\"text\",width:\"40%\",height:14})]}),(0,T.jsx)(ee.default,{variant:\"text\",width:36,height:18})]}),pr=()=>(0,T.jsxs)(ir,{\"data-testid\":\"skeleton-categories-pie\",children:[(0,T.jsxs)(lr,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:140,height:22}),(0,T.jsx)(ee.default,{variant:\"rounded\",width:100,height:32})]}),(0,T.jsxs)(el,{children:[(0,T.jsx)(tl,{variant:\"circular\"}),(0,T.jsx)(ol,{children:[\"legend-1\",\"legend-2\",\"legend-3\",\"legend-4\",\"legend-5\"].map(e=>(0,T.jsx)(Oc,{},e))})]})]});var Kt=()=>(0,T.jsxs)(La,{\"data-testid\":\"skeleton-fullview-chart\",children:[(0,T.jsxs)(nl,{children:[(0,T.jsxs)(il,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:140,height:52}),(0,T.jsx)(ee.default,{variant:\"text\",width:80,height:24}),(0,T.jsx)(ee.default,{variant:\"text\",width:160,height:16})]}),(0,T.jsx)(ll,{variant:\"rounded\",width:\"100%\"})]}),(0,T.jsxs)($a,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:200,height:24}),[\"table-row-1\",\"table-row-2\",\"table-row-3\",\"table-row-4\",\"table-row-5\"].map(e=>(0,T.jsx)(sr,{variant:\"rounded\",width:\"100%\",height:44},e))]})]}),pl=()=>(0,T.jsxs)(La,{\"data-testid\":\"skeleton-fullview-table\",children:[(0,T.jsxs)(sl,{children:[(0,T.jsx)(Eo,{}),(0,T.jsx)(Eo,{}),(0,T.jsx)(Eo,{})]}),(0,T.jsxs)($a,{children:[(0,T.jsx)(ee.default,{variant:\"text\",width:200,height:24}),(0,T.jsx)(sr,{variant:\"rounded\",width:\"100%\",height:40}),[\"summary-row-1\",\"summary-row-2\",\"summary-row-3\",\"summary-row-4\",\"summary-row-5\",\"summary-row-6\",\"summary-row-7\",\"summary-row-8\"].map(e=>(0,T.jsx)(sr,{variant:\"rounded\",width:\"100%\",height:44},e))]})]});var le=require(\"react/jsx-runtime\"),Fc=({title:e,value:t,subtitle:o,caption:n,layout:i=\"default\",trendDirection:s=\"neutral\",trendValue:d,testId:p,isLoading:w=!1})=>{if(w)return(0,le.jsx)(nr,{$layout:i,\"data-testid\":p,children:(0,le.jsx)(Eo,{})});let C=()=>{let x=a(r.stats.trend.unchanged);return s===\"up\"?x=a(r.stats.trend.increased):s===\"down\"&&(x=a(r.stats.trend.decreased)),`${e} ${x} ${d??\"\"}`},u=x=>s===\"up\"?(0,le.jsx)(gl.default,{sx:{fontSize:x},\"aria-hidden\":\"true\"}):s===\"down\"?(0,le.jsx)(fl.default,{sx:{fontSize:x},\"aria-hidden\":\"true\"}):(0,le.jsx)(ul.default,{sx:{fontSize:x},\"aria-hidden\":\"true\"});return i===\"split\"?(0,le.jsxs)(nr,{as:\"article\",$layout:\"split\",\"aria-label\":`${e}: ${t}`,\"data-testid\":p,children:[(0,le.jsx)($i,{id:`stats-title-${p}`,children:e}),(0,le.jsxs)(Ii,{children:[(0,le.jsx)(Oa,{\"aria-describedby\":`stats-title-${p}`,\"data-testid\":`stats-value-${p}`,children:t}),(d??n)&&(0,le.jsxs)(Ni,{children:[d&&(0,le.jsxs)(Vi,{as:\"output\",direction:s,\"aria-live\":\"polite\",\"aria-label\":C(),\"data-testid\":`stats-trend-${p}`,children:[u(\"18px\"),(0,le.jsx)(Fa,{children:d})]}),n&&(0,le.jsx)(Ai,{\"data-testid\":`stats-caption-${p}`,children:n})]})]})]}):(0,le.jsxs)(nr,{as:\"article\",\"aria-label\":`${e}: ${t}`,\"data-testid\":p,children:[(0,le.jsx)(_i,{children:(0,le.jsx)(zi,{id:`stats-title-${p}`,children:e})}),(0,le.jsxs)(Bi,{children:[(0,le.jsxs)(Ei,{children:[(0,le.jsx)(Oa,{\"aria-describedby\":`stats-title-${p}`,\"data-testid\":`stats-value-${p}`,children:t}),o&&(0,le.jsx)(Hi,{\"aria-label\":`${e} ${a(r.stats.details)}: ${o}`,\"data-testid\":`stats-subtitle-${p}`,children:o})]}),d&&(0,le.jsxs)(Wi,{as:\"output\",direction:s,\"aria-live\":\"polite\",\"aria-label\":C(),\"data-testid\":`stats-trend-${p}`,children:[u(\"16px\"),(0,le.jsx)(Fa,{children:d})]})]})]})},Ct=cl.default.memo(Fc);Ct.displayName=\"StatsCard\";var Gl=M(require(\"react\")),jl=M(require(\"@mui/icons-material/ShoppingCart\")),Yl=M(require(\"@mui/icons-material/ShowChart\")),Jl=M(require(\"@mui/icons-material/TrendingUp\")),Zl=M(require(\"@mui/icons-material/TrendingDown\"));var ml=M(require(\"@mui/icons-material/ArrowUpward\")),hl=M(require(\"@mui/icons-material/ArrowDownward\")),xl=M(require(\"@mui/icons-material/Remove\"));var cr=require(\"react/jsx-runtime\");function vt(e){if(!e)return null;let t=e.replace(\"%\",\"\").trim(),o=Number(t);return Number.isFinite(o)?o:null}function Gt(e){let t=vt(e);return t===null?\"neutral\":t>0?\"up\":t<0?\"down\":\"neutral\"}function jt(e,t,o){let{weightedSum:n,weight:i}=e.reduce((p,w)=>{let C=vt(o(w));return C===null?p:{weightedSum:p.weightedSum+C*t(w),weight:p.weight+t(w)}},{weightedSum:0,weight:0}),s=i>0?n/i:0,d=\"neutral\";return s>0?d=\"up\":s<0&&(d=\"down\"),{direction:d,formatted:`${s>0?\"+\":\"\"}${s.toFixed(1)}%`}}function bo(e){return e===\"up\"?a(r.stats.trend.increased):e===\"down\"?a(r.stats.trend.decreased):a(r.stats.trend.unchanged)}function rt(e){switch(e){case\"up\":return(0,cr.jsx)(ml.default,{});case\"down\":return(0,cr.jsx)(hl.default,{});case\"neutral\":default:return(0,cr.jsx)(xl.default,{})}}function bl(e){switch(e){case\"up\":return\"#4caf50\";case\"down\":return\"#f44336\";case\"neutral\":default:return\"#757575\"}}var Ia=require(\"react\");function Na(e,t){return Math.ceil(e.length/t)}function Va(e,t,o){let n=(t-1)*o,i=n+o;return e.slice(n,i)}function yl(e,t,o=\"desc\"){return[...e].sort((n,i)=>{let s=n[t],d=i[t];return o===\"asc\"?s-d:d-s})}function wl(e,t,o=1){return t===0?\"0.0\":(e/t*100).toFixed(o)}function kt(e,t,o){let n=(0,Ia.useMemo)(()=>Na(e,o),[e,o]),i=(0,Ia.useMemo)(()=>Va(e,t,o),[e,t,o]);return{totalPages:n,pageItems:i}}function q(e,t,o=\"en-US\",n){let i=Number.isFinite(e)?e:0;if(t)try{return new Intl.NumberFormat(o,{style:\"currency\",currency:t,...n!==void 0?{minimumFractionDigits:n,maximumFractionDigits:n}:{minimumFractionDigits:0,maximumFractionDigits:2}}).format(i)}catch{}return n!==void 0?`$${i.toFixed(n)}`:`$${i.toLocaleString()}`}var ue=require(\"@nuskin/foundation-theme\"),{getGenomeColor:se}=ue.ColorUtils,ur=(0,ue.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>se(e,\"N20\")};\n border: 1px solid ${({theme:e})=>se(e,\"N30\")};\n border-radius: 12px;\n min-height: 320px;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n\n @media (min-width: 768px) {\n padding: 20px;\n min-height: 400px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,Aa=(0,ue.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,Cl=(0,ue.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,za=(0,ue.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>se(e,\"N100\")};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({theme:e})=>se(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,vl=(0,ue.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>se(e,\"N20\")};\n border: 1px solid ${({theme:e})=>se(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>se(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>se(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>se(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>se(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,kl=(0,ue.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 12px;\n width: 100%;\n overflow: hidden;\n list-style: none;\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n gap: 14px;\n }\n`,Sl=(0,ue.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n background-color: ${({theme:e})=>se(e,\"N20\")};\n border-radius: 8px;\n transition:\n background-color 0.2s ease,\n box-shadow 0.2s ease;\n cursor: pointer;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n list-style: none;\n\n &:not(:last-child) {\n border-bottom: 1px solid ${({theme:e})=>se(e,\"N40\")};\n }\n\n &:hover {\n background-color: ${({theme:e})=>se(e,\"N30\")};\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06);\n }\n\n @media (min-width: 768px) {\n padding: 14px;\n gap: 14px;\n }\n`,Tl=(0,ue.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 24px;\n height: 24px;\n background-color: ${({theme:e})=>se(e,\"A10\")};\n color: ${({theme:e})=>se(e,\"A80\")};\n border-radius: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n vertical-align: middle;\n\n @media (min-width: 768px) {\n min-width: 28px;\n height: 28px;\n font-size: 16px;\n }\n`,Dl=(0,ue.styled)(\"img\")`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n object-fit: cover;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 50px;\n height: 50px;\n }\n`,Pl=(0,ue.styled)(\"div\")`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n background-color: ${({theme:e})=>se(e,\"N40\")};\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({theme:e})=>se(e,\"N70\")};\n font-size: 10px;\n font-weight: 500;\n\n @media (min-width: 768px) {\n width: 50px;\n height: 50px;\n font-size: 11px;\n }\n`,Rl=(0,ue.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex-grow: 1;\n min-width: 0;\n`,Ml=(0,ue.styled)(\"div\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({theme:e})=>se(e,\"N100\")};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 18ch;\n\n @media (min-width: 768px) {\n font-size: 16px;\n max-width: none;\n }\n`,Ol=(0,ue.styled)(\"div\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 11px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>se(e,\"N70\")};\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`,Fl=(0,ue.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n flex-shrink: 0;\n`,Ll=(0,ue.styled)(\"div\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.2;\n color: ${({theme:e})=>se(e,\"N100\")};\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`,$l=(0,ue.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 11px;\n font-weight: 500;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#22C55E\":t===\"down\"?\"#DC2626\":se(e,\"N70\")};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 12px;\n\n svg {\n width: 16px;\n height: 16px;\n }\n }\n`,Il=(0,ue.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n text-align: center;\n color: ${({theme:e})=>se(e,\"N70\")};\n\n svg {\n width: 48px;\n height: 48px;\n color: ${({theme:e})=>se(e,\"N50\")};\n }\n`,Nl=(0,ue.styled)(\"div\")`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>se(e,\"N70\")};\n`;var Bl=require(\"react\"),El=M(require(\"@mui/material/Menu\")),Hl=M(require(\"@mui/material/MenuItem\")),Wl=M(require(\"@mui/material/ListItemIcon\")),_l=M(require(\"@mui/material/ListItemText\")),Ul=M(require(\"@mui/icons-material/MoreVert\")),Kl=M(require(\"@mui/icons-material/Visibility\"));var Vl=M(require(\"@mui/material/IconButton\")),Al=require(\"@nuskin/foundation-theme\"),zl=(0,Al.styled)(Vl.default)(()=>({padding:\"4px\",color:\"#252525\",\"&:hover\":{backgroundColor:\"rgba(37, 37, 37, 0.08)\"}}));var at=require(\"react/jsx-runtime\"),nt=({widgetId:e,onFullView:t})=>{let[o,n]=(0,Bl.useState)(null),i=!!o,s=`widget-menu-button-${e}`,d=`widget-menu-${e}`,p=u=>{n(u.currentTarget)},w=()=>{n(null)},C=()=>{w(),t&&t()};return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(zl,{id:s,\"data-testid\":`widget-menu-button-${e}`,\"aria-label\":a(r.widget.menu.ariaLabel),\"aria-controls\":i?d:void 0,\"aria-haspopup\":\"true\",\"aria-expanded\":i?\"true\":void 0,onClick:p,size:\"small\",children:(0,at.jsx)(Ul.default,{fontSize:\"small\"})}),(0,at.jsx)(El.default,{id:d,\"data-testid\":`widget-menu-${e}`,anchorEl:o,open:i,onClose:w,MenuListProps:{\"aria-labelledby\":s},anchorOrigin:{vertical:\"bottom\",horizontal:\"right\"},transformOrigin:{vertical:\"top\",horizontal:\"right\"},children:(0,at.jsxs)(Hl.default,{onClick:C,\"data-testid\":\"widget-menu-item-fullview\",children:[(0,at.jsx)(Wl.default,{children:(0,at.jsx)(Kl.default,{fontSize:\"small\"})}),(0,at.jsx)(_l.default,{children:a(r.widget.menu.fullView)})]})})]})};var j=require(\"react/jsx-runtime\"),Lc=({products:e,productSort:t,isLoading:o=!1,maxProducts:n=5,onSortChange:i,onTitleClick:s})=>{let d=c=>{let v=c.target.value;i?.(v)},p=(c,v)=>{switch(v){case\"units\":return`${c.unitsSold.toLocaleString()} ${a(r.widget.topProducts.unitsSuffix)}`;case\"revenue\":return q(c.revenue,c.currencyCode);case\"volume\":return`${c.volume.toLocaleString()} ${a(r.widget.topProducts.dcSvSuffix)}`;default:return`${c.unitsSold.toLocaleString()} ${a(r.widget.topProducts.unitsSuffix)}`}},w=(c,v)=>{switch(v){case\"units\":return`${q(c.revenue,c.currencyCode)} ${a(r.widget.topProducts.revenueSuffix)}`;case\"revenue\":return`${c.unitsSold.toLocaleString()} ${a(r.widget.topProducts.unitsSuffix)}`;case\"volume\":return`${q(c.revenue,c.currencyCode)} ${a(r.widget.topProducts.revenueSuffix)}`;default:return`${q(c.revenue,c.currencyCode)} ${a(r.widget.topProducts.revenueSuffix)}`}},C=(c,v)=>{let y=c.trend;if(!y)return\"\";switch(v){case\"units\":return y.units??\"\";case\"revenue\":return y.revenue??\"\";case\"volume\":return y.volume??\"\";default:return y.units??\"\"}},u=(c,v)=>{let y=C(c,v);return y?y.startsWith(\"+\")?\"up\":y.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\"},x=c=>c===\"up\"?(0,j.jsx)(Jl.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):c===\"down\"?(0,j.jsx)(Zl.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):(0,j.jsx)(Yl.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}),g=e.slice(0,n),b=a(r.widget.topProducts.rank),f=a(r.widget.topProducts.trend);return o&&e.length===0?(0,j.jsx)(ur,{\"data-testid\":\"widget-top-products\",children:(0,j.jsx)(dl,{})}):e.length===0?(0,j.jsxs)(ur,{\"data-testid\":\"widget-top-products\",children:[(0,j.jsx)(Aa,{children:(0,j.jsx)(za,{children:a(r.widget.topProducts.title)})}),(0,j.jsxs)(Il,{\"data-testid\":\"products-empty-state\",children:[(0,j.jsx)(jl.default,{}),(0,j.jsx)(Nl,{children:a(r.widget.topProducts.empty)})]})]}):(0,j.jsxs)(ur,{as:\"section\",\"data-testid\":\"widget-top-products\",\"aria-label\":a(r.widget.topProducts.ariaLabel),children:[(0,j.jsxs)(Aa,{children:[(0,j.jsx)(za,{as:\"button\",onClick:s,\"aria-label\":a(r.widget.topProducts.titleAriaLabel),\"data-testid\":\"widget-title-top-products\",children:a(r.widget.topProducts.title)}),(0,j.jsxs)(Cl,{children:[(0,j.jsxs)(vl,{id:\"product-sort\",\"data-testid\":\"product-sort-dropdown\",value:t,onChange:d,disabled:o,\"aria-label\":a(r.widget.topProducts.sortAriaLabel),children:[(0,j.jsx)(\"option\",{value:\"units\",children:a(r.filter.productSort.byUnits)}),(0,j.jsx)(\"option\",{value:\"revenue\",children:a(r.filter.productSort.byRevenue)}),(0,j.jsx)(\"option\",{value:\"volume\",children:a(r.filter.productSort.byVolume)})]}),(0,j.jsx)(nt,{widgetId:\"top-products\",onFullView:s})]})]}),(0,j.jsx)(kl,{as:\"ul\",\"data-testid\":\"products-list\",children:g.map((c,v)=>{let y=u(c,t),D=C(c,t);return(0,j.jsxs)(Sl,{as:\"li\",\"data-testid\":`product-item-${v}`,\"aria-label\":`${b} ${c.rank}: ${c.name}, ${p(c,t)}`,children:[(0,j.jsx)(Tl,{\"aria-label\":`${b} ${c.rank}`,children:c.rank}),c.imageUrl?(0,j.jsx)(Dl,{src:c.imageUrl,alt:c.name,loading:\"lazy\",onError:h=>{h.currentTarget.hidden=!0}}):(0,j.jsx)(Pl,{\"aria-label\":a(r.widget.topProducts.noImageAriaLabel),children:c.name.substring(0,2).toUpperCase()}),(0,j.jsxs)(Rl,{children:[(0,j.jsx)(Ml,{title:c.name,children:c.name}),(0,j.jsx)(Ol,{children:w(c,t)})]}),(0,j.jsxs)(Fl,{children:[(0,j.jsx)(Ll,{children:p(c,t)}),D&&(0,j.jsxs)($l,{as:\"output\",direction:y,\"aria-live\":\"polite\",\"aria-label\":`${f}: ${bo(y)} ${D}`,children:[x(y),(0,j.jsx)(\"span\",{children:D})]})]})]},c.id)})})]})},ro=Gl.default.memo(Lc);ro.displayName=\"TopSellingProductsList\";var yo=M(require(\"react\")),je=require(\"recharts\");var ve=require(\"@nuskin/foundation-theme\"),{getGenomeColor:ge}=ve.ColorUtils,Ba=(0,ve.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>ge(e,\"N20\")};\n border: 1px solid ${({theme:e})=>ge(e,\"N30\")};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,ql=(0,ve.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,Ql=(0,ve.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`,Xl=(0,ve.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,es=(0,ve.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>ge(e,\"N100\")};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({theme:e})=>ge(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,ts=(0,ve.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>ge(e,\"N20\")};\n border: 1px solid ${({theme:e})=>ge(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>ge(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>ge(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>ge(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>ge(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,os=(0,ve.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`,rs=(0,ve.styled)(\"div\")`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({theme:e})=>ge(e,\"N100\")};\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`,as=(0,ve.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#DC2626\":ge(e,\"N70\")};\n\n svg {\n width: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>ge(e,\"N70\")};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\n }\n`,ns=(0,ve.styled)(\"div\")`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n color: ${({theme:e})=>ge(e,\"N100\")};\n margin-bottom: 8px;\n margin-top: 0;\n letter-spacing: 0.12px;\n`,is=(0,ve.styled)(\"div\")`\n width: 100%;\n height: 220px;\n margin-top: 16px;\n\n @media (min-width: 768px) {\n height: 280px;\n }\n\n @media (min-width: 1080px) {\n height: 340px;\n }\n\n .recharts-cartesian-grid-horizontal line,\n .recharts-cartesian-grid-vertical line {\n stroke: ${({theme:e})=>ge(e,\"N40\")};\n stroke-width: 1px;\n }\n\n .recharts-text {\n fill: ${({theme:e})=>ge(e,\"N70\")};\n font-size: 10px;\n }\n\n .recharts-tooltip-wrapper {\n z-index: 100;\n }\n`,ls=(0,ve.styled)(\"div\")`\n background-color: ${({theme:e})=>ge(e,\"N100\")};\n border: 1px solid ${({theme:e})=>ge(e,\"N40\")};\n border-radius: 6px;\n padding: 8px 12px;\n box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);\n`,ss=(0,ve.styled)(\"div\")`\n font-size: 11px;\n font-weight: 600;\n color: ${({theme:e})=>ge(e,\"N10\")};\n margin-bottom: 4px;\n`,ds=(0,ve.styled)(\"div\")`\n font-size: 13px;\n font-weight: 700;\n color: ${({theme:e})=>ge(e,\"A10\")};\n`,ps=(0,ve.styled)(\"div\")`\n font-size: 10px;\n font-weight: 400;\n color: ${({theme:e})=>ge(e,\"N30\")};\n margin-top: 2px;\n`;var Ea={last7days:7,last30days:30,last90days:90,thisMonth:31},Ha={last7days:\"Last 7 Days\",last30days:\"Last 30 Days\",last90days:\"Last 90 Days\",thisMonth:\"This Month\"};function cs(e){return Ea[e]??30}function gr(e){return Ha[e]??\"Last 30 Days\"}function us(e){return gr(e)}function Wa(e){return`${[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"][e.getMonth()]} ${e.getDate()}`}var $c={Jan:\"1\",Feb:\"2\",Mar:\"3\",Apr:\"4\",May:\"5\",Jun:\"6\",Jul:\"7\",Aug:\"8\",Sep:\"9\",Oct:\"10\",Nov:\"11\",Dec:\"12\"};function hr(e){let t=e.split(\" \");return t.length!==2?e:`${$c[t[0]]||t[0]}/${t[1]}`}function fr(e){let t=new Date(e);return Wa(t)}function _a(e,t){return`${fr(e)} - ${fr(t)}`}function mr(e){return e.toISOString().split(\"T\")[0]}function ke(e){let t=new Date,o=t.getFullYear(),n=t.getMonth(),i=t.getDate(),s,d=new Date(o,n,i);switch(e){case\"last7days\":s=new Date(o,n,i-7);break;case\"last30days\":s=new Date(o,n,i-30);break;case\"last90days\":s=new Date(o,n,i-90);break;case\"thisMonth\":s=new Date(o,n,1),d=new Date(o,n+1,0);break;default:return\"N/A\"}return _a(mr(s),mr(d))}var G=require(\"react/jsx-runtime\"),Ic={top:5,right:10,left:-10,bottom:5},gs={fontSize:10},Nc={r:3,fill:\"#3B82F6\"},Vc={r:5},Ac=e=>`${e}%`,zc=({active:e,payload:t})=>{if(!e||!t?.length)return null;let o=t[0].payload;return(0,G.jsxs)(ls,{children:[(0,G.jsx)(ss,{children:o.date}),(0,G.jsxs)(ds,{children:[(o.rate??0).toFixed(2),\"%\"]}),(0,G.jsxs)(ps,{children:[o.orders??0,\" \",a(r.widget.conversionRate.tooltipOrders),\" /\",\" \",(o.siteVisits??0).toLocaleString(),\" \",a(r.widget.conversionRate.tooltipVisits)]})]})},Bc=({conversionData:e,conversionFilter:t,isLoading:o=!1,title:n,summaryRate:i,summaryChangePct:s,onFilterChange:d,onTitleClick:p})=>{let w=yo.default.useCallback(c=>{let v=c.target.value;d?.(v)},[d]),C=a(r.widget.conversionRate.noData),u=a(r.widget.conversionRate.noChange),x=yo.default.useMemo(()=>typeof i==\"number\"&&Number.isFinite(i)?i:e.at(-1)?.rate??0,[i,e]),g=yo.default.useMemo(()=>{if(s!==void 0){if(s===null||Math.abs(s)<.1)return{direction:\"neutral\",value:u};let V=s>0?\"up\":\"down\",Y=`${s>0?\"+\":\"\"}${s.toFixed(2)}%`;return{direction:V,value:Y}}if(e.length<2)return{direction:\"neutral\",value:C};let c=e.at(-1)?.rate??0,v=e[0].rate;if(v===0)return{direction:\"neutral\",value:u};let y=c-v,D=y/v*100;if(Math.abs(D)<.1)return{direction:\"neutral\",value:u};let h=y>0?\"up\":\"down\",F=`${y>0?\"+\":\"\"}${y.toFixed(2)}%`;return{direction:h,value:F}},[s,e,u,C]),b=yo.default.useMemo(()=>e.map(c=>({...c,shortDate:hr(c.date)})),[e]);if(o&&e.length===0)return(0,G.jsx)(Ba,{\"data-testid\":\"widget-conversion-rate\",children:(0,G.jsx)(dr,{})});let f=a(r.widget.conversionRate.chartAriaLabel);return(0,G.jsxs)(Ba,{as:\"section\",\"data-testid\":\"widget-conversion-rate\",\"aria-label\":f,children:[(0,G.jsx)(ql,{children:(0,G.jsxs)(Ql,{children:[(0,G.jsx)(es,{as:\"button\",onClick:p,\"aria-label\":a(r.widget.conversionRate.titleAriaLabel),\"data-testid\":\"widget-title-conversion-rate\",children:n??a(r.widget.conversionRate.title)}),(0,G.jsxs)(Xl,{children:[(0,G.jsxs)(ts,{id:\"conversion-filter\",\"data-testid\":\"conversion-filter-dropdown\",value:t,onChange:w,disabled:o,\"aria-label\":a(r.widget.conversionRate.filterAriaLabel),children:[(0,G.jsx)(\"option\",{value:\"all\",children:a(r.filter.conversionType.all)}),(0,G.jsx)(\"option\",{value:\"standard\",children:a(r.filter.conversionType.standard)}),(0,G.jsx)(\"option\",{value:\"subscription\",children:a(r.filter.conversionType.subscription)})]}),(0,G.jsx)(nt,{widgetId:\"conversion-rate\",onFullView:p})]})]})}),(0,G.jsxs)(os,{children:[(0,G.jsxs)(rs,{\"aria-label\":`${a(r.widget.conversionRate.title)}: ${x.toFixed(2)}%`,\"data-testid\":\"conversion-metric-value\",children:[x.toFixed(2),\"%\"]}),g.value!==C&&(0,G.jsxs)(as,{as:\"output\",direction:g.direction,\"aria-live\":\"polite\",\"aria-label\":`${bo(g.direction)} ${g.value}`,\"data-testid\":\"conversion-metric-trend\",children:[(0,G.jsxs)(\"div\",{className:\"trend-line\",children:[(0,G.jsx)(\"span\",{\"aria-hidden\":\"true\",children:rt(g.direction)}),(0,G.jsx)(\"span\",{className:\"change-value\",children:g.value.replace(\"%\",\"\")}),(0,G.jsx)(\"span\",{className:\"change-percent\",children:\"%\"})]}),(0,G.jsx)(\"div\",{className:\"comparison-text\",children:a(r.widget.conversionRate.comparison)})]})]}),(0,G.jsx)(ns,{\"data-testid\":\"conversion-formula\",children:a(r.widget.conversionRate.formula)}),(0,G.jsx)(is,{\"data-testid\":\"conversion-chart\",children:(0,G.jsx)(je.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:200,children:(0,G.jsxs)(je.LineChart,{data:b,margin:Ic,children:[(0,G.jsx)(je.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,G.jsx)(je.XAxis,{dataKey:\"shortDate\",tick:gs,tickLine:!1,interval:\"preserveStartEnd\"}),(0,G.jsx)(je.YAxis,{tick:gs,tickLine:!1,tickFormatter:Ac,domain:[\"dataMin - 0.5\",\"dataMax + 0.5\"]}),(0,G.jsx)(je.Tooltip,{content:zc}),(0,G.jsx)(je.Line,{type:\"monotone\",dataKey:\"rate\",stroke:\"#3B82F6\",strokeWidth:2,dot:Nc,activeDot:Vc})]})})})]})},ao=yo.default.memo(Bc);ao.displayName=\"ConversionRateChart\";var Co=M(require(\"react\")),xe=require(\"recharts\");var Ae=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Le}=Ae.ColorUtils,Ua=(0,Ae.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>Le(e,\"N20\")};\n border: 1px solid ${({theme:e})=>Le(e,\"N30\")};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,fs=(0,Ae.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,ms=(0,Ae.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,hs=(0,Ae.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>Le(e,\"N100\")};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({theme:e})=>Le(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,xs=(0,Ae.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>Le(e,\"N20\")};\n border: 1px solid ${({theme:e})=>Le(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>Le(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Le(e,\"N30\")};\n }\n &:focus {\n border-color: ${({theme:e})=>Le(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>Le(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,bs=(0,Ae.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`,ys=(0,Ae.styled)(\"div\")`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({theme:e})=>Le(e,\"N100\")};\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`,ws=(0,Ae.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#DC2626\":Le(e,\"N70\")};\n\n svg {\n width: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>Le(e,\"N70\")};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\n }\n`,Cs=(0,Ae.styled)(\"div\")`\n width: 100%;\n height: 220px;\n margin-top: 16px;\n\n @media (min-width: 768px) {\n height: 280px;\n }\n @media (min-width: 1080px) {\n height: 340px;\n }\n\n .recharts-cartesian-grid-horizontal line,\n .recharts-cartesian-grid-vertical line {\n stroke: ${({theme:e})=>Le(e,\"N40\")};\n stroke-width: 1px;\n }\n .recharts-text {\n fill: ${({theme:e})=>Le(e,\"N70\")};\n font-size: 10px;\n }\n`,vs=(0,Ae.styled)(\"div\")`\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 16px;\n margin-top: 16px;\n padding-top: 0;\n`,Ho=(0,Ae.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Le(e,\"N30\")};\n }\n`,Wo=(0,Ae.styled)(\"div\")`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({color:e})=>e};\n flex-shrink: 0;\n`,_o=(0,Ae.styled)(\"span\")`\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>Le(e,\"N70\")};\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;var L=require(\"react/jsx-runtime\"),mt={total:\"#3B82F6\",members:\"#7B92A8\",retail:\"#A3B5C7\",brandAffiliates:\"#CBD6E0\"},Ec={top:5,right:10,left:-10,bottom:5},ks={fontSize:10},wo={r:2},Hc=({signupData:e,signupView:t,isLoading:o=!1,title:n,onViewChange:i,onTitleClick:s})=>{let d=Co.default.useCallback(v=>{let y=v.target.value;i?.(y)},[i]),p=a(r.widget.signups.noData),w=a(r.widget.signups.noChange),C=Co.default.useMemo(()=>e.length===0?0:e[e.length-1].total,[e]),u=Co.default.useMemo(()=>{if(e.length<2)return{direction:\"neutral\",value:p};let v=e[e.length-1].total,y=e[0].total,D=v-y,h=D/y*100;if(Math.abs(h)<.1)return{direction:\"neutral\",value:w};let F=D>0?\"up\":\"down\",V=`${D>0?\"+\":\"\"}${D} (${h.toFixed(1)}%)`;return{direction:F,value:V}},[w,p,e]),x=Co.default.useMemo(()=>e.map(v=>({...v,shortDate:hr(v.date)})),[e]),g=a(r.widget.signups.total),b=a(r.widget.signups.members),f=a(r.widget.signups.retail),c=a(r.widget.signups.brandAffiliates);return o&&e.length===0?(0,L.jsx)(Ua,{\"data-testid\":\"widget-signups\",children:(0,L.jsx)(dr,{})}):(0,L.jsxs)(Ua,{as:\"section\",\"data-testid\":\"widget-signups\",\"aria-label\":a(r.widget.signups.chartAriaLabel),children:[(0,L.jsxs)(fs,{children:[(0,L.jsx)(hs,{as:\"button\",onClick:s,\"aria-label\":a(r.widget.signups.titleAriaLabel),\"data-testid\":\"widget-title-signups\",children:n??a(r.widget.signups.title)}),(0,L.jsxs)(ms,{children:[(0,L.jsxs)(xs,{id:\"signup-view\",\"data-testid\":\"signup-view-dropdown\",value:t,onChange:d,disabled:o,\"aria-label\":a(r.widget.signups.filterAriaLabel),children:[(0,L.jsx)(\"option\",{value:\"all\",children:a(r.filter.signupView.showAll)}),(0,L.jsx)(\"option\",{value:\"members\",children:a(r.filter.signupView.showMembers)}),(0,L.jsx)(\"option\",{value:\"retail\",children:a(r.filter.signupView.showRetail)}),(0,L.jsx)(\"option\",{value:\"brandAffiliates\",children:a(r.filter.signupView.showBrandAffiliates)})]}),(0,L.jsx)(nt,{widgetId:\"signups\",onFullView:s})]})]}),(0,L.jsxs)(bs,{\"data-testid\":\"signups-metric-display\",children:[(0,L.jsx)(ys,{\"data-testid\":\"signups-metric-value\",\"aria-label\":`${g}: ${C.toLocaleString()}`,children:C.toLocaleString()}),u.value!==p&&(0,L.jsxs)(ws,{as:\"output\",\"data-testid\":\"signups-metric-trend\",direction:u.direction,\"aria-live\":\"polite\",\"aria-label\":`${bo(u.direction)} ${u.value}`,children:[(0,L.jsxs)(\"div\",{className:\"trend-line\",children:[(0,L.jsx)(\"span\",{\"aria-hidden\":\"true\",children:rt(u.direction)}),(0,L.jsx)(\"span\",{className:\"change-value\",children:u.value.split(\" \")[0]}),(0,L.jsx)(\"span\",{className:\"change-percent\",children:u.value.split(\" \")[1]})]}),(0,L.jsx)(\"div\",{className:\"comparison-text\",children:a(r.widget.conversionRate.comparison)})]})]}),(0,L.jsx)(Cs,{\"data-testid\":\"signups-chart\",children:(0,L.jsx)(xe.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:200,children:(0,L.jsxs)(xe.LineChart,{data:x,margin:Ec,children:[(0,L.jsx)(xe.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,L.jsx)(xe.XAxis,{dataKey:\"shortDate\",tick:ks,tickLine:!1,interval:\"preserveStartEnd\"}),(0,L.jsx)(xe.YAxis,{tick:ks,tickLine:!1}),(0,L.jsx)(xe.Tooltip,{}),(t===\"all\"||t===\"members\")&&(0,L.jsx)(xe.Line,{type:\"monotone\",dataKey:t===\"all\"?\"total\":\"members\",stroke:t===\"all\"?mt.total:mt.members,strokeWidth:2,dot:wo,name:t===\"all\"?g:b}),t===\"all\"&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(xe.Line,{type:\"monotone\",dataKey:\"members\",stroke:mt.members,strokeWidth:2,dot:wo,name:b}),(0,L.jsx)(xe.Line,{type:\"monotone\",dataKey:\"retail\",stroke:mt.retail,strokeWidth:2,dot:wo,name:f}),(0,L.jsx)(xe.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:mt.brandAffiliates,strokeWidth:2,dot:wo,name:c})]}),t===\"retail\"&&(0,L.jsx)(xe.Line,{type:\"monotone\",dataKey:\"retail\",stroke:mt.retail,strokeWidth:2,dot:wo,name:f}),t===\"brandAffiliates\"&&(0,L.jsx)(xe.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:mt.brandAffiliates,strokeWidth:2,dot:wo,name:c})]})})}),t===\"all\"&&(0,L.jsxs)(vs,{\"data-testid\":\"signups-legend\",children:[(0,L.jsxs)(Ho,{\"data-testid\":\"legend-total\",children:[(0,L.jsx)(Wo,{color:mt.total}),(0,L.jsx)(_o,{children:g})]}),(0,L.jsxs)(Ho,{\"data-testid\":\"legend-members\",children:[(0,L.jsx)(Wo,{color:mt.members}),(0,L.jsx)(_o,{children:b})]}),(0,L.jsxs)(Ho,{\"data-testid\":\"legend-retail\",children:[(0,L.jsx)(Wo,{color:mt.retail}),(0,L.jsx)(_o,{children:f})]}),(0,L.jsxs)(Ho,{\"data-testid\":\"legend-brandAffiliates\",children:[(0,L.jsx)(Wo,{color:mt.brandAffiliates}),(0,L.jsx)(_o,{children:c})]})]})]})},Uo=Co.default.memo(Hc);Uo.displayName=\"SignupsChart\";var $r=M(require(\"react\")),St=require(\"recharts\"),Rs=M(require(\"@mui/icons-material/TrendingUp\")),Ms=M(require(\"@mui/icons-material/TrendingDown\"));var oe=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Se}=oe.ColorUtils,Yt=(0,oe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>Se(e,\"N20\")};\n border: 1px solid ${({theme:e})=>Se(e,\"N30\")};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,vo=(0,oe.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,xr=(0,oe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,ko=(0,oe.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>Se(e,\"N100\")};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({theme:e})=>Se(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,br=(0,oe.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>Se(e,\"N20\")};\n border: 1px solid ${({theme:e})=>Se(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>Se(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Se(e,\"N30\")};\n }\n &:focus {\n border-color: ${({theme:e})=>Se(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>Se(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,yr=(0,oe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 20px;\n align-items: center;\n justify-content: center;\n flex: 1;\n\n @media (min-width: 768px) {\n flex-direction: row;\n gap: 24px;\n align-items: center;\n justify-content: center;\n }\n`,wr=(0,oe.styled)(\"div\")`\n position: relative;\n width: 100%;\n height: 220px;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 260px;\n height: 260px;\n flex: 0 0 auto;\n }\n\n @media (min-width: 1080px) {\n width: 280px;\n height: 280px;\n flex: 0 0 auto;\n }\n\n /* Style recharts pie labels (percentages inside segments) */\n svg text {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n text[class*='recharts'] {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n`,Cr=(0,oe.styled)(\"div\")`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 96px;\n`,vr=(0,oe.styled)(\"div\")`\n font-size: 10px;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>Se(e,\"N70\")};\n`,kr=(0,oe.styled)(\"div\")`\n margin-top: 2px;\n font-size: 16px;\n line-height: 1.2;\n font-weight: 700;\n color: ${({theme:e})=>Se(e,\"N100\")};\n`,Sr=(0,oe.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 3px;\n margin-top: 4px;\n font-size: 12px;\n line-height: 1.2;\n font-weight: 600;\n color: ${({direction:e,theme:t})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":Se(t,\"N70\")};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`,Tr=(0,oe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex: 0 1 auto;\n\n @media (min-width: 768px) {\n gap: 10px;\n }\n`,Dr=(0,oe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 0;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n @media (min-width: 768px) {\n gap: 10px;\n padding: 6px 0;\n }\n\n &:hover {\n background-color: ${({theme:e})=>Se(e,\"N30\")};\n }\n`,Pr=(0,oe.styled)(\"div\")`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({color:e})=>e};\n flex-shrink: 0;\n`,Rr=(0,oe.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n gap: 4px;\n flex: 1;\n min-width: 0;\n align-items: center;\n`,Mr=(0,oe.styled)(\"div\")`\n font-size: 13px;\n font-weight: 600;\n color: ${({theme:e})=>Se(e,\"N100\")};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n font-size: 14px;\n }\n`,Or=(0,oe.styled)(\"div\")`\n font-size: 12px;\n font-weight: 500;\n color: ${({theme:e})=>Se(e,\"N100\")};\n flex-shrink: 0;\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,Ss=(0,oe.styled)(\"div\")`\n display: none;\n`,Ts=(0,oe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 4px;\n flex: 1;\n min-width: 0;\n`,Ds=(0,oe.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({direction:e})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":\"#757575\"};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`,Ps=(0,oe.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({direction:e})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":\"#757575\"};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,Fr=(0,oe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n text-align: center;\n color: ${({theme:e})=>Se(e,\"N70\")};\n`,Lr=(0,oe.styled)(\"div\")`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>Se(e,\"N70\")};\n`;var E=require(\"react/jsx-runtime\"),Wc=({categories:e,categorySort:t,isLoading:o=!1,title:n,onSortChange:i,onTitleClick:s})=>{let d=$r.default.useCallback(f=>{let c=f.target.value;i?.(c)},[i]),{sortedCategories:p,totalRevenue:w,trendDirection:C,formattedTrend:u}=$r.default.useMemo(()=>{let f=[...e].sort((D,h)=>t===\"revenue\"?h.revenue-D.revenue:(vt(h.trend?.revenue)??-1/0)-(vt(D.trend?.revenue)??-1/0)),c=f.reduce((D,h)=>D+h.revenue,0),{direction:v,formatted:y}=jt(f,D=>D.revenue,D=>D.trend?.revenue);return{sortedCategories:f,totalRevenue:c,trendDirection:v,formattedTrend:y}},[e,t]),x=f=>f===\"up\"?(0,E.jsx)(Rs.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):f===\"down\"?(0,E.jsx)(Ms.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):null,g=f=>{let{cx:c,cy:v,midAngle:y,innerRadius:D,outerRadius:h,percentage:F}=f,V=Math.PI/180,Y=D+(h-D)/2,A=c+Y*Math.cos(-y*V),H=v+Y*Math.sin(-y*V);return(0,E.jsx)(\"text\",{x:A,y:H,fill:\"white\",textAnchor:\"middle\",dominantBaseline:\"central\",fontSize:\"10\",fontWeight:\"600\",fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",letterSpacing:\"0.2\",style:{lineHeight:\"12px\",leadingTrim:\"none\"},children:`${F}%`})},b=p[0]?.currencyCode;return o&&e.length===0?(0,E.jsx)(Yt,{\"data-testid\":\"widget-top-categories\",children:(0,E.jsx)(pr,{})}):e.length===0?(0,E.jsxs)(Yt,{\"data-testid\":\"widget-top-categories\",children:[(0,E.jsx)(vo,{children:(0,E.jsx)(ko,{children:n??a(r.widget.topCategories.title)})}),(0,E.jsx)(Fr,{\"data-testid\":\"categories-empty-state\",children:(0,E.jsx)(Lr,{children:a(r.widget.topCategories.empty)})})]}):(0,E.jsxs)(Yt,{as:\"section\",\"data-testid\":\"widget-top-categories\",\"aria-label\":a(r.widget.topCategories.chartAriaLabel),children:[(0,E.jsxs)(vo,{children:[(0,E.jsx)(ko,{as:\"button\",onClick:s,\"aria-label\":a(r.widget.topCategories.titleAriaLabel),\"data-testid\":\"widget-title-top-categories\",children:n??a(r.widget.topCategories.title)}),(0,E.jsxs)(xr,{children:[(0,E.jsxs)(br,{id:\"category-sort\",\"data-testid\":\"category-sort-dropdown\",value:t,onChange:d,disabled:o,\"aria-label\":a(r.widget.topCategories.sortAriaLabel),children:[(0,E.jsx)(\"option\",{value:\"revenue\",children:a(r.filter.categorySort.byRevenue)}),(0,E.jsx)(\"option\",{value:\"trend\",children:a(r.filter.categorySort.byTrend)})]}),(0,E.jsx)(nt,{widgetId:\"top-categories\",onFullView:s})]})]}),(0,E.jsxs)(yr,{children:[(0,E.jsxs)(wr,{\"data-testid\":\"categories-chart\",children:[(0,E.jsx)(St.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,E.jsxs)(St.PieChart,{children:[(0,E.jsx)(St.Pie,{data:p,cx:\"50%\",cy:\"50%\",innerRadius:\"55%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,label:g,labelLine:!1,children:p.map(f=>(0,E.jsx)(St.Cell,{fill:f.color},`cell-${f.id}`))}),(0,E.jsx)(St.Tooltip,{formatter:f=>q(f,b)})]})}),(0,E.jsxs)(Cr,{\"data-testid\":\"categories-donut-center\",children:[(0,E.jsx)(vr,{children:a(r.stats.revenue)}),(0,E.jsx)(kr,{children:q(w,b)}),(0,E.jsxs)(Sr,{direction:C,children:[x(C),(0,E.jsx)(\"span\",{children:u})]})]})]}),(0,E.jsx)(Tr,{\"data-testid\":\"categories-legend-container\",children:p.map((f,c)=>(0,E.jsxs)(Dr,{\"data-testid\":`category-legend-${c}`,children:[(0,E.jsx)(Pr,{color:f.color}),(0,E.jsxs)(Rr,{children:[(0,E.jsx)(Mr,{children:f.name.charAt(0).toUpperCase()+f.name.slice(1)}),(0,E.jsxs)(Ts,{children:[(0,E.jsxs)(Or,{children:[q(f.revenue,f.currencyCode),\" (\",f.percentage,\"%)\"]}),f.trend?.revenue?(0,E.jsx)(Ds,{direction:Gt(f.trend?.revenue),\"data-testid\":`category-legend-trend-${c}`,\"aria-label\":f.trend.revenue,children:x(Gt(f.trend?.revenue))}):null]})]})]},f.id))})]})]})},Ko=$r.default.memo(Wc);Ko.displayName=\"TopCategoriesPieChart\";var Te=require(\"react/jsx-runtime\"),_c=[],Uc=[],Kc=[],Gc=[],Ir=({stats:e,topProducts:t,conversionData:o,signupData:n,categories:i,isLoading:s=!1,error:d,shopTitle:p,className:w,dateRange:C=\"last30days\",market:u=\"all\",productSort:x=\"units\",signupView:g=\"all\",conversionFilter:b=\"all\",categorySort:f=\"revenue\",markets:c,onDateRangeChange:v,onMarketChange:y,onProductSortChange:D,onSignupViewChange:h,onConversionFilterChange:F,onCategorySortChange:V,onProductsTitleClick:Y,onConversionTitleClick:A,onSignupsTitleClick:H,onCategoriesToTitleClick:Q})=>{let I=t??_c,m=o??Uc,k=n??Kc,S=i??Gc;if(d)return(0,Te.jsx)(va,{as:\"main\",className:w,\"aria-label\":a(r.ariaLabel.dashboard),children:(0,Te.jsxs)(wi,{\"data-testid\":\"dashboard-error\",role:\"alert\",\"aria-live\":\"assertive\",children:[(0,Te.jsxs)(\"strong\",{children:[a(r.error),\":\"]}),\" \",d]})});let l=R=>R?R.startsWith(\"+\")?\"up\":R.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\";return(0,Te.jsxs)(va,{as:\"main\",className:w,\"data-testid\":\"shopping-dashboard\",\"aria-label\":a(r.ariaLabel.dashboard),\"aria-busy\":s,children:[(0,Te.jsx)(ho,{shopTitle:p,dateRange:C,market:u,isLoading:s,stats:e,markets:c,onDateRangeChange:v,onMarketChange:y}),(0,Te.jsxs)(bi,{as:\"section\",\"data-testid\":\"stats-row\",\"aria-label\":a(r.ariaLabel.statsRow),children:[(0,Te.jsx)(Ct,{title:a(r.stats.revenue),value:e?.metrics?.revenue??\"$0\",trendDirection:l(e?.trend?.revenue),trendValue:e?.trend?.revenue,testId:\"stats-card-revenue\",isLoading:s}),(0,Te.jsx)(Ct,{title:a(r.stats.volume),value:e?.metrics?.volume??\"0\",subtitle:a(r.stats.subtitle.dcSv),trendDirection:l(e?.trend?.volume),trendValue:e?.trend?.volume,testId:\"stats-card-volume\",isLoading:s}),(0,Te.jsx)(Ct,{title:a(r.stats.visits),value:e?.metrics?.siteVisits??\"0\",subtitle:`${e?.metrics?.conversionRate??\"0%\"} ${a(r.stats.subtitle.conversionRate)}`,trendDirection:l(e?.trend?.siteVisits),trendValue:e?.trend?.siteVisits,testId:\"stats-card-visits\",isLoading:s})]}),(0,Te.jsxs)(yi,{\"data-testid\":\"widget-container\",children:[(0,Te.jsxs)(ka,{\"data-testid\":\"widget-row-1\",children:[(0,Te.jsx)(ro,{products:I,productSort:x,isLoading:s,maxProducts:5,onSortChange:D,onTitleClick:Y}),(0,Te.jsx)(Uo,{signupData:k,signupView:g,isLoading:s,onViewChange:h,onTitleClick:H})]}),(0,Te.jsxs)(ka,{\"data-testid\":\"widget-row-2\",children:[(0,Te.jsx)(ao,{conversionData:m,conversionFilter:b,isLoading:s,onFilterChange:F,onTitleClick:A}),(0,Te.jsx)(Ko,{categories:S,categorySort:f,isLoading:s,onSortChange:V,onTitleClick:Q})]})]})]})};var ne=M(require(\"react\"));var dt=M(require(\"react\"));var Us=M(require(\"@mui/icons-material/ArrowBack\")),Ks=M(require(\"@mui/icons-material/CalendarToday\")),Gs=M(require(\"@mui/icons-material/Language\"));var $e=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Ze}=$e.ColorUtils,Os=(0,$e.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n`,Fs=(0,$e.styled)(\"div\")`\n display: flex;\n align-items: center;\n`,Ls=(0,$e.styled)(\"button\")`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0;\n border: none;\n background-color: transparent;\n color: ${({theme:e})=>Ze(e,\"N70\")};\n cursor: pointer;\n transition: color 0.2s ease;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n\n &:hover {\n color: ${({theme:e})=>Ze(e,\"N100\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>Ze(e,\"A70\")};\n outline-offset: 2px;\n border-radius: 4px;\n }\n\n svg {\n font-size: 16px;\n }\n\n span {\n line-height: 1;\n }\n`,$s=(0,$e.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 16px;\n border-bottom: 1px solid ${({theme:e})=>Ze(e,\"N30\")};\n gap: 24px;\n\n @media (max-width: 767px) {\n align-items: flex-end;\n gap: 16px;\n }\n`,Is=(0,$e.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 16px;\n flex: 1;\n\n @media (max-width: 767px) {\n display: none;\n }\n`,Ns=(0,$e.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({theme:e})=>Ze(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`,Vs=(0,$e.styled)(\"p\")`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({theme:e})=>Ze(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n`,As=(0,$e.styled)(\"p\")`\n display: none;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({theme:e})=>Ze(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n flex-shrink: 0;\n }\n`,zs=(0,$e.styled)(\"div\")`\n display: flex;\n gap: 24px;\n align-items: center;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n`,Bs=(0,$e.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Es=(0,$e.styled)(\"span\")`\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({theme:e})=>Ze(e,\"N70\")};\n\n svg {\n font-size: 16px;\n }\n`,Hs=(0,$e.styled)(\"select\")`\n min-width: 120px;\n height: 32px;\n padding: 6px 8px;\n padding-right: 24px;\n background-color: transparent;\n border: none;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ${({theme:e})=>Ze(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: background-color 0.2s ease;\n appearance: none;\n background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><path fill=\"%23667085\" d=\"M6 8L2 4h8L6 8z\"/></svg>');\n background-repeat: no-repeat;\n background-position: right 4px center;\n\n &:hover {\n background-color: ${({theme:e})=>Ze(e,\"N20\")};\n border-radius: 4px;\n }\n\n &:focus {\n background-color: ${({theme:e})=>Ze(e,\"N20\")};\n border-radius: 4px;\n outline: 2px solid ${({theme:e})=>Ze(e,\"A70\")};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n @media (max-width: 767px) {\n min-width: auto;\n width: auto;\n flex: none;\n padding-right: 24px;\n background-position: right 8px center;\n }\n`,Ws=(0,$e.styled)(\"div\")`\n display: none;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`,_s=(0,$e.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({theme:e})=>Ze(e,\"N100\")};\n margin: 0;\n`;var fe=require(\"react/jsx-runtime\");function Tt(e,t){return{key:\"dateRange\",label:a(t.filter.dateRange.label),value:e,icon:\"calendar\",options:[{value:\"last7days\",label:a(t.filter.dateRange.last7days)},{value:\"last30days\",label:a(t.filter.dateRange.last30days)},{value:\"last90days\",label:a(t.filter.dateRange.last90days)},{value:\"thisMonth\",label:a(t.filter.dateRange.thisMonth)}]}}function Dt(e,t,o){return{key:\"market\",label:a(o.filter.market.label),value:e,icon:\"globe\",options:t.map(n=>({value:n.value,label:n.label}))}}var me=({title:e,dateRange:t,onBack:o,filters:n,onFilterChange:i})=>{let s=d=>d?(0,fe.jsxs)(Es,{children:[d===\"calendar\"&&(0,fe.jsx)(Ks.default,{}),d===\"globe\"&&(0,fe.jsx)(Gs.default,{})]}):null;return(0,fe.jsxs)(Os,{\"data-testid\":\"page-header\",children:[(0,fe.jsx)(Fs,{children:(0,fe.jsxs)(Ls,{onClick:o,\"aria-label\":a(r.navigation.backAriaLabel),\"data-testid\":\"page-back-button\",type:\"button\",children:[(0,fe.jsx)(Us.default,{}),(0,fe.jsx)(\"span\",{children:a(r.navigation.backToDashboard)})]})}),(0,fe.jsx)(Ws,{children:(0,fe.jsx)(_s,{children:e})}),(0,fe.jsxs)($s,{children:[(0,fe.jsxs)(Is,{children:[(0,fe.jsx)(Ns,{\"data-testid\":\"page-header-title\",children:e}),(0,fe.jsx)(Vs,{\"data-testid\":\"page-header-date-range\",children:t})]}),n&&n.length>0&&i&&(0,fe.jsx)(zs,{\"data-testid\":\"page-header-filters\",children:n.map(d=>(0,fe.jsxs)(Bs,{children:[s(d.icon),(0,fe.jsx)(Hs,{id:`filter-${d.key}`,value:d.value,onChange:p=>i(d.key,p.target.value),disabled:d.disabled,\"aria-label\":`${d.label} ${a(r.ariaLabel.filterSuffix)}`,\"data-testid\":`filter-dropdown-${d.key}`,children:d.options.map(p=>(0,fe.jsx)(\"option\",{value:p.value,children:d.label&&d.key===\"customerType\"?`${d.label} ${p.label}`:p.label},p.value))})]},d.key))}),(0,fe.jsx)(As,{children:t})]})]})};var ed=M(require(\"@mui/icons-material/ArrowUpward\")),td=M(require(\"@mui/icons-material/ArrowDownward\"));var it=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Pt}=it.ColorUtils,js=(0,it.styled)(\"div\")`\n width: 100%;\n overflow-x: auto;\n border-radius: 8px;\n border: 1px solid ${({theme:e})=>Pt(e,\"N30\")};\n`,Ys=(0,it.styled)(\"table\")`\n width: 100%;\n border-collapse: collapse;\n`,Js=(0,it.styled)(\"thead\")`\n background-color: ${({theme:e})=>Pt(e,\"N20\")};\n border-bottom: 2px solid ${({theme:e})=>Pt(e,\"N40\")};\n`,Zs=(0,it.styled)(\"th\")`\n padding: 12px 16px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n background-color: ${({theme:e})=>Pt(e,\"N20\")};\n color: ${({theme:e})=>Pt(e,\"N70\")};\n text-align: left;\n cursor: ${({sortable:e})=>e?\"pointer\":\"default\"};\n user-select: none;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Pt(e,\"N20\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>Pt(e,\"A70\")};\n outline-offset: -2px;\n }\n`,qs=(0,it.styled)(\"tbody\")``,Ka=(0,it.styled)(\"tr\")`\n border-bottom: 1px solid ${({theme:e})=>Pt(e,\"N30\")};\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Pt(e,\"N20\")};\n }\n\n &:last-child {\n border-bottom: none;\n }\n`,Ga=(0,it.styled)(\"td\")`\n padding: 12px 16px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({theme:e})=>Pt(e,\"N70\")};\n text-align: left;\n`,Qs=(0,it.styled)(Ga)`\n text-align: center;\n`,Xs=(0,it.styled)(\"span\")`\n display: inline-flex;\n margin-left: 6px;\n opacity: ${({isActive:e})=>e?1:.4};\n transition: opacity 0.2s ease;\n\n svg {\n font-size: 16px;\n }\n`;var He=require(\"react/jsx-runtime\"),lt=({columns:e,data:t,sortable:o=!1,onSort:n,sortColumn:i,sortDirection:s=\"asc\",getRowKey:d})=>{let p=u=>{if(!o||!n)return;n(u,i===u&&s===\"asc\"?\"desc\":\"asc\")},w=(u,x)=>{(u.key===\"Enter\"||u.key===\" \")&&(u.preventDefault(),p(x))},C=u=>{if(i===u)return s===\"asc\"?\"ascending\":\"descending\"};return(0,He.jsx)(js,{\"data-testid\":\"data-table\",children:(0,He.jsxs)(Ys,{children:[(0,He.jsx)(Js,{children:(0,He.jsx)(\"tr\",{children:e.map(u=>(0,He.jsxs)(Zs,{scope:\"col\",sortable:o&&u.sortable,onClick:()=>u.sortable&&p(u.key),onKeyDown:x=>u.sortable&&w(x,u.key),tabIndex:o&&u.sortable?0:-1,\"aria-sort\":C(u.key),\"aria-label\":`${u.label}${u.sortable?a(r.dataTable.sortableColumn):\"\"}`,\"data-testid\":`table-header-${u.key}`,children:[u.label,o&&u.sortable&&(0,He.jsx)(Xs,{isActive:i===u.key,children:i===u.key&&s===\"desc\"?(0,He.jsx)(td.default,{}):(0,He.jsx)(ed.default,{})})]},u.key))})}),(0,He.jsx)(qs,{children:t.length===0?(0,He.jsx)(Ka,{\"data-testid\":\"table-empty-row\",children:(0,He.jsx)(Qs,{colSpan:e.length,children:a(r.dataTable.noDataAvailable)})}):t.map((u,x)=>(0,He.jsx)(Ka,{\"data-testid\":`table-row-${x}`,children:e.map(g=>(0,He.jsx)(Ga,{\"data-testid\":`table-cell-${g.key}`,children:g.render?g.render(u[g.key],u):u[g.key]},g.key))},d?d(u,x):x))})]})})};var rd=M(require(\"@mui/icons-material/ChevronLeft\")),ad=M(require(\"@mui/icons-material/ChevronRight\"));var no=require(\"@nuskin/foundation-theme\"),{getGenomeColor:ht}=no.ColorUtils,od=(0,no.styled)(\"div\")`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n margin-top: 24px;\n`,Nr=(0,no.styled)(\"button\")`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({theme:e,isActive:t})=>t?ht(e,\"A80\"):ht(e,\"N20\")};\n color: ${({theme:e,isActive:t})=>t?\"#ffffff\":ht(e,\"N100\")};\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: ${({theme:e,isActive:t})=>t?ht(e,\"A70\"):ht(e,\"N30\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>ht(e,\"A70\")};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n`,Vr=(0,no.styled)(\"span\")`\n font-size: 14px;\n font-weight: 400;\n color: ${({theme:e})=>ht(e,\"N70\")};\n margin: 0 8px;\n`,ja=(0,no.styled)(\"button\")`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({theme:e})=>ht(e,\"N20\")};\n color: ${({theme:e})=>ht(e,\"N100\")};\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background-color 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: ${({theme:e})=>ht(e,\"N30\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>ht(e,\"A70\")};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n\n svg {\n font-size: 18px;\n }\n`;var De=require(\"react/jsx-runtime\"),st=({currentPage:e,totalPages:t,onPageChange:o,itemsPerPage:n,totalItems:i})=>{let s=()=>{e>1&&o(e-1)},d=()=>{e<t&&o(e+1)},p=(b,f)=>{(b.key===\"Enter\"||b.key===\" \")&&(b.preventDefault(),f())},C=(()=>{if(t<=7)return Array.from({length:t},(f,c)=>c+1);let b=[];return e<=4?b.push(1,2,3,4,5):e>=t-3?b.push(t-4,t-3,t-2,t-1,t):b.push(e-1,e,e+1),b})(),u=n?(e-1)*n+1:null,x=n?Math.min(e*n,i??1/0):null,g=a(r.pagination.goToPage);return(0,De.jsxs)(od,{\"data-testid\":\"pagination\",children:[(0,De.jsx)(ja,{onClick:s,onKeyDown:b=>p(b,s),disabled:e===1,\"aria-label\":a(r.pagination.previousPage),\"data-testid\":\"pagination-previous\",type:\"button\",children:(0,De.jsx)(rd.default,{})}),t>7&&e>4&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Nr,{onClick:()=>o(1),isActive:!1,\"aria-label\":`${g} 1`,\"data-testid\":\"pagination-page-1\",type:\"button\",children:\"1\"}),(0,De.jsx)(Vr,{children:\"...\"})]}),C.map(b=>(0,De.jsx)(Nr,{onClick:()=>o(b),isActive:e===b,\"aria-label\":`${g} ${b}`,\"aria-current\":e===b?\"page\":void 0,\"data-testid\":`pagination-page-${b}`,type:\"button\",children:b},b)),t>7&&e<t-3&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Vr,{children:\"...\"}),(0,De.jsx)(Nr,{onClick:()=>o(t),isActive:!1,\"aria-label\":`${g} ${t}`,\"data-testid\":`pagination-page-${t}`,type:\"button\",children:t})]}),(0,De.jsx)(ja,{onClick:d,onKeyDown:b=>p(b,d),disabled:e===t,\"aria-label\":a(r.pagination.nextPage),\"data-testid\":\"pagination-next\",type:\"button\",children:(0,De.jsx)(ad.default,{})}),n&&i&&(0,De.jsxs)(Vr,{as:\"output\",\"aria-live\":\"polite\",\"data-testid\":\"pagination-page-info\",children:[u,\"-\",x,\" \",a(r.pagination.of),\" \",i]})]})};var Ie=require(\"@mui/material/styles\"),Ne=require(\"@mui/material\"),nd=require(\"@nuskin/foundation-theme\"),{getGenomeColor:id}=nd.ColorUtils,Pe=(0,Ie.styled)(Ne.Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n box-sizing: border-box;\n\n @media (max-width: 767px) {\n gap: 16px;\n }\n`,Ar=(0,Ie.styled)(Ne.Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 24px;\n background-color: ${({theme:e})=>id(e,\"N20\")};\n border-radius: 8px;\n box-shadow: ${({theme:e})=>e.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n gap: 16px;\n }\n`,zr=(0,Ie.styled)(Ne.Box)`\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 16px 0;\n gap: 10px;\n flex-wrap: nowrap;\n width: 100%;\n\n @media (max-width: 767px) {\n padding: 8px 0;\n flex-wrap: nowrap;\n align-items: center;\n }\n`,Br=(0,Ie.styled)(Ne.Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 32px;\n font-weight: 700;\n line-height: 1;\n letter-spacing: 0em;\n color: ${({theme:e})=>e.palette.text.primary};\n margin: 0;\n padding: 0;\n\n @media (max-width: 767px) {\n font-size: 28px;\n line-height: 1;\n }\n`,Er=(0,Ie.styled)(Ne.Box)`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 13px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.01em;\n color: ${({theme:e,direction:t})=>t===\"up\"?e.palette.success.main:t===\"down\"?e.palette.error.main:e.palette.text.secondary};\n flex-wrap: nowrap;\n white-space: nowrap;\n\n svg {\n font-size: 13px;\n flex-shrink: 0;\n width: 13px;\n height: 13px;\n }\n\n span {\n display: inline;\n line-height: 1;\n }\n\n @media (max-width: 767px) {\n font-size: 13px;\n line-height: 1;\n flex-wrap: nowrap;\n\n svg {\n font-size: 13px;\n width: 13px;\n height: 13px;\n }\n }\n`,tm=(0,Ie.styled)(Ne.Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n\n @media (max-width: 767px) {\n font-size: 12px;\n line-height: 1.3;\n }\n`,Hr=(0,Ie.styled)(Ne.Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 0;\n\n @media (max-width: 767px) {\n gap: 8px;\n }\n`,Jt=(0,Ie.styled)(\"h2\")`\n margin: 0;\n font-size: 1.25rem;\n font-weight: 600;\n color: ${({theme:e})=>e.palette.text.primary};\n\n @media (max-width: 767px) {\n font-size: 1.125rem;\n }\n`,om=(0,Ie.styled)(Ne.Box)`\n width: 90%;\n height: 450px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 250px;\n margin-bottom: 0;\n }\n`,Zt=(0,Ie.styled)(Ne.Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n ${({withCard:e=!0,theme:t})=>e&&`\n padding: 20px;\n background-color: ${id(t,\"N20\")};\n border-radius: 8px;\n box-shadow: ${t.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n }\n `}\n`,rm=(0,Ie.styled)(Ne.Box)`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 400px;\n`,qt=(0,Ie.styled)(Ne.Typography)`\n text-align: center;\n color: ${({theme:e})=>e.palette.text.secondary};\n font-size: 1rem;\n padding: 40px 20px;\n\n @media (max-width: 767px) {\n font-size: 0.875rem;\n padding: 32px 16px;\n }\n`,ld=(0,Ie.styled)(Ne.Typography)`\n font-weight: 600;\n font-size: 14px;\n`,sd=(0,Ie.styled)(Ne.Typography)`\n font-size: 13px;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,dd=(0,Ie.styled)(Ne.Typography)`\n font-size: 13px;\n`,pd=(0,Ie.styled)(Ne.Typography)`\n font-size: 13px;\n color: ${({theme:e,status:t})=>t===\"Active\"?e.palette.success.main:e.palette.warning.main};\n`;var Ve=require(\"@mui/material/styles\"),Re=require(\"@mui/material\"),cd=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Ya}=cd.ColorUtils,ud=(0,Ve.styled)(Re.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n`,gd=(0,Ve.styled)(Re.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.primary};\n`,fd=(0,Ve.styled)(Re.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Wr=(0,Ve.styled)(Re.Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({theme:e})=>Ya(e,\"N70\")};\n`,md=(0,Ve.styled)(Re.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,hd=(0,Ve.styled)(Re.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,xd=(0,Ve.styled)(Re.Box)`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>Ya(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`,bd=(0,Ve.styled)(Re.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n`,yd=(0,Ve.styled)(Re.Typography)`\n font-size: 1rem;\n font-weight: 700;\n color: ${({theme:e})=>e.palette.primary.main};\n min-width: 24px;\n`,wd=(0,Ve.styled)(Re.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`,Cd=(0,Ve.styled)(Re.Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n`,vd=(0,Ve.styled)(Re.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,kd=(0,Ve.styled)(Re.Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({theme:e})=>e.palette.divider};\n`,_r=(0,Ve.styled)(Re.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`,Ur=(0,Ve.styled)(Re.Typography)`\n font-size: 0.625rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n text-transform: uppercase;\n`,Kr=(0,Ve.styled)(Re.Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({theme:e})=>Ya(e,\"N70\")};\n`;var Sd=M(require(\"@mui/material/useMediaQuery\")),jc=\"(max-width:767px)\";function Rt(){return(0,Sd.default)(jc,{noSsr:!0})}var U=require(\"react/jsx-runtime\");function Yc(e){return{rank:e.rank,name:e.name,sku:`${a(r.fullView.products.skuPrefix)}-${e.id.replace(\"prod-\",\"\").padStart(3,\"0\")}`,units:e.unitsSold,revenue:e.revenue,volume:e.volume}}var So=({products:e,dateRange:t,market:o,productSort:n,markets:i,isLoading:s=!1,onBack:d,onDateRangeChange:p,onMarketChange:w,onProductSortChange:C})=>{let[u,x]=(0,dt.useState)(1),[g,b]=(0,dt.useState)(n===\"revenue\"?\"revenue\":\"units\"),[f,c]=(0,dt.useState)(\"desc\"),v=10,y=Rt(),D=dt.default.useCallback(()=>d?.(),[d]),h=ot(i),F=dt.default.useMemo(()=>[Tt(t,r),Dt(o,h,r),{key:\"sort\",label:a(r.filter.productSort.label),value:n,options:[{value:\"units\",label:a(r.filter.productSort.units)},{value:\"revenue\",label:a(r.filter.productSort.revenue)},{value:\"volume\",label:a(r.filter.productSort.volume)}]}],[t,o,h,n]),V=dt.default.useCallback((S,l)=>{S===\"dateRange\"?p?.(l):S===\"market\"?w?.(l):S===\"sort\"&&(C?.(l),x(1))},[p,w,C]),Y=dt.default.useCallback((S,l)=>{b(S),c(l),x(1)},[]),A=dt.default.useMemo(()=>e.map(Yc),[e]),H=dt.default.useMemo(()=>[...A].sort((S,l)=>{let R=S[g],J=l[g];return f===\"asc\"?R-J:J-R}),[A,g,f]),{totalPages:Q,pageItems:I}=kt(H,u,v),m=e[0]?.currencyCode,k=dt.default.useMemo(()=>[{key:\"rank\",label:a(r.fullView.products.columns.rank),sortable:!0},{key:\"name\",label:a(r.fullView.products.columns.product),sortable:!0,render:(S,l)=>(0,U.jsxs)(ud,{children:[(0,U.jsx)(gd,{children:l.name}),(0,U.jsx)(fd,{children:l.sku})]})},{key:\"units\",label:a(r.fullView.products.columns.unitsSold),sortable:!0,render:S=>(0,U.jsx)(Wr,{children:Number(S).toLocaleString()})},{key:\"revenue\",label:a(r.fullView.products.columns.revenue),sortable:!0,render:S=>(0,U.jsx)(Wr,{children:q(Number(S),m)})},{key:\"volume\",label:a(r.fullView.products.columns.volume),sortable:!0,render:S=>(0,U.jsx)(Wr,{children:Number(S).toLocaleString()})}],[m]);return s?(0,U.jsxs)(Pe,{\"data-testid\":\"products-full-view\",children:[(0,U.jsx)(me,{title:a(r.widget.topProducts.title),dateRange:ke(t),onBack:D,filters:F,onFilterChange:V}),(0,U.jsx)(pl,{})]}):e.length===0?(0,U.jsxs)(Pe,{\"data-testid\":\"products-full-view\",children:[(0,U.jsx)(me,{title:a(r.widget.topProducts.title),dateRange:ke(t),onBack:D,filters:F,onFilterChange:V}),(0,U.jsx)(qt,{\"data-testid\":\"products-fullview-empty\",children:a(r.fullView.products.noProducts)})]}):(0,U.jsxs)(Pe,{\"data-testid\":\"products-full-view\",children:[(0,U.jsx)(me,{title:a(r.widget.topProducts.title),dateRange:ke(t),onBack:D,filters:F,onFilterChange:V}),y?(0,U.jsx)(md,{\"data-testid\":\"products-fullview-mobile-cards\",children:I.map(S=>(0,U.jsxs)(xd,{children:[(0,U.jsxs)(bd,{children:[(0,U.jsxs)(yd,{children:[\"#\",S.rank]}),(0,U.jsxs)(wd,{children:[(0,U.jsx)(Cd,{children:S.name}),(0,U.jsx)(vd,{children:S.sku})]})]}),(0,U.jsxs)(kd,{children:[(0,U.jsxs)(_r,{children:[(0,U.jsx)(Ur,{children:a(r.widget.topProducts.units)}),(0,U.jsx)(Kr,{children:S.units.toLocaleString()})]}),(0,U.jsxs)(_r,{children:[(0,U.jsx)(Ur,{children:a(r.widget.topProducts.revenue)}),(0,U.jsx)(Kr,{children:q(S.revenue,m)})]}),(0,U.jsxs)(_r,{children:[(0,U.jsx)(Ur,{children:a(r.filter.productSort.volume)}),(0,U.jsx)(Kr,{children:S.volume.toLocaleString()})]})]})]},S.rank))}):(0,U.jsx)(hd,{\"data-testid\":\"products-fullview-desktop-table\",children:(0,U.jsx)(lt,{columns:k,data:I,sortable:!0,onSort:Y,sortColumn:g,sortDirection:f,getRowKey:S=>S.rank})}),Q>1&&(0,U.jsx)(st,{currentPage:u,totalPages:Q,onPageChange:x,itemsPerPage:v,totalItems:H.length})]})};var qe=M(require(\"react\")),Ye=require(\"recharts\"),Ed=M(require(\"@mui/icons-material/ArrowUpward\")),Hd=M(require(\"@mui/icons-material/ArrowDownward\"));var be=require(\"@mui/material/styles\"),Me=require(\"@mui/material\"),Td=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Jc}=Td.ColorUtils,Dd=(0,be.styled)(Me.Box)`\n width: 100%;\n height: 370px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 260px;\n }\n`,Pd=(0,be.styled)(Me.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>Jc(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n }\n`,Rd=(0,be.styled)(Me.Box)`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`,Md=(0,be.styled)(Me.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n`,Od=(0,be.styled)(Me.Typography)`\n font-size: 1rem;\n font-weight: 600;\n`,Fd=(0,be.styled)(Me.Typography)`\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Ld=(0,be.styled)(\"a\")`\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.primary.main};\n text-decoration: none;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n`,$d=(0,be.styled)(Me.Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 16px;\n padding-top: 12px;\n border-top: 1px solid ${({theme:e})=>e.palette.divider};\n`,Gr=(0,be.styled)(Me.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n text-align: center;\n`,jr=(0,be.styled)(Me.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Yr=(0,be.styled)(Me.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`,Id=(0,be.styled)(Me.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,Nd=(0,be.styled)(Me.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,Vd=(0,be.styled)(Me.Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`,Ad=(0,be.styled)(Me.Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n min-width: 160px;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n min-width: auto;\n }\n`,zd=(0,be.styled)(Me.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\n }\n`,ym=(0,be.styled)(Me.Typography)`\n margin-top: 4px;\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n @media (max-width: 767px) {\n font-size: 0.75rem;\n }\n`,Bd=(0,be.styled)(\"span\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;var $=require(\"react/jsx-runtime\"),To=({conversionData:e,orders:t,summaryRate:o,summaryChangePct:n,dateRange:i,market:s,conversionFilter:d,markets:p,isLoading:w=!1,onBack:C,onDateRangeChange:u,onMarketChange:x,onConversionFilterChange:g})=>{let[b,f]=(0,qe.useState)(1),c=10,v=Rt(),y=qe.default.useCallback(()=>C?.(),[C]),D=ot(p),h=qe.default.useMemo(()=>typeof o==\"number\"&&Number.isFinite(o)?o:e.at(-1)?.rate??0,[o,e]),F=qe.default.useMemo(()=>{if(n!==void 0){if(n===null)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let de=\"neutral\";return n>0?de=\"up\":n<0&&(de=\"down\"),{direction:de,value:`${n>=0?\"+\":\"\"}${n.toFixed(1)}%`}}if(e.length<2)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let l=e.at(-1)?.rate??0,R=e[0].rate;if(R===0)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let J=(l-R)/R*100;if(Math.abs(J)<.1)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let ye=\"neutral\";return J>0?ye=\"up\":J<0&&(ye=\"down\"),{direction:ye,value:`${J>=0?\"+\":\"\"}${J.toFixed(1)}%`}},[n,e]),V=qe.default.useCallback(l=>l===\"standard\"?a(r.filter.conversionType.standard):l===\"subscription\"?a(r.filter.conversionType.subscription):a(r.filter.conversionType.all),[]),Y=qe.default.useMemo(()=>V(d),[d,V]),A=qe.default.useMemo(()=>[Tt(i,r),Dt(s,D,r),{key:\"customerType\",label:a(r.filter.signupView.label),value:d,options:[{value:\"all\",label:a(r.filter.conversionType.all)},{value:\"standard\",label:a(r.filter.conversionType.standard)},{value:\"subscription\",label:a(r.filter.conversionType.subscription)}]}],[d,i,s,D]),H=qe.default.useCallback((l,R)=>{l===\"dateRange\"?u?.(R):l===\"market\"?x?.(R):l===\"customerType\"&&(g?.(R),f(1))},[g,u,x]),Q=qe.default.useMemo(()=>d===\"all\"?t:t.filter(l=>l.customerType.toLowerCase()===d),[t,d]),{totalPages:I,pageItems:m}=kt(Q,b,c),k=qe.default.useMemo(()=>[{key:\"orderId\",label:a(r.fullView.conversionRate.columns.orderId),sortable:!0,render:l=>(0,$.jsx)(Bd,{children:l})},{key:\"date\",label:a(r.fullView.conversionRate.columns.date),sortable:!0},{key:\"customerName\",label:a(r.fullView.conversionRate.columns.customer),sortable:!0},{key:\"customerType\",label:a(r.fullView.conversionRate.columns.type),sortable:!0},{key:\"items\",label:a(r.fullView.conversionRate.columns.items),sortable:!0},{key:\"total\",label:a(r.fullView.conversionRate.columns.total),sortable:!0,render:(l,R)=>q(Number(l),R.currencyCode,void 0,2)},{key:\"bv\",label:a(r.fullView.conversionRate.columns.bv),sortable:!0}],[]),S=qe.default.useCallback(()=>d===\"standard\"?\"#2e7d32\":d===\"subscription\"?\"#ed6c02\":\"#1976d2\",[d]);return w?(0,$.jsxs)(Pe,{\"data-testid\":\"conversion-rate-full-view\",children:[(0,$.jsx)(me,{title:a(r.widget.conversionRate.title),dateRange:ke(i),onBack:y,filters:A,onFilterChange:H}),(0,$.jsx)(Kt,{})]}):(0,$.jsxs)(Pe,{\"data-testid\":\"conversion-rate-full-view\",children:[(0,$.jsx)(me,{title:a(r.widget.conversionRate.title),dateRange:ke(i),onBack:y,filters:A,onFilterChange:H}),(0,$.jsxs)(Ar,{\"data-testid\":\"conversion-fullview-metric-chart\",children:[(0,$.jsx)(zr,{children:(0,$.jsxs)(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"0px\",flexWrap:\"wrap\"},children:[(0,$.jsxs)(Br,{\"data-testid\":\"conversion-rate-value\",style:{marginRight:\"6px\"},children:[h.toFixed(1),\"%\"]}),(0,$.jsxs)(Er,{direction:F.direction,\"data-testid\":\"conversion-rate-trend\",children:[F.direction===\"up\"&&(0,$.jsx)(Ed.default,{}),F.direction===\"down\"&&(0,$.jsx)(Hd.default,{}),(0,$.jsx)(\"span\",{style:{fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",fontWeight:600,fontSize:\"14px\",lineHeight:\"20px\",letterSpacing:\"0em\"},children:F.value}),(0,$.jsx)(\"span\",{style:{marginLeft:\"2px\",fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",fontWeight:400,fontSize:\"12px\",lineHeight:\"16px\",letterSpacing:\"0.01em\",color:\"#5F5F5F\"},children:\"compared to this time last month\"})]})]})}),(0,$.jsx)(Hr,{children:(0,$.jsxs)(Vd,{children:[(0,$.jsx)(Dd,{\"data-testid\":\"conversion-fullview-chart\",children:(0,$.jsx)(Ye.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,$.jsxs)(Ye.LineChart,{data:e,margin:{top:10,right:10,left:0,bottom:0},children:[(0,$.jsx)(Ye.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,$.jsx)(Ye.XAxis,{dataKey:\"date\"}),(0,$.jsx)(Ye.YAxis,{tickFormatter:l=>`${l}%`,domain:[0,\"auto\"]}),(0,$.jsx)(Ye.Tooltip,{formatter:l=>typeof l==\"number\"?`${l.toFixed(2)}%`:typeof l==\"string\"?l:a(r.fullView.conversionRate.notAvailable)}),(0,$.jsx)(Ye.Line,{type:\"monotone\",dataKey:\"rate\",stroke:S(),strokeWidth:2,name:`${a(r.widget.conversionRate.title)} (${Y})`,dot:!1})]})})}),(0,$.jsx)(Ad,{children:(0,$.jsx)(zd,{style:{color:S()},children:`${a(r.widget.conversionRate.title)} (${Y})`})})]})})]}),(0,$.jsxs)(Zt,{\"data-testid\":\"conversion-fullview-table-section\",children:[(0,$.jsxs)(Jt,{\"data-testid\":\"conversion-fullview-table-title\",children:[a(r.fullView.conversionRate.orderDetailsTitle),\" (\",Q.length,\")\"]}),v?(0,$.jsx)(Id,{\"data-testid\":\"conversion-fullview-mobile-orders\",children:m.map(l=>(0,$.jsxs)(Pd,{children:[(0,$.jsxs)(Rd,{children:[(0,$.jsxs)(Md,{children:[(0,$.jsx)(Od,{children:l.customerName}),(0,$.jsx)(Fd,{children:l.date})]}),(0,$.jsx)(Ld,{children:l.orderId})]}),(0,$.jsxs)($d,{children:[(0,$.jsxs)(Gr,{children:[(0,$.jsx)(jr,{children:a(r.fullView.conversionRate.columns.items)}),(0,$.jsx)(Yr,{children:l.items})]}),(0,$.jsxs)(Gr,{children:[(0,$.jsx)(jr,{children:a(r.fullView.conversionRate.columns.total)}),(0,$.jsxs)(Yr,{children:[\"$\",l.total.toFixed(2)]})]}),(0,$.jsxs)(Gr,{children:[(0,$.jsx)(jr,{children:a(r.fullView.conversionRate.columns.totalSv)}),(0,$.jsx)(Yr,{children:l.bv})]})]})]},l.orderId))}):(0,$.jsx)(Nd,{\"data-testid\":\"conversion-fullview-desktop-table\",children:(0,$.jsx)(lt,{columns:k,data:m,getRowKey:l=>l.orderId})}),I>1&&(0,$.jsx)(st,{currentPage:b,totalPages:I,onPageChange:f,itemsPerPage:c,totalItems:Q.length})]})]})};var Ft=M(require(\"react\")),Zd=require(\"@mui/material\"),he=require(\"recharts\"),qd=M(require(\"@mui/icons-material/TrendingUp\")),Qd=M(require(\"@mui/icons-material/TrendingDown\"));var Mt=require(\"@mui/material/styles\"),Ot=require(\"@mui/material\"),Wd=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Zc}=Wd.ColorUtils,_d=(0,Mt.styled)(Ot.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,Ud=(0,Mt.styled)(Ot.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,Kd=(0,Mt.styled)(Ot.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 16px;\n background-color: ${({theme:e})=>Zc(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n }\n`,Gd=(0,Mt.styled)(Ot.Box)`\n width: 100%;\n height: 320px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 260px;\n }\n`,jd=(0,Mt.styled)(Ot.Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n`,Yd=(0,Mt.styled)(Ot.Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`,Go=(0,Mt.styled)(Ot.Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n min-width: 160px;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n min-width: auto;\n }\n`,Qt=(0,Mt.styled)(Ot.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\n }\n`,Jd=(0,Mt.styled)(\"span\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;var P=require(\"react/jsx-runtime\"),Je={total:\"#3B82F6\",members:\"#7B92A8\",retail:\"#A3B5C7\",brandAffiliates:\"#5F7388\"};function Xt(e){if(typeof e==\"number\")return Number.isFinite(e)?e:0;if(typeof e==\"string\"){let t=Number(e.replace(/,/g,\"\"));return Number.isFinite(t)?t:0}return 0}function qc(e){if(Array.isArray(e))return e;let t=e;return Array.isArray(t.daily)?t.daily.map(o=>({date:String(o.date??\"\"),total:Xt(o.total),members:Xt(o.members),retail:Xt(o.retail),brandAffiliates:Xt(o.brandAffiliates??o.brandAffiliate??o.brand_affiliates??o.brand_affiliate)})):[]}var Jr=({signupData:e,signups:t,dateRange:o,market:n,signupView:i,markets:s,isLoading:d=!1,onBack:p,onDateRangeChange:w,onMarketChange:C,onSignupViewChange:u})=>{let[x,g]=(0,Ft.useState)(1),b=10,f=Rt(),c=Ft.default.useCallback(()=>p?.(),[p]),v=ot(s),y=Ft.default.useMemo(()=>qc(e).map(m=>{let k=m,S=Xt(k.members),l=Xt(k.retail),R=Xt(k.brandAffiliates??k.brandAffiliate??k.brand_affiliates??k.brand_affiliate),J=Xt(k.total??k.all??k.signupTotal??k.value);return{...m,total:J>0?J:S+l+R,members:S,retail:l,brandAffiliates:R}}),[e]),D=Ft.default.useMemo(()=>y.length===0?0:y[y.length-1].total,[y]),h=Ft.default.useMemo(()=>{if(y.length<2)return{direction:\"neutral\",absoluteChange:0,percentageChange:a(r.defaults.zeroTrend)};let I=y[0].total,m=y[y.length-1].total;if(I<=0)return{direction:\"neutral\",absoluteChange:0,percentageChange:a(r.defaults.zeroTrend)};let k=m-I,S=k/I*100,l=\"neutral\";return S>0?l=\"up\":S<0&&(l=\"down\"),{direction:l,absoluteChange:Math.round(k),percentageChange:`${S>=0?\"+\":\"\"}${S.toFixed(1)}%`}},[y,r]),F=y.length>0,V=Ft.default.useMemo(()=>[Tt(o,r),Dt(n,v,r),{key:\"signupView\",label:a(r.filter.signupView.label),value:i,options:[{value:\"all\",label:a(r.filter.signupView.all)},{value:\"members\",label:a(r.filter.signupView.members)},{value:\"retail\",label:a(r.filter.signupView.retail)},{value:\"brandAffiliates\",label:a(r.filter.signupView.brandAffiliates)}]}],[o,n,v,i]),Y=Ft.default.useCallback((I,m)=>{I===\"dateRange\"?w?.(m):I===\"market\"?C?.(m):I===\"signupView\"&&(u?.(m),g(1))},[w,C,u]),{totalPages:A,pageItems:H}=kt(t,x,b),Q=Ft.default.useMemo(()=>[{key:\"id\",label:a(r.fullView.signups.columns.id),sortable:!0},{key:\"name\",label:a(r.fullView.signups.columns.name),sortable:!0,render:I=>(0,P.jsx)(Jd,{children:I})},{key:\"date\",label:a(r.fullView.signups.columns.date),sortable:!0},{key:\"type\",label:a(r.fullView.signups.columns.type),sortable:!0},{key:\"email\",label:a(r.fullView.signups.columns.email),sortable:!0},{key:\"status\",label:a(r.fullView.signups.columns.status),sortable:!0}],[]);return d?(0,P.jsxs)(Pe,{\"data-testid\":\"signups-full-view\",children:[(0,P.jsx)(me,{title:a(r.widget.signups.title),dateRange:ke(o),onBack:c,filters:V,onFilterChange:Y}),(0,P.jsx)(Kt,{})]}):(0,P.jsxs)(Pe,{\"data-testid\":\"signups-full-view\",children:[(0,P.jsx)(me,{title:a(r.widget.signups.title),dateRange:ke(o),onBack:c,filters:V,onFilterChange:Y}),(0,P.jsxs)(Ar,{\"data-testid\":\"signups-fullview-metric-chart\",children:[(0,P.jsxs)(zr,{children:[(0,P.jsx)(Br,{\"data-testid\":\"signups-total\",children:D.toLocaleString()}),(0,P.jsxs)(Er,{direction:h.direction,children:[h.direction===\"up\"&&(0,P.jsx)(qd.default,{}),h.direction===\"down\"&&(0,P.jsx)(Qd.default,{}),h.direction!==\"neutral\"&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(\"span\",{style:{fontWeight:600,lineHeight:1},children:[h.absoluteChange>0?\"+\":\"\",h.absoluteChange]}),(0,P.jsx)(\"span\",{style:{fontWeight:400,lineHeight:1},children:h.percentageChange})]}),h.direction===\"neutral\"&&(0,P.jsx)(\"span\",{children:h.percentageChange})]}),(0,P.jsx)(jd,{children:a(r.widget.conversionRate.comparison)})]}),(0,P.jsx)(Hr,{children:F?(0,P.jsxs)(Yd,{children:[(0,P.jsx)(Gd,{\"data-testid\":\"signups-fullview-chart\",children:(0,P.jsx)(he.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:240,children:(0,P.jsxs)(he.LineChart,{data:y,children:[(0,P.jsx)(he.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,P.jsx)(he.XAxis,{dataKey:\"date\"}),(0,P.jsx)(he.YAxis,{}),(0,P.jsx)(he.Tooltip,{}),i===\"all\"&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"total\",stroke:Je.total,strokeWidth:2,name:a(r.widget.signups.total),dot:{r:2},connectNulls:!0}),(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"members\",stroke:Je.members,strokeWidth:2,name:a(r.widget.signups.members),dot:{r:2},connectNulls:!0}),(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"retail\",stroke:Je.retail,strokeWidth:2,name:a(r.widget.signups.retail),dot:{r:2},connectNulls:!0}),(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:Je.brandAffiliates,strokeWidth:2,name:a(r.widget.signups.brandAffiliates),dot:{r:2},connectNulls:!0})]}),i===\"members\"&&(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"members\",stroke:Je.members,strokeWidth:2,name:a(r.widget.signups.members),dot:{r:2},connectNulls:!0}),i===\"retail\"&&(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"retail\",stroke:Je.retail,strokeWidth:2,name:a(r.widget.signups.retail),dot:{r:2},connectNulls:!0}),i===\"brandAffiliates\"&&(0,P.jsx)(he.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:Je.brandAffiliates,strokeWidth:2,name:a(r.widget.signups.brandAffiliates),dot:{r:2},connectNulls:!0})]})})}),(0,P.jsxs)(Zd.Box,{children:[i===\"all\"&&(0,P.jsxs)(Go,{children:[(0,P.jsx)(Qt,{style:{color:Je.total},children:a(r.widget.signups.total)}),(0,P.jsx)(Qt,{style:{color:Je.members},children:a(r.widget.signups.members)}),(0,P.jsx)(Qt,{style:{color:Je.retail},children:a(r.widget.signups.retail)}),(0,P.jsx)(Qt,{style:{color:Je.brandAffiliates},children:a(r.widget.signups.brandAffiliates)})]}),i===\"members\"&&(0,P.jsx)(Go,{children:(0,P.jsx)(Qt,{style:{color:Je.members},children:a(r.widget.signups.members)})}),i===\"retail\"&&(0,P.jsx)(Go,{children:(0,P.jsx)(Qt,{style:{color:Je.retail},children:a(r.widget.signups.retail)})}),i===\"brandAffiliates\"&&(0,P.jsx)(Go,{children:(0,P.jsx)(Qt,{style:{color:Je.brandAffiliates},children:a(r.widget.signups.brandAffiliates)})})]})]}):(0,P.jsx)(qt,{\"data-testid\":\"signups-fullview-chart-empty\",children:a(r.widget.signups.noTrendData)})})]}),(0,P.jsxs)(Zt,{\"data-testid\":\"signups-fullview-table-section\",children:[(0,P.jsx)(Jt,{\"data-testid\":\"signups-fullview-table-title\",children:`${a(r.fullView.signups.detailsTitle)} (${t.length})`}),f?(0,P.jsx)(_d,{\"data-testid\":\"signups-fullview-mobile-cards\",children:H.map(I=>(0,P.jsxs)(Kd,{children:[(0,P.jsx)(ld,{children:I.name}),(0,P.jsxs)(sd,{children:[I.date,\" - \",I.type]}),(0,P.jsx)(dd,{children:I.email}),(0,P.jsx)(pd,{status:I.status,children:I.status})]},I.id))}):(0,P.jsx)(Ud,{\"data-testid\":\"signups-fullview-desktop-table\",children:(0,P.jsx)(lt,{columns:Q,data:H,getRowKey:I=>I.id})}),A>1&&(0,P.jsx)(st,{currentPage:x,totalPages:A,onPageChange:g,itemsPerPage:b,totalItems:t.length})]})]})};var Lt=M(require(\"react\")),$t=require(\"recharts\"),yp=M(require(\"@mui/icons-material/TrendingUp\")),wp=M(require(\"@mui/icons-material/TrendingDown\"));var _t=require(\"@nuskin/foundation-theme\"),Oe=require(\"@mui/material/styles\"),Fe=require(\"@mui/material\"),{getGenomeColor:Ja}=_t.ColorUtils,Zr=(0,_t.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Xd=(0,_t.styled)(\"div\")`\n flex: 1;\n`,ep=(0,_t.styled)(\"span\")`\n font-weight: 600;\n`,tp=(0,_t.styled)(\"span\")`\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,op=(0,_t.styled)(\"span\")`\n font-weight: 600;\n`,rp=(0,Oe.styled)(Fe.Box)`\n display: flex;\n gap: 32px;\n padding: 24px;\n background-color: ${({theme:e})=>Ja(e,\"N20\")};\n border-radius: 8px;\n box-shadow: ${({theme:e})=>e.shadows[1]};\n align-items: center;\n justify-content: center;\n width: 100%;\n box-sizing: border-box;\n margin: 0 auto;\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n align-items: flex-start;\n justify-content: flex-start;\n }\n`,ap=(0,Oe.styled)(Fe.Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`,np=(0,Oe.styled)(Fe.Box)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 120px;\n`,ip=(0,Oe.styled)(Fe.Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,lp=(0,Oe.styled)(Fe.Typography)`\n margin-top: 2px;\n font-size: 1.25rem;\n line-height: 1.2;\n font-weight: 700;\n color: ${({theme:e})=>e.palette.text.primary};\n`,sp=(0,Oe.styled)(Fe.Typography)`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n margin-top: 2px;\n font-size: 0.875rem;\n line-height: 1.2;\n font-weight: 600;\n color: ${({direction:e,theme:t})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":t.palette.text.secondary};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,dp=(0,Oe.styled)(Fe.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n flex: 0;\n`,pp=(0,Oe.styled)(Fe.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n white-space: nowrap;\n min-width: 0;\n\n &:hover {\n background-color: ${({theme:e})=>Ja(e,\"N30\")};\n }\n`,qr=(0,Oe.styled)(Fe.Box)`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({dotColor:e})=>e};\n flex-shrink: 0;\n`,Gm=(0,Oe.styled)(Fe.Box)`\n display: none;\n`,cp=(0,Oe.styled)(Fe.Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.primary};\n flex-shrink: 0;\n min-width: 0;\n text-overflow: ellipsis;\n overflow: hidden;\n`,up=(0,Oe.styled)(Fe.Typography)`\n font-size: 0.75rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n flex-shrink: 0;\n white-space: nowrap;\n`,gp=(0,Oe.styled)(Fe.Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n flex-shrink: 0;\n color: ${({theme:e})=>e.palette.text.primary};\n`,fp=(0,Oe.styled)(Fe.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,mp=(0,Oe.styled)(Fe.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,hp=(0,Oe.styled)(Fe.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>Ja(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`,xp=(0,Oe.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({direction:e})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":\"#757575\"};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`,bp=(0,_t.styled)(\"span\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;var N=require(\"react/jsx-runtime\"),Qr=({categories:e,dateRange:t,market:o,categorySort:n,markets:i,isLoading:s=!1,onBack:d,onDateRangeChange:p,onMarketChange:w,onCategorySortChange:C})=>{let[u,x]=(0,Lt.useState)(1),g=10,b=Rt(),f=Lt.default.useCallback(()=>d?.(),[d]),c=ot(i),v=Lt.default.useMemo(()=>[Tt(t,r),Dt(o,c,r),{key:\"sort\",label:a(r.filter.productSort.label),value:n,options:[{value:\"revenue\",label:a(r.filter.categorySort.byRevenue)},{value:\"trend\",label:a(r.filter.categorySort.byTrend)}]}],[n,t,o,c]),y=Lt.default.useCallback((l,R)=>{l===\"dateRange\"?p?.(R):l===\"market\"?w?.(R):l===\"sort\"&&(C?.(R),x(1))},[C,p,w]),D=l=>{let{cx:R,cy:J,midAngle:ye,innerRadius:de,outerRadius:_e,percentage:At}=l,Qe=Math.PI/180,ie=de+(_e-de)*.45,pt=R+ie*Math.cos(-ye*Qe),Xe=J+ie*Math.sin(-ye*Qe);return(0,N.jsx)(\"text\",{x:pt,y:Xe,fill:\"white\",textAnchor:\"middle\",dominantBaseline:\"middle\",fontSize:\"12\",fontWeight:\"700\",fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",letterSpacing:\"0\",style:{lineHeight:\"14px\",pointerEvents:\"none\"},children:`${At}%`})},h=l=>l===\"up\"?(0,N.jsx)(yp.default,{sx:{fontSize:\"16px\"},\"aria-hidden\":\"true\"}):l===\"down\"?(0,N.jsx)(wp.default,{sx:{fontSize:\"16px\"},\"aria-hidden\":\"true\"}):null,F=l=>{if(!l)return\"neutral\";let R=Number.parseFloat(l);return Number.isNaN(R)?\"neutral\":R>0?\"up\":R<0?\"down\":\"neutral\"},V=Lt.default.useMemo(()=>[...e].sort((l,R)=>n===\"revenue\"?R.revenue-l.revenue:(vt(R.trend?.revenue)??-1/0)-(vt(l.trend?.revenue)??-1/0)),[e,n]),{totalRevenue:Y,totalRevenueTrendDirection:A,totalRevenueTrend:H}=Lt.default.useMemo(()=>{let l=V.reduce((ye,de)=>ye+de.revenue,0),{direction:R,formatted:J}=jt(V,ye=>ye.revenue,ye=>ye.trend?.revenue);return{totalRevenue:l,totalRevenueTrendDirection:R,totalRevenueTrend:J}},[V]),Q=Lt.default.useMemo(()=>V.slice(0,5),[V]),{totalPages:I,pageItems:m}=kt(V,u,g),k=Lt.default.useMemo(()=>[{key:\"name\",label:a(r.fullView.categories.columns.category),sortable:!0,render:(l,R)=>(0,N.jsxs)(Zr,{children:[(0,N.jsx)(qr,{dotColor:R.color}),(0,N.jsx)(bp,{children:R.name.charAt(0).toUpperCase()+R.name.slice(1)})]})},{key:\"revenue\",label:a(r.fullView.categories.columns.revenue),sortable:!0,render:(l,R)=>q(Number(l),R.currencyCode)},{key:\"percentage\",label:a(r.fullView.categories.columns.percentOfTotal),sortable:!0,render:l=>`${Number(l)}%`},{key:\"trend\",label:a(r.fullView.categories.columns.trend),render:(l,R)=>R.trend?.revenue??a(r.defaults.noValue)}],[]),S=V[0]?.currencyCode;return s?(0,N.jsxs)(Pe,{\"data-testid\":\"categories-full-view\",children:[(0,N.jsx)(me,{title:a(r.widget.topCategories.title),dateRange:ke(t),onBack:f,filters:v,onFilterChange:y}),(0,N.jsx)(Kt,{})]}):e.length===0?(0,N.jsxs)(Pe,{\"data-testid\":\"categories-full-view\",children:[(0,N.jsx)(me,{title:a(r.widget.topCategories.title),dateRange:ke(t),onBack:f,filters:v,onFilterChange:y}),(0,N.jsx)(qt,{\"data-testid\":\"categories-fullview-empty\",children:a(r.fullView.categories.noCategoryData)})]}):(0,N.jsxs)(Pe,{\"data-testid\":\"categories-full-view\",children:[(0,N.jsx)(me,{title:a(r.widget.topCategories.title),dateRange:ke(t),onBack:f,filters:v,onFilterChange:y}),(0,N.jsxs)(rp,{\"data-testid\":\"categories-fullview-top-section\",children:[(0,N.jsxs)(ap,{\"data-testid\":\"categories-fullview-chart\",children:[(0,N.jsx)($t.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,N.jsxs)($t.PieChart,{children:[(0,N.jsx)($t.Pie,{data:V,cx:\"50%\",cy:\"50%\",innerRadius:\"50%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,label:D,labelLine:!1,children:V.map(l=>(0,N.jsx)($t.Cell,{fill:l.color},`cell-${l.id}`))}),(0,N.jsx)($t.Tooltip,{formatter:l=>q(l,S)})]})}),(0,N.jsxs)(np,{\"data-testid\":\"categories-fullview-donut-center\",children:[(0,N.jsx)(ip,{children:a(r.stats.revenue)}),(0,N.jsx)(lp,{children:q(Y,S)}),(0,N.jsxs)(sp,{direction:A,children:[h(A),(0,N.jsx)(\"span\",{children:H})]})]})]}),(0,N.jsx)(dp,{\"data-testid\":\"categories-fullview-summary\",children:Q.map(l=>(0,N.jsxs)(pp,{children:[(0,N.jsx)(qr,{dotColor:l.color}),(0,N.jsx)(cp,{children:l.name}),(0,N.jsx)(up,{children:q(l.revenue,l.currencyCode)}),(0,N.jsxs)(gp,{children:[\"(\",l.percentage,\"%)\"]}),l.trend?.revenue?(0,N.jsx)(xp,{direction:F(l.trend.revenue),children:h(F(l.trend.revenue))}):null]},l.id))})]}),(0,N.jsxs)(Zt,{\"data-testid\":\"categories-fullview-table-section\",children:[(0,N.jsxs)(Jt,{\"data-testid\":\"categories-fullview-table-title\",children:[a(r.fullView.categories.allCategoriesTitle),\" (\",V.length,\")\"]}),b?(0,N.jsx)(mp,{children:m.map(l=>(0,N.jsxs)(hp,{children:[(0,N.jsx)(qr,{dotColor:l.color}),(0,N.jsxs)(Xd,{children:[(0,N.jsx)(ep,{children:l.name}),(0,N.jsx)(tp,{children:q(l.revenue,l.currencyCode)})]}),(0,N.jsxs)(op,{children:[l.percentage,\"%\"]})]},l.id))}):(0,N.jsx)(fp,{children:(0,N.jsx)(lt,{columns:k,data:m,sortable:!0,getRowKey:l=>l.id})}),I>1&&(0,N.jsx)(st,{currentPage:u,totalPages:I,onPageChange:x,itemsPerPage:g,totalItems:V.length})]})]})};var Za=M(require(\"react\"));function io(e){mo(e),Za.default.useEffect(()=>(mo(e),()=>{mo(void 0)}),[e])}var Cp=({translate:e,children:t})=>(io(e),t??null);function vp(){return Za.default.useCallback(e=>Ut(e),[])}var Do=require(\"react/jsx-runtime\"),Qc=\"shoppingDashboardView\",Xc=[],eu=[],tu=[],ou=[],ru=[],au=[];function Sp(e){return typeof e==\"object\"&&e!==null}function nu(e){return e===\"dashboard\"||e===\"products\"||e===\"conversion-rate\"||e===\"signups\"||e===\"categories\"}function Xr(e,t){if(!Sp(e))return\"dashboard\";let o=e[t];return nu(o)?o:\"dashboard\"}function kp(e,t,o){return{...Sp(e)?e:{},[t]:o}}function iu(e,t){return{pathname:e?.pathname,search:e?.search,hash:e?.hash,state:t}}var Tp=({stats:e,topProducts:t,conversionData:o,signupData:n,categories:i,orders:s,signups:d,isLoading:p=!1,error:w,shopTitle:C,className:u,translate:x,initialDateRange:g=\"last30days\",initialMarket:b=\"all\",initialProductSort:f=\"units\",initialSignupView:c=\"all\",initialConversionFilter:v=\"all\",initialCategorySort:y=\"revenue\",markets:D,historyAdapter:h,historyStateKey:F=Qc,resetToDashboardOnMount:V=!0,onDateRangeChange:Y,onMarketChange:A,onProductSortChange:H,onSignupViewChange:Q,onConversionFilterChange:I,onCategorySortChange:m,onViewChange:k})=>{io(x);let[S,l]=ne.default.useState(\"dashboard\"),R=ne.default.useRef(!1),[J,ye]=ne.default.useState(g),[de,_e]=ne.default.useState(b),[At,Qe]=ne.default.useState(f),[ie,pt]=ne.default.useState(c),[Xe,po]=ne.default.useState(v),[co,Jo]=ne.default.useState(y),Zo=t??Xc,Fo=o??eu,Lo=n??tu,$o=i??ou,da=s??ru,pa=d??au,ct=ne.default.useCallback(_=>{l(_),k?.(_)},[k]),et=ne.default.useCallback(()=>h?Xr(h.location?.state,F):typeof window>\"u\"?\"dashboard\":Xr(window.history.state,F),[h,F]),zt=ne.default.useCallback((_,Ue)=>{if(h){let to=kp(h.location?.state,F,_),an=iu(h.location,to);if(Ue===\"replace\"){h.replace(an);return}h.push(an);return}if(typeof window>\"u\")return;let tt=kp(window.history.state,F,_);if(Ue===\"replace\"){window.history.replaceState(tt,\"\");return}window.history.pushState(tt,\"\")},[h,F]);ne.default.useEffect(()=>{if(V?(zt(\"dashboard\",\"replace\"),R.current=!1,ct(\"dashboard\")):ct(et()),h)return h.listen((Ue,tt)=>{if(tt===\"POP\"){let to=Xr(Ue.state,F);R.current=to!==\"dashboard\",ct(to)}});let _=Ue=>{let tt=Xr(Ue.state,F);R.current=tt!==\"dashboard\",ct(tt)};return window.addEventListener(\"popstate\",_),()=>{window.removeEventListener(\"popstate\",_)}},[h,F,et,V,ct,zt]);let ze=ne.default.useCallback(_=>{R.current=!0,zt(_,\"push\"),ct(_)},[ct,zt]),ut=ne.default.useCallback(()=>{if(S!==\"dashboard\"&&R.current){if(h){h.goBack();return}typeof window<\"u\"&&window.history.back();return}R.current=!1,zt(\"dashboard\",\"replace\"),ct(\"dashboard\")},[S,h,ct,zt]),Bt=ne.default.useCallback(_=>{ye(_),Y?.(_)},[Y]),xt=ne.default.useCallback(_=>{_e(_),A?.(_)},[A]),eo=ne.default.useCallback(_=>{Qe(_),H?.(_)},[H]),Io=ne.default.useCallback(_=>{pt(_),Q?.(_)},[Q]),No=ne.default.useCallback(_=>{po(_),I?.(_)},[I]),Vo=ne.default.useCallback(_=>{Jo(_),m?.(_)},[m]),ca=ne.default.useCallback(()=>{ze(\"products\")},[ze]),ua=ne.default.useCallback(()=>{ze(\"conversion-rate\")},[ze]),ga=ne.default.useCallback(()=>{ze(\"signups\")},[ze]),X=ne.default.useCallback(()=>{ze(\"categories\")},[ze]);return S===\"products\"?(0,Do.jsx)(So,{products:Zo,dateRange:J,market:de,productSort:At,markets:D,isLoading:p,onBack:ut,onDateRangeChange:Bt,onMarketChange:xt,onProductSortChange:eo}):S===\"conversion-rate\"?(0,Do.jsx)(To,{conversionData:Fo,orders:da,dateRange:J,market:de,conversionFilter:Xe,markets:D,isLoading:p,onBack:ut,onDateRangeChange:Bt,onMarketChange:xt,onConversionFilterChange:No}):S===\"signups\"?(0,Do.jsx)(Jr,{signupData:Lo,signups:pa,dateRange:J,market:de,signupView:ie,markets:D,isLoading:p,onBack:ut,onDateRangeChange:Bt,onMarketChange:xt,onSignupViewChange:Io}):S===\"categories\"?(0,Do.jsx)(Qr,{categories:$o,dateRange:J,market:de,categorySort:co,markets:D,isLoading:p,onBack:ut,onDateRangeChange:Bt,onMarketChange:xt,onCategorySortChange:Vo}):(0,Do.jsx)(Ir,{stats:e,topProducts:Zo,conversionData:Fo,signupData:Lo,categories:$o,isLoading:p,error:w,shopTitle:C,className:u,dateRange:J,market:de,productSort:At,signupView:ie,conversionFilter:Xe,categorySort:co,markets:D,onDateRangeChange:Bt,onMarketChange:xt,onProductSortChange:eo,onSignupViewChange:Io,onConversionFilterChange:No,onCategorySortChange:Vo,onProductsTitleClick:ca,onConversionTitleClick:ua,onSignupsTitleClick:ga,onCategoriesToTitleClick:X})};var Po=require(\"@nuskin/foundation-theme\"),qa=(0,Po.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n gap: 24px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`,Dp=(0,Po.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n }\n`,Pp=(0,Po.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n gap: 24px;\n justify-content: flex-start;\n }\n`,Rp=(0,Po.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n }\n`,Mp=(0,Po.styled)(\"div\")`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;var ea=M(require(\"react\")),It=require(\"recharts\");var z={title:{key:\"productOfferDashboard.title\",fallback:\"Performance Overview\"},error:{key:\"productOfferDashboard.error\",fallback:\"Failed to load dashboard data. Please try again.\"},stats:{revenue:{key:\"productOfferDashboard.stats.revenue\",fallback:\"Total Revenue\"},offersPurchased:{key:\"productOfferDashboard.stats.offersPurchased\",fallback:\"Offers Purchased\"},conversionRate:{key:\"productOfferDashboard.stats.conversionRate\",fallback:\"Conversion Rate\"},trendUp:{key:\"productOfferDashboard.stats.trendUp\",fallback:\"Trending up\"},trendDown:{key:\"productOfferDashboard.stats.trendDown\",fallback:\"Trending down\"},trendNeutral:{key:\"productOfferDashboard.stats.trendNeutral\",fallback:\"No change\"},comparedTo:{key:\"productOfferDashboard.stats.comparedTo\",fallback:\"compared to this time last month\"}},filter:{dateRange:{label:{key:\"productOfferDashboard.filter.dateRange.label\",fallback:\"Date Range\"},last7days:{key:\"productOfferDashboard.filter.dateRange.last7days\",fallback:\"Last 7 Days\"},last30days:{key:\"productOfferDashboard.filter.dateRange.last30days\",fallback:\"Last 30 Days\"},last90days:{key:\"productOfferDashboard.filter.dateRange.last90days\",fallback:\"Last 90 Days\"},thisMonth:{key:\"productOfferDashboard.filter.dateRange.thisMonth\",fallback:\"This Month\"}},market:{label:{key:\"productOfferDashboard.filter.market.label\",fallback:\"Market\"},all:{key:\"productOfferDashboard.filter.market.all\",fallback:\"All Markets\"}},offerSort:{byRevenue:{key:\"productOfferDashboard.filter.offerSort.byRevenue\",fallback:\"Revenue\"},byUnits:{key:\"productOfferDashboard.filter.offerSort.byUnits\",fallback:\"Units\"}},productSort:{byUnits:{key:\"productOfferDashboard.filter.productSort.byUnits\",fallback:\"Units\"},byRevenue:{key:\"productOfferDashboard.filter.productSort.byRevenue\",fallback:\"Revenue\"},byVolume:{key:\"productOfferDashboard.filter.productSort.byVolume\",fallback:\"Volume\"}},conversionFilter:{overall:{key:\"productOfferDashboard.filter.conversionFilter.overall\",fallback:\"Overall\"}}},widget:{topProducts:{title:{key:\"productOfferDashboard.widget.topProducts.title\",fallback:\"Top Selling Products\"},emptyState:{key:\"productOfferDashboard.widget.topProducts.emptyState\",fallback:\"No products data available\"}},conversionRate:{title:{key:\"productOfferDashboard.widget.conversionRate.title\",fallback:\"Conversion Rate\"},subtitle:{key:\"productOfferDashboard.widget.conversionRate.subtitle\",fallback:\"Orders \\xF7 Site visits\"}},topPerformingOffers:{title:{key:\"productOfferDashboard.widget.topPerformingOffers.title\",fallback:\"Top Performing Offers\"},totalRevenue:{key:\"productOfferDashboard.widget.topPerformingOffers.totalRevenue\",fallback:\"Total revenue\"},emptyState:{key:\"productOfferDashboard.widget.topPerformingOffers.emptyState\",fallback:\"No offers data available\"}},menu:{fullView:{key:\"productOfferDashboard.widget.menu.fullView\",fallback:\"Full View\"}}},navigation:{back:{key:\"productOfferDashboard.navigation.back\",fallback:\"Back to Dashboard\"}},ariaLabel:{dashboard:{key:\"productOfferDashboard.ariaLabel.dashboard\",fallback:\"Product Offer Performance Dashboard\"},statsCard:{key:\"productOfferDashboard.ariaLabel.statsCard\",fallback:\"Performance metric\"},conversionChart:{key:\"productOfferDashboard.ariaLabel.conversionChart\",fallback:\"Conversion rate chart\"},topProducts:{key:\"productOfferDashboard.ariaLabel.topProducts\",fallback:\"Top selling products\"},topOffers:{key:\"productOfferDashboard.ariaLabel.topOffers\",fallback:\"Top performing offers chart\"},widgetMenu:{key:\"productOfferDashboard.ariaLabel.widgetMenu\",fallback:\"Widget options menu\"},filterDateRange:{key:\"productOfferDashboard.ariaLabel.filterDateRange\",fallback:\"Filter by date range\"},filterMarket:{key:\"productOfferDashboard.ariaLabel.filterMarket\",fallback:\"Filter by market\"},backButton:{key:\"productOfferDashboard.ariaLabel.backButton\",fallback:\"Back to dashboard overview\"}},fullView:{topOffers:{title:{key:\"productOfferDashboard.fullView.topOffers.title\",fallback:\"Top Performing Offers\"},columnName:{key:\"productOfferDashboard.fullView.topOffers.columnName\",fallback:\"Offer Name\"},columnRevenue:{key:\"productOfferDashboard.fullView.topOffers.columnRevenue\",fallback:\"Revenue\"},columnPercentage:{key:\"productOfferDashboard.fullView.topOffers.columnPercentage\",fallback:\"Share\"},columnTrend:{key:\"productOfferDashboard.fullView.topOffers.columnTrend\",fallback:\"Trend\"}}},defaults:{trendZero:{key:\"productOfferDashboard.defaults.trendZero\",fallback:\"+0%\"},noData:{key:\"productOfferDashboard.defaults.noData\",fallback:\"--\"}}};function W(e){return Ut(e)}var K=require(\"react/jsx-runtime\"),lu=({offers:e,offerSort:t,isLoading:o=!1,title:n,onSortChange:i,onTitleClick:s})=>{let d=ea.default.useCallback(g=>{let b=g.target.value;i?.(b)},[i]),{sortedOffers:p,totalRevenue:w,trendDirection:C,formattedTrend:u}=ea.default.useMemo(()=>{let g=[...e].sort((v,y)=>t===\"revenue\"?y.revenue-v.revenue:y.percentage-v.percentage),b=g.reduce((v,y)=>v+y.revenue,0),{direction:f,formatted:c}=jt(g,v=>v.revenue,v=>v.trend?.revenue);return{sortedOffers:g,totalRevenue:b,trendDirection:f,formattedTrend:c}},[e,t]),x=p[0]?.currencyCode;return o&&e.length===0?(0,K.jsx)(Yt,{\"data-testid\":\"widget-top-offers\",children:(0,K.jsx)(pr,{})}):e.length===0?(0,K.jsxs)(Yt,{\"data-testid\":\"widget-top-offers\",children:[(0,K.jsx)(vo,{children:(0,K.jsx)(ko,{children:n??W(z.widget.topPerformingOffers.title)})}),(0,K.jsx)(Fr,{\"data-testid\":\"top-offers-empty-state\",children:(0,K.jsx)(Lr,{children:W(z.widget.topPerformingOffers.emptyState)})})]}):(0,K.jsxs)(Yt,{as:\"section\",\"data-testid\":\"widget-top-offers\",\"aria-label\":W(z.ariaLabel.topOffers),children:[(0,K.jsxs)(vo,{children:[(0,K.jsx)(ko,{as:\"button\",onClick:s,\"aria-label\":W(z.ariaLabel.topOffers),\"data-testid\":\"widget-title-top-offers\",children:n??W(z.widget.topPerformingOffers.title)}),(0,K.jsxs)(xr,{children:[(0,K.jsxs)(br,{id:\"offer-sort\",\"data-testid\":\"offer-sort-dropdown\",value:t,onChange:d,disabled:o,\"aria-label\":W(z.ariaLabel.topOffers),children:[(0,K.jsx)(\"option\",{value:\"revenue\",children:W(z.filter.offerSort.byRevenue)}),(0,K.jsx)(\"option\",{value:\"units\",children:W(z.filter.offerSort.byUnits)})]}),(0,K.jsx)(nt,{widgetId:\"top-offers\",onFullView:s})]})]}),(0,K.jsxs)(yr,{children:[(0,K.jsxs)(wr,{\"data-testid\":\"top-offers-chart\",children:[(0,K.jsx)(It.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,K.jsxs)(It.PieChart,{children:[(0,K.jsx)(It.Pie,{data:p,cx:\"50%\",cy:\"50%\",innerRadius:\"55%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,children:p.map(g=>(0,K.jsx)(It.Cell,{fill:g.color},`cell-${g.id}`))}),(0,K.jsx)(It.Tooltip,{formatter:g=>q(g,x)})]})}),(0,K.jsxs)(Cr,{\"data-testid\":\"top-offers-donut-center\",children:[(0,K.jsx)(vr,{children:W(z.widget.topPerformingOffers.totalRevenue)}),(0,K.jsx)(kr,{children:q(w,x)}),(0,K.jsx)(Sr,{direction:C,children:u})]})]}),(0,K.jsx)(Tr,{\"data-testid\":\"top-offers-legend-container\",children:p.map((g,b)=>{let f=Gt(g.trend?.revenue);return(0,K.jsxs)(Dr,{\"data-testid\":`offer-legend-${b}`,children:[(0,K.jsx)(Pr,{color:g.color}),(0,K.jsxs)(Rr,{children:[(0,K.jsx)(Mr,{children:g.name}),(0,K.jsx)(Or,{children:q(g.revenue,g.currencyCode)})]}),(0,K.jsxs)(Ss,{children:[g.percentage,\"%\"]}),g.trend?.revenue?(0,K.jsx)(Ps,{direction:f,\"data-testid\":`offer-legend-trend-${b}`,\"aria-label\":g.trend.revenue,children:rt(f)}):null]},g.id)})})]})]})},jo=ea.default.memo(lu);jo.displayName=\"TopPerformingOffersPieChart\";var We=require(\"react/jsx-runtime\"),su=[],du=[],pu=[],ta=({stats:e,topProducts:t,conversionData:o,topOffers:n,isLoading:i=!1,error:s,dashboardTitle:d,className:p,dateRange:w=\"last30days\",market:C=\"all\",productSort:u=\"units\",conversionFilter:x=\"all\",offerSort:g=\"revenue\",conversionSummaryRate:b,conversionSummaryChangePct:f,markets:c,onDateRangeChange:v,onMarketChange:y,onProductSortChange:D,onConversionFilterChange:h,onOfferSortChange:F,onProductsTitleClick:V,onConversionTitleClick:Y,onOffersTitleClick:A})=>{let H=t??su,Q=o??du,I=n??pu,m=k=>k?k.startsWith(\"+\")&&k!==\"+0%\"?\"up\":k.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\";return s?(0,We.jsx)(qa,{as:\"main\",className:p,\"aria-label\":W(z.ariaLabel.dashboard),children:(0,We.jsxs)(Mp,{\"data-testid\":\"dashboard-error\",role:\"alert\",\"aria-live\":\"assertive\",children:[(0,We.jsxs)(\"strong\",{children:[W(z.error),\":\"]}),\" \",s]})}):(0,We.jsxs)(qa,{as:\"main\",className:p,\"data-testid\":\"product-offer-dashboard\",\"aria-label\":W(z.ariaLabel.dashboard),\"aria-busy\":i,children:[(0,We.jsx)(ho,{shopTitle:d??W(z.title),dateRange:w,market:C,isLoading:i,markets:c,stats:e?{shopTitle:e.shopTitle??\"\",dateRange:e.dateRange,selectedMarket:e.selectedMarket,metrics:{revenue:e.metrics.revenue,volume:\"\",siteVisits:\"\",conversionRate:e.metrics.conversionRate},trend:{}}:void 0,onDateRangeChange:v,onMarketChange:y}),(0,We.jsxs)(Dp,{\"data-testid\":\"top-charts-row\",children:[(0,We.jsx)(ao,{conversionData:Q,conversionFilter:x,isLoading:i,summaryRate:b,summaryChangePct:f,onFilterChange:h,onTitleClick:Y}),(0,We.jsxs)(Pp,{\"data-testid\":\"stats-card-stack\",children:[(0,We.jsx)(Ct,{layout:\"split\",title:W(z.stats.revenue),value:e?.metrics?.revenue??\"$0\",trendDirection:m(e?.trend?.revenue),trendValue:e?.trend?.revenue,caption:W(z.stats.comparedTo),testId:\"stats-card-revenue\",isLoading:i}),(0,We.jsx)(Ct,{layout:\"split\",title:W(z.stats.offersPurchased),value:e?.metrics?.offersPurchased??\"0\",trendDirection:m(e?.trend?.offersPurchased),trendValue:e?.trend?.offersPurchased,caption:W(z.stats.comparedTo),testId:\"stats-card-offers-purchased\",isLoading:i})]})]}),(0,We.jsxs)(Rp,{\"data-testid\":\"bottom-charts-row\",children:[(0,We.jsx)(ro,{products:H,productSort:u,isLoading:i,maxProducts:5,onSortChange:D,onTitleClick:V}),(0,We.jsx)(jo,{offers:I,offerSort:g,isLoading:i,onSortChange:F,onTitleClick:A})]})]})};var ce=M(require(\"react\"));var Nt=M(require(\"react\")),Vt=require(\"recharts\");var re=require(\"@mui/material/styles\"),te=require(\"@mui/material\"),Op=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Qa}=Op.ColorUtils,Fp=(0,re.styled)(te.Box)`\n display: flex;\n gap: 24px;\n padding: 24px;\n background-color: ${({theme:e})=>Qa(e,\"N20\")};\n border-radius: 8px;\n box-shadow: ${({theme:e})=>e.shadows[1]};\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n }\n`,Lp=(0,re.styled)(te.Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`,$p=(0,re.styled)(te.Box)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 120px;\n`,Ip=(0,re.styled)(te.Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Np=(0,re.styled)(te.Typography)`\n margin-top: 2px;\n font-size: 1.25rem;\n line-height: 1.2;\n font-weight: 700;\n color: ${({theme:e})=>e.palette.text.primary};\n`,Vp=(0,re.styled)(te.Typography)`\n margin-top: 2px;\n font-size: 0.875rem;\n line-height: 1.2;\n font-weight: 600;\n color: ${({direction:e,theme:t})=>e===\"up\"?t.palette.success.main:e===\"down\"?t.palette.error.main:t.palette.text.secondary};\n`,Ap=(0,re.styled)(te.Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex: 1;\n`,zp=(0,re.styled)(te.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 12px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Qa(e,\"N30\")};\n }\n`,oa=(0,re.styled)(te.Box)`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({dotColor:e})=>e};\n flex-shrink: 0;\n`,Bp=(0,re.styled)(te.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`,Ep=(0,re.styled)(te.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`,Hp=(0,re.styled)(te.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Wp=(0,re.styled)(te.Typography)`\n font-size: 1rem;\n font-weight: 600;\n flex-shrink: 0;\n`,_p=(0,re.styled)(te.Box)`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({theme:e,direction:t})=>t===\"up\"?e.palette.success.main:t===\"down\"?e.palette.error.main:e.palette.text.secondary};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,Up=(0,re.styled)(te.Box)`\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-weight: 600;\n color: ${({theme:e,direction:t})=>t===\"up\"?e.palette.success.main:t===\"down\"?e.palette.error.main:e.palette.text.secondary};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,Kp=(0,re.styled)(te.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,Gp=(0,re.styled)(te.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,jp=(0,re.styled)(te.Box)`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>Qa(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`,Yp=(0,re.styled)(te.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Jp=(0,re.styled)(te.Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n color: ${({theme:e})=>e.palette.text.primary};\n word-break: break-word;\n`,Zp=(0,re.styled)(te.Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({theme:e})=>e.palette.divider};\n`,ra=(0,re.styled)(te.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`,aa=(0,re.styled)(te.Typography)`\n font-size: 0.625rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n text-transform: uppercase;\n`,Xa=(0,re.styled)(te.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.primary};\n`,qp=(0,re.styled)(te.Typography)`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n font-size: 0.875rem;\n font-weight: 600;\n color: ${({theme:e,direction:t})=>t===\"up\"?e.palette.success.main:t===\"down\"?e.palette.error.main:e.palette.text.secondary};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;var O=require(\"react/jsx-runtime\"),na=({offers:e,dateRange:t,market:o,offerSort:n,markets:i,isLoading:s=!1,onBack:d,onDateRangeChange:p,onMarketChange:w,onOfferSortChange:C})=>{let[u,x]=(0,Nt.useState)(1),g=10,b=Rt(),f=Nt.default.useCallback(()=>d?.(),[d]),c=ot(i),v=Nt.default.useMemo(()=>[Tt(t,z),Dt(o,c,z),{key:\"sort\",label:W(z.filter.offerSort.byRevenue),value:n,options:[{value:\"revenue\",label:W(z.filter.offerSort.byRevenue)},{value:\"units\",label:W(z.filter.offerSort.byUnits)}]}],[t,o,c,n]),y=Nt.default.useCallback((m,k)=>{m===\"dateRange\"?p?.(k):m===\"market\"?w?.(k):m===\"sort\"&&(C?.(k),x(1))},[C,p,w]),D=Nt.default.useMemo(()=>[...e].sort((m,k)=>n===\"revenue\"?k.revenue-m.revenue:k.percentage-m.percentage),[e,n]),{totalRevenue:h,totalRevenueTrendDirection:F,totalRevenueTrend:V}=Nt.default.useMemo(()=>{let m=D.reduce((l,R)=>l+R.revenue,0),{direction:k,formatted:S}=jt(D,l=>l.revenue,l=>l.trend?.revenue);return{totalRevenue:m,totalRevenueTrendDirection:k,totalRevenueTrend:S}},[D]),Y=Nt.default.useMemo(()=>D.slice(0,5),[D]),{totalPages:A,pageItems:H}=kt(D,u,g),Q=Nt.default.useMemo(()=>[{key:\"name\",label:W(z.fullView.topOffers.columnName),sortable:!0,render:(m,k)=>(0,O.jsxs)(Zr,{children:[(0,O.jsx)(oa,{dotColor:k.color}),(0,O.jsx)(\"span\",{children:k.name})]})},{key:\"revenue\",label:W(z.fullView.topOffers.columnRevenue),sortable:!0,render:(m,k)=>q(Number(m),k.currencyCode)},{key:\"percentage\",label:W(z.fullView.topOffers.columnPercentage),sortable:!0,render:m=>`${Number(m)}%`},{key:\"trend\",label:W(z.fullView.topOffers.columnTrend),render:(m,k)=>{if(!k.trend?.revenue)return W(z.defaults.noData);let S=Gt(k.trend.revenue);return(0,O.jsxs)(Up,{direction:S,children:[rt(S),(0,O.jsx)(\"span\",{children:k.trend.revenue})]})}}],[]),I=D[0]?.currencyCode;return s?(0,O.jsxs)(Pe,{\"data-testid\":\"top-offers-full-view\",children:[(0,O.jsx)(me,{title:W(z.fullView.topOffers.title),dateRange:ke(t),onBack:f,filters:v,onFilterChange:y}),(0,O.jsx)(Kt,{})]}):e.length===0?(0,O.jsxs)(Pe,{\"data-testid\":\"top-offers-full-view\",children:[(0,O.jsx)(me,{title:W(z.fullView.topOffers.title),dateRange:ke(t),onBack:f,filters:v,onFilterChange:y}),(0,O.jsx)(qt,{\"data-testid\":\"top-offers-fullview-empty\",children:W(z.widget.topPerformingOffers.emptyState)})]}):(0,O.jsxs)(Pe,{\"data-testid\":\"top-offers-full-view\",children:[(0,O.jsx)(me,{title:W(z.fullView.topOffers.title),dateRange:ke(t),onBack:f,filters:v,onFilterChange:y}),(0,O.jsxs)(Fp,{\"data-testid\":\"top-offers-fullview-top-section\",children:[(0,O.jsxs)(Lp,{\"data-testid\":\"top-offers-fullview-chart\",children:[(0,O.jsx)(Vt.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,O.jsxs)(Vt.PieChart,{children:[(0,O.jsx)(Vt.Pie,{data:D,cx:\"50%\",cy:\"50%\",innerRadius:\"50%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,children:D.map(m=>(0,O.jsx)(Vt.Cell,{fill:m.color},`cell-${m.id}`))}),(0,O.jsx)(Vt.Tooltip,{formatter:m=>q(m,I)})]})}),(0,O.jsxs)($p,{\"data-testid\":\"top-offers-fullview-donut-center\",children:[(0,O.jsx)(Ip,{children:W(z.widget.topPerformingOffers.totalRevenue)}),(0,O.jsx)(Np,{children:q(h,I)}),(0,O.jsx)(Vp,{direction:F,children:V})]})]}),(0,O.jsx)(Ap,{\"data-testid\":\"top-offers-fullview-summary\",children:Y.map(m=>{let k=Gt(m.trend?.revenue);return(0,O.jsxs)(zp,{children:[(0,O.jsx)(oa,{dotColor:m.color}),(0,O.jsxs)(Bp,{children:[(0,O.jsx)(Ep,{children:m.name}),(0,O.jsx)(Hp,{children:q(m.revenue,m.currencyCode)})]}),(0,O.jsxs)(Wp,{children:[m.percentage,\"%\"]}),m.trend?.revenue?(0,O.jsx)(_p,{direction:k,\"aria-label\":m.trend.revenue,children:rt(k)}):null]},m.id)})})]}),(0,O.jsxs)(Zt,{\"data-testid\":\"top-offers-table\",children:[(0,O.jsxs)(Jt,{\"data-testid\":\"top-offers-fullview-table-title\",children:[W(z.fullView.topOffers.title),\" (\",D.length,\")\"]}),b?(0,O.jsx)(Gp,{children:H.map(m=>{let k=vt(m.trend?.revenue),S=\"neutral\";return k!==null&&k>0?S=\"up\":k!==null&&k<0&&(S=\"down\"),(0,O.jsxs)(jp,{children:[(0,O.jsxs)(Yp,{children:[(0,O.jsx)(oa,{dotColor:m.color}),(0,O.jsx)(Jp,{children:m.name})]}),(0,O.jsxs)(Zp,{children:[(0,O.jsxs)(ra,{children:[(0,O.jsx)(aa,{children:W(z.fullView.topOffers.columnRevenue)}),(0,O.jsx)(Xa,{children:q(m.revenue,m.currencyCode)})]}),(0,O.jsxs)(ra,{children:[(0,O.jsx)(aa,{children:W(z.fullView.topOffers.columnPercentage)}),(0,O.jsxs)(Xa,{children:[m.percentage,\"%\"]})]}),(0,O.jsxs)(ra,{children:[(0,O.jsx)(aa,{children:W(z.fullView.topOffers.columnTrend)}),(0,O.jsx)(qp,{direction:S,children:m.trend?.revenue?(0,O.jsxs)(O.Fragment,{children:[rt(S),(0,O.jsx)(\"span\",{children:m.trend.revenue})]}):W(z.defaults.noData)})]})]})]},m.id)})}):(0,O.jsx)(Kp,{children:(0,O.jsx)(lt,{columns:Q,data:H,sortable:!0,getRowKey:m=>m.id})}),A>1&&(0,O.jsx)(st,{currentPage:u,totalPages:A,onPageChange:x,itemsPerPage:g,totalItems:D.length,\"data-testid\":\"top-offers-pagination\"})]})]})};var Yo=require(\"react/jsx-runtime\"),cu=\"productOfferDashboardView\",uu=[],gu=[],fu=[],mu=[];function Xp(e){return typeof e==\"object\"&&e!==null}function hu(e){return e===\"dashboard\"||e===\"products\"||e===\"conversion-rate\"||e===\"top-offers\"}function ia(e,t){if(!Xp(e))return\"dashboard\";let o=e[t];return hu(o)?o:\"dashboard\"}function Qp(e,t,o){return{...Xp(e)?e:{},[t]:o}}function xu(e,t){return{pathname:e?.pathname,search:e?.search,hash:e?.hash,state:t}}var ec=({stats:e,topProducts:t,conversionData:o,topOffers:n,isLoading:i=!1,error:s,dashboardTitle:d,className:p,allProducts:w,orders:C,allOffers:u,conversionSummaryRate:x,conversionSummaryChangePct:g,conversionFullViewData:b,conversionFullViewRate:f,conversionFullViewChangePct:c,initialDateRange:v=\"last30days\",initialMarket:y=\"all\",initialProductSort:D=\"units\",initialConversionFilter:h=\"all\",initialOfferSort:F=\"revenue\",markets:V,translate:Y,historyAdapter:A,historyStateKey:H=cu,resetToDashboardOnMount:Q=!0,onDateRangeChange:I,onMarketChange:m,onProductSortChange:k,onConversionFilterChange:S,onOfferSortChange:l,onViewChange:R})=>{io(Y);let[J,ye]=ce.default.useState(\"dashboard\"),de=ce.default.useRef(!1),[_e,At]=ce.default.useState(v),[Qe,ie]=ce.default.useState(y),[pt,Xe]=ce.default.useState(D),[po,co]=ce.default.useState(h),[Jo,Zo]=ce.default.useState(F),Fo=t??uu,Lo=o??gu,$o=n??fu,da=w??Fo,pa=C??mu,ct=u??$o,et=ce.default.useCallback(X=>{ye(X),R?.(X)},[R]),zt=ce.default.useCallback(()=>A?ia(A.location?.state,H):typeof window>\"u\"?\"dashboard\":ia(window.history.state,H),[A,H]),ze=ce.default.useCallback((X,_)=>{if(A){let tt=Qp(A.location?.state,H,X),to=xu(A.location,tt);if(_===\"replace\"){A.replace(to);return}A.push(to);return}if(typeof window>\"u\")return;let Ue=Qp(window.history.state,H,X);if(_===\"replace\"){window.history.replaceState(Ue,\"\");return}window.history.pushState(Ue,\"\")},[A,H]);ce.default.useEffect(()=>{if(Q?(ze(\"dashboard\",\"replace\"),de.current=!1,et(\"dashboard\")):et(zt()),A)return A.listen((_,Ue)=>{if(Ue===\"POP\"){let tt=ia(_.state,H);de.current=tt!==\"dashboard\",et(tt)}});let X=_=>{let Ue=ia(_.state,H);de.current=Ue!==\"dashboard\",et(Ue)};return window.addEventListener(\"popstate\",X),()=>{window.removeEventListener(\"popstate\",X)}},[A,H,zt,Q,et,ze]);let ut=ce.default.useCallback(X=>{de.current=!0,ze(X,\"push\"),et(X)},[et,ze]),Bt=ce.default.useCallback(()=>{if(J!==\"dashboard\"&&de.current){if(A){A.goBack();return}typeof window<\"u\"&&window.history.back();return}de.current=!1,ze(\"dashboard\",\"replace\"),et(\"dashboard\")},[J,A,et,ze]),xt=ce.default.useCallback(X=>{At(X),I?.(X)},[I]),eo=ce.default.useCallback(X=>{ie(X),m?.(X)},[m]),Io=ce.default.useCallback(X=>{Xe(X),k?.(X)},[k]),No=ce.default.useCallback(X=>{co(X),S?.(X)},[S]),Vo=ce.default.useCallback(X=>{Zo(X),l?.(X)},[l]),ca=ce.default.useCallback(()=>{ut(\"products\")},[ut]),ua=ce.default.useCallback(()=>{ut(\"conversion-rate\")},[ut]),ga=ce.default.useCallback(()=>{ut(\"top-offers\")},[ut]);return J===\"products\"?(0,Yo.jsx)(So,{products:da,dateRange:_e,market:Qe,productSort:pt,markets:V,isLoading:i,onBack:Bt,onDateRangeChange:xt,onMarketChange:eo,onProductSortChange:Io}):J===\"conversion-rate\"?(0,Yo.jsx)(To,{conversionData:b??Lo,orders:pa,summaryRate:f??x,summaryChangePct:c??g,dateRange:_e,market:Qe,conversionFilter:po,markets:V,isLoading:i,onBack:Bt,onDateRangeChange:xt,onMarketChange:eo,onConversionFilterChange:No}):J===\"top-offers\"?(0,Yo.jsx)(na,{offers:ct,dateRange:_e,market:Qe,offerSort:Jo,markets:V,isLoading:i,onBack:Bt,onDateRangeChange:xt,onMarketChange:eo,onOfferSortChange:Vo}):(0,Yo.jsx)(ta,{stats:e,topProducts:Fo,conversionData:Lo,topOffers:$o,isLoading:i,error:s,dashboardTitle:d,className:p,dateRange:_e,market:Qe,productSort:pt,conversionFilter:po,offerSort:Jo,conversionSummaryRate:x,conversionSummaryChangePct:g,markets:V,onDateRangeChange:xt,onMarketChange:eo,onProductSortChange:Io,onConversionFilterChange:No,onOfferSortChange:Vo,onProductsTitleClick:ca,onConversionTitleClick:ua,onOffersTitleClick:ga})};var Ro=require(\"@nuskin/foundation-theme\"),{getGenomeColor:lo}=Ro.ColorUtils,tc=(0,Ro.styled)(\"div\")`\n display: flex;\n gap: 12px;\n margin-bottom: 24px;\n flex-wrap: wrap;\n`,oc=(0,Ro.styled)(\"select\")`\n min-width: 160px;\n height: 40px;\n padding: 8px 12px;\n background-color: ${({theme:e})=>lo(e,\"N20\")};\n border: 1px solid ${({theme:e})=>lo(e,\"N40\")};\n border-radius: 8px;\n font-size: 14px;\n font-weight: 400;\n color: ${({theme:e})=>lo(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>lo(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>lo(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>lo(e,\"A20\")};\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n`,rc=(0,Ro.styled)(\"label\")`\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n color: ${({theme:e})=>lo(e,\"N70\")};\n`;var Mo=require(\"react/jsx-runtime\"),ac=({filters:e,onChange:t})=>(0,Mo.jsx)(tc,{\"data-testid\":\"filter-bar\",children:e.map(o=>(0,Mo.jsxs)(rc,{htmlFor:`filter-${o.key}`,children:[o.label,(0,Mo.jsx)(oc,{id:`filter-${o.key}`,value:o.value,onChange:n=>t(o.key,n.target.value),disabled:o.disabled,\"aria-label\":`${o.label} ${a(r.ariaLabel.filterSuffix)}`,\"data-testid\":`filter-dropdown-${o.key}`,children:o.options.map(n=>(0,Mo.jsx)(\"option\",{value:n.value,children:n.label},n.value))})]},o.key))});var en={shopTitle:\"My NuSkin Shop\",dateRange:{start:\"2026-03-01\",end:\"2026-03-31\",label:\"Mar 1 - Mar 31\"},selectedMarket:\"all\",metrics:{revenue:\"$9,453\",volume:\"1,211\",siteVisits:\"17,935\",conversionRate:\"4.2%\"},trend:{revenue:\"+12.5%\",volume:\"+8.3%\",siteVisits:\"-2.1%\"}},la=[{id:\"prod-001\",rank:1,name:\"ageLOC LumiSpa\",imageUrl:\"\",unitsSold:342,revenue:29580,volume:245,trend:{units:\"+15%\",revenue:\"+12%\",volume:\"+8%\"}},{id:\"prod-002\",rank:2,name:\"Pharmanex LifePak\",imageUrl:\"\",unitsSold:287,revenue:24395,volume:198,trend:{units:\"+8%\",revenue:\"+10%\",volume:\"+5%\"}},{id:\"prod-003\",rank:3,name:\"ageLOC Meta\",imageUrl:\"\",unitsSold:256,revenue:21760,volume:176,trend:{units:\"-3%\",revenue:\"-1%\",volume:\"-2%\"}},{id:\"prod-004\",rank:4,name:\"Nu Skin 180 System\",imageUrl:\"\",unitsSold:198,revenue:17820,volume:142,trend:{units:\"+22%\",revenue:\"+18%\",volume:\"+15%\"}},{id:\"prod-005\",rank:5,name:\"Epoch Baobab Body Butter\",imageUrl:\"\",unitsSold:176,revenue:8800,volume:88,trend:{units:\"+5%\",revenue:\"+3%\",volume:\"+2%\"}}],Oo=Array.from({length:30},(e,t)=>{let o=new Date(\"2026-03-01\");return o.setDate(o.getDate()+t),{date:`${[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"][o.getMonth()]} ${o.getDate()}`,rate:Number((4+t%15*.1).toFixed(2)),orders:200+t*13%100,siteVisits:4e3+t*97%2e3}}),bu=Oo.map(e=>({...e,rate:Number((e.rate*1.35).toFixed(2)),orders:Math.round(e.orders*.7)})),yu=Oo.map(e=>({...e,rate:Number((e.rate*.55).toFixed(2)),orders:Math.round(e.orders*.3)})),tn=Array.from({length:30},(e,t)=>{let o=new Date(\"2026-03-01\");o.setDate(o.getDate()+t);let n=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],i=80+t*11%40,s=Math.floor(i*.4),d=Math.floor(i*.35),p=i-s-d;return{date:`${n[o.getMonth()]} ${o.getDate()}`,total:i,members:s,retail:d,brandAffiliates:p}}),on=[{id:\"cat-001\",name:\"Favorites\",revenue:45200,percentage:29,color:\"#C95D63\",trend:{revenue:\"+8%\",units:\"+10%\"}},{id:\"cat-002\",name:\"Daily Routine\",revenue:42100,percentage:27,color:\"#6C7A9B\",trend:{revenue:\"+12%\",units:\"+15%\"}},{id:\"cat-003\",name:\"Fit & Trim Body\",revenue:34300,percentage:22,color:\"#E8975E\",trend:{revenue:\"-3%\",units:\"-1%\"}},{id:\"cat-004\",name:\"Dull Skin\",revenue:24900,percentage:16,color:\"#5F8FC4\",trend:{revenue:\"+5%\",units:\"+7%\"}},{id:\"cat-005\",name:\"Acne\",revenue:9400,percentage:6,color:\"#A2C3B3\",trend:{revenue:\"+2%\",units:\"+3%\"}}],sa=Array.from({length:50},(e,t)=>{let o=[\"Sarah\",\"John\",\"Emma\",\"Michael\",\"Olivia\",\"William\",\"Ava\",\"James\"],n=[\"Smith\",\"Johnson\",\"Williams\",\"Brown\",\"Jones\",\"Garcia\",\"Miller\",\"Davis\"],i=new Date(\"2026-03-31\");return i.setDate(i.getDate()-t%30),{orderId:`ORD-${String(1e4+t).padStart(5,\"0\")}`,date:i.toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\"}),customerName:`${o[t%o.length]} ${n[t%n.length]}`,customerType:t%3===0?\"Subscription\":\"Standard\",items:t%5+1,total:Number((50+t*17%200+t%10*.1).toFixed(2)),bv:30+t*9%150}}),rn=Array.from({length:30},(e,t)=>{let o=[\"Alice\",\"Bob\",\"Carol\",\"David\",\"Eva\",\"Frank\",\"Grace\",\"Henry\"],n=[\"Anderson\",\"Baker\",\"Clark\",\"Davis\",\"Evans\",\"Fisher\",\"Grant\",\"Hall\"],i=[\"Member\",\"Retail\",\"Brand Affiliate\"],s=new Date(\"2026-03-31\");return s.setDate(s.getDate()-t%30),{id:`SU-${String(1e3+t).padStart(4,\"0\")}`,name:`${o[t%o.length]} ${n[t%n.length]}`,date:s.toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\"}),type:i[t%i.length],email:`${o[t%o.length].toLowerCase()}.${n[t%n.length].toLowerCase()}@example.com`,status:t%4===0?\"Pending\":\"Active\"}});var so={shopTitle:\"Performance Overview\",dateRange:{start:\"2026-03-01\",end:\"2026-03-31\",label:\"Mar 1 - Mar 31\"},selectedMarket:\"all\",metrics:{revenue:\"$5,208\",offersPurchased:\"285\",conversionRate:\"4.2%\"},trend:{revenue:\"+2.3%\",offersPurchased:\"+3.7%\"}},sx={...so,trend:{revenue:\"+5.1%\",offersPurchased:\"+12.5%\"}},dx={...so,trend:{revenue:\"-1.8%\",offersPurchased:\"-3.7%\"}},px={...so,trend:{revenue:\"+0%\",offersPurchased:\"+0%\"}},cx={...so,metrics:{...so.metrics,offersPurchased:\"0\"},trend:{revenue:\"+0%\",offersPurchased:\"+0%\"}},nc=[{id:\"offer-1\",name:\"Winter Skincare Bundle\",revenue:2800,percentage:29,color:\"#6B8E7B\",trend:{revenue:\"-4.2%\"}},{id:\"offer-2\",name:\"Supplement Starter Pack\",revenue:2500,percentage:27,color:\"#E8915A\",trend:{revenue:\"+3.1%\"}},{id:\"offer-3\",name:\"Holiday Special Bundle\",revenue:2100,percentage:22,color:\"#C75B5B\",trend:{revenue:\"-1.5%\"}},{id:\"offer-4\",name:\"LumiSpa Cleansing Kit\",revenue:1500,percentage:16,color:\"#5B8EC7\",trend:{revenue:\"+2.8%\"}},{id:\"offer-5\",name:\"Daily Wellness Bundle\",revenue:529,percentage:6,color:\"#9B8EC7\",trend:{revenue:\"+7.2%\"}}];\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","export * from './common';\n","import React, { ReactElement, useState } from 'react';\nimport { NsImage } from '@nuskin/foundation-ui-components';\nimport { ProductImageType } from '../types/image';\nimport {\n PriceComponent,\n ProductCardContainer,\n ImageContainer,\n DefaultImage,\n ProductTitle,\n ProductBadgeContainer,\n AddToCartButton,\n CartIcon,\n} from './styles/NsProductCard.Styled';\nimport { useMediaQuery } from '@mui/material';\nimport { NsCardButton } from './types';\n\ntype NsProductCardProps = {\n readonly productTitle: string;\n readonly imageDetails?: ProductImageType;\n readonly className?: string;\n readonly button?: NsCardButton & { disabled?: boolean };\n readonly onCardClick?: () => void;\n readonly productStatusBadge?: React.ReactNode;\n readonly directSellerBadge?: React.ReactNode;\n readonly mySitePriceComponent?: React.ReactNode;\n readonly testId?: string;\n};\n\nconst NsProductCard = ({\n productTitle,\n imageDetails,\n className,\n button,\n onCardClick,\n productStatusBadge,\n directSellerBadge,\n mySitePriceComponent,\n testId,\n}: NsProductCardProps): ReactElement => {\n const [isButtonHovered, setIsButtonHovered] = useState(false);\n const isMobile = useMediaQuery('(max-width: 560px)');\n\n const handleImageError = (e: React.SyntheticEvent<HTMLImageElement, Event>) => {\n const target = e.target as HTMLImageElement;\n const noImageFallback = imageDetails?.fallbackImage;\n if (noImageFallback && target.src !== noImageFallback) {\n target.src = noImageFallback;\n }\n };\n\n return (\n <ProductCardContainer\n className={className}\n onClick={onCardClick}\n tabIndex={0}\n data-testid=\"product-card\"\n isMobile={isMobile}\n >\n <ImageContainer bgColor={imageDetails?.bgColor} onError={handleImageError}>\n {imageDetails?.imageSrc ? (\n <NsImage\n data-testid={testId ?? 'test-product-image'}\n className={imageDetails.className ?? ''}\n src={imageDetails.imageSrc}\n alt={imageDetails.imageAlt}\n aria-label={imageDetails.areaLabel ?? imageDetails.imageAlt}\n width={'100%'}\n />\n ) : (\n <DefaultImage alt=\"\" />\n )}\n </ImageContainer>\n <ProductTitle title={productTitle} data-testid=\"product-title\">\n {productTitle}\n </ProductTitle>\n {directSellerBadge && <ProductBadgeContainer>{directSellerBadge}</ProductBadgeContainer>}\n <ProductBadgeContainer>{productStatusBadge}</ProductBadgeContainer>\n <PriceComponent>{mySitePriceComponent}</PriceComponent>\n {button?.showButton && (\n <AddToCartButton\n tabIndex={0}\n aria-roledescription=\":\"\n aria-label={button.buttonText || 'ADD TO CART'}\n data-testid=\"add-to-cart-button\"\n disabled={button?.disabled ?? false}\n isMobile={isMobile}\n isHovered={isButtonHovered}\n onClick={(e) => {\n e.stopPropagation();\n if (!button?.disabled) {\n button.onClick?.();\n }\n }}\n onMouseEnter={() => {\n if (!isMobile && !button?.disabled) {\n setIsButtonHovered(true);\n }\n }}\n onMouseLeave={() => {\n if (!isMobile) {\n setIsButtonHovered(false);\n }\n }}\n >\n <CartIcon className=\"cart-icon\" disabled={button?.disabled}>\n <svg width=\"24\" height=\"22\" viewBox=\"0 0 24 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0 1.86358C0 1.26109 0.488416 0.772675 1.09091 0.772675H3.48173C4.51054 0.772675 5.39955 1.49136 5.61511 2.49733L5.71309 2.95456H22.9091C23.245 2.95456 23.5622 3.10933 23.7689 3.37411C23.9757 3.63889 24.0489 3.98415 23.9674 4.31005L22.4053 10.5583C21.9197 12.5009 20.1743 13.8636 18.172 13.8636H8.05068L8.28444 14.9546H20.7273C21.3298 14.9546 21.8182 15.443 21.8182 16.0455C21.8182 16.648 21.3298 17.1364 20.7273 17.1364H19.6364H8.18182H7.40252C6.88811 17.1364 6.4436 16.777 6.33582 16.274L3.76449 4.27405L3.48173 2.95449H1.09091C0.488416 2.95449 0 2.46608 0 1.86358ZM8.18182 17.1364C6.97683 17.1364 6 18.1132 6 19.3182C6 20.5232 6.97683 21.5 8.18182 21.5C9.3868 21.5 10.3636 20.5232 10.3636 19.3182C10.3636 18.1132 9.3868 17.1364 8.18182 17.1364ZM19.6364 17.1364C18.4314 17.1364 17.4545 18.1132 17.4545 19.3182C17.4545 20.5232 18.4314 21.5 19.6364 21.5C20.8413 21.5 21.8182 20.5232 21.8182 19.3182C21.8182 18.1132 20.8413 17.1364 19.6364 17.1364ZM7.58317 11.6818H18.172C19.1732 11.6818 20.0459 11.0005 20.2887 10.0292L21.5119 5.13638H6.18062L7.58317 11.6818Z\"\n fill={button?.disabled ? '#999' : '#ffffff'}\n />\n </svg>\n </CartIcon>\n {button.buttonText || 'ADD TO CART'}\n </AddToCartButton>\n )}\n </ProductCardContainer>\n );\n};\n\nexport default NsProductCard;\n","import { styled } from '@nuskin/foundation-theme';\n\nexport const PriceComponent = styled('div')`\n width: 200px;\n text-align: left;\n margin-bottom: 5px;\n`;\n\nexport const ProductCardContainer = styled('button')<{ isMobile: boolean }>`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n width: 240px;\n height: ${(props) => (props.isMobile ? '410px' : '513px')};\n overflow: hidden;\n cursor: pointer;\n border: 1px solid #ededed;\n background: var(--color-primary-n-10-primary-white, #fff);\n`;\n\nexport const ImageContainer = styled('div')<{\n bgColor?: string;\n}>`\n width: '240px';\n height: '240px';\n background: ${(props) => props.bgColor ?? '#f5f5f5'};\n border-radius: 8px;\n overflow: hidden;\n margin-bottom: 0;\n display: flex;\n align-items: normal;\n justify-content: center;\n position: relative;\n @media (max-width: 560px) {\n width: 200px;\n height: 200px;\n align-items: unset;\n }\n`;\n\nexport const DefaultImage = styled('img')`\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n display: block;\n`;\n\nexport const ProductTitle = styled('div')`\n width: 200px;\n margin-top: 16px;\n max-height: 66px;\n text-align: left;\n font-size: 16px;\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n line-height: 22px;\n overflow: hidden;\n color: #666;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n @media (max-width: 560px) {\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n margin-top: 5px;\n max-height: 54px;\n line-height: 18px;\n }\n`;\n\nexport const ProductBadgeContainer = styled('div')`\n width: 200px;\n text-align: left;\n margin-bottom: 12px;\n @media (max-width: 560px) {\n margin-bottom: 8px;\n }\n`;\n\nexport const AddToCartButton = styled('button')<{\n disabled?: boolean;\n isMobile: boolean;\n isHovered: boolean;\n}>`\n width: 200px;\n height: 40px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n gap: 10px;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0.14px;\n text-transform: none;\n justify-content: flex-start;\n padding-left: 31px;\n overflow: hidden;\n white-space: normal;\n word-break: break-word;\n overflow-wrap: break-word;\n text-overflow: ellipsis;\n margin-top: 8px;\n margin-bottom: 10px;\n -webkit-appearance: none;\n -webkit-tap-highlight-color: transparent;\n\n color: ${(props) => (props.disabled ? '#999' : '#fff')};\n background-color: ${(props) => {\n if (props.disabled) return '#e0e0e0';\n if (!props.isMobile && props.isHovered) return '#888';\n return '#000';\n }};\n border: ${(props) => (props.disabled ? '1px solid #ccc' : 'none')};\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n opacity: ${(props) => (props.disabled ? 0.6 : 1)};\n transition: ${(props) => (props.isMobile ? 'none' : 'all 0.3s ease')};\n\n @media (max-width: 560px) {\n margin: 5px 0;\n }\n`;\n\nexport const CartIcon = styled('span')<{ disabled?: boolean }>`\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n display: inline-block;\n background: none;\n transition: all 0.3s ease;\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n`;\n","import React, { ReactElement, useCallback, ReactNode, useRef } from 'react';\nimport Slider from 'react-slick';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport 'slick-carousel/slick/slick.css';\nimport { NsCardButton, NsCarouselControl } from '@nuskin/foundation-ui-components';\nimport { ProductImageType } from '../types/image';\nimport NsProductCard from '../card/NsProductCard';\nimport {\n SlickContainer,\n ControlsContainer,\n ControlsHeaderRow,\n ScrollableContainer,\n CardList,\n ViewAllWrapper,\n ProductCountWrapper,\n ArrowsWrapper,\n CustomTypography,\n ViewAllLink,\n ProductInfoWrapper,\n CategoryNameWrapper,\n EmptyProductCategories,\n} from './NsProductCarousel.styled';\n\nexport type ProductCardEntry = {\n readonly productTitle: string;\n readonly imageDetails?: ProductImageType;\n readonly button?: NsCardButton;\n readonly onCardClick?: () => void;\n readonly productStatusBadge?: React.ReactNode;\n readonly directSeller?: React.ReactNode;\n readonly mySitePriceComponent?: React.ReactNode;\n};\n\ninterface SlickSettings {\n dots?: boolean;\n infinite?: boolean;\n speed?: number;\n slidesToShow?: number;\n slidesToScroll?: number;\n swipe?: boolean;\n draggable?: boolean;\n arrows?: boolean;\n responsive?: Array<{\n breakpoint: number;\n settings: {\n slidesToShow?: number;\n slidesToScroll?: number;\n arrows?: boolean;\n };\n }>;\n}\n\ninterface ProductCardCarouselProps<T = ProductCardEntry> {\n readonly entries: T[];\n readonly settings?: SlickSettings;\n readonly showControlButtons?: boolean;\n readonly renderEntry?: (entry: T, index: number) => ReactNode;\n readonly allEntryLabel?: string;\n readonly allEntryLink?: string;\n readonly categoryName?: string;\n readonly emptyProductMessage?: string;\n readonly productsCountLabel?: string;\n readonly isInitialDataLoading?: boolean;\n readonly history?: {\n push: (path: string) => void;\n };\n}\n\nexport default function ProductCardCarousel({\n entries,\n renderEntry,\n settings = {},\n showControlButtons = true,\n allEntryLabel = 'View All',\n allEntryLink = '',\n categoryName,\n emptyProductMessage = 'No Products Available For The Selected Category',\n productsCountLabel = 'Products',\n isInitialDataLoading,\n history,\n}: ProductCardCarouselProps): ReactElement {\n const sliderRef = useRef<Slider>(null);\n const isMobile = useMediaQuery('(max-width: 560px)');\n\n const prev = useCallback(() => {\n sliderRef.current?.slickPrev();\n }, []);\n\n const next = useCallback(() => {\n sliderRef.current?.slickNext();\n }, []);\n\n const renderProductEntry =\n renderEntry ??\n ((entry: ProductCardEntry, index: number) => (\n <NsProductCard\n key={`${entry.productTitle}-${index}`}\n productTitle={entry.productTitle}\n imageDetails={entry.imageDetails}\n button={entry.button}\n onCardClick={entry.onCardClick}\n productStatusBadge={entry.productStatusBadge}\n directSellerBadge={entry.directSeller}\n mySitePriceComponent={entry.mySitePriceComponent}\n />\n ));\n\n const sliderSettings = {\n dots: true,\n infinite: true,\n speed: 500,\n slidesToShow: Math.min(entries?.length ?? 0, 4),\n slidesToScroll: 4,\n swipe: true,\n draggable: true,\n arrows: true,\n responsive: [\n {\n breakpoint: 1320,\n settings: {\n slidesToShow: Math.min(entries?.length ?? 0, 3),\n slidesToScroll: 3,\n },\n },\n {\n breakpoint: 900,\n settings: {\n slidesToShow: Math.min(entries?.length ?? 0, 2),\n slidesToScroll: 2,\n },\n },\n {\n breakpoint: 600,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n arrows: false,\n },\n },\n ],\n ...settings,\n };\n\n const shouldShowNavigation = (entries?.length ?? 0) > sliderSettings.slidesToShow;\n\n const renderCarouselContent = () => {\n if (entries?.length === 0 && !isInitialDataLoading) {\n return <EmptyProductCategories>{emptyProductMessage}</EmptyProductCategories>;\n }\n\n if (isMobile) {\n return (\n <ScrollableContainer>\n <CardList>{entries.map((entry, index) => entry && renderProductEntry(entry, index))}</CardList>\n </ScrollableContainer>\n );\n }\n\n return (\n <Slider {...sliderSettings} ref={sliderRef}>\n {entries.map((entry, index) => entry && renderProductEntry(entry, index))}\n </Slider>\n );\n };\n\n return (\n <SlickContainer>\n {showControlButtons && (\n <ControlsContainer>\n <ControlsHeaderRow>\n <ProductInfoWrapper>\n <ProductCountWrapper>\n <CustomTypography variant=\"body-m\">\n {entries?.length ?? 0} {productsCountLabel}\n </CustomTypography>\n </ProductCountWrapper>\n {!isMobile && categoryName && <CategoryNameWrapper>{categoryName}</CategoryNameWrapper>}\n </ProductInfoWrapper>\n <ViewAllWrapper $isMobile={isMobile}>\n <ViewAllLink\n $disabled={(entries?.length ?? 0) === 0}\n onClick={(e) => {\n e.preventDefault();\n if ((entries?.length ?? 0) > 0 && history) {\n history.push(allEntryLink);\n }\n }}\n >\n {allEntryLabel}\n </ViewAllLink>\n </ViewAllWrapper>\n </ControlsHeaderRow>\n {!isMobile && (\n <ArrowsWrapper $isDisabled={!shouldShowNavigation}>\n <NsCarouselControl prev={prev} next={next} viewAllLabel={''} viewAllUrl={''} />\n </ArrowsWrapper>\n )}\n </ControlsContainer>\n )}\n {renderCarouselContent()}\n </SlickContainer>\n );\n}\n","import React from 'react';\nimport { styled } from '@nuskin/foundation-theme';\nimport Box, { BoxProps } from '@mui/material/Box';\nimport { NsTypography } from '@nuskin/foundation-ui-components';\n\nexport const SlickContainer: React.ComponentType<BoxProps> = styled(Box)`\n padding: 30px 0 60px;\n width: 100%;\n margin: auto;\n margin-top: 50px;\n position: relative;\n\n .slick-list {\n padding-left: 24px;\n padding-right: 24px;\n }\n .slick-slide {\n display: flex;\n justify-content: center;\n padding: 0 12px;\n box-sizing: border-box;\n }\n .slick-prev,\n .slick-next {\n display: none !important;\n }\n\n @media (max-width: 1200px) {\n max-width: 1024px;\n .slick-list {\n padding-left: 12px;\n padding-right: 12px;\n }\n .slick-slide {\n padding: 0 6px;\n }\n }\n @media (max-width: 700px) {\n max-width: 100vw;\n padding: 10px 0 50px;\n .slick-list {\n padding-left: 4px;\n padding-right: 4px;\n }\n .slick-slide {\n padding: 0 2px;\n }\n }\n @media (max-width: 560px) {\n padding: 10px 0 10px;\n margin-top: 25px;\n }\n`;\nexport const ScrollableContainer = styled('div')`\n overflow-x: auto;\n display: flex;\n scroll-snap-type: x mandatory;\n -webkit-overflow-scrolling: touch;\n gap: 16px;\n padding: 0 8px 16px;\n width: 100%;\n box-sizing: border-box;\n\n &::-webkit-scrollbar {\n height: 6px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #007bff;\n border-radius: 10px;\n }\n`;\n\nexport const CardList = styled('div')`\n display: flex;\n scroll-snap-align: start;\n justify-content: center;\n gap: 15px;\n`;\n\nexport const ControlsContainer: React.ComponentType<BoxProps> = styled(Box)`\n position: absolute;\n bottom: calc(100% + 1px);\n right: 1px;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n`;\n\nexport const ViewAllWrapper: React.ComponentType<BoxProps & { $isMobile?: boolean }> = styled(Box)<{\n $isMobile?: boolean;\n}>`\n display: flex;\n align-items: center;\n margin-left: auto;\n margin-right: ${({ $isMobile }) => ($isMobile ? 0 : '24px')};\n\n @media (max-width: 560px) {\n margin-left: 0;\n order: 2;\n }\n`;\n\nexport const ProductCountWrapper: React.ComponentType<BoxProps> = styled(Box)`\n display: none;\n\n @media (max-width: 560px) {\n color: #666666;\n font-family: Inter;\n font-size: 14px !important;\n font-style: normal;\n font-weight: 600;\n line-height: 18px;\n display: flex;\n align-items: center;\n order: 1;\n }\n`;\n\nexport const ArrowsWrapper: React.ComponentType<BoxProps & { $isDisabled?: boolean }> = styled(Box)<{\n $isDisabled?: boolean;\n}>`\n display: flex;\n align-items: center;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.3 : 1)};\n pointer-events: ${({ $isDisabled }) => ($isDisabled ? 'none' : 'auto')};\n transition: opacity 0.3s ease;\n\n .carousal-prev-button,\n .carousal-next-button {\n transition: all 0.3s ease;\n border: 2px solid #000000;\n border-radius: 3px;\n padding: 9px;\n cursor: pointer;\n\n svg {\n transition: all 0.3s ease;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n\n &:hover {\n background-color: #f5f5f5;\n border: 2px solid #ddd;\n\n svg {\n opacity: 0.5;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n }\n }\n\n @media (max-width: 560px) {\n display: none;\n }\n`;\nexport const Scrollablewrapper = styled('div')`\n @media (max-width: 560px) {\n overflow-y: hidden;\n scrollbar-width: thin;\n scrollbar-color: #007bff #eee;\n &::-webkit-scrollbar {\n width: 8px;\n }\n &::-webkit-scrollbar-track {\n background: #eee;\n }\n &::-webkit-scrollbar-thumb {\n background-color: red;\n border-radius: 8px;\n border: 2px solid #eee;\n }\n }\n`;\nexport const CustomTypography = styled(NsTypography)`\n color: #666666;\n font-family: Inter;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 22px;\n @media (max-width: 560px) {\n margin: 0 3px;\n }\n`;\n\nexport const ViewAllLink = styled('a')<{ $disabled?: boolean }>`\n color: ${({ $disabled }) => ($disabled ? '#999999' : '#000000')};\n font-family: Inter, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 22px;\n text-decoration: none;\n border-bottom: 1px solid ${({ $disabled }) => ($disabled ? '#999999' : '#000000')};\n padding-bottom: 4px;\n transition: all 0.3s ease;\n cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'pointer')};\n pointer-events: ${({ $disabled }) => ($disabled ? 'none' : 'auto')};\n opacity: ${({ $disabled }) => ($disabled ? 0.5 : 1)};\n\n @media (max-width: 560px) {\n font-size: 14px;\n line-height: 18px;\n }\n\n &:hover {\n color: ${({ $disabled }) => ($disabled ? '#999999' : '#666666')};\n border-bottom: 1px solid ${({ $disabled }) => ($disabled ? '#999999' : '#666666')};\n cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'pointer')};\n }\n`;\n\nexport const EmptyProductCategories = styled('div')`\n padding-top: 20px;\n font-size: 20px;\n text-align: center;\n`;\nexport const ControlsHeaderRow = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`;\n\nexport const ProductInfoWrapper = styled('div')`\n display: flex;\n align-items: center;\n flex: 1;\n min-width: 0;\n`;\n\nexport const CategoryNameWrapper = styled('div')`\n font-family: 'Lora';\n font-weight: 400;\n font-size: 22px;\n margin-left: 16px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 13px;\n`;\n","import React, { useState, useEffect, useCallback } from 'react';\nimport { useMediaQuery } from '@mui/material';\n\nimport { NsCategoryNavigation } from '../Nav-Category-Navigation';\nimport { NsSpinner } from '@nuskin/foundation-ui-components';\nimport ProductCardCarousel, { ProductCardEntry } from './NsProductCarousel';\nimport {\n ProductTabCarouselContainer,\n TabsContainer,\n ContentContainer,\n NoTabsContainer,\n SpinnerContainer,\n} from './ProductTabCarousel.styled';\n\ninterface Category {\n label: string;\n categoryId: string;\n}\n\ninterface SlickSettings {\n dots?: boolean;\n infinite?: boolean;\n speed?: number;\n slidesToShow?: number;\n slidesToScroll?: number;\n swipe?: boolean;\n draggable?: boolean;\n arrows?: boolean;\n responsive?: Array<{\n breakpoint: number;\n settings: {\n slidesToShow?: number;\n slidesToScroll?: number;\n arrows?: boolean;\n };\n }>;\n}\n\ninterface ProductTabCarouselProps {\n readonly allEntryLabel?: string;\n readonly allEntryLink?: string;\n readonly renderEntry?: (entry: ProductCardEntry) => React.ReactNode;\n readonly settings?: SlickSettings;\n readonly showControlButtons?: boolean;\n readonly fetchCategories: () => Promise<Category[]>;\n readonly fetchProducts: (categoryId: string) => Promise<ProductCardEntry[]>;\n readonly emptyProductTabs?: string;\n readonly emptyProductMessage?: string;\n readonly showCustomCategory?: boolean;\n readonly productsCountLabel?: string;\n readonly getCategoryId?: (categoryId: string) => Promise<Category[]>;\n readonly history?: {\n push: (path: string) => void;\n };\n}\n\nconst ProductTabCarousel: React.FC<ProductTabCarouselProps> = ({\n allEntryLabel,\n allEntryLink,\n renderEntry,\n settings,\n showControlButtons = true,\n fetchCategories,\n fetchProducts,\n showCustomCategory = false,\n emptyProductTabs = 'No tabs available',\n emptyProductMessage,\n productsCountLabel,\n getCategoryId,\n history,\n}) => {\n const isMobile = useMediaQuery('(max-width:768px)');\n const [isLoadingInitialData, setIsLoadingInitialData] = useState(true);\n const [categories, setCategories] = useState<Category[]>([]);\n const [isCategoriesLoaded, setIsCategoriesLoaded] = useState(false);\n const [selectedTab, setSelectedTab] = useState(0);\n const [products, setProducts] = useState<ProductCardEntry[]>([]);\n const [loading, setLoading] = useState(false);\n const [shouldShowSpinner, setShouldShowSpinner] = useState(true);\n\n const checkForExistingSpinners = useCallback(() => {\n const existingSpinners = document.querySelectorAll('[data-testid*=\"spinner\"], .ns-spinner, [class*=\"spinner\"]');\n setShouldShowSpinner(existingSpinners.length === 0);\n }, []);\n\n useEffect(() => {\n if (loading) {\n checkForExistingSpinners();\n }\n }, [loading, checkForExistingSpinners]);\n\n useEffect(() => {\n fetchCategories().then((data) => {\n setCategories(data);\n setIsCategoriesLoaded(true);\n });\n }, [fetchCategories]);\n\n useEffect(() => {\n if (!isCategoriesLoaded) return;\n\n if (categories.length > 0) {\n const categoryId = categories[selectedTab]?.categoryId;\n if (getCategoryId) {\n getCategoryId(categoryId);\n }\n\n setLoading(true);\n fetchProducts(categoryId)\n .then(setProducts)\n .finally(() => {\n setLoading(false);\n setIsLoadingInitialData(false);\n });\n } else {\n setLoading(false);\n }\n }, [categories, selectedTab, fetchProducts, isCategoriesLoaded]);\n\n const itemArray = categories.map((cat) => ({\n label: cat.label,\n content: '',\n categoryId: cat.categoryId,\n }));\n\n return (\n <ProductTabCarouselContainer isMobile={isMobile} $hasCategories={categories.length > 0}>\n {showCustomCategory &&\n (itemArray.length > 0 ? (\n <TabsContainer isMobile={isMobile}>\n <NsCategoryNavigation\n itemArray={itemArray}\n value={selectedTab}\n onChange={(_, newValue) => setSelectedTab(newValue)}\n />\n </TabsContainer>\n ) : (\n <NoTabsContainer>{emptyProductTabs}</NoTabsContainer>\n ))}\n <ContentContainer isMobile={isMobile}>\n {loading ? (\n <SpinnerContainer>{shouldShowSpinner && <NsSpinner />}</SpinnerContainer>\n ) : (\n <ProductCardCarousel\n isInitialDataLoading={isLoadingInitialData}\n entries={products}\n allEntryLabel={allEntryLabel}\n allEntryLink={allEntryLink}\n renderEntry={\n renderEntry\n ? (entry) => renderEntry({ ...entry, productStatusBadge: entry.productStatusBadge })\n : undefined\n }\n settings={settings}\n showControlButtons={showControlButtons}\n categoryName={categories[selectedTab]?.label}\n emptyProductMessage={emptyProductMessage}\n productsCountLabel={productsCountLabel}\n history={history}\n />\n )}\n </ContentContainer>\n </ProductTabCarouselContainer>\n );\n};\n\nexport default ProductTabCarousel;\n","import * as React from 'react';\nimport Tabs from '@mui/material/Tabs';\nimport Tab from '@mui/material/Tab';\nimport Box from '@mui/material/Box';\nimport PropTypes from 'prop-types';\nimport { NsCategoryNavigationContainer } from './NsCategoryNavigation.styled';\nimport { useMediaQuery } from '@mui/material';\n\nfunction TabPanel(\n props: Readonly<{\n children?: React.ReactNode;\n value: number;\n index: number;\n [key: string]: unknown;\n }>,\n) {\n const { children, value, index, ...other } = props;\n return (\n <div\n role=\"tabpanel\"\n hidden={value !== index}\n id={`vertical-tabpanel-${index}`}\n aria-labelledby={`vertical-tab-${index}`}\n {...other}\n >\n {value === index && <Box className=\"tabPanel\">{children}</Box>}\n </div>\n );\n}\nTabPanel.propTypes = {\n children: PropTypes.node,\n index: PropTypes.number.isRequired,\n value: PropTypes.number.isRequired,\n};\n\ninterface NsCategoryNavigationProps {\n itemArray: { label: string; content: React.ReactNode; categoryId: string }[];\n value?: number;\n onChange?: (event: React.SyntheticEvent, newValue: number) => void;\n}\n\nexport const NsCategoryNavigation: React.FC<Readonly<NsCategoryNavigationProps>> = ({\n itemArray,\n value: controlledValue,\n onChange,\n}) => {\n const [internalValue, setInternalValue] = React.useState(0);\n const isMobile = useMediaQuery('(max-width:768px)');\n const value = controlledValue ?? internalValue;\n const handleChange = (event: React.SyntheticEvent, newValue: number) => {\n if (onChange) {\n onChange(event, newValue);\n } else {\n setInternalValue(newValue);\n }\n };\n\n return (\n <NsCategoryNavigationContainer>\n <Box className=\"tabContainer\">\n <Tabs\n orientation={isMobile ? 'horizontal' : 'vertical'}\n variant=\"scrollable\"\n value={value}\n onChange={handleChange}\n aria-label=\"Vertical tabs example\"\n className=\"tabsStyle\"\n >\n {itemArray.map((item) => (\n <Tab key={item.categoryId} label={item.label} className=\"tabStyle\" />\n ))}\n </Tabs>\n {itemArray.map((item) => (\n <TabPanel\n key={item.categoryId}\n value={value}\n index={itemArray.findIndex((i) => i.categoryId === item.categoryId)}\n >\n {item.content}\n </TabPanel>\n ))}\n </Box>\n </NsCategoryNavigationContainer>\n );\n};\n","import { styled } from '@nuskin/foundation-theme';\nexport const NsCategoryNavigationContainer = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n width: 100%;\n height: 100%;\n background-color: #fff;\n .tabsStyle {\n display: flex;\n padding-top: 8.533px;\n flex-direction: column;\n align-items: flex-start;\n gap: 12.8px;\n border-right: 1px;\n border-color: divider;\n width: 200px;\n & .Mui-selected {\n font-weight: 700;\n font-size: 14px;\n font-family: 'inter', sans-serif;\n font-style: normal;\n font-height: 20px;\n border-radius: 4px;\n }\n & .MuiTabs-indicator {\n left: 0;\n background-color: #5b81a5;\n color: #5b81a5;\n\n @media (max-width: 768px) {\n display: none;\n }\n }\n }\n\n .tabContainer {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n min-width: 100%;\n background-color: #fff;\n @media (max-width: 768px) {\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n }\n\n .tabStyle {\n align-items: flex-start;\n display: flex;\n text-align: left;\n font-size: 14px;\n font-family: 'inter' sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n min-height: 20px;\n padding: 1px;\n padding-left: 10px;\n margin-bottom: 10px;\n cursor: pointer;\n text-transform: none;\n }\n @media (max-width: 768px) {\n flex-direction: row;\n\n .tabsStyle {\n width: 100%;\n border-right: none;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding-top: 0px;\n }\n\n .tabStyle {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 70px;\n padding: 8px 16px;\n text-align: center;\n margin: 4px;\n background-color: #fff;\n cursor: pointer;\n color: black;\n font-family: Inter;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n }\n\n .tabStyle.Mui-selected {\n background-color: #5b81a5;\n color: #ffffff !important;\n font-weight: 700;\n border-radius: 70px;\n }\n }\n .tabPanel {\n padding: 8px;\n text-align: left;\n }\n`;\n","import { styled } from '@nuskin/foundation-theme';\n\nconst getMinHeight = ({ isMobile, $hasCategories }: { isMobile?: boolean; $hasCategories?: boolean }) => {\n if (isMobile) return 'auto';\n return $hasCategories ? '800px' : 'auto';\n};\n\nexport const ProductTabCarouselContainer = styled('div')<{ isMobile?: boolean; $hasCategories?: boolean }>`\n display: flex;\n flex-direction: ${({ isMobile }) => (isMobile ? 'column' : 'row')};\n align-items: ${({ isMobile }) => (isMobile ? 'stretch' : 'flex-start')};\n width: 100%;\n max-width: 1920px;\n min-height: ${getMinHeight};\n margin: 0 auto;\n box-sizing: border-box;\n overflow: visible;\n background: #fff;\n padding: ${({ isMobile }) => (isMobile ? '10px 16px 0px 16px' : '50px 60px 0px 60px')};\n\n @media (max-width: 768px) {\n padding: 10px 16px 0px 16px;\n min-height: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n padding: 30px 40px 0px 40px;\n gap: 20px;\n }\n\n transform: translateZ(0);\n will-change: auto;\n`;\n\nexport const TabsContainer = styled('div')<{ isMobile?: boolean }>`\n min-width: ${({ isMobile }) => (isMobile ? '100%' : 'auto')};\n height: ${({ isMobile }) => (isMobile ? 'auto' : '100%')};\n flex-shrink: 0;\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n\n overflow-x: auto;\n overflow-y: visible;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: none;\n -ms-overflow-style: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-width: 200px;\n margin-right: 20px;\n }\n`;\n\nexport const ContentContainer = styled('div')<{ isMobile?: boolean }>`\n flex: 1;\n min-width: 0;\n height: ${({ isMobile }) => (isMobile ? 'auto' : '100%')};\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n min-height: 300px;\n\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-height: 400px;\n }\n\n contain: layout style paint;\n transform: translateZ(0);\n`;\n\nexport const LoadingContainer = styled('div')`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 200px;\n padding: 20px;\n\n @media (max-width: 768px) {\n min-height: 150px;\n padding: 16px;\n }\n`;\n\nexport const NoTabsContainer = styled('div')`\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 40px 20px;\n color: #666;\n font-size: 16px;\n\n @media (max-width: 768px) {\n padding: 20px 16px;\n font-size: 14px;\n }\n`;\nexport const SpinnerContainer = styled('div')`\n padding: 10px;\n display: flex;\n justify-content: center;\n`;\n","import React, { ReactElement, useState, useEffect, useMemo } from 'react';\nimport { Typography, Box, useMediaQuery, Tooltip } from '@mui/material';\nimport { NsLink, NsImage } from '@nuskin/foundation-ui-components';\nimport {\n MysiteHeroContainer,\n MysiteHeroContainerMobile,\n BadgeContainer,\n Badge,\n ToggleButtonMobile,\n StyledSpan,\n ImgTabIndex,\n ContactLink,\n BadgeValue,\n} from '@/common/headers/MysiteHero.styled';\nimport { PlaceholderImage } from '../icon/icons/PlaceholderImage';\nimport { ArrowDownIcon } from '../icon/icons/ArrowDownIcon';\nimport { trackGTMEvent } from '../utils/gtmTracking';\n\ntype MysiteHeroProps = {\n readonly imageDetails?: {\n imageSrc: string;\n imageAlt: string;\n bgColor: string;\n };\n readonly shopTitle: string;\n readonly shopDescription: string;\n readonly socialTitleText: string;\n readonly email: string;\n readonly phone: string;\n readonly className?: string;\n readonly bannerProps?: {\n backgroundColor?: string;\n headlineFont?: string;\n paragraphFont?: string;\n };\n readonly socialIcons?: {\n type: string;\n url: string;\n }[];\n readonly expirationDate?: string;\n readonly showBadges?: boolean;\n readonly totalSavings?: string;\n};\n\ntype ImageDetails = {\n imageSrc: string;\n imageAlt: string;\n bgColor: string;\n};\n\ntype BannerProps = {\n backgroundColor?: string;\n headlineFont?: string;\n paragraphFont?: string;\n};\n\ntype ContentProps = {\n shopTitle: string;\n shopDescription: string;\n socialTitleText: string;\n email: string;\n phone: string;\n showBadges: boolean;\n expirationDate?: string;\n totalSavings?: string;\n};\n\nconst renderImageContent = (imageDetails: ImageDetails | undefined, bannerProps: BannerProps, className: string) => {\n const placeholderClass = className.includes('mobile') ? 'placeholder-image-mobile' : 'placeholder-image';\n return imageDetails?.imageSrc ? (\n <ImgTabIndex tabIndex={0}>\n <NsImage className={className} src={imageDetails.imageSrc} alt={imageDetails.imageAlt} />\n </ImgTabIndex>\n ) : (\n <Box className={placeholderClass}>\n <PlaceholderImage\n width={className.includes('mobile') ? '144px' : '246px'}\n height={className.includes('mobile') ? '144px' : '246px'}\n backgroundColor={bannerProps?.backgroundColor ?? '#5F5F5F'}\n />\n </Box>\n );\n};\n\nconst renderBadges = (\n showBadges: boolean,\n expirationDate: string,\n isMobile: boolean,\n hasWhiteBackground: boolean,\n totalSavings?: string,\n) => {\n if (!showBadges || (!expirationDate && !totalSavings)) return null;\n\n const badgeClass = isMobile ? 'mobile-badge' : 'tablet-badge';\n const containerClass = isMobile ? 'mobile-badges' : 'tablet-badges';\n\n return (\n <BadgeContainer className={containerClass}>\n {totalSavings && (\n <Badge\n className={`${badgeClass} total-savings-badge`}\n hasWhiteBackground={hasWhiteBackground}\n tabIndex={0}\n >\n <BadgeValue className=\"badge-value\">{totalSavings}</BadgeValue>\n </Badge>\n )}\n {expirationDate && (\n <Badge\n className={`${badgeClass} expiration-badge`}\n hasWhiteBackground={hasWhiteBackground}\n tabIndex={0}\n >\n <BadgeValue className=\"badge-value\">{expirationDate}</BadgeValue>\n </Badge>\n )}\n </BadgeContainer>\n );\n};\n\nconst renderMobileContent = (\n props: ContentProps,\n isScrolled: boolean,\n renderSocialMediaIcons: React.ReactNode,\n isMobile: boolean,\n hasWhiteBackground: boolean,\n) => {\n const { shopTitle, socialTitleText, email, showBadges, expirationDate, phone, totalSavings } = props;\n\n return (\n <Box className=\"content-mobile\">\n <Typography component=\"h1\" tabIndex={shopTitle?.trim() ? 0 : -1} className=\"body-title-mobile\">\n {shopTitle}\n </Typography>\n {!isScrolled && (\n <>\n <Typography tabIndex={socialTitleText?.trim() ? 0 : -1} className=\"social-title-text-mobile\">\n {socialTitleText}\n </Typography>\n {email?.trim() && renderContactLink('email', email, 'email-text-mobile')}\n {phone?.trim() && renderContactLink('phone', phone, 'phone-text-mobile')}\n <Box className=\"social-icons-mobile\">{renderSocialMediaIcons}</Box>\n {renderBadges(showBadges, expirationDate ?? '', isMobile, hasWhiteBackground, totalSavings)}\n </>\n )}\n </Box>\n );\n};\n\nconst renderDesktopContent = (\n props: ContentProps,\n isScrolled: boolean,\n renderSocialMediaIcons: React.ReactNode,\n isMobile: boolean,\n hasWhiteBackground: boolean,\n) => {\n const { shopTitle, shopDescription, socialTitleText, email, phone, showBadges, expirationDate, totalSavings } =\n props;\n\n return (\n <Box className=\"content\">\n <Typography component=\"h1\" tabIndex={shopTitle?.trim() ? 0 : -1} className=\"body-title\">\n {shopTitle}\n </Typography>\n {!isScrolled && (\n <>\n {shopDescription?.length > 480 ? (\n <Tooltip title={shopDescription} arrow>\n <Typography tabIndex={shopDescription?.trim() ? 0 : -1} className=\"body-text\">\n {shopDescription}\n </Typography>\n </Tooltip>\n ) : (\n <Typography tabIndex={shopDescription?.trim() ? 0 : -1} className=\"body-text\">\n {shopDescription}\n </Typography>\n )}\n <Box className=\"social-media\">\n <Typography tabIndex={socialTitleText?.trim() ? 0 : -1} className=\"social-title-text\">\n {socialTitleText}\n </Typography>\n <Box className=\"social-icons\">\n {renderSocialMediaIcons}\n {email?.trim() && renderContactLink('email', email, 'email-text')}\n {phone?.trim() && renderContactLink('phone', phone, 'phone-text')}\n </Box>\n </Box>\n {renderBadges(showBadges, expirationDate ?? '', isMobile, hasWhiteBackground, totalSavings)}\n </>\n )}\n </Box>\n );\n};\n\nconst checkIfImageIsCircular = (url: string): Promise<boolean> => {\n return new Promise((resolve, reject) => {\n const imageContext = new Image();\n imageContext.crossOrigin = 'anonymous';\n imageContext.src = url;\n\n imageContext.onload = () => {\n const canvas = document.createElement('canvas');\n const context = canvas.getContext('2d');\n if (!context) return reject(new Error('Canvas not supported'));\n\n canvas.width = imageContext.width;\n canvas.height = imageContext.height;\n\n context.drawImage(imageContext, 0, 0);\n\n const corners = [\n context.getImageData(0, 0, 1, 1).data,\n context.getImageData(imageContext.width - 1, 0, 1, 1).data,\n context.getImageData(0, imageContext.height - 1, 1, 1).data,\n context.getImageData(imageContext.width - 1, imageContext.height - 1, 1, 1).data,\n ];\n\n const isCircular = corners.every((corner) => {\n const imageArray = Array.prototype.slice.call(corner);\n const alpha = imageArray[3];\n return alpha < 10;\n });\n resolve(isCircular);\n };\n imageContext.onerror = () => reject(new Error('Failed to load image'));\n });\n};\n\nconst isWhiteOrNearWhite = (color: string | undefined): boolean => {\n if (!color) return false;\n\n const hex = color.replace('#', '').toLowerCase();\n\n /* regex pattern for hex color format: 3 chars (#fff), 4 chars (#ffff), 6 chars (#ffffff), or 8 chars (#ffffffff)*/\n if (!/^[0-9a-f]{3,4}$|^[0-9a-f]{6}$|^[0-9a-f]{8}$/i.test(hex)) return false;\n\n let fullHex = hex;\n if (hex.length === 3 || hex.length === 4) {\n fullHex = hex\n .split('')\n .map((char) => char + char)\n .join('');\n }\n\n const r = Number.parseInt(fullHex.substring(0, 2), 16);\n const g = Number.parseInt(fullHex.substring(2, 4), 16);\n const b = Number.parseInt(fullHex.substring(4, 6), 16);\n\n const threshold = 220;\n return r >= threshold && g >= threshold && b >= threshold;\n};\n\nconst createContactClickHandler = (contactType: 'email' | 'phone', contactValue: string) => ({\n onClick: () => {\n trackGTMEvent({\n event: 'contact_click',\n contact_type: contactType,\n contact_value: contactValue,\n click_element: `${contactType}_link`,\n });\n },\n onKeyDown: (e: React.KeyboardEvent<HTMLAnchorElement>) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n trackGTMEvent({\n event: 'contact_click',\n contact_type: contactType,\n contact_value: contactValue,\n click_element: `${contactType}_link`,\n });\n globalThis.location.href = `${contactType === 'email' ? 'mailto' : 'tel'}:${contactValue}`;\n }\n },\n});\n\nconst renderContactLink = (contactType: 'email' | 'phone', contactValue: string, className: string) => {\n const protocol = contactType === 'email' ? 'mailto:' : 'tel:';\n const handlers = createContactClickHandler(contactType, contactValue);\n\n return (\n <Typography className={className}>\n <ContactLink href={`${protocol}${contactValue}`} {...handlers}>\n {contactValue}\n </ContactLink>\n </Typography>\n );\n};\nexport default function MysiteHero({\n className,\n shopTitle,\n shopDescription,\n socialTitleText,\n imageDetails,\n email,\n phone,\n bannerProps,\n socialIcons,\n expirationDate,\n showBadges = false,\n totalSavings,\n}: MysiteHeroProps): ReactElement {\n const isMobile = useMediaQuery('(max-width: 560px)');\n const [isScrolled, setIsScrolled] = useState(false);\n const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false);\n const [hasWhiteBackground, setHasWhiteBackground] = useState(false);\n const [isImageCircular, setIsImageCircular] = useState(false);\n\n const toggleDescription = () => {\n setIsDescriptionExpanded(!isDescriptionExpanded);\n };\n\n useEffect(() => {\n const checkImage = async () => {\n if (imageDetails?.imageSrc) {\n const isCircular = await checkIfImageIsCircular(imageDetails.imageSrc);\n setIsImageCircular(isCircular);\n } else {\n setIsImageCircular(false);\n }\n };\n\n checkImage();\n }, [imageDetails?.imageSrc]);\n\n useEffect(() => {\n setHasWhiteBackground(isWhiteOrNearWhite(bannerProps?.backgroundColor));\n }, [bannerProps?.backgroundColor]);\n\n useEffect(() => {\n let debounceTimeout: ReturnType<typeof setTimeout>;\n let lastScrollY = window.scrollY;\n let currentScrollState = false;\n let isTransitioning = false;\n let lastUpdateTime = 0;\n\n const updateScrollState = (newState: boolean) => {\n const now = Date.now();\n\n if (currentScrollState !== newState && !isTransitioning) {\n if (now - lastUpdateTime < 100) {\n return;\n }\n\n isTransitioning = true;\n currentScrollState = newState;\n lastUpdateTime = now;\n\n if (newState) {\n setIsDescriptionExpanded(false);\n }\n\n clearTimeout(debounceTimeout);\n setIsScrolled(newState);\n\n debounceTimeout = setTimeout(() => {\n isTransitioning = false;\n\n if (newState && window.scrollY < 15) {\n window.scrollTo({\n top: isMobile ? 20 : 30,\n behavior: 'smooth',\n });\n }\n }, 300);\n }\n };\n\n const handleScroll = () => {\n const currentScrollY = window.scrollY;\n\n if (isTransitioning) {\n lastScrollY = currentScrollY;\n return;\n }\n\n const scrollDelta = Math.abs(currentScrollY - lastScrollY);\n\n if (scrollDelta < 0.5) {\n return;\n }\n\n const scrollingDown = currentScrollY > lastScrollY;\n\n const scrollDownThreshold = isMobile ? 15 : 25;\n const scrollUpThreshold = isMobile ? 8 : 12;\n\n if (scrollingDown && currentScrollY > scrollDownThreshold && !currentScrollState) {\n updateScrollState(true);\n } else if (!scrollingDown && currentScrollY < scrollUpThreshold && currentScrollState) {\n updateScrollState(false);\n }\n\n lastScrollY = currentScrollY;\n };\n\n const initializeState = () => {\n const initialScrollY = window.scrollY;\n const scrollThreshold = isMobile ? 5 : 10;\n const shouldStartCompact = initialScrollY > scrollThreshold;\n\n currentScrollState = shouldStartCompact;\n setIsScrolled(shouldStartCompact);\n lastScrollY = initialScrollY;\n lastUpdateTime = Date.now();\n };\n\n let rafId: number | null = null;\n let lastRafTime = 0;\n const throttledScrollHandler = () => {\n if (rafId) return;\n\n const now = Date.now();\n if (now - lastRafTime < 16) {\n return;\n }\n\n rafId = requestAnimationFrame(() => {\n handleScroll();\n lastRafTime = Date.now();\n rafId = null;\n });\n };\n\n initializeState();\n window.addEventListener('scroll', throttledScrollHandler, { passive: true });\n\n return () => {\n window.removeEventListener('scroll', throttledScrollHandler);\n if (rafId) cancelAnimationFrame(rafId);\n clearTimeout(debounceTimeout);\n };\n }, [isMobile]);\n\n const renderSocialMediaIcons = useMemo(() => {\n return socialIcons?.map((icon, index) => {\n const handleSocialClick = (e: React.MouseEvent) => {\n e.preventDefault();\n trackGTMEvent({\n event: 'social_click',\n social_platform: icon.type,\n social_url: icon.url,\n click_element: 'social_icon',\n });\n window.open(icon.url, '_blank');\n };\n\n return (\n <StyledSpan key={icon?.type + index} onClick={handleSocialClick}>\n <NsLink href={icon.url} target=\"_blank\">\n <NsImage\n key={icon?.type + index}\n src={`https://www.google.com/s2/favicons?domain=${icon?.url}&sz=24`}\n alt={`${icon.type} icon`}\n width=\"24\"\n height=\"24\"\n />\n </NsLink>\n </StyledSpan>\n );\n });\n }, [socialIcons]);\n\n const containerClass = `${className} ${isScrolled ? 'scrolled' : ''}`;\n const props = {\n shopTitle,\n shopDescription,\n socialTitleText,\n email,\n phone,\n showBadges,\n expirationDate,\n totalSavings,\n };\n\n const getCharacterLimit = () => {\n if (window.innerWidth <= 380) return 50;\n if (window.innerWidth <= 415) return 56;\n if (window.innerWidth <= 460) return 62;\n return 80;\n };\n\n const shouldShowToggle = isMobile && shopDescription && shopDescription.length > getCharacterLimit();\n\n return isMobile ? (\n <MysiteHeroContainerMobile\n className={containerClass}\n data-testid=\"my-site-shop-header\"\n bannerProps={bannerProps}\n isCircularImage={isImageCircular}\n hasWhiteBackground={hasWhiteBackground}\n >\n <Box className=\"image-content-mobile\">\n {renderImageContent(imageDetails, bannerProps ?? {}, 'bg-image-mobile')}\n {renderMobileContent(props, isScrolled, renderSocialMediaIcons, isMobile, hasWhiteBackground)}\n </Box>\n {!isScrolled && (\n <Box className=\"expandable-description-mobile\">\n <Typography\n className={`description-content-mobile ${isDescriptionExpanded || !shouldShowToggle ? 'expanded' : 'collapsed'}`}\n >\n {shopDescription}\n </Typography>\n {shouldShowToggle && (\n <ToggleButtonMobile onClick={toggleDescription}>\n <ArrowDownIcon\n width={16}\n height={16}\n className={`arrow-icon-mobile ${isDescriptionExpanded ? 'expanded' : ''}`}\n />\n </ToggleButtonMobile>\n )}\n </Box>\n )}\n </MysiteHeroContainerMobile>\n ) : (\n <MysiteHeroContainer\n className={containerClass}\n data-testid=\"my-site-shop-header\"\n bannerProps={bannerProps}\n isCircularImage={isImageCircular}\n hasWhiteBackground={hasWhiteBackground}\n >\n {renderImageContent(imageDetails, bannerProps ?? {}, 'bg-image')}\n {renderDesktopContent(props, isScrolled, renderSocialMediaIcons, isMobile, hasWhiteBackground)}\n </MysiteHeroContainer>\n );\n}\n","import React from 'react';\nimport { styled } from '@nuskin/foundation-theme';\nimport { Box, BoxProps } from '@mui/material';\n\ninterface StyledBoxProps extends BoxProps {\n bannerProps?: {\n backgroundColor?: string;\n headlineFont?: string;\n paragraphFont?: string;\n };\n isCircularImage?: boolean;\n hasWhiteBackground?: boolean;\n}\n\ninterface BadgeProps extends BoxProps {\n hasWhiteBackground?: boolean;\n}\n\nconst getContactTextStyles = (hasWhiteBackground: boolean | undefined) => ({\n fontSize: '12px',\n fontStyle: 'normal' as const,\n fontWeight: '600',\n lineHeight: '16px',\n letterSpacing: '0.12px',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n '& a': {\n color: 'inherit',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n});\n\nconst getSocialTitleStyles = (hasWhiteBackground: boolean | undefined) => ({\n fontSize: '12px',\n fontStyle: 'normal' as const,\n fontWeight: '700',\n lineHeight: '16px',\n letterSpacing: '0.48px',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n textTransform: 'uppercase' as const,\n paddingLeft: '5px',\n});\n\nconst getSocialIconsStyles = () => ({\n display: 'flex',\n flexDirection: 'row' as const,\n gap: '10px',\n alignItems: 'center',\n});\n\nconst getContactTextMobileStyles = (hasWhiteBackground: boolean | undefined) => ({\n ...getContactTextStyles(hasWhiteBackground),\n paddingBottom: '11px',\n wordBreak: 'break-all' as const,\n overflowWrap: 'break-word' as const,\n paddingLeft: '5px',\n '& a': {\n color: 'inherit',\n textDecoration: 'none',\n },\n '@media (max-width: 420px)': {\n fontSize: '11px',\n lineHeight: '15px',\n paddingBottom: '8px',\n },\n '@media (max-width: 400px)': {\n fontSize: '10px',\n lineHeight: '14px',\n paddingBottom: '6px',\n },\n '@media (max-width: 375px)': {\n fontSize: '8px',\n lineHeight: '12px',\n paddingBottom: '4px',\n },\n});\n\nconst getSocialTitleMobileStyles = (hasWhiteBackground: boolean | undefined) => ({\n ...getSocialTitleStyles(hasWhiteBackground),\n marginBottom: '11px',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n '@media (max-width: 420px)': {\n fontSize: '11px',\n lineHeight: '14px',\n marginBottom: '8px',\n },\n '@media (max-width: 400px)': {\n fontSize: '10px',\n lineHeight: '12px',\n marginBottom: '5px',\n },\n '@media (max-width: 375px)': {\n fontSize: '8px',\n lineHeight: '11px',\n marginBottom: '4px',\n },\n});\n\nexport const MysiteHeroContainer = styled((props: StyledBoxProps) => <Box {...props} />)(\n ({ bannerProps, isCircularImage, hasWhiteBackground }) => ({\n backgroundClip: 'border-box',\n display: 'flex',\n background: bannerProps?.backgroundColor ?? '#383838',\n position: 'relative',\n overflow: 'hidden',\n width: '100%',\n height: 'auto',\n flexDirection: 'row',\n alignItems: 'center',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'transform, opacity',\n transform: 'translateZ(0)',\n backfaceVisibility: 'hidden',\n '&.scrolled': {\n top: 0,\n left: 0,\n right: 0,\n boxShadow: '0 2px 8px rgba(0,0,0,0.2)',\n '.content': {\n paddingTop: '0',\n justifyContent: 'center',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.body-title': {\n fontSize: '26px',\n lineHeight: '34px',\n marginBottom: '0',\n fontStyle: 'normal',\n fontWeight: '400',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n\n '.bg-image': {\n width: '90px',\n height: '90px',\n padding: isCircularImage ? '2px' : '0px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n objectFit: 'cover',\n objectPosition: 'center',\n },\n '.placeholder-image': {\n '& > div': {\n width: '90px',\n height: '90px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n },\n },\n '.content': {\n width: '70%',\n height: '100%',\n marginLeft: '2%',\n marginRight: 'auto',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n boxSizing: 'border-box',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.bg-image': {\n width: '252px',\n height: '252px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n padding: isCircularImage ? '3px' : '0px',\n objectFit: 'cover',\n objectPosition: 'center',\n },\n '.placeholder-image': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n '& > div': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n },\n '.body-title': {\n fontSize: '32px',\n lineHeight: '38px',\n marginBottom: '8px',\n fontWeight: '400',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n paddingLeft: '5px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.body-text': {\n fontSize: '16px',\n marginBottom: '12px',\n fontStyle: 'normal',\n fontWeight: '400',\n lineHeight: '22px',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontFamily: bannerProps?.paragraphFont ?? 'inherit',\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n WebkitLineClamp: 3,\n textOverflow: 'ellipsis',\n paddingLeft: '5px',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n },\n '.social-media': {\n display: 'flex',\n flexDirection: 'column',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n },\n '.email-text': getContactTextStyles(hasWhiteBackground),\n '.phone-text': getContactTextStyles(hasWhiteBackground),\n '.social-title-text': {\n ...getSocialTitleStyles(hasWhiteBackground),\n marginBottom: '8px',\n },\n '.social-icons': {\n ...getSocialIconsStyles(),\n paddingBottom: '8px',\n },\n }),\n);\n\nexport const MysiteHeroContainerMobile = styled((props: StyledBoxProps) => <Box {...props} />)(\n ({ bannerProps, isCircularImage, hasWhiteBackground }) => ({\n backgroundClip: 'border-box',\n display: 'flex',\n background: bannerProps?.backgroundColor ?? '#383838',\n position: 'relative',\n overflow: 'hidden',\n width: '100%',\n flexDirection: 'column',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'transform, opacity',\n transform: 'translateZ(0)',\n backfaceVisibility: 'hidden',\n '&.scrolled': {\n top: 0,\n left: 0,\n right: 0,\n boxShadow: '0 2px 8px rgba(0,0,0,0.2)',\n '.content-mobile': {\n paddingTop: '5px',\n width: '60%',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.body-title-mobile': {\n fontSize: '18px',\n lineHeight: '28px',\n marginBottom: '0',\n fontStyle: 'normal',\n fontWeight: '400',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.bg-image-mobile': {\n width: '75px',\n height: '75px',\n padding: isCircularImage ? '2px' : '0px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n objectFit: 'cover',\n objectPosition: 'center',\n },\n '.placeholder-image-mobile': {\n '& > div': {\n width: '75px !important',\n height: '75px !important',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n },\n },\n '.image-content-mobile': {\n display: 'flex',\n flexDirection: 'row',\n width: '100%',\n justifyContent: 'center',\n alignItems: 'center',\n },\n '.content-mobile': {\n width: '55%',\n height: '100%',\n paddingTop: '10px',\n paddingRight: '10px',\n marginLeft: '8px',\n marginRight: 'auto',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n '@media (max-width: 420px)': {\n paddingTop: '8px',\n width: '100%',\n },\n '@media (max-width: 400px)': {\n paddingTop: '6px',\n width: '100%',\n height: '100%',\n },\n '@media (max-width: 375px)': {\n paddingTop: '4px',\n width: '100%',\n height: '100%',\n },\n },\n '.bg-image-mobile': {\n width: '144px',\n height: '144px',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n objectFit: 'cover',\n objectPosition: 'center',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n padding: isCircularImage ? '2px' : '0px',\n '@media (max-width: 420px)': {\n width: '120px',\n height: '120px',\n },\n '@media (max-width: 400px)': {\n width: '112px',\n height: '112px',\n },\n '@media (max-width: 375px)': {\n width: '90px',\n height: '90px',\n },\n },\n '.placeholder-image-mobile': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n '& > div': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n width: '144px',\n height: '144px',\n '@media (max-width: 420px)': {\n width: '120px',\n height: '120px',\n },\n '@media (max-width: 400px)': {\n width: '110px !important',\n height: '110px !important',\n },\n '@media (max-width: 375px)': {\n width: '90px',\n height: '90px',\n },\n },\n },\n '.body-title-mobile': {\n fontSize: '22px',\n lineHeight: '28px',\n marginBottom: '13px',\n fontWeight: '400',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontStyle: 'normal',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n paddingLeft: '5px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n '@media (max-width: 420px)': {\n fontSize: '16px',\n lineHeight: '24px',\n marginBottom: '8px',\n },\n '@media (max-width: 400px)': {\n fontSize: '16px',\n lineHeight: '22px',\n marginBottom: '6px',\n },\n '@media (max-width: 375px)': {\n fontSize: '14px',\n lineHeight: '20px',\n marginBottom: '4px',\n },\n },\n '.body-text-mobile': {\n fontSize: '14px',\n padding: '20px 25px 20px 25px',\n fontStyle: 'normal',\n fontWeight: '400',\n lineHeight: '20px',\n color: '#252525',\n backgroundColor: '#E0E0E0',\n fontFamily: bannerProps?.paragraphFont ?? 'inherit',\n transition: 'all 0.25s cubic-bezier(0.4, 0, 0.2, 1)',\n opacity: 1,\n transform: 'translateY(0)',\n },\n '.expandable-description-mobile': {\n backgroundColor: '#E0E0E0',\n position: 'relative',\n },\n '.description-content-mobile': {\n fontSize: '14px',\n padding: '10px 15px',\n fontStyle: 'normal',\n fontWeight: '400',\n lineHeight: '20px',\n color: '#252525',\n fontFamily: bannerProps?.paragraphFont ?? 'inherit',\n transition: 'max-height 0.3s ease-in-out, opacity 0.3s ease-in-out',\n overflow: 'hidden',\n position: 'relative',\n '&.collapsed': {\n maxHeight: '50px',\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n height: '20px',\n background: 'linear-gradient(transparent, rgba(224, 224, 224, 0.8), #E0E0E0)',\n pointerEvents: 'none',\n },\n },\n '&.expanded': {\n maxHeight: 'none',\n whiteSpace: 'normal',\n display: 'block',\n '&::after': {\n display: 'none',\n },\n },\n },\n '.email-text-mobile': getContactTextMobileStyles(hasWhiteBackground),\n '.phone-text-mobile': getContactTextMobileStyles(hasWhiteBackground),\n '.social-title-text-mobile': getSocialTitleMobileStyles(hasWhiteBackground),\n '.social-icons-mobile': {\n ...getSocialIconsStyles(),\n paddingBottom: '10px',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n '& img': {\n width: '24px',\n height: '24px',\n '@media (max-width: 400px)': {\n width: '20px',\n height: '20px',\n },\n '@media (max-width: 375px)': {\n width: '18px',\n height: '18px',\n },\n },\n '@media (max-width: 420px)': {\n paddingBottom: '8px',\n },\n '@media (max-width: 400px)': {\n paddingBottom: '4px',\n },\n '@media (max-width: 375px)': {\n paddingBottom: '3px',\n },\n },\n }),\n);\n\nexport const BadgeContainer = styled(Box)({\n display: 'flex',\n gap: '12px',\n marginBottom: '16px',\n paddingLeft: '5px',\n\n '&.mobile-badges': {\n flexDirection: 'column',\n gap: '8px',\n marginBottom: '12px',\n },\n\n '&.tablet-badges': {\n flexDirection: 'row',\n gap: '12px',\n marginBottom: '8px',\n },\n});\n\nexport const Badge = styled((props: BadgeProps) => <Box {...props} />)(({ hasWhiteBackground }) => ({\n backgroundColor: 'rgba(255, 255, 255, 0.2)',\n backdropFilter: 'blur(10px)',\n borderRadius: '20px',\n padding: '8px 16px',\n display: 'flex',\n alignItems: 'center',\n gap: '4px',\n border: '1px solid rgba(255, 255, 255, 0.3)',\n transition: 'all 0.3s ease',\n\n '&.mobile-badge': {\n padding: '6px 12px',\n borderRadius: '16px',\n fontSize: '12px',\n },\n\n '&.tablet-badge': {\n padding: '8px 16px',\n borderRadius: '20px',\n fontSize: '14px',\n },\n\n '&.total-savings-badge': {\n backgroundColor: '#4A6987',\n border: 'none',\n borderRadius: '8px',\n padding: '8px 16px',\n gap: '4px',\n minHeight: '32px',\n backdropFilter: 'none',\n '.badge-value': {\n color: '#FFFFFF',\n },\n '&:hover': {\n backgroundColor: '#4A6987',\n transform: 'none',\n boxShadow: 'none',\n },\n },\n\n '&.expiration-badge': {\n borderRadius: '8px',\n padding: '8px 16px',\n gap: '4px',\n minHeight: '32px',\n },\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.3)',\n transform: 'translateY(-1px)',\n boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',\n },\n\n '.badge-text': {\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontWeight: '400',\n opacity: 0.9,\n },\n\n '.badge-value': {\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontWeight: '600',\n },\n}));\nexport const ToggleButtonMobile = styled('button')({\n backgroundColor: '#E0E0E0',\n border: '1px solid #252525',\n borderRadius: '10px',\n cursor: 'pointer',\n width: '40px',\n height: '20px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n margin: '10px auto 5px auto',\n transition: 'all 0.2s ease',\n '& .arrow-icon-mobile': {\n transition: 'transform 0.3s ease',\n '&.expanded': {\n transform: 'rotate(180deg)',\n },\n },\n});\nexport const StyledSpan = styled(Box)`\n background: none;\n border: 2px solid transparent;\n cursor: pointer;\n padding: 2px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n transition: all 0.3s ease;\n\n &:hover {\n transform: scale(1.1);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n\n &:focus,\n &:focus-within {\n outline: none;\n border-color: #007bff;\n box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);\n }\n\n &:hover svg {\n fill: #ffffff;\n }\n`;\nexport const ImgTabIndex = styled('span')`\n line-height: 0.5;\n`;\n\nexport const ContactLink = styled('a')({\n fontSize: 'inherit',\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit',\n color: 'inherit',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n});\n\nexport const BadgeValue = styled('span')({});\n","import React from 'react';\nimport { Box } from '@mui/material';\n\ntype PlaceholderImageProps = {\n readonly width: string | number;\n readonly height: string | number;\n readonly backgroundColor: string;\n};\n\nexport const PlaceholderImage: React.FC<PlaceholderImageProps> = ({ width, height, backgroundColor }) => {\n return (\n <Box\n sx={{\n width,\n height,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor,\n }}\n data-testid=\"placeholder-image\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"128\" height=\"129\" viewBox=\"0 0 128 129\" fill=\"none\">\n <g id=\"ns_logomark\">\n <path\n id=\"Vector\"\n d=\"M127.495 52.1946C125.663 47.9538 122.999 44.1171 119.661 40.9073C112.565 34.2835 102.562 31.7037 93.1175 34.0622C83.6733 36.4206 76.0882 43.3926 72.991 52.5619C71.4142 56.8414 70.6063 61.3627 70.6039 65.9196C70.6039 85.8227 70.6039 105.737 70.6039 125.662C70.6039 129.001 70.6039 129.001 66.9051 128.834C66.9051 128.2 66.9051 127.499 66.9051 126.831C66.9051 104.323 66.9051 81.8263 66.9051 59.3409C66.3415 45.3064 74.9302 32.5039 88.1888 27.6164C89.79 27.0612 91.4307 26.6259 93.0981 26.314C94.7114 25.98 96.4605 25.8465 98.0738 25.6461C96.0231 16.3291 78.9419 5.60953 65.0889 4.97504C50.3084 4.62252 36.6074 12.6365 29.7509 25.6461C31.331 25.8465 32.8779 25.9466 34.3569 26.2138C48.0999 28.544 58.7086 39.4998 60.5168 53.2298C60.8904 55.7285 61.0812 58.2508 61.0877 60.7769C61.0877 82.7507 61.0877 104.724 61.0877 126.697C61.0877 128.434 60.6842 129.169 58.8016 128.968C56.9183 128.768 57.1204 128.2 57.1204 126.965C57.1204 119.985 57.1204 113.006 57.1204 105.993C57.1204 92.1674 57.1204 78.3423 57.1204 64.5171C57.2385 56.3928 54.2457 48.5271 48.7477 42.5103C42.2429 35.5282 32.6539 32.2371 23.1959 33.7401C13.7379 35.243 5.66194 41.3411 1.67448 49.9906C1.23781 50.8254 0.867444 51.6937 0.262573 52.9293C5.79294 22.3996 32.4752 0.139867 63.7085 0.000656323C94.9411 -0.138555 121.824 21.8824 127.629 52.3616\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_2\"\n d=\"M86.0995 124.927C86.0995 124.293 86.0995 123.858 86.0995 123.425C86.0995 111.669 86.0995 100.049 86.0995 88.1269C85.8836 82.4231 88.0775 76.89 92.1523 72.8653C97.3131 67.9567 104.984 66.7091 111.452 69.7263C117.892 72.1185 122.166 78.225 122.178 85.0541C122.372 92.1747 119.781 99.0921 114.949 104.356C107.882 113.237 98.6134 120.141 88.05 124.392C87.4217 124.616 86.782 124.805 86.1335 124.96\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_3\"\n d=\"M41.8183 125.395C37.6149 123.224 33.6477 121.487 29.9828 119.25C21.5405 114.299 14.4778 107.331 9.43828 98.9796C6.53442 94.3985 5.34408 88.9493 6.07591 83.5852C7.056 75.2882 13.8859 68.8841 22.2829 68.3905C31.1231 67.2473 39.3527 73.0751 41.1455 81.7484C41.76 84.263 42.0762 86.8411 42.0868 89.4287C42.0868 100.516 42.0868 111.636 42.0868 122.823C42.0868 123.457 42.0867 124.059 41.8854 125.294\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_4\"\n d=\"M51.3337 127.431C47.9713 127.431 47.6681 127.198 47.6681 124.326V76.6386C48.1096 67.937 42.9747 59.906 34.8574 56.602C25.8992 52.8557 15.5485 54.8615 8.66523 61.6779C4.28638 66.6086 1.89197 72.9696 1.94049 79.5438C1.95423 80.2444 1.78037 80.9357 1.43588 81.5476C1.06552 79.9446 0.62885 78.2081 0.426687 76.7387C-0.724024 70.4463 0.471163 63.9529 3.78906 58.472C6.09291 54.6111 9.65016 51.6434 13.8762 50.0567C22.8587 46.555 32.9393 47.1785 41.4148 51.7598C47.6592 54.8694 51.5262 61.2882 51.3337 68.2232C51.5019 87.6249 51.3337 107.027 51.3337 126.396C51.3337 126.797 51.3337 127.164 51.3337 127.532\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_5\"\n d=\"M76.287 127.499V125.094C76.287 107.196 76.4883 89.2963 76.287 71.3966C76.0848 56.9034 84.2554 50.6588 95.7553 48.3545C101.535 47.2005 107.524 47.6393 113.071 49.6235C122.914 53.3319 128.994 63.1725 127.866 73.5672C127.631 76.2831 127.17 78.975 126.487 81.6151C125.916 78.2758 125.68 74.9364 124.772 71.597C122.808 64.3002 117.377 58.4174 110.228 55.8421C103.078 53.2668 95.1132 54.3239 88.8955 58.6734C83.0441 62.6207 79.7011 69.3237 80.086 76.3389C80.086 92.2349 80.086 108.131 80.086 124.026C80.086 127.366 80.086 127.366 76.2198 127.366\"\n fill=\"#252525\"\n />\n </g>\n </svg>\n </Box>\n );\n};\n","import React from 'react';\n\ntype ArrowDownIconProps = {\n readonly width?: string | number;\n readonly height?: string | number;\n readonly className?: string;\n};\n\nexport const ArrowDownIcon: React.FC<ArrowDownIconProps> = ({ width = 16, height = 16, className = '' }) => {\n return (\n <svg\n width={width}\n height={height}\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className={className}\n data-testid=\"arrow-down-icon\"\n >\n <path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\" />\n </svg>\n );\n};\n","export interface GTMEvent {\n event: string;\n\n [key: string]: unknown;\n}\n\ndeclare global {\n interface Window {\n dataLayer: unknown[];\n }\n}\n\nexport function trackGTMEvent(eventData: GTMEvent): void {\n if (typeof window === 'undefined') {\n return;\n }\n\n const url = window.location.href;\n const updatedEventData = { ...eventData };\n\n const prefix = url.includes('personal-offer') ? 'postorefront_' : 'mysite_';\n updatedEventData.event = prefix + eventData.event;\n\n try {\n if (window.dataLayer) {\n window.dataLayer.push(updatedEventData);\n } else {\n console.error('GTM dataLayer not available, but event logged');\n window.dataLayer = [];\n window.dataLayer.push(updatedEventData);\n }\n } catch (error) {\n console.error('Failed to track GTM event:', error);\n }\n}\n","import { styled } from '@nuskin/foundation-theme';\n\nexport const DashboardContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 20px;\n width: 100%;\n box-sizing: border-box;\n padding: 16px;\n\n @media (min-width: 768px) {\n gap: 24px;\n padding: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n padding: 24px;\n }\n`;\n\nexport const StatsRow = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`;\n\nexport const WidgetContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n gap: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`;\n\nexport const TwoColumnGrid = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: repeat(2, 1fr);\n gap: 24px;\n }\n`;\n\nexport const ErrorContainer = styled('div')`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;\n","import React from 'react';\nimport CalendarTodayIcon from '@mui/icons-material/CalendarToday';\nimport PublicIcon from '@mui/icons-material/Public';\nimport { NsSpinner } from '@nuskin/foundation-ui-components';\nimport {\n HeaderContainer,\n TitleSection,\n ShopTitle,\n DateRangeLabel,\n FiltersSection,\n FilterDropdownContainer,\n FilterLabel,\n StyledSelect,\n FilterIcon,\n LoadingIndicatorContainer,\n DesktopFiltersContainer,\n} from './DashboardHeader.styled';\nimport type { DateRangeOption, MarketOption, MarketFilterOption, DashboardStats } from '../types.d';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport { useMarketOptions } from '../utils/marketOptions';\n\nexport interface DashboardHeaderProps {\n readonly shopTitle?: string;\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly dateRangeLabel?: string;\n readonly isLoading?: boolean;\n readonly stats?: DashboardStats | null;\n\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n}\n\nexport const DashboardHeader: React.FC<DashboardHeaderProps> = ({\n shopTitle,\n dateRange,\n market,\n dateRangeLabel: dateRangeLabelProp,\n isLoading = false,\n stats,\n markets,\n onDateRangeChange,\n onMarketChange,\n}) => {\n const marketOptions = useMarketOptions(markets);\n\n const handleDateRangeChange = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newDateRange = event.target.value as DateRangeOption;\n onDateRangeChange?.(newDateRange);\n };\n\n const handleMarketChange = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newMarket = event.target.value;\n onMarketChange?.(newMarket);\n };\n\n const handleFilterKeyDown = (event: React.KeyboardEvent<HTMLSelectElement>) => {\n if (event.key === 'Escape') {\n (event.target as HTMLSelectElement).blur();\n }\n };\n\n const getDateRangeLabelText = () => {\n if (dateRangeLabelProp) return dateRangeLabelProp;\n if (stats?.dateRange) return stats.dateRange.label;\n return getTranslation(Keys.filter.dateRange.last30days);\n };\n\n return (\n <HeaderContainer as=\"header\" data-testid=\"dashboard-header\">\n <TitleSection>\n <ShopTitle data-testid=\"dashboard-shop-title\">\n {shopTitle ?? stats?.shopTitle ?? getTranslation(Keys.title)}\n </ShopTitle>\n <DateRangeLabel aria-live=\"polite\" data-testid=\"dashboard-date-range-label\">\n {getDateRangeLabelText()}\n </DateRangeLabel>\n </TitleSection>\n\n <FiltersSection\n aria-label={getTranslation(Keys.ariaLabel.dashboardFilters)}\n data-testid=\"dashboard-filters-section\"\n >\n <DesktopFiltersContainer>\n {isLoading && (\n <LoadingIndicatorContainer\n as=\"output\"\n aria-live=\"polite\"\n aria-label={getTranslation(Keys.ariaLabel.loadingDashboard)}\n data-testid=\"dashboard-loading-indicator\"\n >\n <NsSpinner />\n </LoadingIndicatorContainer>\n )}\n\n <FilterDropdownContainer>\n <FilterLabel htmlFor=\"filter-date-range\">\n {getTranslation(Keys.filter.dateRange.label)}\n </FilterLabel>\n <FilterIcon aria-hidden=\"true\">\n <CalendarTodayIcon />\n </FilterIcon>\n <StyledSelect\n id=\"filter-date-range\"\n data-testid=\"filter-date-range\"\n value={dateRange}\n onChange={handleDateRangeChange}\n onKeyDown={handleFilterKeyDown}\n disabled={isLoading}\n aria-label={`${getTranslation(Keys.ariaLabel.dateRangeFilter)} ${getTranslation(Keys.filter.dateRange[dateRange])}`}\n >\n <option value=\"last7days\">{getTranslation(Keys.filter.dateRange.last7days)}</option>\n <option value=\"last30days\">{getTranslation(Keys.filter.dateRange.last30days)}</option>\n <option value=\"last90days\">{getTranslation(Keys.filter.dateRange.last90days)}</option>\n <option value=\"thisMonth\">{getTranslation(Keys.filter.dateRange.thisMonth)}</option>\n </StyledSelect>\n </FilterDropdownContainer>\n\n <FilterDropdownContainer>\n <FilterLabel htmlFor=\"filter-market\">{getTranslation(Keys.filter.market.label)}</FilterLabel>\n <FilterIcon aria-hidden=\"true\">\n <PublicIcon />\n </FilterIcon>\n <StyledSelect\n id=\"filter-market\"\n data-testid=\"filter-market\"\n value={market}\n onChange={handleMarketChange}\n onKeyDown={handleFilterKeyDown}\n disabled={isLoading}\n aria-label={`${getTranslation(Keys.ariaLabel.marketFilter)} ${\n marketOptions.find((opt) => opt.value === market)?.label ?? String(market)\n }`}\n >\n {marketOptions.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </StyledSelect>\n </FilterDropdownContainer>\n </DesktopFiltersContainer>\n </FiltersSection>\n </HeaderContainer>\n );\n};\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const HeaderContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 12px;\n min-height: auto;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n gap: 16px;\n }\n\n @media (min-width: 1080px) {\n padding: 16px 24px;\n gap: 20px;\n }\n`;\n\nexport const TitleSection = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: baseline;\n gap: 12px;\n flex-wrap: wrap;\n`;\n\nexport const ShopTitle = styled('h1')`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n\n @media (min-width: 1080px) {\n font-size: 16px;\n }\n`;\n\nexport const DateRangeLabel = styled('div')`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`;\n\nexport const FiltersSection = styled('div')`\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n gap: 12px;\n width: 100%;\n overflow-x: auto;\n\n @media (min-width: 768px) {\n width: auto;\n gap: 16px;\n }\n`;\n\nexport const FilterDropdownContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n position: relative;\n`;\n\nexport const FilterLabel = styled('label')`\n font-size: 14px;\n font-weight: 500;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N80')};\n white-space: nowrap;\n display: none;\n margin-bottom: 0;\n\n @media (min-width: 768px) {\n display: block;\n }\n`;\n\nexport const StyledSelect = styled('select')`\n height: 40px;\n padding: 8px 32px 8px 12px;\n background-color: transparent;\n border: none;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n appearance: none;\n background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3e%3cpath d=\"M5.625 7.3125L9 10.6875L12.375 7.3125\" stroke=\"%235f5f5f\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/%3e%3c/svg%3e');\n background-repeat: no-repeat;\n background-position: right 8px center;\n min-width: 100px;\n max-width: 100%;\n white-space: nowrap;\n flex-shrink: 0;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n @media (min-width: 768px) {\n min-width: 140px;\n }\n\n @media (min-width: 1080px) {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N10')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 8px;\n min-width: 160px;\n }\n`;\n\nexport const FilterIcon = styled('span')`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n svg {\n width: 16px;\n height: 16px;\n }\n`;\n\nexport const LoadingIndicatorContainer = styled('div')`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n overflow: hidden;\n\n svg,\n img,\n > * {\n width: 28px !important;\n height: 28px !important;\n max-width: 28px;\n max-height: 28px;\n }\n`;\n\nexport const DesktopFiltersContainer = styled('div')`\n display: flex;\n flex-wrap: nowrap;\n gap: 12px;\n align-items: center;\n width: 100%;\n overflow-x: auto;\n\n @media (min-width: 768px) {\n width: auto;\n gap: 16px;\n overflow-x: visible;\n }\n\n @media (min-width: 1080px) {\n gap: 20px;\n }\n`;\n\nexport const StyledCircularProgress = styled('div')`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n","export type TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport type TranslateFn = (key: string, fallback: string) => string;\n\nlet activeResolver: TranslateFn | undefined;\n\nexport function setTranslationResolver(resolver: TranslateFn | undefined): void {\n activeResolver = resolver;\n}\n\nexport function getTranslationResolver(): TranslateFn | undefined {\n return activeResolver;\n}\n\nexport function resolveTranslation(entry: TranslationEntry): string {\n if (!activeResolver) {\n return entry.fallback;\n }\n let result: string | undefined;\n try {\n result = activeResolver(entry.key, entry.fallback);\n } catch {\n result = undefined;\n }\n return typeof result === 'string' && result.length > 0 ? result : entry.fallback;\n}\n","import { resolveTranslation } from './translationResolver';\n\nexport const ShoppingDashboardTranslationKeys = {\n title: {\n key: 'shoppingDashboard.title',\n fallback: 'Shop Performance',\n },\n error: {\n key: 'shoppingDashboard.error',\n fallback: 'Error loading dashboard',\n },\n stats: {\n revenue: {\n key: 'shoppingDashboard.stats.revenue',\n fallback: 'Total Revenue',\n },\n volume: {\n key: 'shoppingDashboard.stats.volume',\n fallback: 'Volume',\n },\n visits: {\n key: 'shoppingDashboard.stats.visits',\n fallback: 'Site Visits',\n },\n subtitle: {\n dcSv: {\n key: 'shoppingDashboard.stats.subtitle.dcSv',\n fallback: 'DC-SV',\n },\n conversionRate: {\n key: 'shoppingDashboard.stats.subtitle.conversionRate',\n fallback: 'Conversion Rate',\n },\n },\n trend: {\n increased: {\n key: 'shoppingDashboard.stats.trend.increased',\n fallback: 'increased',\n },\n decreased: {\n key: 'shoppingDashboard.stats.trend.decreased',\n fallback: 'decreased',\n },\n unchanged: {\n key: 'shoppingDashboard.stats.trend.unchanged',\n fallback: 'unchanged',\n },\n },\n details: {\n key: 'shoppingDashboard.stats.details',\n fallback: 'details',\n },\n },\n filter: {\n dateRange: {\n label: {\n key: 'shoppingDashboard.filter.dateRange.label',\n fallback: 'Date Range',\n },\n last7days: {\n key: 'shoppingDashboard.filter.dateRange.last7days',\n fallback: 'Last 7 Days',\n },\n last30days: {\n key: 'shoppingDashboard.filter.dateRange.last30days',\n fallback: 'Last 30 Days',\n },\n last90days: {\n key: 'shoppingDashboard.filter.dateRange.last90days',\n fallback: 'Last 90 Days',\n },\n thisMonth: {\n key: 'shoppingDashboard.filter.dateRange.thisMonth',\n fallback: 'This Month',\n },\n },\n\n market: {\n label: {\n key: 'shoppingDashboard.filter.market.label',\n fallback: 'Market',\n },\n all: {\n key: 'shoppingDashboard.filter.market.all',\n fallback: 'All Markets',\n },\n },\n\n productSort: {\n label: {\n key: 'shoppingDashboard.filter.productSort.label',\n fallback: 'Sort By',\n },\n units: {\n key: 'shoppingDashboard.filter.productSort.units',\n fallback: 'Units',\n },\n revenue: {\n key: 'shoppingDashboard.filter.productSort.revenue',\n fallback: 'Revenue',\n },\n volume: {\n key: 'shoppingDashboard.filter.productSort.volume',\n fallback: 'Volume',\n },\n byUnits: {\n key: 'shoppingDashboard.filter.productSort.byUnits',\n fallback: 'By: Units',\n },\n byRevenue: {\n key: 'shoppingDashboard.filter.productSort.byRevenue',\n fallback: 'By: Revenue',\n },\n byVolume: {\n key: 'shoppingDashboard.filter.productSort.byVolume',\n fallback: 'By: Volume',\n },\n },\n signupView: {\n label: {\n key: 'shoppingDashboard.filter.signupView.label',\n fallback: 'Show',\n },\n all: {\n key: 'shoppingDashboard.filter.signupView.all',\n fallback: 'All',\n },\n members: {\n key: 'shoppingDashboard.filter.signupView.members',\n fallback: 'Members',\n },\n retail: {\n key: 'shoppingDashboard.filter.signupView.retail',\n fallback: 'Retail',\n },\n brandAffiliates: {\n key: 'shoppingDashboard.filter.signupView.brandAffiliates',\n fallback: 'Brand Affiliates',\n },\n showAll: {\n key: 'shoppingDashboard.filter.signupView.showAll',\n fallback: 'Show: All',\n },\n showMembers: {\n key: 'shoppingDashboard.filter.signupView.showMembers',\n fallback: 'Show: Members',\n },\n showRetail: {\n key: 'shoppingDashboard.filter.signupView.showRetail',\n fallback: 'Show: Retail',\n },\n showBrandAffiliates: {\n key: 'shoppingDashboard.filter.signupView.showBrandAffiliates',\n fallback: 'Show: Brand Affiliates',\n },\n },\n conversionType: {\n all: {\n key: 'shoppingDashboard.filter.conversionType.all',\n fallback: 'All',\n },\n standard: {\n key: 'shoppingDashboard.filter.conversionType.standard',\n fallback: 'Standard',\n },\n subscription: {\n key: 'shoppingDashboard.filter.conversionType.subscription',\n fallback: 'Subscription',\n },\n },\n categorySort: {\n byRevenue: {\n key: 'shoppingDashboard.filter.categorySort.byRevenue',\n fallback: 'By: Revenue',\n },\n byTrend: {\n key: 'shoppingDashboard.filter.categorySort.byTrend',\n fallback: 'By: Trend',\n },\n },\n },\n widget: {\n topProducts: {\n title: {\n key: 'shoppingDashboard.widget.topProducts.title',\n fallback: 'Top Selling Products',\n },\n viewAll: {\n key: 'shoppingDashboard.widget.topProducts.viewAll',\n fallback: 'View All Products',\n },\n units: {\n key: 'shoppingDashboard.widget.topProducts.units',\n fallback: 'Units',\n },\n revenue: {\n key: 'shoppingDashboard.widget.topProducts.revenue',\n fallback: 'Revenue',\n },\n loading: {\n key: 'shoppingDashboard.widget.topProducts.loading',\n fallback: 'Loading products...',\n },\n empty: {\n key: 'shoppingDashboard.widget.topProducts.empty',\n fallback: 'No products available',\n },\n ariaLabel: {\n key: 'shoppingDashboard.widget.topProducts.ariaLabel',\n fallback: 'Top Selling Products widget',\n },\n titleAriaLabel: {\n key: 'shoppingDashboard.widget.topProducts.titleAriaLabel',\n fallback: 'Click to view full top products details page',\n },\n sortAriaLabel: {\n key: 'shoppingDashboard.widget.topProducts.sortAriaLabel',\n fallback: 'Sort products by',\n },\n noImageAriaLabel: {\n key: 'shoppingDashboard.widget.topProducts.noImageAriaLabel',\n fallback: 'No image available',\n },\n unitsSuffix: {\n key: 'shoppingDashboard.widget.topProducts.unitsSuffix',\n fallback: 'units',\n },\n revenueSuffix: {\n key: 'shoppingDashboard.widget.topProducts.revenueSuffix',\n fallback: 'revenue',\n },\n dcSvSuffix: {\n key: 'shoppingDashboard.widget.topProducts.dcSvSuffix',\n fallback: 'DC-SV',\n },\n rank: {\n key: 'shoppingDashboard.widget.topProducts.rank',\n fallback: 'Rank',\n },\n trend: {\n key: 'shoppingDashboard.widget.topProducts.trend',\n fallback: 'Trend',\n },\n },\n conversionRate: {\n title: {\n key: 'shoppingDashboard.widget.conversionRate.title',\n fallback: 'Conversion Rate',\n },\n formula: {\n key: 'shoppingDashboard.widget.conversionRate.formula',\n fallback: 'Orders \\u00F7 Site visits',\n },\n comparison: {\n key: 'shoppingDashboard.widget.conversionRate.comparison',\n fallback: 'compared to this time last month',\n },\n chartAriaLabel: {\n key: 'shoppingDashboard.widget.conversionRate.chartAriaLabel',\n fallback: 'Conversion Rate chart showing daily rates',\n },\n titleAriaLabel: {\n key: 'shoppingDashboard.widget.conversionRate.titleAriaLabel',\n fallback: 'Click to view full conversion rate details page',\n },\n filterAriaLabel: {\n key: 'shoppingDashboard.widget.conversionRate.filterAriaLabel',\n fallback: 'Filter conversion rate by customer type',\n },\n noData: {\n key: 'shoppingDashboard.widget.conversionRate.noData',\n fallback: 'No data',\n },\n noChange: {\n key: 'shoppingDashboard.widget.conversionRate.noChange',\n fallback: 'No change',\n },\n tooltipOrders: {\n key: 'shoppingDashboard.widget.conversionRate.tooltipOrders',\n fallback: 'orders',\n },\n tooltipVisits: {\n key: 'shoppingDashboard.widget.conversionRate.tooltipVisits',\n fallback: 'visits',\n },\n ordersPerSiteVisits: {\n key: 'shoppingDashboard.widget.conversionRate.ordersPerSiteVisits',\n fallback: 'Orders / Site Visits',\n },\n },\n signups: {\n title: {\n key: 'shoppingDashboard.widget.signups.title',\n fallback: 'Sign-ups',\n },\n total: {\n key: 'shoppingDashboard.widget.signups.total',\n fallback: 'Total',\n },\n members: {\n key: 'shoppingDashboard.widget.signups.members',\n fallback: 'Members',\n },\n retail: {\n key: 'shoppingDashboard.widget.signups.retail',\n fallback: 'Retail',\n },\n brandAffiliates: {\n key: 'shoppingDashboard.widget.signups.brandAffiliates',\n fallback: 'Brand Affiliates',\n },\n chartAriaLabel: {\n key: 'shoppingDashboard.widget.signups.chartAriaLabel',\n fallback: 'Signups multi-line chart showing Total, Members, Retail, and Brand Affiliates',\n },\n titleAriaLabel: {\n key: 'shoppingDashboard.widget.signups.titleAriaLabel',\n fallback: 'Click to view full signups details page',\n },\n filterAriaLabel: {\n key: 'shoppingDashboard.widget.signups.filterAriaLabel',\n fallback: 'Filter signups view',\n },\n noData: {\n key: 'shoppingDashboard.widget.signups.noData',\n fallback: 'No data',\n },\n noChange: {\n key: 'shoppingDashboard.widget.signups.noChange',\n fallback: 'No change',\n },\n totalSignupsInPeriod: {\n key: 'shoppingDashboard.widget.signups.totalSignupsInPeriod',\n fallback: 'Total sign-ups in period',\n },\n noTrendData: {\n key: 'shoppingDashboard.widget.signups.noTrendData',\n fallback: 'No sign-up trend data available.',\n },\n },\n topCategories: {\n title: {\n key: 'shoppingDashboard.widget.topCategories.title',\n fallback: 'Top Categories',\n },\n revenue: {\n key: 'shoppingDashboard.widget.topCategories.revenue',\n fallback: 'Revenue',\n },\n units: {\n key: 'shoppingDashboard.widget.topCategories.units',\n fallback: 'Units',\n },\n empty: {\n key: 'shoppingDashboard.widget.topCategories.empty',\n fallback: 'No category data available',\n },\n chartAriaLabel: {\n key: 'shoppingDashboard.widget.topCategories.chartAriaLabel',\n fallback: 'Top Categories donut chart showing revenue distribution by category',\n },\n titleAriaLabel: {\n key: 'shoppingDashboard.widget.topCategories.titleAriaLabel',\n fallback: 'Click to view full categories details page',\n },\n sortAriaLabel: {\n key: 'shoppingDashboard.widget.topCategories.sortAriaLabel',\n fallback: 'Sort categories by',\n },\n },\n menu: {\n ariaLabel: {\n key: 'shoppingDashboard.widget.menu.ariaLabel',\n fallback: 'widget options',\n },\n fullView: {\n key: 'shoppingDashboard.widget.menu.fullView',\n fallback: 'Full View',\n },\n },\n },\n navigation: {\n backToDashboard: {\n key: 'shoppingDashboard.navigation.backToDashboard',\n fallback: 'Back to Dashboard',\n },\n backAriaLabel: {\n key: 'shoppingDashboard.navigation.backAriaLabel',\n fallback: 'Back to dashboard',\n },\n },\n ariaLabel: {\n dashboard: {\n key: 'shoppingDashboard.ariaLabel.dashboard',\n fallback: 'Shopping Dashboard',\n },\n statsRow: {\n key: 'shoppingDashboard.ariaLabel.statsRow',\n fallback: 'Key performance metrics',\n },\n dashboardFilters: {\n key: 'shoppingDashboard.ariaLabel.dashboardFilters',\n fallback: 'Dashboard filters',\n },\n loadingDashboard: {\n key: 'shoppingDashboard.ariaLabel.loadingDashboard',\n fallback: 'Loading dashboard data',\n },\n dateRangeFilter: {\n key: 'shoppingDashboard.ariaLabel.dateRangeFilter',\n fallback: 'Date range filter, currently selected:',\n },\n marketFilter: {\n key: 'shoppingDashboard.ariaLabel.marketFilter',\n fallback: 'Market filter, currently selected:',\n },\n filterSuffix: {\n key: 'shoppingDashboard.ariaLabel.filterSuffix',\n fallback: 'filter',\n },\n },\n fullView: {\n signups: {\n columns: {\n id: { key: 'shoppingDashboard.fullView.signups.columns.id', fallback: 'ID' },\n name: { key: 'shoppingDashboard.fullView.signups.columns.name', fallback: 'Name' },\n date: { key: 'shoppingDashboard.fullView.signups.columns.date', fallback: 'Date' },\n type: { key: 'shoppingDashboard.fullView.signups.columns.type', fallback: 'Type' },\n email: { key: 'shoppingDashboard.fullView.signups.columns.email', fallback: 'Email' },\n status: { key: 'shoppingDashboard.fullView.signups.columns.status', fallback: 'Status' },\n },\n detailsTitle: {\n key: 'shoppingDashboard.fullView.signups.detailsTitle',\n fallback: 'Signup Details',\n },\n },\n conversionRate: {\n columns: {\n orderId: { key: 'shoppingDashboard.fullView.conversionRate.columns.orderId', fallback: 'Order ID' },\n date: { key: 'shoppingDashboard.fullView.conversionRate.columns.date', fallback: 'Date' },\n customer: { key: 'shoppingDashboard.fullView.conversionRate.columns.customer', fallback: 'Customer' },\n type: { key: 'shoppingDashboard.fullView.conversionRate.columns.type', fallback: 'Type' },\n items: { key: 'shoppingDashboard.fullView.conversionRate.columns.items', fallback: 'Items' },\n total: { key: 'shoppingDashboard.fullView.conversionRate.columns.total', fallback: 'Order Total' },\n bv: { key: 'shoppingDashboard.fullView.conversionRate.columns.bv', fallback: 'BV' },\n\n totalSv: { key: 'shoppingDashboard.fullView.conversionRate.columns.totalSv', fallback: 'Total SV' },\n },\n orderDetailsTitle: {\n key: 'shoppingDashboard.fullView.conversionRate.orderDetailsTitle',\n fallback: 'Order Details',\n },\n notAvailable: {\n key: 'shoppingDashboard.fullView.conversionRate.notAvailable',\n fallback: 'N/A',\n },\n },\n products: {\n columns: {\n rank: { key: 'shoppingDashboard.fullView.products.columns.rank', fallback: '#' },\n product: { key: 'shoppingDashboard.fullView.products.columns.product', fallback: 'Product' },\n unitsSold: { key: 'shoppingDashboard.fullView.products.columns.unitsSold', fallback: 'Units Sold' },\n revenue: { key: 'shoppingDashboard.fullView.products.columns.revenue', fallback: 'Revenue' },\n volume: { key: 'shoppingDashboard.fullView.products.columns.volume', fallback: 'Volume (DC-SV)' },\n },\n skuPrefix: {\n key: 'shoppingDashboard.fullView.products.skuPrefix',\n fallback: 'SKU',\n },\n noProducts: {\n key: 'shoppingDashboard.fullView.products.noProducts',\n fallback: 'No products available.',\n },\n },\n categories: {\n columns: {\n category: { key: 'shoppingDashboard.fullView.categories.columns.category', fallback: 'Category' },\n revenue: { key: 'shoppingDashboard.fullView.categories.columns.revenue', fallback: 'Revenue' },\n percentOfTotal: {\n key: 'shoppingDashboard.fullView.categories.columns.percentOfTotal',\n fallback: '% of Total',\n },\n trend: { key: 'shoppingDashboard.fullView.categories.columns.trend', fallback: 'Trend' },\n },\n allCategoriesTitle: {\n key: 'shoppingDashboard.fullView.categories.allCategoriesTitle',\n fallback: 'All Categories',\n },\n noCategoryData: {\n key: 'shoppingDashboard.fullView.categories.noCategoryData',\n fallback: 'No category data available.',\n },\n },\n },\n dataTable: {\n noDataAvailable: {\n key: 'shoppingDashboard.dataTable.noDataAvailable',\n fallback: 'No data available',\n },\n sortableColumn: {\n key: 'shoppingDashboard.dataTable.sortableColumn',\n fallback: ', sortable column',\n },\n },\n pagination: {\n previousPage: {\n key: 'shoppingDashboard.pagination.previousPage',\n fallback: 'Previous page',\n },\n nextPage: {\n key: 'shoppingDashboard.pagination.nextPage',\n fallback: 'Next page',\n },\n goToPage: {\n key: 'shoppingDashboard.pagination.goToPage',\n fallback: 'Go to page',\n },\n of: {\n key: 'shoppingDashboard.pagination.of',\n fallback: 'of',\n },\n },\n defaults: {\n zeroTrend: {\n key: 'shoppingDashboard.defaults.zeroTrend',\n fallback: '+0%',\n },\n noValue: {\n key: 'shoppingDashboard.defaults.noValue',\n fallback: '--',\n },\n },\n} as const;\n\ntype TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport function getTranslation(entry: TranslationEntry): string {\n return resolveTranslation(entry);\n}\n","import { useMemo } from 'react';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport type { MarketFilterOption } from '../types.d';\n\nexport function buildDefaultMarketOptions(): MarketFilterOption[] {\n return [{ value: 'all', label: getTranslation(Keys.filter.market.all) }];\n}\n\nexport function resolveMarketOptions(\n markets: ReadonlyArray<MarketFilterOption> | undefined,\n): ReadonlyArray<MarketFilterOption> {\n if (markets && markets.length > 0) {\n return markets;\n }\n return buildDefaultMarketOptions();\n}\n\nexport function useMarketOptions(\n markets: ReadonlyArray<MarketFilterOption> | undefined,\n): ReadonlyArray<MarketFilterOption> {\n return useMemo(() => resolveMarketOptions(markets), [markets]);\n}\n","import React from 'react';\nimport ShowChartIcon from '@mui/icons-material/ShowChart';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport {\n StatsCardContainer,\n StatsTitle,\n StatsValueContainer,\n StatsValue,\n StatsSubtitle,\n ValueSubtitleWrapper,\n TrendContainer,\n TrendText,\n StatsCardHeader,\n SplitTitle,\n SplitRow,\n LegendColumn,\n SplitTrend,\n LegendCaption,\n} from './StatsCard.styled';\nimport { StatsCardSkeleton } from './LoadingSkeletons';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface StatsCardProps {\n readonly title: string;\n readonly value: string;\n readonly subtitle?: string;\n readonly caption?: string;\n readonly layout?: 'default' | 'split';\n readonly trendDirection?: 'up' | 'down' | 'neutral';\n readonly trendValue?: string;\n readonly testId?: string;\n readonly isLoading?: boolean;\n}\n\nconst StatsCardComponent: React.FC<StatsCardProps> = ({\n title,\n value,\n subtitle,\n caption,\n layout = 'default',\n trendDirection = 'neutral',\n trendValue,\n testId,\n isLoading = false,\n}) => {\n if (isLoading) {\n return (\n <StatsCardContainer $layout={layout} data-testid={testId}>\n <StatsCardSkeleton />\n </StatsCardContainer>\n );\n }\n\n const getTrendAriaLabel = () => {\n let directionText = getTranslation(Keys.stats.trend.unchanged);\n if (trendDirection === 'up') directionText = getTranslation(Keys.stats.trend.increased);\n else if (trendDirection === 'down') directionText = getTranslation(Keys.stats.trend.decreased);\n\n return `${title} ${directionText} ${trendValue ?? ''}`;\n };\n\n const getTrendChartIcon = (iconSize: string) => {\n if (trendDirection === 'up') {\n return <TrendingUpIcon sx={{ fontSize: iconSize }} aria-hidden=\"true\" />;\n }\n if (trendDirection === 'down') {\n return <TrendingDownIcon sx={{ fontSize: iconSize }} aria-hidden=\"true\" />;\n }\n return <ShowChartIcon sx={{ fontSize: iconSize }} aria-hidden=\"true\" />;\n };\n\n if (layout === 'split') {\n return (\n <StatsCardContainer as=\"article\" $layout=\"split\" aria-label={`${title}: ${value}`} data-testid={testId}>\n <SplitTitle id={`stats-title-${testId}`}>{title}</SplitTitle>\n <SplitRow>\n <StatsValue aria-describedby={`stats-title-${testId}`} data-testid={`stats-value-${testId}`}>\n {value}\n </StatsValue>\n {(trendValue ?? caption) && (\n <LegendColumn>\n {trendValue && (\n <SplitTrend\n as=\"output\"\n direction={trendDirection}\n aria-live=\"polite\"\n aria-label={getTrendAriaLabel()}\n data-testid={`stats-trend-${testId}`}\n >\n {getTrendChartIcon('18px')}\n <TrendText>{trendValue}</TrendText>\n </SplitTrend>\n )}\n {caption && (\n <LegendCaption data-testid={`stats-caption-${testId}`}>{caption}</LegendCaption>\n )}\n </LegendColumn>\n )}\n </SplitRow>\n </StatsCardContainer>\n );\n }\n\n return (\n <StatsCardContainer as=\"article\" aria-label={`${title}: ${value}`} data-testid={testId}>\n <StatsCardHeader>\n <StatsTitle id={`stats-title-${testId}`}>{title}</StatsTitle>\n </StatsCardHeader>\n\n <StatsValueContainer>\n <ValueSubtitleWrapper>\n <StatsValue aria-describedby={`stats-title-${testId}`} data-testid={`stats-value-${testId}`}>\n {value}\n </StatsValue>\n {subtitle && (\n <StatsSubtitle\n aria-label={`${title} ${getTranslation(Keys.stats.details)}: ${subtitle}`}\n data-testid={`stats-subtitle-${testId}`}\n >\n {subtitle}\n </StatsSubtitle>\n )}\n </ValueSubtitleWrapper>\n\n {trendValue && (\n <TrendContainer\n as=\"output\"\n direction={trendDirection}\n aria-live=\"polite\"\n aria-label={getTrendAriaLabel()}\n data-testid={`stats-trend-${testId}`}\n >\n {getTrendChartIcon('16px')}\n <TrendText>{trendValue}</TrendText>\n </TrendContainer>\n )}\n </StatsValueContainer>\n </StatsCardContainer>\n );\n};\n\nexport const StatsCard = React.memo(StatsCardComponent);\nStatsCard.displayName = 'StatsCard';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const StatsCardContainer = styled('div')<{ $layout?: 'default' | 'split' }>`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n box-sizing: border-box;\n gap: ${({ $layout }) => ($layout === 'split' ? '8px' : '0')};\n padding: ${({ $layout }) => ($layout === 'split' ? '12px' : '10px')};\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 8px;\n min-height: ${({ $layout }) => ($layout === 'split' ? '110px' : 'auto')};\n transition: box-shadow 0.2s ease;\n\n &:hover {\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);\n }\n\n @media (min-width: 768px) {\n padding: ${({ $layout }) => ($layout === 'split' ? '16px' : '12px')};\n min-height: ${({ $layout }) => ($layout === 'split' ? '110px' : 'auto')};\n }\n\n @media (min-width: 1080px) {\n padding: ${({ $layout }) => ($layout === 'split' ? '16px' : '14px')};\n min-height: ${({ $layout }) => ($layout === 'split' ? '110px' : 'auto')};\n }\n`;\n\nexport const SplitTitle = styled('div')`\n width: 100%;\n font-size: 16px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`;\n\nexport const SplitRow = styled('div')`\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n`;\n\nexport const LegendColumn = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;\n gap: 2px;\n`;\n\nexport const SplitTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n flex-shrink: 0;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#066100';\n if (direction === 'down') return '#9b131a';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 24px;\n height: 24px;\n }\n`;\n\nexport const LegendCaption = styled('div')`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n letter-spacing: 0.12px;\n text-align: right;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n\nexport const StatsTitle = styled('div')`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.2;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin-bottom: 2px;\n text-transform: capitalize;\n\n @media (min-width: 768px) {\n font-size: 14px;\n margin-bottom: 4px;\n }\n\n @media (min-width: 1080px) {\n font-size: 14px;\n }\n`;\n\nexport const StatsValueContainer = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n justify-content: space-between;\n gap: 2px;\n margin-top: 10px;\n width: 100%;\n @media (min-width: 768px) {\n margin-top: 5px;\n }\n`;\n\nexport const StatsValue = styled('div')`\n font-size: 20px;\n font-weight: 700;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n\n @media (min-width: 768px) {\n font-size: 24px;\n }\n\n @media (min-width: 1080px) {\n font-size: 28px;\n }\n`;\n\nexport const ValueSubtitleWrapper = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n`;\n\nexport const StatsSubtitle = styled('div')`\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`;\n\nexport const TrendContainer = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n flex-shrink: 0;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#22C55E';\n if (direction === 'down') return '#DC2626';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 14px;\n\n svg {\n width: 18px;\n height: 18px;\n }\n }\n`;\n\nexport const TrendIcon = styled('span')`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const TrendText = styled('span')`\n white-space: nowrap;\n`;\n\nexport const StatsCardHeader = styled('div')`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;\n","import React from 'react';\nimport Skeleton from '@mui/material/Skeleton';\nimport {\n SkeletonCard,\n SkeletonHeader,\n SkeletonRow,\n StatsCardWrapper,\n StatsCardHeaderRow,\n StatsCardBody,\n StatsCardSubtitle,\n ProductRowInfo,\n ProductRowMetrics,\n ChartMetricRow,\n ChartMetricTrend,\n ChartAreaSkeleton,\n PieChartLayout,\n PieCircleSkeleton,\n LegendList,\n LegendRowWrapper,\n LegendRowInfo,\n DashboardLayout,\n DashboardHeaderRow,\n DashboardFilterGroup,\n StatsGrid,\n WidgetGrid,\n FullViewLayout,\n FullViewMetricCard,\n FullViewMetricCenter,\n FullViewChartArea,\n FullViewTableCard,\n FullViewTableRow,\n SummaryCardsGrid,\n} from './LoadingSkeletons.styled';\n\nexport const StatsCardSkeleton: React.FC = () => (\n <StatsCardWrapper data-testid=\"skeleton-stats-card\">\n <StatsCardHeaderRow>\n <Skeleton variant=\"text\" width={80} height={18} />\n <Skeleton variant=\"text\" width={48} height={16} />\n </StatsCardHeaderRow>\n <StatsCardBody>\n <Skeleton variant=\"text\" width={120} height={36} />\n <StatsCardSubtitle variant=\"text\" width={100} height={16} />\n </StatsCardBody>\n </StatsCardWrapper>\n);\n\nconst ProductRowSkeleton: React.FC = () => (\n <SkeletonRow>\n <Skeleton variant=\"rounded\" width={28} height={28} />\n <Skeleton variant=\"rounded\" width={50} height={50} />\n <ProductRowInfo>\n <Skeleton variant=\"text\" width=\"70%\" height={18} />\n <Skeleton variant=\"text\" width=\"50%\" height={14} />\n </ProductRowInfo>\n <ProductRowMetrics>\n <Skeleton variant=\"text\" width={80} height={18} />\n <Skeleton variant=\"text\" width={48} height={14} />\n </ProductRowMetrics>\n </SkeletonRow>\n);\n\nexport const ProductsListSkeleton: React.FC = () => (\n <SkeletonCard data-testid=\"skeleton-products-list\">\n <SkeletonHeader>\n <Skeleton variant=\"text\" width={160} height={22} />\n <Skeleton variant=\"rounded\" width={100} height={32} />\n </SkeletonHeader>\n {['product-1', 'product-2', 'product-3', 'product-4', 'product-5'].map((rowKey) => (\n <ProductRowSkeleton key={rowKey} />\n ))}\n </SkeletonCard>\n);\n\nexport const ChartWidgetSkeleton: React.FC = () => (\n <SkeletonCard data-testid=\"skeleton-chart-widget\">\n <SkeletonHeader>\n <Skeleton variant=\"text\" width={140} height={22} />\n <Skeleton variant=\"rounded\" width={110} height={32} />\n </SkeletonHeader>\n <ChartMetricRow>\n <Skeleton variant=\"text\" width={100} height={36} />\n <ChartMetricTrend>\n <Skeleton variant=\"text\" width={60} height={18} />\n <Skeleton variant=\"text\" width={140} height={14} />\n </ChartMetricTrend>\n </ChartMetricRow>\n <ChartAreaSkeleton variant=\"rounded\" width=\"100%\" />\n </SkeletonCard>\n);\n\nconst LegendRowSkeleton: React.FC = () => (\n <LegendRowWrapper>\n <Skeleton variant=\"circular\" width={12} height={12} />\n <LegendRowInfo>\n <Skeleton variant=\"text\" width=\"60%\" height={16} />\n <Skeleton variant=\"text\" width=\"40%\" height={14} />\n </LegendRowInfo>\n <Skeleton variant=\"text\" width={36} height={18} />\n </LegendRowWrapper>\n);\n\nexport const CategoriesPieChartSkeleton: React.FC = () => (\n <SkeletonCard data-testid=\"skeleton-categories-pie\">\n <SkeletonHeader>\n <Skeleton variant=\"text\" width={140} height={22} />\n <Skeleton variant=\"rounded\" width={100} height={32} />\n </SkeletonHeader>\n <PieChartLayout>\n <PieCircleSkeleton variant=\"circular\" />\n <LegendList>\n {['legend-1', 'legend-2', 'legend-3', 'legend-4', 'legend-5'].map((rowKey) => (\n <LegendRowSkeleton key={rowKey} />\n ))}\n </LegendList>\n </PieChartLayout>\n </SkeletonCard>\n);\n\nexport const DashboardSkeleton: React.FC = () => (\n <DashboardLayout data-testid=\"skeleton-dashboard\">\n <DashboardHeaderRow>\n <Skeleton variant=\"text\" width={200} height={32} />\n <DashboardFilterGroup>\n <Skeleton variant=\"rounded\" width={140} height={36} />\n <Skeleton variant=\"rounded\" width={140} height={36} />\n </DashboardFilterGroup>\n </DashboardHeaderRow>\n\n <StatsGrid>\n <StatsCardSkeleton />\n <StatsCardSkeleton />\n <StatsCardSkeleton />\n </StatsGrid>\n\n <WidgetGrid>\n <ProductsListSkeleton />\n <ChartWidgetSkeleton />\n </WidgetGrid>\n\n <WidgetGrid>\n <ChartWidgetSkeleton />\n <CategoriesPieChartSkeleton />\n </WidgetGrid>\n </DashboardLayout>\n);\n\nexport const FullViewChartSkeleton: React.FC = () => (\n <FullViewLayout data-testid=\"skeleton-fullview-chart\">\n <FullViewMetricCard>\n <FullViewMetricCenter>\n <Skeleton variant=\"text\" width={140} height={52} />\n <Skeleton variant=\"text\" width={80} height={24} />\n <Skeleton variant=\"text\" width={160} height={16} />\n </FullViewMetricCenter>\n <FullViewChartArea variant=\"rounded\" width=\"100%\" />\n </FullViewMetricCard>\n\n <FullViewTableCard>\n <Skeleton variant=\"text\" width={200} height={24} />\n {['table-row-1', 'table-row-2', 'table-row-3', 'table-row-4', 'table-row-5'].map((rowKey) => (\n <FullViewTableRow key={rowKey} variant=\"rounded\" width=\"100%\" height={44} />\n ))}\n </FullViewTableCard>\n </FullViewLayout>\n);\n\nexport const FullViewTableSkeleton: React.FC = () => (\n <FullViewLayout data-testid=\"skeleton-fullview-table\">\n <SummaryCardsGrid>\n <StatsCardSkeleton />\n <StatsCardSkeleton />\n <StatsCardSkeleton />\n </SummaryCardsGrid>\n\n <FullViewTableCard>\n <Skeleton variant=\"text\" width={200} height={24} />\n <FullViewTableRow variant=\"rounded\" width=\"100%\" height={40} />\n {[\n 'summary-row-1',\n 'summary-row-2',\n 'summary-row-3',\n 'summary-row-4',\n 'summary-row-5',\n 'summary-row-6',\n 'summary-row-7',\n 'summary-row-8',\n ].map((rowKey) => (\n <FullViewTableRow key={rowKey} variant=\"rounded\" width=\"100%\" height={44} />\n ))}\n </FullViewTableCard>\n </FullViewLayout>\n);\n","import { styled } from '@nuskin/foundation-theme';\nimport Skeleton from '@mui/material/Skeleton';\n\nexport const SkeletonCard = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const SkeletonHeader = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 12px;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const SkeletonRow = styled('div')`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 0;\n\n @media (min-width: 768px) {\n gap: 14px;\n padding: 14px 0;\n }\n`;\n\nexport const StatsCardWrapper = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 12px;\n border-radius: 8px;\n min-height: 120px;\n\n @media (min-width: 600px) {\n padding: 20px;\n min-height: 140px;\n }\n @media (min-width: 900px) {\n padding: 24px;\n min-height: 160px;\n }\n`;\n\nexport const StatsCardHeaderRow = styled('div')`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;\n\nexport const StatsCardBody = styled('div')`\n margin-top: 8px;\n`;\n\nexport const StatsCardSubtitle = styled(Skeleton)`\n margin-top: 4px;\n`;\n\nexport const ProductRowInfo = styled('div')`\n flex: 1;\n min-width: 0;\n`;\n\nexport const ProductRowMetrics = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n`;\n\nexport const ChartMetricRow = styled('div')`\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin-bottom: 16px;\n`;\n\nexport const ChartMetricTrend = styled('div')`\n padding-top: 4px;\n`;\n\nexport const ChartAreaSkeleton = styled(Skeleton)`\n border-radius: 8px;\n height: 220px;\n\n @media (min-width: 600px) {\n height: 280px;\n }\n @media (min-width: 900px) {\n height: 340px;\n }\n`;\n\nexport const PieChartLayout = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media (min-width: 600px) {\n flex-direction: row;\n gap: 24px;\n }\n`;\n\nexport const PieCircleSkeleton = styled(Skeleton)`\n width: 100%;\n height: 200px;\n border-radius: 8px;\n flex-shrink: 0;\n\n @media (min-width: 600px) {\n width: 200px;\n border-radius: 50%;\n }\n`;\n\nexport const LegendList = styled('div')`\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n`;\n\nexport const LegendRowWrapper = styled('div')`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px;\n`;\n\nexport const LegendRowInfo = styled('div')`\n flex: 1;\n`;\n\nexport const DashboardLayout = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n @media (min-width: 600px) {\n gap: 32px;\n }\n @media (min-width: 900px) {\n gap: 40px;\n }\n`;\n\nexport const DashboardHeaderRow = styled('div')`\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n`;\n\nexport const DashboardFilterGroup = styled('div')`\n display: flex;\n gap: 16px;\n`;\n\nexport const StatsGrid = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 600px) {\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n }\n @media (min-width: 900px) {\n gap: 24px;\n }\n`;\n\nexport const WidgetGrid = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 900px) {\n grid-template-columns: repeat(2, 1fr);\n gap: 24px;\n }\n`;\n\nexport const FullViewLayout = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 24px;\n`;\n\nexport const FullViewMetricCard = styled('div')`\n padding: 24px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 24px;\n`;\n\nexport const FullViewMetricCenter = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 16px 0;\n gap: 8px;\n`;\n\nexport const FullViewChartArea = styled(Skeleton)`\n border-radius: 8px;\n height: 260px;\n\n @media (min-width: 600px) {\n height: 320px;\n }\n @media (min-width: 900px) {\n height: 400px;\n }\n`;\n\nexport const FullViewTableCard = styled('div')`\n padding: 20px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n`;\n\nexport const FullViewTableRow = styled(Skeleton)`\n border-radius: 4px;\n`;\n\nexport const SummaryCardsGrid = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 600px) {\n grid-template-columns: repeat(3, 1fr);\n }\n`;\n","import React from 'react';\nimport ShoppingCartIcon from '@mui/icons-material/ShoppingCart';\nimport ShowChartIcon from '@mui/icons-material/ShowChart';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { getTrendDirectionLabel } from '../../utils/trendUtils';\nimport { formatMoney } from '../../utils/dataUtils';\nimport {\n ProductsListContainer,\n WidgetHeader,\n WidgetTitle,\n SortDropdown,\n HeaderActionsContainer,\n ProductsList,\n ProductItem,\n ProductRank,\n ProductImage,\n ProductImagePlaceholder,\n ProductInfo,\n ProductName,\n ProductSubtitle,\n ProductMetrics,\n ProductValue,\n ProductTrend,\n EmptyState,\n EmptyStateText,\n} from './TopSellingProductsList.styled';\nimport { WidgetMenu } from '../WidgetMenu';\nimport type { TopProduct, ProductSortOption } from '../../types.d';\nimport type { TrendDirection } from '../types';\nimport { ProductsListSkeleton } from '../LoadingSkeletons';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface TopSellingProductsListProps {\n readonly products: TopProduct[];\n readonly productSort: ProductSortOption;\n readonly isLoading?: boolean;\n readonly maxProducts?: number;\n readonly onSortChange?: (sort: ProductSortOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nconst TopSellingProductsListComponent: React.FC<TopSellingProductsListProps> = ({\n products,\n productSort,\n isLoading = false,\n maxProducts = 5,\n onSortChange,\n onTitleClick,\n}) => {\n const handleSortChange = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newSort = event.target.value as ProductSortOption;\n onSortChange?.(newSort);\n };\n\n const formatValue = (product: TopProduct, sortBy: ProductSortOption) => {\n switch (sortBy) {\n case 'units':\n return `${product.unitsSold.toLocaleString()} ${getTranslation(Keys.widget.topProducts.unitsSuffix)}`;\n case 'revenue':\n return formatMoney(product.revenue, product.currencyCode);\n case 'volume':\n return `${product.volume.toLocaleString()} ${getTranslation(Keys.widget.topProducts.dcSvSuffix)}`;\n default:\n return `${product.unitsSold.toLocaleString()} ${getTranslation(Keys.widget.topProducts.unitsSuffix)}`;\n }\n };\n\n const getSubtitle = (product: TopProduct, sortBy: ProductSortOption) => {\n switch (sortBy) {\n case 'units':\n return `${formatMoney(product.revenue, product.currencyCode)} ${getTranslation(Keys.widget.topProducts.revenueSuffix)}`;\n case 'revenue':\n return `${product.unitsSold.toLocaleString()} ${getTranslation(Keys.widget.topProducts.unitsSuffix)}`;\n case 'volume':\n return `${formatMoney(product.revenue, product.currencyCode)} ${getTranslation(Keys.widget.topProducts.revenueSuffix)}`;\n default:\n return `${formatMoney(product.revenue, product.currencyCode)} ${getTranslation(Keys.widget.topProducts.revenueSuffix)}`;\n }\n };\n\n const getTrendValue = (product: TopProduct, sortBy: ProductSortOption) => {\n const trend = product.trend;\n if (!trend) return '';\n switch (sortBy) {\n case 'units':\n return trend.units ?? '';\n case 'revenue':\n return trend.revenue ?? '';\n case 'volume':\n return trend.volume ?? '';\n default:\n return trend.units ?? '';\n }\n };\n\n const getTrendDirection = (product: TopProduct, sortBy: ProductSortOption): TrendDirection => {\n const trendValue = getTrendValue(product, sortBy);\n if (!trendValue) return 'neutral';\n if (trendValue.startsWith('+')) return 'up';\n if (trendValue.startsWith('-')) return 'down';\n return 'neutral';\n };\n\n const getTrendChartIcon = (direction: TrendDirection) => {\n if (direction === 'up') {\n return <TrendingUpIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n if (direction === 'down') {\n return <TrendingDownIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n return <ShowChartIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n };\n\n const displayedProducts = products.slice(0, maxProducts);\n const rankLabel = getTranslation(Keys.widget.topProducts.rank);\n const trendLabel = getTranslation(Keys.widget.topProducts.trend);\n\n if (isLoading && products.length === 0) {\n return (\n <ProductsListContainer data-testid=\"widget-top-products\">\n <ProductsListSkeleton />\n </ProductsListContainer>\n );\n }\n\n if (products.length === 0) {\n return (\n <ProductsListContainer data-testid=\"widget-top-products\">\n <WidgetHeader>\n <WidgetTitle>{getTranslation(Keys.widget.topProducts.title)}</WidgetTitle>\n </WidgetHeader>\n <EmptyState data-testid=\"products-empty-state\">\n <ShoppingCartIcon />\n <EmptyStateText>{getTranslation(Keys.widget.topProducts.empty)}</EmptyStateText>\n </EmptyState>\n </ProductsListContainer>\n );\n }\n\n return (\n <ProductsListContainer\n as=\"section\"\n data-testid=\"widget-top-products\"\n aria-label={getTranslation(Keys.widget.topProducts.ariaLabel)}\n >\n <WidgetHeader>\n <WidgetTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.widget.topProducts.titleAriaLabel)}\n data-testid=\"widget-title-top-products\"\n >\n {getTranslation(Keys.widget.topProducts.title)}\n </WidgetTitle>\n <HeaderActionsContainer>\n <SortDropdown\n id=\"product-sort\"\n data-testid=\"product-sort-dropdown\"\n value={productSort}\n onChange={handleSortChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.widget.topProducts.sortAriaLabel)}\n >\n <option value=\"units\">{getTranslation(Keys.filter.productSort.byUnits)}</option>\n <option value=\"revenue\">{getTranslation(Keys.filter.productSort.byRevenue)}</option>\n <option value=\"volume\">{getTranslation(Keys.filter.productSort.byVolume)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-products\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </WidgetHeader>\n\n <ProductsList as=\"ul\" data-testid=\"products-list\">\n {displayedProducts.map((product, index) => {\n const trendDirection = getTrendDirection(product, productSort);\n const trendValue = getTrendValue(product, productSort);\n\n return (\n <ProductItem\n as=\"li\"\n key={product.id}\n data-testid={`product-item-${index}`}\n aria-label={`${rankLabel} ${product.rank}: ${product.name}, ${formatValue(product, productSort)}`}\n >\n <ProductRank aria-label={`${rankLabel} ${product.rank}`}>{product.rank}</ProductRank>\n\n {product.imageUrl ? (\n <ProductImage\n src={product.imageUrl}\n alt={product.name}\n loading=\"lazy\"\n onError={(e) => {\n e.currentTarget.hidden = true;\n }}\n />\n ) : (\n <ProductImagePlaceholder\n aria-label={getTranslation(Keys.widget.topProducts.noImageAriaLabel)}\n >\n {product.name.substring(0, 2).toUpperCase()}\n </ProductImagePlaceholder>\n )}\n\n <ProductInfo>\n <ProductName title={product.name}>{product.name}</ProductName>\n <ProductSubtitle>{getSubtitle(product, productSort)}</ProductSubtitle>\n </ProductInfo>\n\n <ProductMetrics>\n <ProductValue>{formatValue(product, productSort)}</ProductValue>\n {trendValue && (\n <ProductTrend\n as=\"output\"\n direction={trendDirection}\n aria-live=\"polite\"\n aria-label={`${trendLabel}: ${getTrendDirectionLabel(trendDirection)} ${trendValue}`}\n >\n {getTrendChartIcon(trendDirection)}\n <span>{trendValue}</span>\n </ProductTrend>\n )}\n </ProductMetrics>\n </ProductItem>\n );\n })}\n </ProductsList>\n </ProductsListContainer>\n );\n};\n\nexport const TopSellingProductsList = React.memo(TopSellingProductsListComponent);\nTopSellingProductsList.displayName = 'TopSellingProductsList';\n","import React from 'react';\nimport ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\nimport RemoveIcon from '@mui/icons-material/Remove';\nimport type { TrendDirection } from '../shared/types';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport function parseTrendPercent(value?: string): number | null {\n if (!value) return null;\n const cleanedValue = value.replace('%', '').trim();\n const parsedValue = Number(cleanedValue);\n return Number.isFinite(parsedValue) ? parsedValue : null;\n}\n\nexport function resolveTrendDirection(value?: string): TrendDirection {\n const parsedValue = parseTrendPercent(value);\n if (parsedValue === null) return 'neutral';\n if (parsedValue > 0) return 'up';\n if (parsedValue < 0) return 'down';\n return 'neutral';\n}\n\nexport function calculateWeightedRevenueTrend<T>(\n items: readonly T[],\n getRevenue: (item: T) => number,\n getTrend: (item: T) => string | undefined,\n): { direction: TrendDirection; formatted: string } {\n const { weightedSum, weight } = items.reduce(\n (accumulator, item) => {\n const trendValue = parseTrendPercent(getTrend(item));\n if (trendValue === null) return accumulator;\n return {\n weightedSum: accumulator.weightedSum + trendValue * getRevenue(item),\n weight: accumulator.weight + getRevenue(item),\n };\n },\n { weightedSum: 0, weight: 0 },\n );\n\n const average = weight > 0 ? weightedSum / weight : 0;\n let direction: TrendDirection = 'neutral';\n if (average > 0) direction = 'up';\n else if (average < 0) direction = 'down';\n\n return { direction, formatted: `${average > 0 ? '+' : ''}${average.toFixed(1)}%` };\n}\n\nexport function getTrendDirectionLabel(direction: TrendDirection): string {\n if (direction === 'up') return getTranslation(Keys.stats.trend.increased);\n if (direction === 'down') return getTranslation(Keys.stats.trend.decreased);\n return getTranslation(Keys.stats.trend.unchanged);\n}\n\nexport function getTrendIcon(direction: TrendDirection): React.ReactNode {\n switch (direction) {\n case 'up':\n return <ArrowUpwardIcon />;\n case 'down':\n return <ArrowDownwardIcon />;\n case 'neutral':\n default:\n return <RemoveIcon />;\n }\n}\n\nexport function getTrendColor(direction: TrendDirection): string {\n switch (direction) {\n case 'up':\n return '#4caf50';\n case 'down':\n return '#f44336';\n case 'neutral':\n default:\n return '#757575';\n }\n}\n","import { useMemo } from 'react';\n\nexport function calculateTotalPages<T>(items: T[], itemsPerPage: number): number {\n return Math.ceil(items.length / itemsPerPage);\n}\n\nexport function paginateItems<T>(items: T[], currentPage: number, itemsPerPage: number): T[] {\n const startIndex = (currentPage - 1) * itemsPerPage;\n const endIndex = startIndex + itemsPerPage;\n return items.slice(startIndex, endIndex);\n}\n\nexport function sortByNumericProperty<T extends Record<string, unknown>>(\n items: T[],\n key: keyof T,\n direction: 'asc' | 'desc' = 'desc',\n): T[] {\n return [...items].sort((a, b) => {\n const aVal = a[key] as number;\n const bVal = b[key] as number;\n return direction === 'asc' ? aVal - bVal : bVal - aVal;\n });\n}\n\nexport function calculatePercentage(value: number, total: number, decimalPlaces: number = 1): string {\n if (total === 0) return '0.0';\n return ((value / total) * 100).toFixed(decimalPlaces);\n}\n\nexport function usePaginatedItems<T>(\n items: T[],\n currentPage: number,\n itemsPerPage: number,\n): { totalPages: number; pageItems: T[] } {\n const totalPages = useMemo(() => calculateTotalPages(items, itemsPerPage), [items, itemsPerPage]);\n const pageItems = useMemo(\n () => paginateItems(items, currentPage, itemsPerPage),\n [items, currentPage, itemsPerPage],\n );\n return { totalPages, pageItems };\n}\n\nexport function formatMoney(\n value: number,\n currencyCode?: string,\n locale: string = 'en-US',\n fractionDigits?: number,\n): string {\n const amount = Number.isFinite(value) ? value : 0;\n if (currencyCode) {\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency: currencyCode,\n ...(fractionDigits !== undefined\n ? { minimumFractionDigits: fractionDigits, maximumFractionDigits: fractionDigits }\n : { minimumFractionDigits: 0, maximumFractionDigits: 2 }),\n }).format(amount);\n } catch {}\n }\n return fractionDigits !== undefined ? `$${amount.toFixed(fractionDigits)}` : `$${amount.toLocaleString()}`;\n}\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const ProductsListContainer = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 12px;\n min-height: 320px;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n\n @media (min-width: 768px) {\n padding: 20px;\n min-height: 400px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const WidgetHeader = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const HeaderActionsContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const WidgetTitle = styled('h2')`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`;\n\nexport const SortDropdown = styled('select')`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const ProductsList = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 12px;\n width: 100%;\n overflow: hidden;\n list-style: none;\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n gap: 14px;\n }\n`;\n\nexport const ProductItem = styled('div')`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n transition:\n background-color 0.2s ease,\n box-shadow 0.2s ease;\n cursor: pointer;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n list-style: none;\n\n &:not(:last-child) {\n border-bottom: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n }\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06);\n }\n\n @media (min-width: 768px) {\n padding: 14px;\n gap: 14px;\n }\n`;\n\nexport const ProductRank = styled('div')`\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 24px;\n height: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'A10')};\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n border-radius: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n vertical-align: middle;\n\n @media (min-width: 768px) {\n min-width: 28px;\n height: 28px;\n font-size: 16px;\n }\n`;\n\nexport const ProductImage = styled('img')`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n object-fit: cover;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 50px;\n height: 50px;\n }\n`;\n\nexport const ProductImagePlaceholder = styled('div')`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N40')};\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n font-size: 10px;\n font-weight: 500;\n\n @media (min-width: 768px) {\n width: 50px;\n height: 50px;\n font-size: 11px;\n }\n`;\n\nexport const ProductInfo = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex-grow: 1;\n min-width: 0;\n`;\n\nexport const ProductName = styled('div')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 18ch;\n\n @media (min-width: 768px) {\n font-size: 16px;\n max-width: none;\n }\n`;\n\nexport const ProductSubtitle = styled('div')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 11px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`;\n\nexport const ProductMetrics = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n flex-shrink: 0;\n`;\n\nexport const ProductValue = styled('div')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.2;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`;\n\nexport const ProductTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 11px;\n font-weight: 500;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#22C55E';\n if (direction === 'down') return '#DC2626';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 12px;\n\n svg {\n width: 16px;\n height: 16px;\n }\n }\n`;\n\nexport const EmptyState = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n text-align: center;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n svg {\n width: 48px;\n height: 48px;\n color: ${({ theme }) => getGenomeColor(theme, 'N50')};\n }\n`;\n\nexport const EmptyStateText = styled('div')`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n","import React, { useState } from 'react';\nimport Menu from '@mui/material/Menu';\nimport MenuItem from '@mui/material/MenuItem';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport MoreVertIcon from '@mui/icons-material/MoreVert';\nimport VisibilityIcon from '@mui/icons-material/Visibility';\nimport { StyledIconButton } from './WidgetMenu.styled';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface WidgetMenuProps {\n readonly widgetId?: string;\n readonly onFullView?: () => void;\n}\n\nexport const WidgetMenu: React.FC<WidgetMenuProps> = ({ widgetId, onFullView }) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n const open = Boolean(anchorEl);\n const buttonId = `widget-menu-button-${widgetId}`;\n const menuId = `widget-menu-${widgetId}`;\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const handleFullView = () => {\n handleClose();\n if (onFullView) {\n onFullView();\n }\n };\n\n return (\n <>\n <StyledIconButton\n id={buttonId}\n data-testid={`widget-menu-button-${widgetId}`}\n aria-label={getTranslation(Keys.widget.menu.ariaLabel)}\n aria-controls={open ? menuId : undefined}\n aria-haspopup=\"true\"\n aria-expanded={open ? 'true' : undefined}\n onClick={handleClick}\n size=\"small\"\n >\n <MoreVertIcon fontSize=\"small\" />\n </StyledIconButton>\n <Menu\n id={menuId}\n data-testid={`widget-menu-${widgetId}`}\n anchorEl={anchorEl}\n open={open}\n onClose={handleClose}\n MenuListProps={{\n 'aria-labelledby': buttonId,\n }}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'right',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'right',\n }}\n >\n <MenuItem onClick={handleFullView} data-testid=\"widget-menu-item-fullview\">\n <ListItemIcon>\n <VisibilityIcon fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText>{getTranslation(Keys.widget.menu.fullView)}</ListItemText>\n </MenuItem>\n </Menu>\n </>\n );\n};\n","import IconButton from '@mui/material/IconButton';\nimport { styled } from '@nuskin/foundation-theme';\n\nexport const StyledIconButton = styled(IconButton)(() => ({\n padding: '4px',\n color: '#252525',\n '&:hover': {\n backgroundColor: 'rgba(37, 37, 37, 0.08)',\n },\n}));\n","import React from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport { WidgetMenu } from '../WidgetMenu';\nimport { getTrendIcon, getTrendDirectionLabel } from '../../utils/trendUtils';\nimport {\n ConversionRateContainer,\n ChartHeader,\n ChartTitle,\n FilterDropdown,\n MetricDisplay,\n MetricValue,\n MetricTrend,\n FormulaDisplay,\n ChartContainer,\n TooltipContainer,\n TooltipLabel,\n TooltipValue,\n TooltipDetails,\n TitleRow,\n HeaderActionsContainer,\n} from './ConversionRateChart.styled';\nimport type { ConversionDataPoint, ConversionFilterOption } from '../../types.d';\nimport { ChartWidgetSkeleton } from '../LoadingSkeletons';\nimport { formatAxisDate } from '../../utils/dateFormat';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface ConversionRateChartProps {\n readonly conversionData: ConversionDataPoint[];\n readonly conversionFilter: ConversionFilterOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly summaryRate?: number;\n readonly summaryChangePct?: number | null;\n readonly onFilterChange?: (filter: ConversionFilterOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nconst CHART_MARGIN = { top: 5, right: 10, left: -10, bottom: 5 };\nconst AXIS_TICK = { fontSize: 10 };\nconst LINE_DOT = { r: 3, fill: '#3B82F6' };\nconst ACTIVE_DOT = { r: 5 };\n\ninterface CustomTooltipProps {\n readonly active?: boolean;\n readonly payload?: Array<{ payload?: unknown }>;\n}\n\nconst rateTickFormatter = (value: number | string): string => `${value}%`;\n\nconst CustomTooltip: React.FC<CustomTooltipProps> = ({ active, payload }) => {\n if (!active || !payload?.length) return null;\n const data = payload[0].payload as ConversionDataPoint;\n return (\n <TooltipContainer>\n <TooltipLabel>{data.date}</TooltipLabel>\n <TooltipValue>{(data.rate ?? 0).toFixed(2)}%</TooltipValue>\n <TooltipDetails>\n {data.orders ?? 0} {getTranslation(Keys.widget.conversionRate.tooltipOrders)} /{' '}\n {(data.siteVisits ?? 0).toLocaleString()} {getTranslation(Keys.widget.conversionRate.tooltipVisits)}\n </TooltipDetails>\n </TooltipContainer>\n );\n};\n\nconst ConversionRateChartComponent: React.FC<ConversionRateChartProps> = ({\n conversionData,\n conversionFilter,\n isLoading = false,\n title,\n summaryRate,\n summaryChangePct,\n onFilterChange,\n onTitleClick,\n}) => {\n const handleFilterChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newFilter = event.target.value as ConversionFilterOption;\n onFilterChange?.(newFilter);\n },\n [onFilterChange],\n );\n\n const noDataText = getTranslation(Keys.widget.conversionRate.noData);\n const noChangeText = getTranslation(Keys.widget.conversionRate.noChange);\n\n const currentRate = React.useMemo(() => {\n if (typeof summaryRate === 'number' && Number.isFinite(summaryRate)) return summaryRate;\n return conversionData.at(-1)?.rate ?? 0;\n }, [summaryRate, conversionData]);\n\n const trendInfo = React.useMemo((): { direction: 'up' | 'down' | 'neutral'; value: string } => {\n if (summaryChangePct !== undefined) {\n if (summaryChangePct === null || Math.abs(summaryChangePct) < 0.1) {\n return { direction: 'neutral', value: noChangeText };\n }\n const direction = summaryChangePct > 0 ? 'up' : 'down';\n const formatted = `${summaryChangePct > 0 ? '+' : ''}${summaryChangePct.toFixed(2)}%`;\n return { direction, value: formatted };\n }\n if (conversionData.length < 2) return { direction: 'neutral', value: noDataText };\n const latestRate = conversionData.at(-1)?.rate ?? 0;\n const previousRate = conversionData[0].rate;\n if (previousRate === 0) return { direction: 'neutral', value: noChangeText };\n const change = latestRate - previousRate;\n const percentageChange = (change / previousRate) * 100;\n if (Math.abs(percentageChange) < 0.1) return { direction: 'neutral', value: noChangeText };\n const direction = change > 0 ? 'up' : 'down';\n const formattedChange = `${change > 0 ? '+' : ''}${change.toFixed(2)}%`;\n return { direction, value: formattedChange };\n }, [summaryChangePct, conversionData, noChangeText, noDataText]);\n\n const formattedData = React.useMemo(\n () => conversionData.map((item) => ({ ...item, shortDate: formatAxisDate(item.date) })),\n [conversionData],\n );\n\n if (isLoading && conversionData.length === 0) {\n return (\n <ConversionRateContainer data-testid=\"widget-conversion-rate\">\n <ChartWidgetSkeleton />\n </ConversionRateContainer>\n );\n }\n\n const chartAriaLabel = getTranslation(Keys.widget.conversionRate.chartAriaLabel);\n\n return (\n <ConversionRateContainer as=\"section\" data-testid=\"widget-conversion-rate\" aria-label={chartAriaLabel}>\n <ChartHeader>\n <TitleRow>\n <ChartTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.widget.conversionRate.titleAriaLabel)}\n data-testid=\"widget-title-conversion-rate\"\n >\n {title ?? getTranslation(Keys.widget.conversionRate.title)}\n </ChartTitle>\n <HeaderActionsContainer>\n <FilterDropdown\n id=\"conversion-filter\"\n data-testid=\"conversion-filter-dropdown\"\n value={conversionFilter}\n onChange={handleFilterChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.widget.conversionRate.filterAriaLabel)}\n >\n <option value=\"all\">{getTranslation(Keys.filter.conversionType.all)}</option>\n <option value=\"standard\">{getTranslation(Keys.filter.conversionType.standard)}</option>\n <option value=\"subscription\">\n {getTranslation(Keys.filter.conversionType.subscription)}\n </option>\n </FilterDropdown>\n <WidgetMenu widgetId=\"conversion-rate\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </TitleRow>\n </ChartHeader>\n\n <MetricDisplay>\n <MetricValue\n aria-label={`${getTranslation(Keys.widget.conversionRate.title)}: ${currentRate.toFixed(2)}%`}\n data-testid=\"conversion-metric-value\"\n >\n {currentRate.toFixed(2)}%\n </MetricValue>\n {trendInfo.value !== noDataText && (\n <MetricTrend\n as=\"output\"\n direction={trendInfo.direction}\n aria-live=\"polite\"\n aria-label={`${getTrendDirectionLabel(trendInfo.direction)} ${trendInfo.value}`}\n data-testid=\"conversion-metric-trend\"\n >\n <div className=\"trend-line\">\n <span aria-hidden=\"true\">{getTrendIcon(trendInfo.direction)}</span>\n <span className=\"change-value\">{trendInfo.value.replace('%', '')}</span>\n <span className=\"change-percent\">%</span>\n </div>\n <div className=\"comparison-text\">{getTranslation(Keys.widget.conversionRate.comparison)}</div>\n </MetricTrend>\n )}\n </MetricDisplay>\n\n <FormulaDisplay data-testid=\"conversion-formula\">\n {getTranslation(Keys.widget.conversionRate.formula)}\n </FormulaDisplay>\n\n <ChartContainer data-testid=\"conversion-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\" minHeight={200}>\n <LineChart data={formattedData} margin={CHART_MARGIN}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"shortDate\" tick={AXIS_TICK} tickLine={false} interval=\"preserveStartEnd\" />\n <YAxis\n tick={AXIS_TICK}\n tickLine={false}\n tickFormatter={rateTickFormatter}\n domain={['dataMin - 0.5', 'dataMax + 0.5']}\n />\n <Tooltip content={CustomTooltip} />\n <Line\n type=\"monotone\"\n dataKey=\"rate\"\n stroke=\"#3B82F6\"\n strokeWidth={2}\n dot={LINE_DOT}\n activeDot={ACTIVE_DOT}\n />\n </LineChart>\n </ResponsiveContainer>\n </ChartContainer>\n </ConversionRateContainer>\n );\n};\n\nexport const ConversionRateChart = React.memo(ConversionRateChartComponent);\nConversionRateChart.displayName = 'ConversionRateChart';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const ConversionRateContainer = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const ChartHeader = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const TitleRow = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`;\n\nexport const HeaderActionsContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const ChartTitle = styled('h2')`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`;\n\nexport const FilterDropdown = styled('select')`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const MetricDisplay = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`;\n\nexport const MetricValue = styled('div')`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`;\n\nexport const MetricTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#066100';\n if (direction === 'down') return '#DC2626';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\n }\n`;\n\nexport const FormulaDisplay = styled('div')`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin-bottom: 8px;\n margin-top: 0;\n letter-spacing: 0.12px;\n`;\n\nexport const ChartContainer = styled('div')`\n width: 100%;\n height: 220px;\n margin-top: 16px;\n\n @media (min-width: 768px) {\n height: 280px;\n }\n\n @media (min-width: 1080px) {\n height: 340px;\n }\n\n .recharts-cartesian-grid-horizontal line,\n .recharts-cartesian-grid-vertical line {\n stroke: ${({ theme }) => getGenomeColor(theme, 'N40')};\n stroke-width: 1px;\n }\n\n .recharts-text {\n fill: ${({ theme }) => getGenomeColor(theme, 'N70')};\n font-size: 10px;\n }\n\n .recharts-tooltip-wrapper {\n z-index: 100;\n }\n`;\n\nexport const TooltipContainer = styled('div')`\n background-color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n padding: 8px 12px;\n box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);\n`;\n\nexport const TooltipLabel = styled('div')`\n font-size: 11px;\n font-weight: 600;\n color: ${({ theme }) => getGenomeColor(theme, 'N10')};\n margin-bottom: 4px;\n`;\n\nexport const TooltipValue = styled('div')`\n font-size: 13px;\n font-weight: 700;\n color: ${({ theme }) => getGenomeColor(theme, 'A10')};\n`;\n\nexport const TooltipDetails = styled('div')`\n font-size: 10px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n margin-top: 2px;\n`;\n","import type { DateRangeOption } from '../types.d';\n\nexport const DAYS_MAP: Record<DateRangeOption, number> = {\n last7days: 7,\n last30days: 30,\n last90days: 90,\n thisMonth: 31,\n};\n\nexport const DATE_RANGE_LABELS: Record<DateRangeOption, string> = {\n last7days: 'Last 7 Days',\n last30days: 'Last 30 Days',\n last90days: 'Last 90 Days',\n thisMonth: 'This Month',\n};\n\nexport function getDaysFromDateRange(dateRange: DateRangeOption): number {\n return DAYS_MAP[dateRange] ?? 30;\n}\n\nexport function getDateRangeLabel(dateRange: DateRangeOption): string {\n return DATE_RANGE_LABELS[dateRange] ?? 'Last 30 Days';\n}\n","import type { DateRangeOption } from '../types.d';\nimport { getDateRangeLabel } from './dateConstants';\n\nexport function formatDateRangeLabel(dateRange: DateRangeOption): string {\n return getDateRangeLabel(dateRange);\n}\n\nexport function formatShortDate(date: Date): string {\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n return `${months[date.getMonth()]} ${date.getDate()}`;\n}\n\nconst AXIS_MONTH_MAP: Record<string, string> = {\n Jan: '1',\n Feb: '2',\n Mar: '3',\n Apr: '4',\n May: '5',\n Jun: '6',\n Jul: '7',\n Aug: '8',\n Sep: '9',\n Oct: '10',\n Nov: '11',\n Dec: '12',\n};\n\nexport function formatAxisDate(dateStr: string): string {\n const parts = dateStr.split(' ');\n if (parts.length !== 2) return dateStr;\n return `${AXIS_MONTH_MAP[parts[0]] || parts[0]}/${parts[1]}`;\n}\n\nexport function formatDisplayDate(dateStr: string): string {\n const date = new Date(dateStr);\n return formatShortDate(date);\n}\n\nexport function formatDateRange(start: string, end: string): string {\n return `${formatDisplayDate(start)} - ${formatDisplayDate(end)}`;\n}\n\nexport function formatISODate(date: Date): string {\n return date.toISOString().split('T')[0];\n}\n\n/**\n * Extract and format the date range from an array of data objects.\n * Handles various date field names: 'date', 'Date', 'dateTime', etc.\n * Falls back to calculating from dateRange option if no date data is available.\n * @param data Array of objects with date information\n * @param fallbackLabel Fallback label if no dates found\n * @returns Formatted date range string (e.g., \"May 30 - Aug 27\")\n */\nexport function getActualDateRange(data: unknown[], fallbackLabel: string = 'N/A'): string {\n if (!Array.isArray(data) || data.length === 0) return fallbackLabel;\n\n try {\n // Extract first and last dates from data\n const first = data[0] as Record<string, unknown>;\n const last = data[data.length - 1] as Record<string, unknown>;\n\n // Try various date field names\n const dateFieldNames = ['date', 'Date', 'dateTime', 'eventDate', 'timestamp'];\n let startDateStr: string | undefined;\n let endDateStr: string | undefined;\n\n for (const fieldName of dateFieldNames) {\n if (first[fieldName] && !startDateStr) {\n startDateStr = String(first[fieldName]);\n }\n if (last[fieldName] && !endDateStr) {\n endDateStr = String(last[fieldName]);\n }\n }\n\n if (startDateStr && endDateStr) {\n return formatDateRange(startDateStr, endDateStr);\n }\n } catch {\n // Silently fail and return fallback\n }\n\n return fallbackLabel;\n}\n\n/**\n * Calculate and format the date range based on a DateRangeOption.\n * Used for components without time-series data (e.g., TopProducts, TopCategories)\n * @param dateRangeOption The selected date range option\n * @returns Formatted date range string (e.g., \"Aug 28 - Sep 27\" for last30days)\n */\nexport function calculateDateRangeFromOption(dateRangeOption: DateRangeOption): string {\n const today = new Date();\n const year = today.getFullYear();\n const month = today.getMonth();\n const date = today.getDate();\n\n let startDate: Date;\n let endDate = new Date(year, month, date);\n\n switch (dateRangeOption) {\n case 'last7days':\n startDate = new Date(year, month, date - 7);\n break;\n case 'last30days':\n startDate = new Date(year, month, date - 30);\n break;\n case 'last90days':\n startDate = new Date(year, month, date - 90);\n break;\n case 'thisMonth':\n startDate = new Date(year, month, 1);\n endDate = new Date(year, month + 1, 0); // Last day of current month\n break;\n default:\n return 'N/A';\n }\n\n return formatDateRange(formatISODate(startDate), formatISODate(endDate));\n}\n","import React from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport { getTrendIcon, getTrendDirectionLabel } from '../../utils/trendUtils';\nimport { WidgetMenu } from '../WidgetMenu';\nimport {\n SignupsContainer,\n ChartHeader,\n ChartTitle,\n FilterDropdown,\n MetricDisplay,\n MetricValue,\n MetricTrend,\n ChartContainer,\n Legend,\n LegendItem,\n LegendColor,\n LegendLabel,\n HeaderActionsContainer,\n} from './SignupsChart.styled';\nimport type { SignupDataPoint, SignupViewOption } from '../../types.d';\nimport { ChartWidgetSkeleton } from '../LoadingSkeletons';\nimport { formatAxisDate } from '../../utils/dateFormat';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface SignupsChartProps {\n readonly signupData: SignupDataPoint[];\n readonly signupView: SignupViewOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly onViewChange?: (view: SignupViewOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nconst SERIES_COLORS = {\n total: '#3B82F6',\n members: '#7B92A8',\n retail: '#A3B5C7',\n brandAffiliates: '#CBD6E0',\n};\n\nconst CHART_MARGIN = { top: 5, right: 10, left: -10, bottom: 5 };\nconst AXIS_TICK = { fontSize: 10 };\nconst LINE_DOT = { r: 2 };\n\nconst SignupsChartComponent: React.FC<SignupsChartProps> = ({\n signupData,\n signupView,\n isLoading = false,\n title,\n onViewChange,\n onTitleClick,\n}) => {\n const handleViewChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newView = event.target.value as SignupViewOption;\n onViewChange?.(newView);\n },\n [onViewChange],\n );\n\n const noDataText = getTranslation(Keys.widget.signups.noData);\n const noChangeText = getTranslation(Keys.widget.signups.noChange);\n\n const totalSignups = React.useMemo(() => {\n if (signupData.length === 0) return 0;\n return signupData[signupData.length - 1].total;\n }, [signupData]);\n\n const trendInfo = React.useMemo((): { direction: 'up' | 'down' | 'neutral'; value: string } => {\n if (signupData.length < 2) return { direction: 'neutral', value: noDataText };\n const latestTotal = signupData[signupData.length - 1].total;\n const previousTotal = signupData[0].total;\n const change = latestTotal - previousTotal;\n const percentageChange = (change / previousTotal) * 100;\n if (Math.abs(percentageChange) < 0.1) return { direction: 'neutral', value: noChangeText };\n const direction = change > 0 ? 'up' : 'down';\n const formattedChange = `${change > 0 ? '+' : ''}${change} (${percentageChange.toFixed(1)}%)`;\n return { direction, value: formattedChange };\n }, [noChangeText, noDataText, signupData]);\n\n const formattedData = React.useMemo(\n () => signupData.map((item) => ({ ...item, shortDate: formatAxisDate(item.date) })),\n [signupData],\n );\n const totalLabel = getTranslation(Keys.widget.signups.total);\n const membersLabel = getTranslation(Keys.widget.signups.members);\n const retailLabel = getTranslation(Keys.widget.signups.retail);\n const brandAffiliatesLabel = getTranslation(Keys.widget.signups.brandAffiliates);\n\n if (isLoading && signupData.length === 0) {\n return (\n <SignupsContainer data-testid=\"widget-signups\">\n <ChartWidgetSkeleton />\n </SignupsContainer>\n );\n }\n\n return (\n <SignupsContainer\n as=\"section\"\n data-testid=\"widget-signups\"\n aria-label={getTranslation(Keys.widget.signups.chartAriaLabel)}\n >\n <ChartHeader>\n <ChartTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.widget.signups.titleAriaLabel)}\n data-testid=\"widget-title-signups\"\n >\n {title ?? getTranslation(Keys.widget.signups.title)}\n </ChartTitle>\n <HeaderActionsContainer>\n <FilterDropdown\n id=\"signup-view\"\n data-testid=\"signup-view-dropdown\"\n value={signupView}\n onChange={handleViewChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.widget.signups.filterAriaLabel)}\n >\n <option value=\"all\">{getTranslation(Keys.filter.signupView.showAll)}</option>\n <option value=\"members\">{getTranslation(Keys.filter.signupView.showMembers)}</option>\n <option value=\"retail\">{getTranslation(Keys.filter.signupView.showRetail)}</option>\n <option value=\"brandAffiliates\">\n {getTranslation(Keys.filter.signupView.showBrandAffiliates)}\n </option>\n </FilterDropdown>\n <WidgetMenu widgetId=\"signups\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </ChartHeader>\n\n <MetricDisplay data-testid=\"signups-metric-display\">\n <MetricValue\n data-testid=\"signups-metric-value\"\n aria-label={`${totalLabel}: ${totalSignups.toLocaleString()}`}\n >\n {totalSignups.toLocaleString()}\n </MetricValue>\n {trendInfo.value !== noDataText && (\n <MetricTrend\n as=\"output\"\n data-testid=\"signups-metric-trend\"\n direction={trendInfo.direction}\n aria-live=\"polite\"\n aria-label={`${getTrendDirectionLabel(trendInfo.direction)} ${trendInfo.value}`}\n >\n <div className=\"trend-line\">\n <span aria-hidden=\"true\">{getTrendIcon(trendInfo.direction)}</span>\n <span className=\"change-value\">{trendInfo.value.split(' ')[0]}</span>\n <span className=\"change-percent\">{trendInfo.value.split(' ')[1]}</span>\n </div>\n <div className=\"comparison-text\">{getTranslation(Keys.widget.conversionRate.comparison)}</div>\n </MetricTrend>\n )}\n </MetricDisplay>\n\n <ChartContainer data-testid=\"signups-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\" minHeight={200}>\n <LineChart data={formattedData} margin={CHART_MARGIN}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"shortDate\" tick={AXIS_TICK} tickLine={false} interval=\"preserveStartEnd\" />\n <YAxis tick={AXIS_TICK} tickLine={false} />\n <Tooltip />\n {(signupView === 'all' || signupView === 'members') && (\n <Line\n type=\"monotone\"\n dataKey={signupView === 'all' ? 'total' : 'members'}\n stroke={signupView === 'all' ? SERIES_COLORS.total : SERIES_COLORS.members}\n strokeWidth={2}\n dot={LINE_DOT}\n name={signupView === 'all' ? totalLabel : membersLabel}\n />\n )}\n {signupView === 'all' && (\n <>\n <Line\n type=\"monotone\"\n dataKey=\"members\"\n stroke={SERIES_COLORS.members}\n strokeWidth={2}\n dot={LINE_DOT}\n name={membersLabel}\n />\n <Line\n type=\"monotone\"\n dataKey=\"retail\"\n stroke={SERIES_COLORS.retail}\n strokeWidth={2}\n dot={LINE_DOT}\n name={retailLabel}\n />\n <Line\n type=\"monotone\"\n dataKey=\"brandAffiliates\"\n stroke={SERIES_COLORS.brandAffiliates}\n strokeWidth={2}\n dot={LINE_DOT}\n name={brandAffiliatesLabel}\n />\n </>\n )}\n {signupView === 'retail' && (\n <Line\n type=\"monotone\"\n dataKey=\"retail\"\n stroke={SERIES_COLORS.retail}\n strokeWidth={2}\n dot={LINE_DOT}\n name={retailLabel}\n />\n )}\n {signupView === 'brandAffiliates' && (\n <Line\n type=\"monotone\"\n dataKey=\"brandAffiliates\"\n stroke={SERIES_COLORS.brandAffiliates}\n strokeWidth={2}\n dot={LINE_DOT}\n name={brandAffiliatesLabel}\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n </ChartContainer>\n\n {signupView === 'all' && (\n <Legend data-testid=\"signups-legend\">\n <LegendItem data-testid=\"legend-total\">\n <LegendColor color={SERIES_COLORS.total} />\n <LegendLabel>{totalLabel}</LegendLabel>\n </LegendItem>\n <LegendItem data-testid=\"legend-members\">\n <LegendColor color={SERIES_COLORS.members} />\n <LegendLabel>{membersLabel}</LegendLabel>\n </LegendItem>\n <LegendItem data-testid=\"legend-retail\">\n <LegendColor color={SERIES_COLORS.retail} />\n <LegendLabel>{retailLabel}</LegendLabel>\n </LegendItem>\n <LegendItem data-testid=\"legend-brandAffiliates\">\n <LegendColor color={SERIES_COLORS.brandAffiliates} />\n <LegendLabel>{brandAffiliatesLabel}</LegendLabel>\n </LegendItem>\n </Legend>\n )}\n </SignupsContainer>\n );\n};\n\nexport const SignupsChart = React.memo(SignupsChartComponent);\nSignupsChart.displayName = 'SignupsChart';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const SignupsContainer = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const ChartHeader = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const HeaderActionsContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const ChartTitle = styled('h2')`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`;\n\nexport const FilterDropdown = styled('select')`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const MetricDisplay = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`;\n\nexport const MetricValue = styled('div')`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`;\n\nexport const MetricTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#066100';\n if (direction === 'down') return '#DC2626';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\n }\n`;\n\nexport const ChartContainer = styled('div')`\n width: 100%;\n height: 220px;\n margin-top: 16px;\n\n @media (min-width: 768px) {\n height: 280px;\n }\n @media (min-width: 1080px) {\n height: 340px;\n }\n\n .recharts-cartesian-grid-horizontal line,\n .recharts-cartesian-grid-vertical line {\n stroke: ${({ theme }) => getGenomeColor(theme, 'N40')};\n stroke-width: 1px;\n }\n .recharts-text {\n fill: ${({ theme }) => getGenomeColor(theme, 'N70')};\n font-size: 10px;\n }\n`;\n\nexport const Legend = styled('div')`\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 16px;\n margin-top: 16px;\n padding-top: 0;\n`;\n\nexport const LegendItem = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n`;\n\nexport const LegendColor = styled('div')<{ color: string }>`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ color }) => color};\n flex-shrink: 0;\n`;\n\nexport const LegendLabel = styled('span')`\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n","import React from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { WidgetMenu } from '../WidgetMenu';\nimport {\n CategoriesContainer,\n ChartHeader,\n ChartTitle,\n SortDropdown,\n ChartAndLegendContainer,\n ChartWrapper,\n LegendContainer,\n LegendItem,\n LegendColor,\n LegendInfo,\n LegendName,\n LegendValue,\n LegendValueWrapper,\n LegendTrendInline,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n EmptyState,\n EmptyStateText,\n HeaderActionsContainer,\n} from './TopCategoriesPieChart.styled';\nimport type { CategoryRevenue, CategorySortOption } from '../../types.d';\nimport { CategoriesPieChartSkeleton } from '../LoadingSkeletons';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport { parseTrendPercent, resolveTrendDirection, calculateWeightedRevenueTrend } from '../../utils/trendUtils';\nimport { formatMoney } from '../../utils/dataUtils';\n\nexport interface TopCategoriesPieChartProps {\n readonly categories: CategoryRevenue[];\n readonly categorySort: CategorySortOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly onSortChange?: (sort: CategorySortOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nconst TopCategoriesPieChartComponent: React.FC<TopCategoriesPieChartProps> = ({\n categories,\n categorySort,\n isLoading = false,\n title,\n onSortChange,\n onTitleClick,\n}) => {\n const handleSortChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newSort = event.target.value as CategorySortOption;\n onSortChange?.(newSort);\n },\n [onSortChange],\n );\n\n const { sortedCategories, totalRevenue, trendDirection, formattedTrend } = React.useMemo(() => {\n const nextSortedCategories = [...categories].sort((a, b) => {\n if (categorySort === 'revenue') return b.revenue - a.revenue;\n return (\n (parseTrendPercent(b.trend?.revenue) ?? -Infinity) - (parseTrendPercent(a.trend?.revenue) ?? -Infinity)\n );\n });\n\n const nextTotalRevenue = nextSortedCategories.reduce((sum, category) => sum + category.revenue, 0);\n\n const { direction: nextTrendDirection, formatted: nextFormattedTrend } = calculateWeightedRevenueTrend(\n nextSortedCategories,\n (category) => category.revenue,\n (category) => category.trend?.revenue,\n );\n\n return {\n sortedCategories: nextSortedCategories,\n totalRevenue: nextTotalRevenue,\n trendDirection: nextTrendDirection,\n formattedTrend: nextFormattedTrend,\n };\n }, [categories, categorySort]);\n\n const getTrendGraphIcon = (direction: 'up' | 'down' | 'neutral') => {\n if (direction === 'up') {\n return <TrendingUpIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n if (direction === 'down') {\n return <TrendingDownIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n return null;\n };\n\n interface CustomLabelProps {\n cx: number;\n cy: number;\n midAngle: number;\n innerRadius: number;\n outerRadius: number;\n percentage: number;\n }\n\n const renderCustomLabel = (props: CustomLabelProps) => {\n // eslint-disable-next-line react/prop-types\n const { cx, cy, midAngle, innerRadius, outerRadius, percentage } = props;\n const RADIAN = Math.PI / 180;\n // Position label in the middle of the donut ring\n const radius = innerRadius + (outerRadius - innerRadius) / 2;\n const x = cx + radius * Math.cos(-midAngle * RADIAN);\n const y = cy + radius * Math.sin(-midAngle * RADIAN);\n\n return (\n <text\n x={x}\n y={y}\n fill=\"white\"\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n fontSize=\"10\"\n fontWeight=\"600\"\n fontFamily=\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\"\n letterSpacing=\"0.2\"\n style={{ lineHeight: '12px', leadingTrim: 'none' }}\n >\n {`${percentage}%`}\n </text>\n );\n };\n\n const currencyCode = sortedCategories[0]?.currencyCode;\n\n if (isLoading && categories.length === 0) {\n return (\n <CategoriesContainer data-testid=\"widget-top-categories\">\n <CategoriesPieChartSkeleton />\n </CategoriesContainer>\n );\n }\n\n if (categories.length === 0) {\n return (\n <CategoriesContainer data-testid=\"widget-top-categories\">\n <ChartHeader>\n <ChartTitle>{title ?? getTranslation(Keys.widget.topCategories.title)}</ChartTitle>\n </ChartHeader>\n <EmptyState data-testid=\"categories-empty-state\">\n <EmptyStateText>{getTranslation(Keys.widget.topCategories.empty)}</EmptyStateText>\n </EmptyState>\n </CategoriesContainer>\n );\n }\n\n return (\n <CategoriesContainer\n as=\"section\"\n data-testid=\"widget-top-categories\"\n aria-label={getTranslation(Keys.widget.topCategories.chartAriaLabel)}\n >\n <ChartHeader>\n <ChartTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.widget.topCategories.titleAriaLabel)}\n data-testid=\"widget-title-top-categories\"\n >\n {title ?? getTranslation(Keys.widget.topCategories.title)}\n </ChartTitle>\n <HeaderActionsContainer>\n <SortDropdown\n id=\"category-sort\"\n data-testid=\"category-sort-dropdown\"\n value={categorySort}\n onChange={handleSortChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.widget.topCategories.sortAriaLabel)}\n >\n <option value=\"revenue\">{getTranslation(Keys.filter.categorySort.byRevenue)}</option>\n <option value=\"trend\">{getTranslation(Keys.filter.categorySort.byTrend)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-categories\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </ChartHeader>\n\n <ChartAndLegendContainer>\n <ChartWrapper data-testid=\"categories-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={sortedCategories}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius=\"55%\"\n outerRadius=\"85%\"\n dataKey=\"revenue\"\n nameKey=\"name\"\n paddingAngle={2}\n label={renderCustomLabel}\n labelLine={false}\n >\n {sortedCategories.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"categories-donut-center\">\n <DonutCenterLabel>{getTranslation(Keys.stats.revenue)}</DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</DonutCenterValue>\n <DonutCenterTrend direction={trendDirection}>\n {getTrendGraphIcon(trendDirection)}\n <span>{formattedTrend}</span>\n </DonutCenterTrend>\n </DonutCenterOverlay>\n </ChartWrapper>\n\n <LegendContainer data-testid=\"categories-legend-container\">\n {sortedCategories.map((category, index) => (\n <LegendItem key={category.id} data-testid={`category-legend-${index}`}>\n <LegendColor color={category.color} />\n <LegendInfo>\n <LegendName>\n {category.name.charAt(0).toUpperCase() + category.name.slice(1)}\n </LegendName>\n <LegendValueWrapper>\n <LegendValue>\n {formatMoney(category.revenue, category.currencyCode)} ({category.percentage}%)\n </LegendValue>\n {category.trend?.revenue ? (\n <LegendTrendInline\n direction={resolveTrendDirection(category.trend?.revenue)}\n data-testid={`category-legend-trend-${index}`}\n aria-label={category.trend.revenue}\n >\n {getTrendGraphIcon(resolveTrendDirection(category.trend?.revenue))}\n </LegendTrendInline>\n ) : null}\n </LegendValueWrapper>\n </LegendInfo>\n </LegendItem>\n ))}\n </LegendContainer>\n </ChartAndLegendContainer>\n </CategoriesContainer>\n );\n};\n\nexport const TopCategoriesPieChart = React.memo(TopCategoriesPieChartComponent);\nTopCategoriesPieChart.displayName = 'TopCategoriesPieChart';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const CategoriesContainer = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const ChartHeader = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const HeaderActionsContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const ChartTitle = styled('h2')`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`;\n\nexport const SortDropdown = styled('select')`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const ChartAndLegendContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 20px;\n align-items: center;\n justify-content: center;\n flex: 1;\n\n @media (min-width: 768px) {\n flex-direction: row;\n gap: 24px;\n align-items: center;\n justify-content: center;\n }\n`;\n\nexport const ChartWrapper = styled('div')`\n position: relative;\n width: 100%;\n height: 220px;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 260px;\n height: 260px;\n flex: 0 0 auto;\n }\n\n @media (min-width: 1080px) {\n width: 280px;\n height: 280px;\n flex: 0 0 auto;\n }\n\n /* Style recharts pie labels (percentages inside segments) */\n svg text {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n text[class*='recharts'] {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n`;\n\nexport const DonutCenterOverlay = styled('div')`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 96px;\n`;\n\nexport const DonutCenterLabel = styled('div')`\n font-size: 10px;\n line-height: 1.2;\n font-weight: 500;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n\nexport const DonutCenterValue = styled('div')`\n margin-top: 2px;\n font-size: 16px;\n line-height: 1.2;\n font-weight: 700;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n`;\n\nexport const DonutCenterTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 3px;\n margin-top: 4px;\n font-size: 12px;\n line-height: 1.2;\n font-weight: 600;\n color: ${({ direction, theme }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n\nexport const LegendContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex: 0 1 auto;\n\n @media (min-width: 768px) {\n gap: 10px;\n }\n`;\n\nexport const LegendItem = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 0;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n @media (min-width: 768px) {\n gap: 10px;\n padding: 6px 0;\n }\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n`;\n\nexport const LegendColor = styled('div')<{ color: string }>`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ color }) => color};\n flex-shrink: 0;\n`;\n\nexport const LegendInfo = styled('div')`\n display: flex;\n flex-direction: row;\n gap: 4px;\n flex: 1;\n min-width: 0;\n align-items: center;\n`;\n\nexport const LegendName = styled('div')`\n font-size: 13px;\n font-weight: 600;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n font-size: 14px;\n }\n`;\n\nexport const LegendValue = styled('div')`\n font-size: 12px;\n font-weight: 500;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n flex-shrink: 0;\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const LegendPercentage = styled('div')`\n display: none;\n`;\n\nexport const LegendValueWrapper = styled('div')`\n display: flex;\n align-items: center;\n gap: 4px;\n flex: 1;\n min-width: 0;\n`;\n\nexport const LegendTrendInline = styled('span')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ direction }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return '#757575';\n }};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n\nexport const LegendTrend = styled('span')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ direction }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return '#757575';\n }};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`;\n\nexport const EmptyState = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n text-align: center;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n\nexport const EmptyStateText = styled('div')`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n","import React from 'react';\nimport {\n DashboardContainer,\n StatsRow,\n WidgetContainer,\n TwoColumnGrid,\n ErrorContainer,\n} from './ShoppingDashboard.styled';\nimport { DashboardHeader } from './shared/DashboardHeader';\nimport { StatsCard } from './shared/StatsCard';\nimport { TopSellingProductsList } from './shared/TopProducts/TopSellingProductsList';\nimport { ConversionRateChart } from './shared/ConversionRate/ConversionRateChart';\nimport { SignupsChart } from './shared/Signups/SignupsChart';\nimport { TopCategoriesPieChart } from './shared/TopCategories/TopCategoriesPieChart';\nimport type {\n DashboardStats,\n TopProduct,\n ConversionDataPoint,\n SignupDataPoint,\n CategoryRevenue,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n ProductSortOption,\n SignupViewOption,\n ConversionFilterOption,\n CategorySortOption,\n} from './types.d';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from './TranslationKeys/ShoppingDashboardTranslationKeys';\n\nconst EMPTY_TOP_PRODUCTS: TopProduct[] = [];\nconst EMPTY_CONVERSION_DATA: ConversionDataPoint[] = [];\nconst EMPTY_SIGNUP_DATA: SignupDataPoint[] = [];\nconst EMPTY_CATEGORIES: CategoryRevenue[] = [];\n\nexport interface ShoppingDashboardProps {\n readonly stats?: DashboardStats | null;\n readonly topProducts?: TopProduct[];\n readonly conversionData?: ConversionDataPoint[];\n readonly signupData?: SignupDataPoint[];\n readonly categories?: CategoryRevenue[];\n readonly isLoading?: boolean;\n readonly error?: string | null;\n readonly shopTitle?: string;\n readonly className?: string;\n\n readonly dateRange?: DateRangeOption;\n readonly market?: MarketOption;\n readonly productSort?: ProductSortOption;\n readonly signupView?: SignupViewOption;\n readonly conversionFilter?: ConversionFilterOption;\n readonly categorySort?: CategorySortOption;\n\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onProductSortChange?: (sort: ProductSortOption) => void;\n readonly onSignupViewChange?: (view: SignupViewOption) => void;\n readonly onConversionFilterChange?: (filter: ConversionFilterOption) => void;\n readonly onCategorySortChange?: (sort: CategorySortOption) => void;\n\n readonly onProductsTitleClick?: () => void;\n readonly onConversionTitleClick?: () => void;\n readonly onSignupsTitleClick?: () => void;\n readonly onCategoriesToTitleClick?: () => void;\n}\n\nexport const ShoppingDashboard: React.FC<ShoppingDashboardProps> = ({\n stats,\n topProducts,\n conversionData,\n signupData,\n categories,\n isLoading = false,\n error,\n shopTitle,\n className,\n dateRange = 'last30days',\n market = 'all',\n productSort = 'units',\n signupView = 'all',\n conversionFilter = 'all',\n categorySort = 'revenue',\n markets,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onSignupViewChange,\n onConversionFilterChange,\n onCategorySortChange,\n onProductsTitleClick,\n onConversionTitleClick,\n onSignupsTitleClick,\n onCategoriesToTitleClick,\n}) => {\n const resolvedTopProducts = topProducts ?? EMPTY_TOP_PRODUCTS;\n const resolvedConversionData = conversionData ?? EMPTY_CONVERSION_DATA;\n const resolvedSignupData = signupData ?? EMPTY_SIGNUP_DATA;\n const resolvedCategories = categories ?? EMPTY_CATEGORIES;\n\n if (error) {\n return (\n <DashboardContainer as=\"main\" className={className} aria-label={getTranslation(Keys.ariaLabel.dashboard)}>\n <ErrorContainer data-testid=\"dashboard-error\" role=\"alert\" aria-live=\"assertive\">\n <strong>{getTranslation(Keys.error)}:</strong> {error}\n </ErrorContainer>\n </DashboardContainer>\n );\n }\n\n const getTrendDirection = (trendValue?: string): 'up' | 'down' | 'neutral' => {\n if (!trendValue) return 'neutral';\n if (trendValue.startsWith('+')) return 'up';\n if (trendValue.startsWith('-')) return 'down';\n return 'neutral';\n };\n\n return (\n <DashboardContainer\n as=\"main\"\n className={className}\n data-testid=\"shopping-dashboard\"\n aria-label={getTranslation(Keys.ariaLabel.dashboard)}\n aria-busy={isLoading}\n >\n <DashboardHeader\n shopTitle={shopTitle}\n dateRange={dateRange}\n market={market}\n isLoading={isLoading}\n stats={stats}\n markets={markets}\n onDateRangeChange={onDateRangeChange}\n onMarketChange={onMarketChange}\n />\n\n <StatsRow as=\"section\" data-testid=\"stats-row\" aria-label={getTranslation(Keys.ariaLabel.statsRow)}>\n <StatsCard\n title={getTranslation(Keys.stats.revenue)}\n value={stats?.metrics?.revenue ?? '$0'}\n trendDirection={getTrendDirection(stats?.trend?.revenue)}\n trendValue={stats?.trend?.revenue}\n testId=\"stats-card-revenue\"\n isLoading={isLoading}\n />\n <StatsCard\n title={getTranslation(Keys.stats.volume)}\n value={stats?.metrics?.volume ?? '0'}\n subtitle={getTranslation(Keys.stats.subtitle.dcSv)}\n trendDirection={getTrendDirection(stats?.trend?.volume)}\n trendValue={stats?.trend?.volume}\n testId=\"stats-card-volume\"\n isLoading={isLoading}\n />\n <StatsCard\n title={getTranslation(Keys.stats.visits)}\n value={stats?.metrics?.siteVisits ?? '0'}\n subtitle={`${stats?.metrics?.conversionRate ?? '0%'} ${getTranslation(Keys.stats.subtitle.conversionRate)}`}\n trendDirection={getTrendDirection(stats?.trend?.siteVisits)}\n trendValue={stats?.trend?.siteVisits}\n testId=\"stats-card-visits\"\n isLoading={isLoading}\n />\n </StatsRow>\n\n <WidgetContainer data-testid=\"widget-container\">\n <TwoColumnGrid data-testid=\"widget-row-1\">\n <TopSellingProductsList\n products={resolvedTopProducts}\n productSort={productSort}\n isLoading={isLoading}\n maxProducts={5}\n onSortChange={onProductSortChange}\n onTitleClick={onProductsTitleClick}\n />\n <SignupsChart\n signupData={resolvedSignupData}\n signupView={signupView}\n isLoading={isLoading}\n onViewChange={onSignupViewChange}\n onTitleClick={onSignupsTitleClick}\n />\n </TwoColumnGrid>\n\n <TwoColumnGrid data-testid=\"widget-row-2\">\n <ConversionRateChart\n conversionData={resolvedConversionData}\n conversionFilter={conversionFilter}\n isLoading={isLoading}\n onFilterChange={onConversionFilterChange}\n onTitleClick={onConversionTitleClick}\n />\n <TopCategoriesPieChart\n categories={resolvedCategories}\n categorySort={categorySort}\n isLoading={isLoading}\n onSortChange={onCategorySortChange}\n onTitleClick={onCategoriesToTitleClick}\n />\n </TwoColumnGrid>\n </WidgetContainer>\n </DashboardContainer>\n );\n};\n\nexport default ShoppingDashboard;\n","import React from 'react';\nimport { ShoppingDashboard } from './ShoppingDashboard';\nimport { ProductsFullView } from './shared/TopProducts/ProductsFullView';\nimport { ConversionRateFullView } from './shared/ConversionRate/ConversionRateFullView';\nimport { SignupsFullView } from './shared/Signups/SignupsFullView';\nimport { CategoriesFullView } from './shared/TopCategories/CategoriesFullView';\nimport { useTranslationResolver } from './TranslationContext';\nimport type { TranslateFn } from './TranslationKeys/translationResolver';\nimport type {\n DashboardStats,\n TopProduct,\n ConversionDataPoint,\n SignupDataPoint,\n CategoryRevenue,\n OrderHistory,\n SignupDetail,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n ProductSortOption,\n SignupViewOption,\n ConversionFilterOption,\n CategorySortOption,\n FullViewWidgetType,\n} from './types.d';\n\ntype ViewMode = 'push' | 'replace';\n\nexport type MysiteDashboardView = 'dashboard' | FullViewWidgetType;\n\nexport interface MysiteDashboardHistoryLocation {\n readonly pathname?: string;\n readonly search?: string;\n readonly hash?: string;\n readonly state?: unknown;\n}\n\nexport interface MysiteDashboardHistoryAdapter {\n readonly location?: MysiteDashboardHistoryLocation;\n push(location: MysiteDashboardHistoryLocation): void;\n replace(location: MysiteDashboardHistoryLocation): void;\n goBack(): void;\n listen(listener: (location: MysiteDashboardHistoryLocation, action: string) => void): () => void;\n}\n\nexport interface MysiteDashboardWithNavigationProps {\n readonly stats?: DashboardStats | null;\n readonly topProducts?: TopProduct[];\n readonly conversionData?: ConversionDataPoint[];\n readonly signupData?: SignupDataPoint[];\n readonly categories?: CategoryRevenue[];\n readonly orders?: OrderHistory[];\n readonly signups?: SignupDetail[];\n readonly isLoading?: boolean;\n readonly error?: string | null;\n readonly shopTitle?: string;\n readonly className?: string;\n\n readonly translate?: TranslateFn;\n\n readonly initialDateRange?: DateRangeOption;\n readonly initialMarket?: MarketOption;\n readonly initialProductSort?: ProductSortOption;\n readonly initialSignupView?: SignupViewOption;\n readonly initialConversionFilter?: ConversionFilterOption;\n readonly initialCategorySort?: CategorySortOption;\n\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n\n readonly historyAdapter?: MysiteDashboardHistoryAdapter;\n readonly historyStateKey?: string;\n readonly resetToDashboardOnMount?: boolean;\n\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onProductSortChange?: (sort: ProductSortOption) => void;\n readonly onSignupViewChange?: (view: SignupViewOption) => void;\n readonly onConversionFilterChange?: (filter: ConversionFilterOption) => void;\n readonly onCategorySortChange?: (sort: CategorySortOption) => void;\n readonly onViewChange?: (view: MysiteDashboardView) => void;\n}\n\nconst DEFAULT_HISTORY_STATE_KEY = 'shoppingDashboardView';\n\nconst EMPTY_TOP_PRODUCTS: TopProduct[] = [];\nconst EMPTY_CONVERSION_DATA: ConversionDataPoint[] = [];\nconst EMPTY_SIGNUP_DATA: SignupDataPoint[] = [];\nconst EMPTY_CATEGORIES: CategoryRevenue[] = [];\nconst EMPTY_ORDERS: OrderHistory[] = [];\nconst EMPTY_SIGNUPS: SignupDetail[] = [];\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nfunction isMysiteDashboardView(value: unknown): value is MysiteDashboardView {\n return (\n value === 'dashboard' ||\n value === 'products' ||\n value === 'conversion-rate' ||\n value === 'signups' ||\n value === 'categories'\n );\n}\n\nfunction readViewFromState(state: unknown, stateKey: string): MysiteDashboardView {\n if (!isRecord(state)) {\n return 'dashboard';\n }\n\n const view = state[stateKey];\n return isMysiteDashboardView(view) ? view : 'dashboard';\n}\n\nfunction buildStateWithView(state: unknown, stateKey: string, view: MysiteDashboardView): Record<string, unknown> {\n const currentState = isRecord(state) ? state : {};\n\n return {\n ...currentState,\n [stateKey]: view,\n };\n}\n\nfunction buildLocationWithState(\n location: MysiteDashboardHistoryLocation | undefined,\n state: Record<string, unknown>,\n): MysiteDashboardHistoryLocation {\n return {\n pathname: location?.pathname,\n search: location?.search,\n hash: location?.hash,\n state,\n };\n}\n\nexport const MysiteDashboardWithNavigation: React.FC<MysiteDashboardWithNavigationProps> = ({\n stats,\n topProducts,\n conversionData,\n signupData,\n categories,\n orders,\n signups,\n isLoading = false,\n error,\n shopTitle,\n className,\n translate,\n initialDateRange = 'last30days',\n initialMarket = 'all',\n initialProductSort = 'units',\n initialSignupView = 'all',\n initialConversionFilter = 'all',\n initialCategorySort = 'revenue',\n markets,\n historyAdapter,\n historyStateKey = DEFAULT_HISTORY_STATE_KEY,\n resetToDashboardOnMount = true,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onSignupViewChange,\n onConversionFilterChange,\n onCategorySortChange,\n onViewChange,\n}) => {\n useTranslationResolver(translate);\n\n const [currentView, setCurrentView] = React.useState<MysiteDashboardView>('dashboard');\n const hasIntraDashboardHistoryRef = React.useRef(false);\n const [dateRange, setDateRange] = React.useState<DateRangeOption>(initialDateRange);\n const [market, setMarket] = React.useState<MarketOption>(initialMarket);\n const [productSort, setProductSort] = React.useState<ProductSortOption>(initialProductSort);\n const [signupView, setSignupView] = React.useState<SignupViewOption>(initialSignupView);\n const [conversionFilter, setConversionFilter] = React.useState<ConversionFilterOption>(initialConversionFilter);\n const [categorySort, setCategorySort] = React.useState<CategorySortOption>(initialCategorySort);\n\n const resolvedTopProducts = topProducts ?? EMPTY_TOP_PRODUCTS;\n const resolvedConversionData = conversionData ?? EMPTY_CONVERSION_DATA;\n const resolvedSignupData = signupData ?? EMPTY_SIGNUP_DATA;\n const resolvedCategories = categories ?? EMPTY_CATEGORIES;\n const resolvedOrders = orders ?? EMPTY_ORDERS;\n const resolvedSignups = signups ?? EMPTY_SIGNUPS;\n\n const updateView = React.useCallback(\n (view: MysiteDashboardView) => {\n setCurrentView(view);\n onViewChange?.(view);\n },\n [onViewChange],\n );\n\n const readCurrentView = React.useCallback((): MysiteDashboardView => {\n if (historyAdapter) {\n return readViewFromState(historyAdapter.location?.state, historyStateKey);\n }\n\n if (typeof window === 'undefined') {\n return 'dashboard';\n }\n\n return readViewFromState(window.history.state, historyStateKey);\n }, [historyAdapter, historyStateKey]);\n\n const writeCurrentView = React.useCallback(\n (view: MysiteDashboardView, mode: ViewMode) => {\n if (historyAdapter) {\n const nextState = buildStateWithView(historyAdapter.location?.state, historyStateKey, view);\n const nextLocation = buildLocationWithState(historyAdapter.location, nextState);\n\n if (mode === 'replace') {\n historyAdapter.replace(nextLocation);\n return;\n }\n\n historyAdapter.push(nextLocation);\n return;\n }\n\n if (typeof window === 'undefined') {\n return;\n }\n\n const nextState = buildStateWithView(window.history.state, historyStateKey, view);\n\n if (mode === 'replace') {\n window.history.replaceState(nextState, '');\n return;\n }\n\n window.history.pushState(nextState, '');\n },\n [historyAdapter, historyStateKey],\n );\n\n React.useEffect(() => {\n if (resetToDashboardOnMount) {\n writeCurrentView('dashboard', 'replace');\n hasIntraDashboardHistoryRef.current = false;\n updateView('dashboard');\n } else {\n updateView(readCurrentView());\n }\n\n if (historyAdapter) {\n return historyAdapter.listen((location, action) => {\n if (action === 'POP') {\n const nextView = readViewFromState(location.state, historyStateKey);\n hasIntraDashboardHistoryRef.current = nextView !== 'dashboard';\n updateView(nextView);\n }\n });\n }\n\n const handlePopState = (event: PopStateEvent) => {\n const nextView = readViewFromState(event.state, historyStateKey);\n hasIntraDashboardHistoryRef.current = nextView !== 'dashboard';\n updateView(nextView);\n };\n\n window.addEventListener('popstate', handlePopState);\n return () => {\n window.removeEventListener('popstate', handlePopState);\n };\n }, [historyAdapter, historyStateKey, readCurrentView, resetToDashboardOnMount, updateView, writeCurrentView]);\n\n const handleOpenFullView = React.useCallback(\n (view: FullViewWidgetType) => {\n hasIntraDashboardHistoryRef.current = true;\n writeCurrentView(view, 'push');\n updateView(view);\n },\n [updateView, writeCurrentView],\n );\n\n const handleBack = React.useCallback(() => {\n if (currentView !== 'dashboard' && hasIntraDashboardHistoryRef.current) {\n if (historyAdapter) {\n historyAdapter.goBack();\n return;\n }\n\n if (typeof window !== 'undefined') {\n window.history.back();\n }\n\n return;\n }\n\n hasIntraDashboardHistoryRef.current = false;\n writeCurrentView('dashboard', 'replace');\n updateView('dashboard');\n }, [currentView, historyAdapter, updateView, writeCurrentView]);\n\n const handleDateRangeChange = React.useCallback(\n (nextDateRange: DateRangeOption) => {\n setDateRange(nextDateRange);\n onDateRangeChange?.(nextDateRange);\n },\n [onDateRangeChange],\n );\n\n const handleMarketChange = React.useCallback(\n (nextMarket: MarketOption) => {\n setMarket(nextMarket);\n onMarketChange?.(nextMarket);\n },\n [onMarketChange],\n );\n\n const handleProductSortChange = React.useCallback(\n (nextProductSort: ProductSortOption) => {\n setProductSort(nextProductSort);\n onProductSortChange?.(nextProductSort);\n },\n [onProductSortChange],\n );\n\n const handleSignupViewChange = React.useCallback(\n (nextSignupView: SignupViewOption) => {\n setSignupView(nextSignupView);\n onSignupViewChange?.(nextSignupView);\n },\n [onSignupViewChange],\n );\n\n const handleConversionFilterChange = React.useCallback(\n (nextFilter: ConversionFilterOption) => {\n setConversionFilter(nextFilter);\n onConversionFilterChange?.(nextFilter);\n },\n [onConversionFilterChange],\n );\n\n const handleCategorySortChange = React.useCallback(\n (nextSort: CategorySortOption) => {\n setCategorySort(nextSort);\n onCategorySortChange?.(nextSort);\n },\n [onCategorySortChange],\n );\n\n const handleProductsTitleClick = React.useCallback(() => {\n handleOpenFullView('products');\n }, [handleOpenFullView]);\n\n const handleConversionTitleClick = React.useCallback(() => {\n handleOpenFullView('conversion-rate');\n }, [handleOpenFullView]);\n\n const handleSignupsTitleClick = React.useCallback(() => {\n handleOpenFullView('signups');\n }, [handleOpenFullView]);\n\n const handleCategoriesTitleClick = React.useCallback(() => {\n handleOpenFullView('categories');\n }, [handleOpenFullView]);\n\n if (currentView === 'products') {\n return (\n <ProductsFullView\n products={resolvedTopProducts}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onProductSortChange={handleProductSortChange}\n />\n );\n }\n\n if (currentView === 'conversion-rate') {\n return (\n <ConversionRateFullView\n conversionData={resolvedConversionData}\n orders={resolvedOrders}\n dateRange={dateRange}\n market={market}\n conversionFilter={conversionFilter}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onConversionFilterChange={handleConversionFilterChange}\n />\n );\n }\n\n if (currentView === 'signups') {\n return (\n <SignupsFullView\n signupData={resolvedSignupData}\n signups={resolvedSignups}\n dateRange={dateRange}\n market={market}\n signupView={signupView}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onSignupViewChange={handleSignupViewChange}\n />\n );\n }\n\n if (currentView === 'categories') {\n return (\n <CategoriesFullView\n categories={resolvedCategories}\n dateRange={dateRange}\n market={market}\n categorySort={categorySort}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onCategorySortChange={handleCategorySortChange}\n />\n );\n }\n\n return (\n <ShoppingDashboard\n stats={stats}\n topProducts={resolvedTopProducts}\n conversionData={resolvedConversionData}\n signupData={resolvedSignupData}\n categories={resolvedCategories}\n isLoading={isLoading}\n error={error}\n shopTitle={shopTitle}\n className={className}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n signupView={signupView}\n conversionFilter={conversionFilter}\n categorySort={categorySort}\n markets={markets}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onProductSortChange={handleProductSortChange}\n onSignupViewChange={handleSignupViewChange}\n onConversionFilterChange={handleConversionFilterChange}\n onCategorySortChange={handleCategorySortChange}\n onProductsTitleClick={handleProductsTitleClick}\n onConversionTitleClick={handleConversionTitleClick}\n onSignupsTitleClick={handleSignupsTitleClick}\n onCategoriesToTitleClick={handleCategoriesTitleClick}\n />\n );\n};\n\nexport default MysiteDashboardWithNavigation;\n","import React, { useState } from 'react';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type { TopProduct, DateRangeOption, MarketOption, MarketFilterOption, ProductSortOption } from '../../types.d';\nimport { FullViewTableSkeleton } from '../LoadingSkeletons';\nimport { PageContainer, EmptyStateText } from '../FullViewComponents.styled';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport {\n ProductInfo,\n ProductName,\n ProductSku,\n MetricValue,\n MobileCardsContainer,\n DesktopTableContainer,\n MobileProductCard,\n MobileCardHeader,\n MobileProductRank,\n MobileProductDetails,\n MobileProductName,\n MobileProductSku,\n MobileMetricsGrid,\n MobileMetricItem,\n MobileMetricLabel,\n MobileMetricValue,\n} from './ProductsFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\ninterface ProductRow {\n rank: number;\n name: string;\n sku: string;\n units: number;\n revenue: number;\n volume: number;\n}\n\nexport interface ProductsFullViewProps {\n readonly products: TopProduct[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly productSort: ProductSortOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n readonly isLoading?: boolean;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onProductSortChange?: (sort: ProductSortOption) => void;\n}\n\nfunction mapProductToRow(product: TopProduct): ProductRow {\n return {\n rank: product.rank,\n name: product.name,\n sku: `${getTranslation(Keys.fullView.products.skuPrefix)}-${product.id.replace('prod-', '').padStart(3, '0')}`,\n units: product.unitsSold,\n revenue: product.revenue,\n volume: product.volume,\n };\n}\n\nexport const ProductsFullView: React.FC<ProductsFullViewProps> = ({\n products,\n dateRange,\n market,\n productSort,\n markets,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const [sortColumn, setSortColumn] = useState<string>(productSort === 'revenue' ? 'revenue' : 'units');\n const [sortDirection, setSortDirection] = useState<'asc' | 'desc'>('desc');\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const marketOptions = useMarketOptions(markets);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'sort',\n label: getTranslation(Keys.filter.productSort.label),\n value: productSort,\n options: [\n { value: 'units', label: getTranslation(Keys.filter.productSort.units) },\n { value: 'revenue', label: getTranslation(Keys.filter.productSort.revenue) },\n { value: 'volume', label: getTranslation(Keys.filter.productSort.volume) },\n ],\n },\n ],\n [dateRange, market, marketOptions, productSort],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value);\n else if (key === 'sort') {\n onProductSortChange?.(value as ProductSortOption);\n setCurrentPage(1);\n }\n },\n [onDateRangeChange, onMarketChange, onProductSortChange],\n );\n\n const handleSort = React.useCallback((columnKey: string, direction: 'asc' | 'desc') => {\n setSortColumn(columnKey);\n setSortDirection(direction);\n setCurrentPage(1);\n }, []);\n\n const productRows = React.useMemo(() => products.map(mapProductToRow), [products]);\n\n const sortedRows = React.useMemo(\n () =>\n [...productRows].sort((a, b) => {\n const aVal = a[sortColumn as keyof ProductRow] as number;\n const bVal = b[sortColumn as keyof ProductRow] as number;\n return sortDirection === 'asc' ? aVal - bVal : bVal - aVal;\n }),\n [productRows, sortColumn, sortDirection],\n );\n\n const { totalPages, pageItems: paginatedRows } = usePaginatedItems(sortedRows, currentPage, itemsPerPage);\n\n const currencyCode = products[0]?.currencyCode;\n\n const columns: ColumnDef<ProductRow>[] = React.useMemo(\n () => [\n { key: 'rank', label: getTranslation(Keys.fullView.products.columns.rank), sortable: true },\n {\n key: 'name',\n label: getTranslation(Keys.fullView.products.columns.product),\n sortable: true,\n render: (_: unknown, row: ProductRow) => (\n <ProductInfo>\n <ProductName>{row.name}</ProductName>\n <ProductSku>{row.sku}</ProductSku>\n </ProductInfo>\n ),\n },\n {\n key: 'units',\n label: getTranslation(Keys.fullView.products.columns.unitsSold),\n sortable: true,\n render: (value: unknown) => <MetricValue>{Number(value).toLocaleString()}</MetricValue>,\n },\n {\n key: 'revenue',\n label: getTranslation(Keys.fullView.products.columns.revenue),\n sortable: true,\n render: (value: unknown) => <MetricValue>{formatMoney(Number(value), currencyCode)}</MetricValue>,\n },\n {\n key: 'volume',\n label: getTranslation(Keys.fullView.products.columns.volume),\n sortable: true,\n render: (value: unknown) => <MetricValue>{Number(value).toLocaleString()}</MetricValue>,\n },\n ],\n [currencyCode],\n );\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"products-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topProducts.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewTableSkeleton />\n </PageContainer>\n );\n }\n\n if (products.length === 0) {\n return (\n <PageContainer data-testid=\"products-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topProducts.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <EmptyStateText data-testid=\"products-fullview-empty\">\n {getTranslation(Keys.fullView.products.noProducts)}\n </EmptyStateText>\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"products-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topProducts.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n {!isMobileView ? (\n <DesktopTableContainer data-testid=\"products-fullview-desktop-table\">\n <DataTable\n columns={columns}\n data={paginatedRows}\n sortable\n onSort={handleSort}\n sortColumn={sortColumn}\n sortDirection={sortDirection}\n getRowKey={(row: ProductRow) => row.rank}\n />\n </DesktopTableContainer>\n ) : (\n <MobileCardsContainer data-testid=\"products-fullview-mobile-cards\">\n {paginatedRows.map((row) => (\n <MobileProductCard key={row.rank}>\n <MobileCardHeader>\n <MobileProductRank>#{row.rank}</MobileProductRank>\n <MobileProductDetails>\n <MobileProductName>{row.name}</MobileProductName>\n <MobileProductSku>{row.sku}</MobileProductSku>\n </MobileProductDetails>\n </MobileCardHeader>\n <MobileMetricsGrid>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.widget.topProducts.units)}\n </MobileMetricLabel>\n <MobileMetricValue>{row.units.toLocaleString()}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.widget.topProducts.revenue)}\n </MobileMetricLabel>\n <MobileMetricValue>{formatMoney(row.revenue, currencyCode)}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.filter.productSort.volume)}\n </MobileMetricLabel>\n <MobileMetricValue>{row.volume.toLocaleString()}</MobileMetricValue>\n </MobileMetricItem>\n </MobileMetricsGrid>\n </MobileProductCard>\n ))}\n </MobileCardsContainer>\n )}\n\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={sortedRows.length}\n />\n )}\n </PageContainer>\n );\n};\n","import React from 'react';\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\nimport CalendarTodayIcon from '@mui/icons-material/CalendarToday';\nimport LanguageIcon from '@mui/icons-material/Language';\nimport {\n PageHeaderWrapper,\n BackButtonWrapper,\n BackButton,\n HeaderContainer,\n LeftSection,\n Title,\n DateRange,\n MobileDateRange,\n FiltersSection,\n FilterWrapper,\n FilterIcon,\n FilterDropdown,\n MobileTitleWrapper,\n MobileTitle,\n} from './PageHeader.styled';\nimport type { FilterConfig } from './types';\nimport type { DateRangeOption, MarketOption, MarketFilterOption } from '../types.d';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport type { FilterConfig } from './types';\n\ntype TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport interface DateRangeMarketKeys {\n readonly filter: {\n readonly dateRange: {\n readonly label: TranslationEntry;\n readonly last7days: TranslationEntry;\n readonly last30days: TranslationEntry;\n readonly last90days: TranslationEntry;\n readonly thisMonth: TranslationEntry;\n };\n readonly market: {\n readonly label: TranslationEntry;\n };\n };\n}\n\nexport function buildDateRangeFilter(dateRange: DateRangeOption, keys: DateRangeMarketKeys): FilterConfig {\n return {\n key: 'dateRange',\n label: getTranslation(keys.filter.dateRange.label),\n value: dateRange,\n icon: 'calendar',\n options: [\n { value: 'last7days', label: getTranslation(keys.filter.dateRange.last7days) },\n { value: 'last30days', label: getTranslation(keys.filter.dateRange.last30days) },\n { value: 'last90days', label: getTranslation(keys.filter.dateRange.last90days) },\n { value: 'thisMonth', label: getTranslation(keys.filter.dateRange.thisMonth) },\n ],\n };\n}\n\nexport function buildMarketFilter(\n market: MarketOption,\n marketOptions: ReadonlyArray<MarketFilterOption>,\n keys: DateRangeMarketKeys,\n): FilterConfig {\n return {\n key: 'market',\n label: getTranslation(keys.filter.market.label),\n value: market,\n icon: 'globe',\n options: marketOptions.map((option) => ({ value: option.value, label: option.label })),\n };\n}\n\nexport interface PageHeaderProps {\n readonly title: string;\n readonly dateRange: string;\n readonly onBack: () => void;\n readonly filters?: FilterConfig[];\n readonly onFilterChange?: (filterKey: string, value: string) => void;\n}\n\nexport const PageHeader: React.FC<PageHeaderProps> = ({ title, dateRange, onBack, filters, onFilterChange }) => {\n const renderFilterIcon = (iconType?: 'calendar' | 'globe') => {\n if (!iconType) return null;\n return (\n <FilterIcon>\n {iconType === 'calendar' && <CalendarTodayIcon />}\n {iconType === 'globe' && <LanguageIcon />}\n </FilterIcon>\n );\n };\n\n return (\n <PageHeaderWrapper data-testid=\"page-header\">\n <BackButtonWrapper>\n <BackButton\n onClick={onBack}\n aria-label={getTranslation(Keys.navigation.backAriaLabel)}\n data-testid=\"page-back-button\"\n type=\"button\"\n >\n <ArrowBackIcon />\n <span>{getTranslation(Keys.navigation.backToDashboard)}</span>\n </BackButton>\n </BackButtonWrapper>\n\n <MobileTitleWrapper>\n <MobileTitle>{title}</MobileTitle>\n </MobileTitleWrapper>\n\n <HeaderContainer>\n <LeftSection>\n <Title data-testid=\"page-header-title\">{title}</Title>\n <DateRange data-testid=\"page-header-date-range\">{dateRange}</DateRange>\n </LeftSection>\n\n {filters && filters.length > 0 && onFilterChange && (\n <FiltersSection data-testid=\"page-header-filters\">\n {filters.map((filter) => (\n <FilterWrapper key={filter.key}>\n {renderFilterIcon(filter.icon)}\n <FilterDropdown\n id={`filter-${filter.key}`}\n value={filter.value}\n onChange={(e) => onFilterChange(filter.key, e.target.value)}\n disabled={filter.disabled}\n aria-label={`${filter.label} ${getTranslation(Keys.ariaLabel.filterSuffix)}`}\n data-testid={`filter-dropdown-${filter.key}`}\n >\n {filter.options.map((option) => (\n <option key={option.value} value={option.value}>\n {filter.label && filter.key === 'customerType'\n ? `${filter.label} ${option.label}`\n : option.label}\n </option>\n ))}\n </FilterDropdown>\n </FilterWrapper>\n ))}\n </FiltersSection>\n )}\n\n <MobileDateRange>{dateRange}</MobileDateRange>\n </HeaderContainer>\n </PageHeaderWrapper>\n );\n};\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const PageHeaderWrapper = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n`;\n\nexport const BackButtonWrapper = styled('div')`\n display: flex;\n align-items: center;\n`;\n\nexport const BackButton = styled('button')`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0;\n border: none;\n background-color: transparent;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n cursor: pointer;\n transition: color 0.2s ease;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n\n &:hover {\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n }\n\n &:focus {\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: 2px;\n border-radius: 4px;\n }\n\n svg {\n font-size: 16px;\n }\n\n span {\n line-height: 1;\n }\n`;\n\nexport const HeaderContainer = styled('div')`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 16px;\n border-bottom: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n gap: 24px;\n\n @media (max-width: 767px) {\n align-items: flex-end;\n gap: 16px;\n }\n`;\n\nexport const LeftSection = styled('div')`\n display: flex;\n align-items: center;\n gap: 16px;\n flex: 1;\n\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const Title = styled('h1')`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`;\n\nexport const DateRange = styled('p')`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n white-space: nowrap;\n`;\n\nexport const MobileDateRange = styled('p')`\n display: none;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n flex-shrink: 0;\n }\n`;\n\nexport const FiltersSection = styled('div')`\n display: flex;\n gap: 24px;\n align-items: center;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n`;\n\nexport const FilterWrapper = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const FilterIcon = styled('span')`\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n svg {\n font-size: 16px;\n }\n`;\n\nexport const FilterDropdown = styled('select')`\n min-width: 120px;\n height: 32px;\n padding: 6px 8px;\n padding-right: 24px;\n background-color: transparent;\n border: none;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: background-color 0.2s ease;\n appearance: none;\n background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><path fill=\"%23667085\" d=\"M6 8L2 4h8L6 8z\"/></svg>');\n background-repeat: no-repeat;\n background-position: right 4px center;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 4px;\n }\n\n &:focus {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 4px;\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n @media (max-width: 767px) {\n min-width: auto;\n width: auto;\n flex: none;\n padding-right: 24px;\n background-position: right 8px center;\n }\n`;\n\nexport const MobileTitleWrapper = styled('div')`\n display: none;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`;\n\nexport const MobileTitle = styled('h1')`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n`;\n","import React from 'react';\nimport ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\nimport {\n TableContainer,\n Table,\n TableHeader,\n TableHeaderCell,\n TableBody,\n TableRow,\n TableCell,\n EmptyTableCell,\n SortIconContainer,\n} from './DataTable.styled';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface ColumnDef<TData = unknown> {\n key: string;\n label: string;\n sortable?: boolean;\n render?: (value: unknown, row: TData) => React.ReactNode;\n align?: 'left' | 'center' | 'right';\n}\n\nexport interface DataTableProps<TData = unknown> {\n readonly columns: ColumnDef<TData>[];\n readonly data: TData[];\n readonly sortable?: boolean;\n readonly onSort?: (columnKey: string, direction: 'asc' | 'desc') => void;\n readonly sortColumn?: string;\n readonly sortDirection?: 'asc' | 'desc';\n readonly getRowKey?: (row: TData, rowIndex: number) => React.Key;\n}\n\nexport const DataTable = <TData,>({\n columns,\n data,\n sortable = false,\n onSort,\n sortColumn,\n sortDirection = 'asc',\n getRowKey,\n}: DataTableProps<TData>) => {\n const handleSort = (columnKey: string) => {\n if (!sortable || !onSort) return;\n const newDirection = sortColumn === columnKey && sortDirection === 'asc' ? 'desc' : 'asc';\n onSort(columnKey, newDirection);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent, columnKey: string) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleSort(columnKey);\n }\n };\n\n const getAriaSort = (columnKey: string): 'ascending' | 'descending' | undefined => {\n if (sortColumn !== columnKey) return undefined;\n return sortDirection === 'asc' ? 'ascending' : 'descending';\n };\n\n return (\n <TableContainer data-testid=\"data-table\">\n <Table>\n <TableHeader>\n <tr>\n {columns.map((column) => (\n <TableHeaderCell\n key={column.key}\n scope=\"col\"\n sortable={sortable && column.sortable}\n onClick={() => column.sortable && handleSort(column.key)}\n onKeyDown={(e) => column.sortable && handleKeyDown(e, column.key)}\n tabIndex={sortable && column.sortable ? 0 : -1}\n aria-sort={getAriaSort(column.key)}\n aria-label={`${column.label}${column.sortable ? getTranslation(Keys.dataTable.sortableColumn) : ''}`}\n data-testid={`table-header-${column.key}`}\n >\n {column.label}\n {sortable && column.sortable && (\n <SortIconContainer isActive={sortColumn === column.key}>\n {sortColumn === column.key && sortDirection === 'desc' ? (\n <ArrowDownwardIcon />\n ) : (\n <ArrowUpwardIcon />\n )}\n </SortIconContainer>\n )}\n </TableHeaderCell>\n ))}\n </tr>\n </TableHeader>\n <TableBody>\n {data.length === 0 ? (\n <TableRow data-testid=\"table-empty-row\">\n <EmptyTableCell colSpan={columns.length}>\n {getTranslation(Keys.dataTable.noDataAvailable)}\n </EmptyTableCell>\n </TableRow>\n ) : (\n data.map((row, rowIndex) => (\n <TableRow\n key={getRowKey ? getRowKey(row, rowIndex) : rowIndex}\n data-testid={`table-row-${rowIndex}`}\n >\n {columns.map((column) => (\n <TableCell key={column.key} data-testid={`table-cell-${column.key}`}>\n {column.render\n ? column.render((row as Record<string, unknown>)[column.key], row)\n : ((row as Record<string, unknown>)[column.key] as React.ReactNode)}\n </TableCell>\n ))}\n </TableRow>\n ))\n )}\n </TableBody>\n </Table>\n </TableContainer>\n );\n};\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const TableContainer = styled('div')`\n width: 100%;\n overflow-x: auto;\n border-radius: 8px;\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n`;\n\nexport const Table = styled('table')`\n width: 100%;\n border-collapse: collapse;\n`;\n\nexport const TableHeader = styled('thead')`\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-bottom: 2px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n`;\n\nexport const TableHeaderCell = styled('th')<{ sortable?: boolean }>`\n padding: 12px 16px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n text-align: left;\n cursor: ${({ sortable }) => (sortable ? 'pointer' : 'default')};\n user-select: none;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n }\n\n &:focus {\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: -2px;\n }\n`;\n\nexport const TableBody = styled('tbody')``;\n\nexport const TableRow = styled('tr')`\n border-bottom: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n }\n\n &:last-child {\n border-bottom: none;\n }\n`;\n\nexport const TableCell = styled('td')`\n padding: 12px 16px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n text-align: left;\n`;\n\nexport const EmptyTableCell = styled(TableCell)`\n text-align: center;\n`;\n\nexport const SortIconContainer = styled('span')<{ isActive?: boolean }>`\n display: inline-flex;\n margin-left: 6px;\n opacity: ${({ isActive }) => (isActive ? 1 : 0.4)};\n transition: opacity 0.2s ease;\n\n svg {\n font-size: 16px;\n }\n`;\n","import React from 'react';\nimport ChevronLeftIcon from '@mui/icons-material/ChevronLeft';\nimport ChevronRightIcon from '@mui/icons-material/ChevronRight';\nimport { PaginationContainer, PageButton, PageInfo, NavButton } from './Pagination.styled';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface PaginationProps {\n readonly currentPage: number;\n readonly totalPages: number;\n readonly onPageChange: (page: number) => void;\n readonly itemsPerPage?: number;\n readonly totalItems?: number;\n}\n\nexport const Pagination: React.FC<PaginationProps> = ({\n currentPage,\n totalPages,\n onPageChange,\n itemsPerPage,\n totalItems,\n}) => {\n const handlePrevious = () => {\n if (currentPage > 1) {\n onPageChange(currentPage - 1);\n }\n };\n\n const handleNext = () => {\n if (currentPage < totalPages) {\n onPageChange(currentPage + 1);\n }\n };\n\n const handleKeyDown = (e: React.KeyboardEvent, action: () => void) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n action();\n }\n };\n\n const getPageNumbers = (): number[] => {\n if (totalPages <= 7) {\n return Array.from({ length: totalPages }, (_, i) => i + 1);\n }\n\n const pages: number[] = [];\n if (currentPage <= 4) {\n pages.push(1, 2, 3, 4, 5);\n } else if (currentPage >= totalPages - 3) {\n pages.push(totalPages - 4, totalPages - 3, totalPages - 2, totalPages - 1, totalPages);\n } else {\n pages.push(currentPage - 1, currentPage, currentPage + 1);\n }\n\n return pages;\n };\n\n const pageNumbers = getPageNumbers();\n const startItem = itemsPerPage ? (currentPage - 1) * itemsPerPage + 1 : null;\n const endItem = itemsPerPage ? Math.min(currentPage * itemsPerPage, totalItems ?? Infinity) : null;\n const goToPageLabel = getTranslation(Keys.pagination.goToPage);\n\n return (\n <PaginationContainer data-testid=\"pagination\">\n <NavButton\n onClick={handlePrevious}\n onKeyDown={(e) => handleKeyDown(e, handlePrevious)}\n disabled={currentPage === 1}\n aria-label={getTranslation(Keys.pagination.previousPage)}\n data-testid=\"pagination-previous\"\n type=\"button\"\n >\n <ChevronLeftIcon />\n </NavButton>\n\n {totalPages > 7 && currentPage > 4 && (\n <>\n <PageButton\n onClick={() => onPageChange(1)}\n isActive={false}\n aria-label={`${goToPageLabel} 1`}\n data-testid=\"pagination-page-1\"\n type=\"button\"\n >\n 1\n </PageButton>\n <PageInfo>...</PageInfo>\n </>\n )}\n\n {pageNumbers.map((page) => (\n <PageButton\n key={page}\n onClick={() => onPageChange(page)}\n isActive={currentPage === page}\n aria-label={`${goToPageLabel} ${page}`}\n aria-current={currentPage === page ? 'page' : undefined}\n data-testid={`pagination-page-${page}`}\n type=\"button\"\n >\n {page}\n </PageButton>\n ))}\n\n {totalPages > 7 && currentPage < totalPages - 3 && (\n <>\n <PageInfo>...</PageInfo>\n <PageButton\n onClick={() => onPageChange(totalPages)}\n isActive={false}\n aria-label={`${goToPageLabel} ${totalPages}`}\n data-testid={`pagination-page-${totalPages}`}\n type=\"button\"\n >\n {totalPages}\n </PageButton>\n </>\n )}\n\n <NavButton\n onClick={handleNext}\n onKeyDown={(e) => handleKeyDown(e, handleNext)}\n disabled={currentPage === totalPages}\n aria-label={getTranslation(Keys.pagination.nextPage)}\n data-testid=\"pagination-next\"\n type=\"button\"\n >\n <ChevronRightIcon />\n </NavButton>\n\n {itemsPerPage && totalItems && (\n <PageInfo as=\"output\" aria-live=\"polite\" data-testid=\"pagination-page-info\">\n {startItem}-{endItem} {getTranslation(Keys.pagination.of)} {totalItems}\n </PageInfo>\n )}\n </PaginationContainer>\n );\n};\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const PaginationContainer = styled('div')`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n margin-top: 24px;\n`;\n\nexport const PageButton = styled('button')<{ isActive?: boolean }>`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({ theme, isActive }) =>\n isActive ? getGenomeColor(theme, 'A80') : getGenomeColor(theme, 'N20')};\n color: ${({ theme, isActive }) => (isActive ? '#ffffff' : getGenomeColor(theme, 'N100'))};\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: ${({ theme, isActive }) =>\n isActive ? getGenomeColor(theme, 'A70') : getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n`;\n\nexport const PageInfo = styled('span')`\n font-size: 14px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n margin: 0 8px;\n`;\n\nexport const NavButton = styled('button')`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background-color 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n\n svg {\n font-size: 18px;\n }\n`;\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const PageContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n box-sizing: border-box;\n\n @media (max-width: 767px) {\n gap: 16px;\n }\n`;\n\nexport const MetricChartCardSection = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${({ theme }) => theme.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n gap: 16px;\n }\n`;\n\nexport const MetricSection = styled(Box)`\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 16px 0;\n gap: 10px;\n flex-wrap: nowrap;\n width: 100%;\n\n @media (max-width: 767px) {\n padding: 8px 0;\n flex-wrap: nowrap;\n align-items: center;\n }\n`;\n\nexport const MetricValue = styled(Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 32px;\n font-weight: 700;\n line-height: 1;\n letter-spacing: 0em;\n color: ${({ theme }) => theme.palette.text.primary};\n margin: 0;\n padding: 0;\n\n @media (max-width: 767px) {\n font-size: 28px;\n line-height: 1;\n }\n`;\n\nexport const MetricTrend = styled(Box)<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 13px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.01em;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return theme.palette.success.main;\n if (direction === 'down') return theme.palette.error.main;\n return theme.palette.text.secondary;\n }};\n flex-wrap: nowrap;\n white-space: nowrap;\n\n svg {\n font-size: 13px;\n flex-shrink: 0;\n width: 13px;\n height: 13px;\n }\n\n span {\n display: inline;\n line-height: 1;\n }\n\n @media (max-width: 767px) {\n font-size: 13px;\n line-height: 1;\n flex-wrap: nowrap;\n\n svg {\n font-size: 13px;\n width: 13px;\n height: 13px;\n }\n }\n`;\n\nexport const ComparisonText = styled(Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n\n @media (max-width: 767px) {\n font-size: 12px;\n line-height: 1.3;\n }\n`;\n\nexport const ChartSection = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 0;\n\n @media (max-width: 767px) {\n gap: 8px;\n }\n`;\n\nexport const ChartTitle = styled('h2')`\n margin: 0;\n font-size: 1.25rem;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.text.primary};\n\n @media (max-width: 767px) {\n font-size: 1.125rem;\n }\n`;\n\nexport const ChartContainer = styled(Box)`\n width: 90%;\n height: 450px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 250px;\n margin-bottom: 0;\n }\n`;\n\nexport const TableSection = styled(Box)<{ withCard?: boolean }>`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n ${({ withCard = true, theme }) =>\n withCard &&\n `\n padding: 20px;\n background-color: ${getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${theme.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n }\n `}\n`;\n\nexport const LoadingContainer = styled(Box)`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 400px;\n`;\n\nexport const EmptyStateText = styled(Typography)`\n text-align: center;\n color: ${({ theme }) => theme.palette.text.secondary};\n font-size: 1rem;\n padding: 40px 20px;\n\n @media (max-width: 767px) {\n font-size: 0.875rem;\n padding: 32px 16px;\n }\n`;\n\nexport const MobileCardName = styled(Typography)`\n font-weight: 600;\n font-size: 14px;\n`;\n\nexport const MobileCardSubtext = styled(Typography)`\n font-size: 13px;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MobileCardDetail = styled(Typography)`\n font-size: 13px;\n`;\n\nexport const MobileCardStatus = styled(Typography)<{ status: string }>`\n font-size: 13px;\n color: ${({ theme, status }) => (status === 'Active' ? theme.palette.success.main : theme.palette.warning.main)};\n`;\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const ProductInfo = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n`;\n\nexport const ProductName = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const ProductSku = styled(Typography)`\n font-size: 0.75rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MetricValue = styled(Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n\nexport const MobileCardsContainer = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const DesktopTableContainer = styled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const MobileProductCard = styled(Box)`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n`;\n\nexport const MobileCardHeader = styled(Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n`;\n\nexport const MobileProductRank = styled(Typography)`\n font-size: 1rem;\n font-weight: 700;\n color: ${({ theme }) => theme.palette.primary.main};\n min-width: 24px;\n`;\n\nexport const MobileProductDetails = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`;\n\nexport const MobileProductName = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n`;\n\nexport const MobileProductSku = styled(Typography)`\n font-size: 0.75rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MobileMetricsGrid = styled(Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({ theme }) => theme.palette.divider};\n`;\n\nexport const MobileMetricItem = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`;\n\nexport const MobileMetricLabel = styled(Typography)`\n font-size: 0.625rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n text-transform: uppercase;\n`;\n\nexport const MobileMetricValue = styled(Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n","import useMediaQuery from '@mui/material/useMediaQuery';\n\nexport const MOBILE_VIEWPORT_QUERY = '(max-width:767px)';\n\nexport function useIsMobileViewport(): boolean {\n return useMediaQuery(MOBILE_VIEWPORT_QUERY, { noSsr: true });\n}\n","import React, { useState } from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type {\n ConversionDataPoint,\n OrderHistory,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n ConversionFilterOption,\n} from '../../types.d';\nimport type { TrendDirection } from '../types';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport {\n PageContainer,\n MetricChartCardSection,\n MetricSection,\n MetricValue,\n MetricTrend,\n ChartSection,\n ChartTitle,\n TableSection,\n} from '../FullViewComponents.styled';\nimport {\n MobileOrderCard,\n MobileOrderHeader,\n MobileCustomerInfo,\n MobileCustomerName,\n MobileOrderDate,\n MobileOrderId,\n MobileOrderMetrics,\n MobileMetricItem,\n MobileMetricLabel,\n MobileMetricValue,\n MobileOrdersContainer,\n DesktopTableContainer,\n OrderIdColumnCell,\n ConversionTrendChartContainer,\n ChartWithLegendWrapper,\n ChartLegendContainer,\n LegendItem,\n} from './ConversionRateFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface ConversionRateFullViewProps {\n readonly conversionData: ConversionDataPoint[];\n readonly orders: OrderHistory[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly conversionFilter: ConversionFilterOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n readonly isLoading?: boolean;\n readonly summaryRate?: number;\n readonly summaryChangePct?: number | null;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onConversionFilterChange?: (filter: ConversionFilterOption) => void;\n}\n\nexport const ConversionRateFullView: React.FC<ConversionRateFullViewProps> = ({\n conversionData,\n orders,\n summaryRate,\n summaryChangePct,\n dateRange,\n market,\n conversionFilter,\n markets,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onConversionFilterChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const marketOptions = useMarketOptions(markets);\n\n const currentRate = React.useMemo(() => {\n if (typeof summaryRate === 'number' && Number.isFinite(summaryRate)) return summaryRate;\n return conversionData.at(-1)?.rate ?? 0;\n }, [summaryRate, conversionData]);\n\n const trend = React.useMemo((): { direction: TrendDirection; value: string } => {\n if (summaryChangePct !== undefined) {\n if (summaryChangePct === null)\n return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n let direction: TrendDirection = 'neutral';\n if (summaryChangePct > 0) direction = 'up';\n else if (summaryChangePct < 0) direction = 'down';\n return { direction, value: `${summaryChangePct >= 0 ? '+' : ''}${summaryChangePct.toFixed(1)}%` };\n }\n if (conversionData.length < 2) return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n const latestRate = conversionData.at(-1)?.rate ?? 0;\n const previousRate = conversionData[0].rate;\n if (previousRate === 0) return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n const changePercent = ((latestRate - previousRate) / previousRate) * 100;\n if (Math.abs(changePercent) < 0.1) {\n return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n }\n let direction: TrendDirection = 'neutral';\n if (changePercent > 0) direction = 'up';\n else if (changePercent < 0) direction = 'down';\n return { direction, value: `${changePercent >= 0 ? '+' : ''}${changePercent.toFixed(1)}%` };\n }, [summaryChangePct, conversionData]);\n\n const getConversionFilterLabel = React.useCallback((filter: ConversionFilterOption): string => {\n if (filter === 'standard') return getTranslation(Keys.filter.conversionType.standard);\n if (filter === 'subscription') return getTranslation(Keys.filter.conversionType.subscription);\n return getTranslation(Keys.filter.conversionType.all);\n }, []);\n\n const conversionFilterLabel = React.useMemo(\n () => getConversionFilterLabel(conversionFilter),\n [conversionFilter, getConversionFilterLabel],\n );\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'customerType',\n label: getTranslation(Keys.filter.signupView.label),\n value: conversionFilter,\n options: [\n { value: 'all', label: getTranslation(Keys.filter.conversionType.all) },\n { value: 'standard', label: getTranslation(Keys.filter.conversionType.standard) },\n { value: 'subscription', label: getTranslation(Keys.filter.conversionType.subscription) },\n ],\n },\n ],\n [conversionFilter, dateRange, market, marketOptions],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value);\n else if (key === 'customerType') {\n onConversionFilterChange?.(value as ConversionFilterOption);\n setCurrentPage(1);\n }\n },\n [onConversionFilterChange, onDateRangeChange, onMarketChange],\n );\n\n const filteredOrders = React.useMemo(() => {\n if (conversionFilter === 'all') return orders;\n return orders.filter((order) => order.customerType.toLowerCase() === conversionFilter);\n }, [orders, conversionFilter]);\n\n const { totalPages, pageItems: paginatedOrders } = usePaginatedItems(filteredOrders, currentPage, itemsPerPage);\n\n const columns: ColumnDef<OrderHistory>[] = React.useMemo(\n () => [\n {\n key: 'orderId',\n label: getTranslation(Keys.fullView.conversionRate.columns.orderId),\n sortable: true,\n render: (value) => <OrderIdColumnCell>{value as React.ReactNode}</OrderIdColumnCell>,\n },\n { key: 'date', label: getTranslation(Keys.fullView.conversionRate.columns.date), sortable: true },\n {\n key: 'customerName',\n label: getTranslation(Keys.fullView.conversionRate.columns.customer),\n sortable: true,\n },\n { key: 'customerType', label: getTranslation(Keys.fullView.conversionRate.columns.type), sortable: true },\n { key: 'items', label: getTranslation(Keys.fullView.conversionRate.columns.items), sortable: true },\n {\n key: 'total',\n label: getTranslation(Keys.fullView.conversionRate.columns.total),\n sortable: true,\n render: (value: unknown, row: OrderHistory) =>\n formatMoney(Number(value), row.currencyCode, undefined, 2),\n },\n { key: 'bv', label: getTranslation(Keys.fullView.conversionRate.columns.bv), sortable: true },\n ],\n [],\n );\n\n const getChartColor = React.useCallback(() => {\n if (conversionFilter === 'standard') return '#2e7d32';\n if (conversionFilter === 'subscription') return '#ed6c02';\n return '#1976d2';\n }, [conversionFilter]);\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"conversion-rate-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.conversionRate.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewChartSkeleton />\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"conversion-rate-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.conversionRate.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <MetricChartCardSection data-testid=\"conversion-fullview-metric-chart\">\n <MetricSection>\n <div style={{ display: 'flex', alignItems: 'center', gap: '0px', flexWrap: 'wrap' }}>\n <MetricValue data-testid=\"conversion-rate-value\" style={{ marginRight: '6px' }}>\n {currentRate.toFixed(1)}%\n </MetricValue>\n <MetricTrend direction={trend.direction} data-testid=\"conversion-rate-trend\">\n {trend.direction === 'up' && <ArrowUpwardIcon />}\n {trend.direction === 'down' && <ArrowDownwardIcon />}\n <span\n style={{\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n fontWeight: 600,\n fontSize: '14px',\n lineHeight: '20px',\n letterSpacing: '0em',\n }}\n >\n {trend.value}\n </span>\n <span\n style={{\n marginLeft: '2px',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n fontWeight: 400,\n fontSize: '12px',\n lineHeight: '16px',\n letterSpacing: '0.01em',\n color: '#5F5F5F',\n }}\n >\n compared to this time last month\n </span>\n </MetricTrend>\n </div>\n </MetricSection>\n\n <ChartSection>\n <ChartWithLegendWrapper>\n <ConversionTrendChartContainer data-testid=\"conversion-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <LineChart data={conversionData} margin={{ top: 10, right: 10, left: 0, bottom: 0 }}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"date\" />\n <YAxis tickFormatter={(value) => `${value}%`} domain={[0, 'auto']} />\n <Tooltip\n formatter={(value: unknown) => {\n if (typeof value === 'number') return `${value.toFixed(2)}%`;\n if (typeof value === 'string') return value;\n return getTranslation(Keys.fullView.conversionRate.notAvailable);\n }}\n />\n <Line\n type=\"monotone\"\n dataKey=\"rate\"\n stroke={getChartColor()}\n strokeWidth={2}\n name={`${getTranslation(Keys.widget.conversionRate.title)} (${conversionFilterLabel})`}\n dot={false}\n />\n </LineChart>\n </ResponsiveContainer>\n </ConversionTrendChartContainer>\n <ChartLegendContainer>\n <LegendItem style={{ color: getChartColor() }}>\n {`${getTranslation(Keys.widget.conversionRate.title)} (${conversionFilterLabel})`}\n </LegendItem>\n </ChartLegendContainer>\n </ChartWithLegendWrapper>\n </ChartSection>\n </MetricChartCardSection>\n\n <TableSection data-testid=\"conversion-fullview-table-section\">\n <ChartTitle data-testid=\"conversion-fullview-table-title\">\n {getTranslation(Keys.fullView.conversionRate.orderDetailsTitle)} ({filteredOrders.length})\n </ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer data-testid=\"conversion-fullview-desktop-table\">\n <DataTable\n columns={columns}\n data={paginatedOrders}\n getRowKey={(row: OrderHistory) => row.orderId}\n />\n </DesktopTableContainer>\n ) : (\n <MobileOrdersContainer data-testid=\"conversion-fullview-mobile-orders\">\n {paginatedOrders.map((order) => (\n <MobileOrderCard key={order.orderId}>\n <MobileOrderHeader>\n <MobileCustomerInfo>\n <MobileCustomerName>{order.customerName}</MobileCustomerName>\n <MobileOrderDate>{order.date}</MobileOrderDate>\n </MobileCustomerInfo>\n <MobileOrderId>{order.orderId}</MobileOrderId>\n </MobileOrderHeader>\n <MobileOrderMetrics>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.fullView.conversionRate.columns.items)}\n </MobileMetricLabel>\n <MobileMetricValue>{order.items}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.fullView.conversionRate.columns.total)}\n </MobileMetricLabel>\n <MobileMetricValue>${order.total.toFixed(2)}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.fullView.conversionRate.columns.totalSv)}\n </MobileMetricLabel>\n <MobileMetricValue>{order.bv}</MobileMetricValue>\n </MobileMetricItem>\n </MobileOrderMetrics>\n </MobileOrderCard>\n ))}\n </MobileOrdersContainer>\n )}\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={filteredOrders.length}\n />\n )}\n </TableSection>\n </PageContainer>\n );\n};\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const ConversionTrendChartContainer = styled(Box)`\n width: 100%;\n height: 370px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 260px;\n }\n`;\n\nexport const MobileOrderCard = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n }\n`;\n\nexport const MobileOrderHeader = styled(Box)`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;\n\nexport const MobileCustomerInfo = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n`;\n\nexport const MobileCustomerName = styled(Typography)`\n font-size: 1rem;\n font-weight: 600;\n`;\n\nexport const MobileOrderDate = styled(Typography)`\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MobileOrderId = styled('a')`\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.primary.main};\n text-decoration: none;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n`;\n\nexport const MobileOrderMetrics = styled(Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 16px;\n padding-top: 12px;\n border-top: 1px solid ${({ theme }) => theme.palette.divider};\n`;\n\nexport const MobileMetricItem = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n text-align: center;\n`;\n\nexport const MobileMetricLabel = styled(Typography)`\n font-size: 0.75rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MobileMetricValue = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`;\n\nexport const MobileOrdersContainer = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const DesktopTableContainer = styled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const ChartWithLegendWrapper = styled(Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`;\n\nexport const ChartLegendContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n min-width: 160px;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n min-width: auto;\n }\n`;\n\nexport const LegendItem = styled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\n }\n`;\n\nexport const ComparisonTextMobile = styled(Typography)`\n margin-top: 4px;\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n @media (max-width: 767px) {\n font-size: 0.75rem;\n }\n`;\n\nexport const OrderIdColumnCell = styled('span')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;\n","import React, { useState } from 'react';\nimport { Box } from '@mui/material';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport type {\n SignupDataPoint,\n SignupDetail,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n SignupViewOption,\n} from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport {\n PageContainer,\n MetricChartCardSection,\n MetricSection,\n MetricValue,\n MetricTrend,\n ChartSection,\n ChartTitle,\n TableSection,\n EmptyStateText,\n MobileCardName,\n MobileCardSubtext,\n MobileCardDetail,\n MobileCardStatus,\n} from '../FullViewComponents.styled';\nimport {\n MobileSignupsContainer,\n DesktopTableContainer,\n MobileSignupCard,\n SignupTrendChartContainer,\n ComparisonTextMobile,\n ChartWithLegendWrapper,\n ChartLegendContainer,\n LegendItem,\n NameColumnCell,\n} from './SignupsFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nconst SERIES_COLORS = { total: '#3B82F6', members: '#7B92A8', retail: '#A3B5C7', brandAffiliates: '#5F7388' };\n\nfunction toNumeric(value: unknown): number {\n if (typeof value === 'number') {\n return Number.isFinite(value) ? value : 0;\n }\n\n if (typeof value === 'string') {\n const parsed = Number(value.replace(/,/g, ''));\n return Number.isFinite(parsed) ? parsed : 0;\n }\n\n return 0;\n}\n\n/**\n * Transform API response format to SignupDataPoint array\n * Handles both direct array format and nested API response with 'daily' array\n */\nfunction normalizeSignupDataInput(input: unknown): SignupDataPoint[] {\n // If it's already an array, return it\n if (Array.isArray(input)) {\n return input;\n }\n\n // Handle API response format with 'daily' array\n const apiResponse = input as Record<string, unknown>;\n if (Array.isArray(apiResponse.daily)) {\n return (apiResponse.daily as Array<Record<string, unknown>>).map((item) => ({\n date: String(item.date ?? ''),\n total: toNumeric(item.total),\n members: toNumeric(item.members),\n retail: toNumeric(item.retail),\n brandAffiliates: toNumeric(\n item.brandAffiliates ?? item.brandAffiliate ?? item.brand_affiliates ?? item.brand_affiliate,\n ),\n }));\n }\n\n // Fallback to empty array\n return [];\n}\n\nexport interface SignupsFullViewProps {\n /**\n * Signup data - can be either:\n * 1. Direct array of SignupDataPoint (camelCase format)\n * 2. API response object with 'daily' array (snake_case format)\n */\n readonly signupData: SignupDataPoint[] | { daily?: Array<Record<string, unknown>>; [key: string]: unknown };\n readonly signups: SignupDetail[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly signupView: SignupViewOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n readonly isLoading?: boolean;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onSignupViewChange?: (view: SignupViewOption) => void;\n}\n\nexport const SignupsFullView: React.FC<SignupsFullViewProps> = ({\n signupData,\n signups,\n dateRange,\n market,\n signupView,\n markets,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onSignupViewChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const marketOptions = useMarketOptions(markets);\n\n const normalizedSignupData = React.useMemo(() => {\n // First, transform API response format to array if needed\n const dataArray = normalizeSignupDataInput(signupData);\n\n // Then, normalize field names and values\n return dataArray.map((point) => {\n const rawPoint = point as unknown as Record<string, unknown>;\n const members = toNumeric(rawPoint.members);\n const retail = toNumeric(rawPoint.retail);\n const brandAffiliates = toNumeric(\n rawPoint.brandAffiliates ??\n rawPoint.brandAffiliate ??\n rawPoint.brand_affiliates ??\n rawPoint.brand_affiliate,\n );\n const total = toNumeric(rawPoint.total ?? rawPoint.all ?? rawPoint.signupTotal ?? rawPoint.value);\n\n return {\n ...point,\n total: total > 0 ? total : members + retail + brandAffiliates,\n members,\n retail,\n brandAffiliates,\n };\n });\n }, [signupData]);\n\n const totalSignups = React.useMemo(() => {\n if (normalizedSignupData.length === 0) return 0;\n return normalizedSignupData[normalizedSignupData.length - 1].total;\n }, [normalizedSignupData]);\n\n const trend = React.useMemo((): {\n direction: 'up' | 'down' | 'neutral';\n absoluteChange: number;\n percentageChange: string;\n } => {\n if (normalizedSignupData.length < 2)\n return {\n direction: 'neutral',\n absoluteChange: 0,\n percentageChange: getTranslation(Keys.defaults.zeroTrend),\n };\n const first = normalizedSignupData[0].total;\n const last = normalizedSignupData[normalizedSignupData.length - 1].total;\n if (first <= 0)\n return {\n direction: 'neutral',\n absoluteChange: 0,\n percentageChange: getTranslation(Keys.defaults.zeroTrend),\n };\n const absoluteChange = last - first;\n const percentageChange = (absoluteChange / first) * 100;\n let direction: 'up' | 'down' | 'neutral' = 'neutral';\n if (percentageChange > 0) direction = 'up';\n else if (percentageChange < 0) direction = 'down';\n return {\n direction,\n absoluteChange: Math.round(absoluteChange),\n percentageChange: `${percentageChange >= 0 ? '+' : ''}${percentageChange.toFixed(1)}%`,\n };\n }, [normalizedSignupData, Keys]);\n\n const hasSignupTrendData = normalizedSignupData.length > 0;\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'signupView',\n label: getTranslation(Keys.filter.signupView.label),\n value: signupView,\n options: [\n { value: 'all', label: getTranslation(Keys.filter.signupView.all) },\n { value: 'members', label: getTranslation(Keys.filter.signupView.members) },\n { value: 'retail', label: getTranslation(Keys.filter.signupView.retail) },\n { value: 'brandAffiliates', label: getTranslation(Keys.filter.signupView.brandAffiliates) },\n ],\n },\n ],\n [dateRange, market, marketOptions, signupView],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value);\n else if (key === 'signupView') {\n onSignupViewChange?.(value as SignupViewOption);\n setCurrentPage(1);\n }\n },\n [onDateRangeChange, onMarketChange, onSignupViewChange],\n );\n\n const { totalPages, pageItems: paginatedSignups } = usePaginatedItems(signups, currentPage, itemsPerPage);\n\n const columns: ColumnDef<SignupDetail>[] = React.useMemo(\n () => [\n { key: 'id', label: getTranslation(Keys.fullView.signups.columns.id), sortable: true },\n {\n key: 'name',\n label: getTranslation(Keys.fullView.signups.columns.name),\n sortable: true,\n render: (value) => <NameColumnCell>{value as React.ReactNode}</NameColumnCell>,\n },\n { key: 'date', label: getTranslation(Keys.fullView.signups.columns.date), sortable: true },\n { key: 'type', label: getTranslation(Keys.fullView.signups.columns.type), sortable: true },\n { key: 'email', label: getTranslation(Keys.fullView.signups.columns.email), sortable: true },\n { key: 'status', label: getTranslation(Keys.fullView.signups.columns.status), sortable: true },\n ],\n [],\n );\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"signups-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.signups.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewChartSkeleton />\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"signups-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.signups.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <MetricChartCardSection data-testid=\"signups-fullview-metric-chart\">\n <MetricSection>\n <MetricValue data-testid=\"signups-total\">{totalSignups.toLocaleString()}</MetricValue>\n <MetricTrend direction={trend.direction}>\n {trend.direction === 'up' && <TrendingUpIcon />}\n {trend.direction === 'down' && <TrendingDownIcon />}\n {trend.direction !== 'neutral' && (\n <>\n <span style={{ fontWeight: 600, lineHeight: 1 }}>\n {trend.absoluteChange > 0 ? '+' : ''}\n {trend.absoluteChange}\n </span>\n <span style={{ fontWeight: 400, lineHeight: 1 }}>{trend.percentageChange}</span>\n </>\n )}\n {trend.direction === 'neutral' && <span>{trend.percentageChange}</span>}\n </MetricTrend>\n <ComparisonTextMobile>{getTranslation(Keys.widget.conversionRate.comparison)}</ComparisonTextMobile>\n </MetricSection>\n\n <ChartSection>\n {hasSignupTrendData ? (\n <ChartWithLegendWrapper>\n <SignupTrendChartContainer data-testid=\"signups-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\" minHeight={240}>\n <LineChart data={normalizedSignupData}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"date\" />\n <YAxis />\n <Tooltip />\n {signupView === 'all' && (\n <>\n <Line\n type=\"monotone\"\n dataKey=\"total\"\n stroke={SERIES_COLORS.total}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.total)}\n dot={{ r: 2 }}\n connectNulls\n />\n <Line\n type=\"monotone\"\n dataKey=\"members\"\n stroke={SERIES_COLORS.members}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.members)}\n dot={{ r: 2 }}\n connectNulls\n />\n <Line\n type=\"monotone\"\n dataKey=\"retail\"\n stroke={SERIES_COLORS.retail}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.retail)}\n dot={{ r: 2 }}\n connectNulls\n />\n <Line\n type=\"monotone\"\n dataKey=\"brandAffiliates\"\n stroke={SERIES_COLORS.brandAffiliates}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.brandAffiliates)}\n dot={{ r: 2 }}\n connectNulls\n />\n </>\n )}\n {signupView === 'members' && (\n <Line\n type=\"monotone\"\n dataKey=\"members\"\n stroke={SERIES_COLORS.members}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.members)}\n dot={{ r: 2 }}\n connectNulls\n />\n )}\n {signupView === 'retail' && (\n <Line\n type=\"monotone\"\n dataKey=\"retail\"\n stroke={SERIES_COLORS.retail}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.retail)}\n dot={{ r: 2 }}\n connectNulls\n />\n )}\n {signupView === 'brandAffiliates' && (\n <Line\n type=\"monotone\"\n dataKey=\"brandAffiliates\"\n stroke={SERIES_COLORS.brandAffiliates}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.brandAffiliates)}\n dot={{ r: 2 }}\n connectNulls\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n </SignupTrendChartContainer>\n <Box>\n {signupView === 'all' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.total }}>\n {getTranslation(Keys.widget.signups.total)}\n </LegendItem>\n <LegendItem style={{ color: SERIES_COLORS.members }}>\n {getTranslation(Keys.widget.signups.members)}\n </LegendItem>\n <LegendItem style={{ color: SERIES_COLORS.retail }}>\n {getTranslation(Keys.widget.signups.retail)}\n </LegendItem>\n <LegendItem style={{ color: SERIES_COLORS.brandAffiliates }}>\n {getTranslation(Keys.widget.signups.brandAffiliates)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n {signupView === 'members' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.members }}>\n {getTranslation(Keys.widget.signups.members)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n {signupView === 'retail' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.retail }}>\n {getTranslation(Keys.widget.signups.retail)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n {signupView === 'brandAffiliates' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.brandAffiliates }}>\n {getTranslation(Keys.widget.signups.brandAffiliates)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n </Box>\n </ChartWithLegendWrapper>\n ) : (\n <EmptyStateText data-testid=\"signups-fullview-chart-empty\">\n {getTranslation(Keys.widget.signups.noTrendData)}\n </EmptyStateText>\n )}\n </ChartSection>\n </MetricChartCardSection>\n\n <TableSection data-testid=\"signups-fullview-table-section\">\n <ChartTitle data-testid=\"signups-fullview-table-title\">{`${getTranslation(Keys.fullView.signups.detailsTitle)} (${signups.length})`}</ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer data-testid=\"signups-fullview-desktop-table\">\n <DataTable\n columns={columns}\n data={paginatedSignups}\n getRowKey={(row: SignupDetail) => row.id}\n />\n </DesktopTableContainer>\n ) : (\n <MobileSignupsContainer data-testid=\"signups-fullview-mobile-cards\">\n {paginatedSignups.map((signup) => (\n <MobileSignupCard key={signup.id}>\n <MobileCardName>{signup.name}</MobileCardName>\n <MobileCardSubtext>\n {signup.date} - {signup.type}\n </MobileCardSubtext>\n <MobileCardDetail>{signup.email}</MobileCardDetail>\n <MobileCardStatus status={signup.status}>{signup.status}</MobileCardStatus>\n </MobileSignupCard>\n ))}\n </MobileSignupsContainer>\n )}\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={signups.length}\n />\n )}\n </TableSection>\n </PageContainer>\n );\n};\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const MobileSignupsContainer = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const DesktopTableContainer = styled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const MobileSignupCard = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n }\n`;\n\nexport const SignupTrendChartContainer = styled(Box)`\n width: 100%;\n height: 320px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 260px;\n }\n`;\n\nexport const ComparisonTextMobile = styled(Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n`;\n\nexport const ChartWithLegendWrapper = styled(Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`;\n\nexport const ChartLegendContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n min-width: 160px;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n min-width: auto;\n }\n`;\n\nexport const LegendItem = styled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\n }\n`;\n\nexport const NameColumnCell = styled('span')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;\n","import React, { useState } from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type {\n CategoryRevenue,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n CategorySortOption,\n} from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { PageContainer, TableSection, ChartTitle, EmptyStateText } from '../FullViewComponents.styled';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport {\n SummaryItemRow,\n SummaryItemInfo,\n SummaryItemName,\n SummaryItemSubtext,\n SummaryItemPercentage,\n TopSection,\n ChartWrapper,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n SummaryContainer,\n SummaryItem,\n ColorDot,\n SummaryName,\n SummaryValue,\n SummaryPercentage,\n SummaryTrendIcon,\n DesktopTableContainer,\n MobileCategoriesContainer,\n MobileCategoryCard,\n CategoryNameColumnCell,\n} from './CategoriesFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport { parseTrendPercent, calculateWeightedRevenueTrend } from '../../utils/trendUtils';\n\nexport interface CategoriesFullViewProps {\n readonly categories: CategoryRevenue[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly categorySort: CategorySortOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n readonly isLoading?: boolean;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onCategorySortChange?: (sort: CategorySortOption) => void;\n}\n\nexport const CategoriesFullView: React.FC<CategoriesFullViewProps> = ({\n categories,\n dateRange,\n market,\n categorySort,\n markets,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onCategorySortChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const marketOptions = useMarketOptions(markets);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'sort',\n label: getTranslation(Keys.filter.productSort.label),\n value: categorySort,\n options: [\n { value: 'revenue', label: getTranslation(Keys.filter.categorySort.byRevenue) },\n { value: 'trend', label: getTranslation(Keys.filter.categorySort.byTrend) },\n ],\n },\n ],\n [categorySort, dateRange, market, marketOptions],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value);\n else if (key === 'sort') {\n onCategorySortChange?.(value as CategorySortOption);\n setCurrentPage(1);\n }\n },\n [onCategorySortChange, onDateRangeChange, onMarketChange],\n );\n\n interface CustomLabelProps {\n cx: number;\n cy: number;\n midAngle: number;\n innerRadius: number;\n outerRadius: number;\n percentage: number;\n }\n\n const renderCustomLabel = (props: CustomLabelProps) => {\n // eslint-disable-next-line react/prop-types\n const { cx, cy, midAngle, innerRadius, outerRadius, percentage } = props;\n const RADIAN = Math.PI / 180;\n // Position label more towards center of the donut ring, slightly inward\n const radius = innerRadius + (outerRadius - innerRadius) * 0.45;\n const x = cx + radius * Math.cos(-midAngle * RADIAN);\n const y = cy + radius * Math.sin(-midAngle * RADIAN);\n\n return (\n <text\n x={x}\n y={y}\n fill=\"white\"\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n fontSize=\"12\"\n fontWeight=\"700\"\n fontFamily=\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\"\n letterSpacing=\"0\"\n style={{ lineHeight: '14px', pointerEvents: 'none' }}\n >\n {`${percentage}%`}\n </text>\n );\n };\n\n const getTrendIcon = (direction: 'up' | 'down' | 'neutral') => {\n if (direction === 'up') {\n return <TrendingUpIcon sx={{ fontSize: '16px' }} aria-hidden=\"true\" />;\n }\n if (direction === 'down') {\n return <TrendingDownIcon sx={{ fontSize: '16px' }} aria-hidden=\"true\" />;\n }\n return null;\n };\n\n const resolveTrendDirection = (trendValue?: string): 'up' | 'down' | 'neutral' => {\n if (!trendValue) return 'neutral';\n const parsed = Number.parseFloat(trendValue);\n if (Number.isNaN(parsed)) return 'neutral';\n if (parsed > 0) return 'up';\n if (parsed < 0) return 'down';\n return 'neutral';\n };\n\n const sortedCategories = React.useMemo(\n () =>\n [...categories].sort((a, b) => {\n if (categorySort === 'revenue') return b.revenue - a.revenue;\n return (\n (parseTrendPercent(b.trend?.revenue) ?? -Infinity) -\n (parseTrendPercent(a.trend?.revenue) ?? -Infinity)\n );\n }),\n [categories, categorySort],\n );\n\n const { totalRevenue, totalRevenueTrendDirection, totalRevenueTrend } = React.useMemo(() => {\n const nextTotalRevenue = sortedCategories.reduce((sum, category) => sum + category.revenue, 0);\n\n const { direction, formatted } = calculateWeightedRevenueTrend(\n sortedCategories,\n (category) => category.revenue,\n (category) => category.trend?.revenue,\n );\n\n return {\n totalRevenue: nextTotalRevenue,\n totalRevenueTrendDirection: direction,\n totalRevenueTrend: formatted,\n };\n }, [sortedCategories]);\n\n const topCategories = React.useMemo(() => sortedCategories.slice(0, 5), [sortedCategories]);\n\n const { totalPages, pageItems: paginatedCategories } = usePaginatedItems(\n sortedCategories,\n currentPage,\n itemsPerPage,\n );\n\n const columns: ColumnDef<CategoryRevenue>[] = React.useMemo(\n () => [\n {\n key: 'name',\n label: getTranslation(Keys.fullView.categories.columns.category),\n sortable: true,\n render: (_: unknown, row: CategoryRevenue) => (\n <SummaryItemRow>\n <ColorDot dotColor={row.color} />\n <CategoryNameColumnCell>\n {row.name.charAt(0).toUpperCase() + row.name.slice(1)}\n </CategoryNameColumnCell>\n </SummaryItemRow>\n ),\n },\n {\n key: 'revenue',\n label: getTranslation(Keys.fullView.categories.columns.revenue),\n sortable: true,\n render: (value: unknown, row: CategoryRevenue) => formatMoney(Number(value), row.currencyCode),\n },\n {\n key: 'percentage',\n label: getTranslation(Keys.fullView.categories.columns.percentOfTotal),\n sortable: true,\n render: (value: unknown) => `${Number(value)}%`,\n },\n {\n key: 'trend',\n label: getTranslation(Keys.fullView.categories.columns.trend),\n render: (_: unknown, row: CategoryRevenue) =>\n row.trend?.revenue ?? getTranslation(Keys.defaults.noValue),\n },\n ],\n [],\n );\n\n const currencyCode = sortedCategories[0]?.currencyCode;\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"categories-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topCategories.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewChartSkeleton />\n </PageContainer>\n );\n }\n\n if (categories.length === 0) {\n return (\n <PageContainer data-testid=\"categories-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topCategories.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <EmptyStateText data-testid=\"categories-fullview-empty\">\n {getTranslation(Keys.fullView.categories.noCategoryData)}\n </EmptyStateText>\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"categories-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topCategories.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <TopSection data-testid=\"categories-fullview-top-section\">\n <ChartWrapper data-testid=\"categories-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={sortedCategories}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius=\"50%\"\n outerRadius=\"85%\"\n dataKey=\"revenue\"\n nameKey=\"name\"\n paddingAngle={2}\n label={renderCustomLabel}\n labelLine={false}\n >\n {sortedCategories.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"categories-fullview-donut-center\">\n <DonutCenterLabel>{getTranslation(Keys.stats.revenue)}</DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</DonutCenterValue>\n <DonutCenterTrend direction={totalRevenueTrendDirection}>\n {getTrendIcon(totalRevenueTrendDirection)}\n <span>{totalRevenueTrend}</span>\n </DonutCenterTrend>\n </DonutCenterOverlay>\n </ChartWrapper>\n\n <SummaryContainer data-testid=\"categories-fullview-summary\">\n {topCategories.map((category) => (\n <SummaryItem key={category.id}>\n <ColorDot dotColor={category.color} />\n <SummaryName>{category.name}</SummaryName>\n <SummaryValue>{formatMoney(category.revenue, category.currencyCode)}</SummaryValue>\n <SummaryPercentage>({category.percentage}%)</SummaryPercentage>\n {category.trend?.revenue ? (\n <SummaryTrendIcon direction={resolveTrendDirection(category.trend.revenue)}>\n {getTrendIcon(resolveTrendDirection(category.trend.revenue))}\n </SummaryTrendIcon>\n ) : null}\n </SummaryItem>\n ))}\n </SummaryContainer>\n </TopSection>\n\n <TableSection data-testid=\"categories-fullview-table-section\">\n <ChartTitle data-testid=\"categories-fullview-table-title\">\n {getTranslation(Keys.fullView.categories.allCategoriesTitle)} ({sortedCategories.length})\n </ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer>\n <DataTable\n columns={columns}\n data={paginatedCategories}\n sortable\n getRowKey={(row: CategoryRevenue) => row.id}\n />\n </DesktopTableContainer>\n ) : (\n <MobileCategoriesContainer>\n {paginatedCategories.map((category) => (\n <MobileCategoryCard key={category.id}>\n <ColorDot dotColor={category.color} />\n <SummaryItemInfo>\n <SummaryItemName>{category.name}</SummaryItemName>\n <SummaryItemSubtext>\n {formatMoney(category.revenue, category.currencyCode)}\n </SummaryItemSubtext>\n </SummaryItemInfo>\n <SummaryItemPercentage>{category.percentage}%</SummaryItemPercentage>\n </MobileCategoryCard>\n ))}\n </MobileCategoriesContainer>\n )}\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={sortedCategories.length}\n />\n )}\n </TableSection>\n </PageContainer>\n );\n};\n","import { styled, ColorUtils } from '@nuskin/foundation-theme';\nimport { styled as muiStyled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const SummaryItemRow = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const SummaryItemInfo = styled('div')`\n flex: 1;\n`;\n\nexport const SummaryItemName = styled('span')`\n font-weight: 600;\n`;\n\nexport const SummaryItemSubtext = styled('span')`\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const SummaryItemPercentage = styled('span')`\n font-weight: 600;\n`;\n\nexport const TopSection = muiStyled(Box)`\n display: flex;\n gap: 32px;\n padding: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${({ theme }) => theme.shadows[1]};\n align-items: center;\n justify-content: center;\n width: 100%;\n box-sizing: border-box;\n margin: 0 auto;\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n align-items: flex-start;\n justify-content: flex-start;\n }\n`;\n\nexport const ChartWrapper = muiStyled(Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`;\n\nexport const DonutCenterOverlay = muiStyled(Box)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 120px;\n`;\n\nexport const DonutCenterLabel = muiStyled(Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const DonutCenterValue = muiStyled(Typography)`\n margin-top: 2px;\n font-size: 1.25rem;\n line-height: 1.2;\n font-weight: 700;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const DonutCenterTrend = muiStyled(Typography)<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n margin-top: 2px;\n font-size: 0.875rem;\n line-height: 1.2;\n font-weight: 600;\n color: ${({ direction, theme }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return theme.palette.text.secondary;\n }};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`;\n\nexport const SummaryContainer = muiStyled(Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n flex: 0;\n`;\n\nexport const SummaryItem = muiStyled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n white-space: nowrap;\n min-width: 0;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n`;\n\nexport const ColorDot = muiStyled(Box)<{ dotColor: string }>`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ dotColor }) => dotColor};\n flex-shrink: 0;\n`;\n\nexport const SummaryInfo = muiStyled(Box)`\n display: none;\n`;\n\nexport const SummaryName = muiStyled(Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.primary};\n flex-shrink: 0;\n min-width: 0;\n text-overflow: ellipsis;\n overflow: hidden;\n`;\n\nexport const SummaryValue = muiStyled(Typography)`\n font-size: 0.75rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.secondary};\n flex-shrink: 0;\n white-space: nowrap;\n`;\n\nexport const SummaryPercentage = muiStyled(Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n flex-shrink: 0;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const DesktopTableContainer = muiStyled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const MobileCategoriesContainer = muiStyled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const MobileCategoryCard = muiStyled(Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n`;\n\nexport const SummaryTrendIcon = muiStyled('span')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ direction }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return '#757575';\n }};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n\nexport const CategoryNameColumnCell = styled('span')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;\n","import React from 'react';\nimport {\n resolveTranslation,\n setTranslationResolver,\n type TranslateFn,\n type TranslationEntry,\n} from './TranslationKeys/translationResolver';\n\nexport function useTranslationResolver(translate?: TranslateFn): void {\n setTranslationResolver(translate);\n\n React.useEffect(() => {\n setTranslationResolver(translate);\n return () => {\n setTranslationResolver(undefined);\n };\n }, [translate]);\n}\n\nexport interface TranslationProviderProps {\n readonly translate?: TranslateFn;\n readonly children?: React.ReactNode;\n}\n\nexport const TranslationProvider: React.FC<TranslationProviderProps> = ({ translate, children }) => {\n useTranslationResolver(translate);\n return children ?? null;\n};\n\nexport function useTranslation(): (entry: TranslationEntry) => string {\n return React.useCallback((entry: TranslationEntry) => resolveTranslation(entry), []);\n}\n\nexport type { TranslateFn, TranslationEntry };\n","import { styled } from '@nuskin/foundation-theme';\n\nexport const PoDashboardContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n gap: 24px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`;\n\nexport const TopChartsRow = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n }\n`;\n\nexport const StatsCardStack = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n gap: 24px;\n justify-content: flex-start;\n }\n`;\n\nexport const BottomChartsRow = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n }\n`;\n\nexport const ErrorContainer = styled('div')`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;\n","import React from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport { WidgetMenu } from '../WidgetMenu';\nimport {\n CategoriesContainer,\n ChartHeader,\n ChartTitle,\n SortDropdown,\n ChartAndLegendContainer,\n ChartWrapper,\n LegendContainer,\n LegendItem,\n LegendColor,\n LegendInfo,\n LegendName,\n LegendValue,\n LegendPercentage,\n LegendTrend,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n EmptyState,\n EmptyStateText,\n HeaderActionsContainer,\n} from '../TopCategories/TopCategoriesPieChart.styled';\nimport type { TopPerformingOffer, OfferSortOption } from '../../types.d';\nimport { CategoriesPieChartSkeleton } from '../LoadingSkeletons';\nimport {\n getTranslation,\n ProductOfferDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ProductOfferDashboardTranslationKeys';\nimport { getTrendIcon, resolveTrendDirection, calculateWeightedRevenueTrend } from '../../utils/trendUtils';\nimport { formatMoney } from '../../utils/dataUtils';\n\nexport interface TopPerformingOffersPieChartProps {\n readonly offers: TopPerformingOffer[];\n readonly offerSort: OfferSortOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly onSortChange?: (sort: OfferSortOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nconst TopPerformingOffersPieChartComponent: React.FC<TopPerformingOffersPieChartProps> = ({\n offers,\n offerSort,\n isLoading = false,\n title,\n onSortChange,\n onTitleClick,\n}) => {\n const handleSortChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newSort = event.target.value as OfferSortOption;\n onSortChange?.(newSort);\n },\n [onSortChange],\n );\n\n const { sortedOffers, totalRevenue, trendDirection, formattedTrend } = React.useMemo(() => {\n const nextSortedOffers = [...offers].sort((a, b) => {\n if (offerSort === 'revenue') return b.revenue - a.revenue;\n return b.percentage - a.percentage;\n });\n\n const nextTotalRevenue = nextSortedOffers.reduce((sum, offer) => sum + offer.revenue, 0);\n\n const { direction: nextTrendDirection, formatted: nextFormattedTrend } = calculateWeightedRevenueTrend(\n nextSortedOffers,\n (offer) => offer.revenue,\n (offer) => offer.trend?.revenue,\n );\n\n return {\n sortedOffers: nextSortedOffers,\n totalRevenue: nextTotalRevenue,\n trendDirection: nextTrendDirection,\n formattedTrend: nextFormattedTrend,\n };\n }, [offers, offerSort]);\n\n const currencyCode = sortedOffers[0]?.currencyCode;\n\n if (isLoading && offers.length === 0) {\n return (\n <CategoriesContainer data-testid=\"widget-top-offers\">\n <CategoriesPieChartSkeleton />\n </CategoriesContainer>\n );\n }\n\n if (offers.length === 0) {\n return (\n <CategoriesContainer data-testid=\"widget-top-offers\">\n <ChartHeader>\n <ChartTitle>{title ?? getTranslation(Keys.widget.topPerformingOffers.title)}</ChartTitle>\n </ChartHeader>\n <EmptyState data-testid=\"top-offers-empty-state\">\n <EmptyStateText>{getTranslation(Keys.widget.topPerformingOffers.emptyState)}</EmptyStateText>\n </EmptyState>\n </CategoriesContainer>\n );\n }\n\n return (\n <CategoriesContainer\n as=\"section\"\n data-testid=\"widget-top-offers\"\n aria-label={getTranslation(Keys.ariaLabel.topOffers)}\n >\n <ChartHeader>\n <ChartTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.ariaLabel.topOffers)}\n data-testid=\"widget-title-top-offers\"\n >\n {title ?? getTranslation(Keys.widget.topPerformingOffers.title)}\n </ChartTitle>\n <HeaderActionsContainer>\n <SortDropdown\n id=\"offer-sort\"\n data-testid=\"offer-sort-dropdown\"\n value={offerSort}\n onChange={handleSortChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.ariaLabel.topOffers)}\n >\n <option value=\"revenue\">{getTranslation(Keys.filter.offerSort.byRevenue)}</option>\n <option value=\"units\">{getTranslation(Keys.filter.offerSort.byUnits)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-offers\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </ChartHeader>\n\n <ChartAndLegendContainer>\n <ChartWrapper data-testid=\"top-offers-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={sortedOffers}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius=\"55%\"\n outerRadius=\"85%\"\n dataKey=\"revenue\"\n nameKey=\"name\"\n paddingAngle={2}\n >\n {sortedOffers.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"top-offers-donut-center\">\n <DonutCenterLabel>\n {getTranslation(Keys.widget.topPerformingOffers.totalRevenue)}\n </DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</DonutCenterValue>\n <DonutCenterTrend direction={trendDirection}>{formattedTrend}</DonutCenterTrend>\n </DonutCenterOverlay>\n </ChartWrapper>\n\n <LegendContainer data-testid=\"top-offers-legend-container\">\n {sortedOffers.map((offer, index) => {\n const legendTrendDirection = resolveTrendDirection(offer.trend?.revenue);\n return (\n <LegendItem key={offer.id} data-testid={`offer-legend-${index}`}>\n <LegendColor color={offer.color} />\n <LegendInfo>\n <LegendName>{offer.name}</LegendName>\n <LegendValue>{formatMoney(offer.revenue, offer.currencyCode)}</LegendValue>\n </LegendInfo>\n <LegendPercentage>{offer.percentage}%</LegendPercentage>\n {offer.trend?.revenue ? (\n <LegendTrend\n direction={legendTrendDirection}\n data-testid={`offer-legend-trend-${index}`}\n aria-label={offer.trend.revenue}\n >\n {getTrendIcon(legendTrendDirection)}\n </LegendTrend>\n ) : null}\n </LegendItem>\n );\n })}\n </LegendContainer>\n </ChartAndLegendContainer>\n </CategoriesContainer>\n );\n};\n\nexport const TopPerformingOffersPieChart = React.memo(TopPerformingOffersPieChartComponent);\nTopPerformingOffersPieChart.displayName = 'TopPerformingOffersPieChart';\n","import { resolveTranslation } from './translationResolver';\n\ntype TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport const ProductOfferDashboardTranslationKeys = {\n title: { key: 'productOfferDashboard.title', fallback: 'Performance Overview' },\n error: { key: 'productOfferDashboard.error', fallback: 'Failed to load dashboard data. Please try again.' },\n\n stats: {\n revenue: { key: 'productOfferDashboard.stats.revenue', fallback: 'Total Revenue' },\n offersPurchased: { key: 'productOfferDashboard.stats.offersPurchased', fallback: 'Offers Purchased' },\n conversionRate: { key: 'productOfferDashboard.stats.conversionRate', fallback: 'Conversion Rate' },\n trendUp: { key: 'productOfferDashboard.stats.trendUp', fallback: 'Trending up' },\n trendDown: { key: 'productOfferDashboard.stats.trendDown', fallback: 'Trending down' },\n trendNeutral: { key: 'productOfferDashboard.stats.trendNeutral', fallback: 'No change' },\n comparedTo: { key: 'productOfferDashboard.stats.comparedTo', fallback: 'compared to this time last month' },\n },\n\n filter: {\n dateRange: {\n label: { key: 'productOfferDashboard.filter.dateRange.label', fallback: 'Date Range' },\n last7days: { key: 'productOfferDashboard.filter.dateRange.last7days', fallback: 'Last 7 Days' },\n last30days: { key: 'productOfferDashboard.filter.dateRange.last30days', fallback: 'Last 30 Days' },\n last90days: { key: 'productOfferDashboard.filter.dateRange.last90days', fallback: 'Last 90 Days' },\n thisMonth: { key: 'productOfferDashboard.filter.dateRange.thisMonth', fallback: 'This Month' },\n },\n market: {\n label: { key: 'productOfferDashboard.filter.market.label', fallback: 'Market' },\n all: { key: 'productOfferDashboard.filter.market.all', fallback: 'All Markets' },\n },\n offerSort: {\n byRevenue: { key: 'productOfferDashboard.filter.offerSort.byRevenue', fallback: 'Revenue' },\n byUnits: { key: 'productOfferDashboard.filter.offerSort.byUnits', fallback: 'Units' },\n },\n productSort: {\n byUnits: { key: 'productOfferDashboard.filter.productSort.byUnits', fallback: 'Units' },\n byRevenue: { key: 'productOfferDashboard.filter.productSort.byRevenue', fallback: 'Revenue' },\n byVolume: { key: 'productOfferDashboard.filter.productSort.byVolume', fallback: 'Volume' },\n },\n conversionFilter: {\n overall: { key: 'productOfferDashboard.filter.conversionFilter.overall', fallback: 'Overall' },\n },\n },\n\n widget: {\n topProducts: {\n title: { key: 'productOfferDashboard.widget.topProducts.title', fallback: 'Top Selling Products' },\n emptyState: {\n key: 'productOfferDashboard.widget.topProducts.emptyState',\n fallback: 'No products data available',\n },\n },\n conversionRate: {\n title: { key: 'productOfferDashboard.widget.conversionRate.title', fallback: 'Conversion Rate' },\n subtitle: { key: 'productOfferDashboard.widget.conversionRate.subtitle', fallback: 'Orders ÷ Site visits' },\n },\n topPerformingOffers: {\n title: { key: 'productOfferDashboard.widget.topPerformingOffers.title', fallback: 'Top Performing Offers' },\n totalRevenue: {\n key: 'productOfferDashboard.widget.topPerformingOffers.totalRevenue',\n fallback: 'Total revenue',\n },\n emptyState: {\n key: 'productOfferDashboard.widget.topPerformingOffers.emptyState',\n fallback: 'No offers data available',\n },\n },\n menu: {\n fullView: { key: 'productOfferDashboard.widget.menu.fullView', fallback: 'Full View' },\n },\n },\n\n navigation: {\n back: { key: 'productOfferDashboard.navigation.back', fallback: 'Back to Dashboard' },\n },\n\n ariaLabel: {\n dashboard: {\n key: 'productOfferDashboard.ariaLabel.dashboard',\n fallback: 'Product Offer Performance Dashboard',\n },\n statsCard: { key: 'productOfferDashboard.ariaLabel.statsCard', fallback: 'Performance metric' },\n conversionChart: { key: 'productOfferDashboard.ariaLabel.conversionChart', fallback: 'Conversion rate chart' },\n topProducts: { key: 'productOfferDashboard.ariaLabel.topProducts', fallback: 'Top selling products' },\n topOffers: { key: 'productOfferDashboard.ariaLabel.topOffers', fallback: 'Top performing offers chart' },\n widgetMenu: { key: 'productOfferDashboard.ariaLabel.widgetMenu', fallback: 'Widget options menu' },\n filterDateRange: { key: 'productOfferDashboard.ariaLabel.filterDateRange', fallback: 'Filter by date range' },\n filterMarket: { key: 'productOfferDashboard.ariaLabel.filterMarket', fallback: 'Filter by market' },\n backButton: { key: 'productOfferDashboard.ariaLabel.backButton', fallback: 'Back to dashboard overview' },\n },\n\n fullView: {\n topOffers: {\n title: { key: 'productOfferDashboard.fullView.topOffers.title', fallback: 'Top Performing Offers' },\n columnName: { key: 'productOfferDashboard.fullView.topOffers.columnName', fallback: 'Offer Name' },\n columnRevenue: { key: 'productOfferDashboard.fullView.topOffers.columnRevenue', fallback: 'Revenue' },\n columnPercentage: { key: 'productOfferDashboard.fullView.topOffers.columnPercentage', fallback: 'Share' },\n columnTrend: { key: 'productOfferDashboard.fullView.topOffers.columnTrend', fallback: 'Trend' },\n },\n },\n\n defaults: {\n trendZero: { key: 'productOfferDashboard.defaults.trendZero', fallback: '+0%' },\n noData: { key: 'productOfferDashboard.defaults.noData', fallback: '--' },\n },\n} as const;\n\nexport function getTranslation(entry: TranslationEntry): string {\n return resolveTranslation(entry);\n}\n","import React from 'react';\nimport {\n PoDashboardContainer,\n TopChartsRow,\n StatsCardStack,\n BottomChartsRow,\n ErrorContainer,\n} from './ProductOfferDashboard.styled';\nimport { DashboardHeader } from './shared/DashboardHeader';\nimport { StatsCard } from './shared/StatsCard';\nimport { TopSellingProductsList } from './shared/TopProducts/TopSellingProductsList';\nimport { ConversionRateChart } from './shared/ConversionRate/ConversionRateChart';\nimport { TopPerformingOffersPieChart } from './shared/TopPerformingOffers/TopPerformingOffersPieChart';\nimport type { ProductOfferDashboardProps, TopProduct, ConversionDataPoint, TopPerformingOffer } from './types.d';\nimport {\n getTranslation,\n ProductOfferDashboardTranslationKeys as Keys,\n} from './TranslationKeys/ProductOfferDashboardTranslationKeys';\n\nconst EMPTY_TOP_PRODUCTS: TopProduct[] = [];\nconst EMPTY_CONVERSION_DATA: ConversionDataPoint[] = [];\nconst EMPTY_TOP_OFFERS: TopPerformingOffer[] = [];\n\nexport const ProductOfferDashboard: React.FC<ProductOfferDashboardProps> = ({\n stats,\n topProducts,\n conversionData,\n topOffers,\n isLoading = false,\n error,\n dashboardTitle,\n className,\n dateRange = 'last30days',\n market = 'all',\n productSort = 'units',\n conversionFilter = 'all',\n offerSort = 'revenue',\n conversionSummaryRate,\n conversionSummaryChangePct,\n markets,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onConversionFilterChange,\n onOfferSortChange,\n onProductsTitleClick,\n onConversionTitleClick,\n onOffersTitleClick,\n}) => {\n const resolvedTopProducts = topProducts ?? EMPTY_TOP_PRODUCTS;\n const resolvedConversionData = conversionData ?? EMPTY_CONVERSION_DATA;\n const resolvedTopOffers = topOffers ?? EMPTY_TOP_OFFERS;\n\n const getTrendDirection = (trendValue?: string): 'up' | 'down' | 'neutral' => {\n if (!trendValue) return 'neutral';\n if (trendValue.startsWith('+') && trendValue !== '+0%') return 'up';\n if (trendValue.startsWith('-')) return 'down';\n return 'neutral';\n };\n\n if (error) {\n return (\n <PoDashboardContainer as=\"main\" className={className} aria-label={getTranslation(Keys.ariaLabel.dashboard)}>\n <ErrorContainer data-testid=\"dashboard-error\" role=\"alert\" aria-live=\"assertive\">\n <strong>{getTranslation(Keys.error)}:</strong> {error}\n </ErrorContainer>\n </PoDashboardContainer>\n );\n }\n\n return (\n <PoDashboardContainer\n as=\"main\"\n className={className}\n data-testid=\"product-offer-dashboard\"\n aria-label={getTranslation(Keys.ariaLabel.dashboard)}\n aria-busy={isLoading}\n >\n <DashboardHeader\n shopTitle={dashboardTitle ?? getTranslation(Keys.title)}\n dateRange={dateRange}\n market={market}\n isLoading={isLoading}\n markets={markets}\n stats={\n stats\n ? {\n shopTitle: stats.shopTitle ?? '',\n dateRange: stats.dateRange,\n selectedMarket: stats.selectedMarket,\n metrics: {\n revenue: stats.metrics.revenue,\n volume: '',\n siteVisits: '',\n conversionRate: stats.metrics.conversionRate,\n },\n trend: {},\n }\n : undefined\n }\n onDateRangeChange={onDateRangeChange}\n onMarketChange={onMarketChange}\n />\n\n <TopChartsRow data-testid=\"top-charts-row\">\n <ConversionRateChart\n conversionData={resolvedConversionData}\n conversionFilter={conversionFilter}\n isLoading={isLoading}\n summaryRate={conversionSummaryRate}\n summaryChangePct={conversionSummaryChangePct}\n onFilterChange={onConversionFilterChange}\n onTitleClick={onConversionTitleClick}\n />\n <StatsCardStack data-testid=\"stats-card-stack\">\n <StatsCard\n layout=\"split\"\n title={getTranslation(Keys.stats.revenue)}\n value={stats?.metrics?.revenue ?? '$0'}\n trendDirection={getTrendDirection(stats?.trend?.revenue)}\n trendValue={stats?.trend?.revenue}\n caption={getTranslation(Keys.stats.comparedTo)}\n testId=\"stats-card-revenue\"\n isLoading={isLoading}\n />\n <StatsCard\n layout=\"split\"\n title={getTranslation(Keys.stats.offersPurchased)}\n value={stats?.metrics?.offersPurchased ?? '0'}\n trendDirection={getTrendDirection(stats?.trend?.offersPurchased)}\n trendValue={stats?.trend?.offersPurchased}\n caption={getTranslation(Keys.stats.comparedTo)}\n testId=\"stats-card-offers-purchased\"\n isLoading={isLoading}\n />\n </StatsCardStack>\n </TopChartsRow>\n\n <BottomChartsRow data-testid=\"bottom-charts-row\">\n <TopSellingProductsList\n products={resolvedTopProducts}\n productSort={productSort}\n isLoading={isLoading}\n maxProducts={5}\n onSortChange={onProductSortChange}\n onTitleClick={onProductsTitleClick}\n />\n <TopPerformingOffersPieChart\n offers={resolvedTopOffers}\n offerSort={offerSort}\n isLoading={isLoading}\n onSortChange={onOfferSortChange}\n onTitleClick={onOffersTitleClick}\n />\n </BottomChartsRow>\n </PoDashboardContainer>\n );\n};\n\nexport default ProductOfferDashboard;\n","import React from 'react';\nimport { ProductOfferDashboard } from './ProductOfferDashboard';\nimport { ProductsFullView } from './shared/TopProducts/ProductsFullView';\nimport { ConversionRateFullView } from './shared/ConversionRate/ConversionRateFullView';\nimport { TopPerformingOffersFullView } from './shared/TopPerformingOffers/TopPerformingOffersFullView';\nimport { useTranslationResolver } from './TranslationContext';\nimport type {\n TopProduct,\n ConversionDataPoint,\n TopPerformingOffer,\n OrderHistory,\n DateRangeOption,\n MarketOption,\n ProductSortOption,\n ConversionFilterOption,\n OfferSortOption,\n ProductOfferFullViewWidgetType,\n ProductOfferDashboardView,\n PoDashboardWithNavigationProps,\n ProductOfferDashboardHistoryLocation,\n} from './types.d';\n\ntype ViewMode = 'push' | 'replace';\n\nconst DEFAULT_HISTORY_STATE_KEY = 'productOfferDashboardView';\n\nconst EMPTY_TOP_PRODUCTS: TopProduct[] = [];\nconst EMPTY_CONVERSION_DATA: ConversionDataPoint[] = [];\nconst EMPTY_TOP_OFFERS: TopPerformingOffer[] = [];\nconst EMPTY_ORDERS: OrderHistory[] = [];\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nfunction isProductOfferDashboardView(value: unknown): value is ProductOfferDashboardView {\n return value === 'dashboard' || value === 'products' || value === 'conversion-rate' || value === 'top-offers';\n}\n\nfunction readViewFromState(state: unknown, stateKey: string): ProductOfferDashboardView {\n if (!isRecord(state)) {\n return 'dashboard';\n }\n\n const view = state[stateKey];\n return isProductOfferDashboardView(view) ? view : 'dashboard';\n}\n\nfunction buildStateWithView(\n state: unknown,\n stateKey: string,\n view: ProductOfferDashboardView,\n): Record<string, unknown> {\n const currentState = isRecord(state) ? state : {};\n\n return {\n ...currentState,\n [stateKey]: view,\n };\n}\n\nfunction buildLocationWithState(\n location: ProductOfferDashboardHistoryLocation | undefined,\n state: Record<string, unknown>,\n): ProductOfferDashboardHistoryLocation {\n return {\n pathname: location?.pathname,\n search: location?.search,\n hash: location?.hash,\n state,\n };\n}\n\nexport const PoDashboardWithNavigation: React.FC<PoDashboardWithNavigationProps> = ({\n stats,\n topProducts,\n conversionData,\n topOffers,\n isLoading = false,\n error,\n dashboardTitle,\n className,\n allProducts,\n orders,\n allOffers,\n conversionSummaryRate,\n conversionSummaryChangePct,\n conversionFullViewData,\n conversionFullViewRate,\n conversionFullViewChangePct,\n initialDateRange = 'last30days',\n initialMarket = 'all',\n initialProductSort = 'units',\n initialConversionFilter = 'all',\n initialOfferSort = 'revenue',\n markets,\n translate,\n historyAdapter,\n historyStateKey = DEFAULT_HISTORY_STATE_KEY,\n resetToDashboardOnMount = true,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onConversionFilterChange,\n onOfferSortChange,\n onViewChange,\n}) => {\n useTranslationResolver(translate);\n\n const [currentView, setCurrentView] = React.useState<ProductOfferDashboardView>('dashboard');\n const hasIntraDashboardHistoryRef = React.useRef(false);\n const [dateRange, setDateRange] = React.useState<DateRangeOption>(initialDateRange);\n const [market, setMarket] = React.useState<MarketOption>(initialMarket);\n const [productSort, setProductSort] = React.useState<ProductSortOption>(initialProductSort);\n const [conversionFilter, setConversionFilter] = React.useState<ConversionFilterOption>(initialConversionFilter);\n const [offerSort, setOfferSort] = React.useState<OfferSortOption>(initialOfferSort);\n\n const resolvedTopProducts = topProducts ?? EMPTY_TOP_PRODUCTS;\n const resolvedConversionData = conversionData ?? EMPTY_CONVERSION_DATA;\n const resolvedTopOffers = topOffers ?? EMPTY_TOP_OFFERS;\n const resolvedAllProducts = allProducts ?? resolvedTopProducts;\n const resolvedOrders = orders ?? EMPTY_ORDERS;\n const resolvedAllOffers = allOffers ?? resolvedTopOffers;\n\n const updateView = React.useCallback(\n (view: ProductOfferDashboardView) => {\n setCurrentView(view);\n onViewChange?.(view);\n },\n [onViewChange],\n );\n\n const readCurrentView = React.useCallback((): ProductOfferDashboardView => {\n if (historyAdapter) {\n return readViewFromState(historyAdapter.location?.state, historyStateKey);\n }\n\n if (typeof window === 'undefined') {\n return 'dashboard';\n }\n\n return readViewFromState(window.history.state, historyStateKey);\n }, [historyAdapter, historyStateKey]);\n\n const writeCurrentView = React.useCallback(\n (view: ProductOfferDashboardView, mode: ViewMode) => {\n if (historyAdapter) {\n const nextState = buildStateWithView(historyAdapter.location?.state, historyStateKey, view);\n const nextLocation = buildLocationWithState(historyAdapter.location, nextState);\n\n if (mode === 'replace') {\n historyAdapter.replace(nextLocation);\n return;\n }\n\n historyAdapter.push(nextLocation);\n return;\n }\n\n if (typeof window === 'undefined') {\n return;\n }\n\n const nextState = buildStateWithView(window.history.state, historyStateKey, view);\n\n if (mode === 'replace') {\n window.history.replaceState(nextState, '');\n return;\n }\n\n window.history.pushState(nextState, '');\n },\n [historyAdapter, historyStateKey],\n );\n\n React.useEffect(() => {\n if (resetToDashboardOnMount) {\n writeCurrentView('dashboard', 'replace');\n hasIntraDashboardHistoryRef.current = false;\n updateView('dashboard');\n } else {\n updateView(readCurrentView());\n }\n\n if (historyAdapter) {\n return historyAdapter.listen((location, action) => {\n if (action === 'POP') {\n const nextView = readViewFromState(location.state, historyStateKey);\n hasIntraDashboardHistoryRef.current = nextView !== 'dashboard';\n updateView(nextView);\n }\n });\n }\n\n const handlePopState = (event: PopStateEvent) => {\n const nextView = readViewFromState(event.state, historyStateKey);\n hasIntraDashboardHistoryRef.current = nextView !== 'dashboard';\n updateView(nextView);\n };\n\n window.addEventListener('popstate', handlePopState);\n return () => {\n window.removeEventListener('popstate', handlePopState);\n };\n }, [historyAdapter, historyStateKey, readCurrentView, resetToDashboardOnMount, updateView, writeCurrentView]);\n\n const handleOpenFullView = React.useCallback(\n (view: ProductOfferFullViewWidgetType) => {\n hasIntraDashboardHistoryRef.current = true;\n writeCurrentView(view, 'push');\n updateView(view);\n },\n [updateView, writeCurrentView],\n );\n\n const handleBack = React.useCallback(() => {\n if (currentView !== 'dashboard' && hasIntraDashboardHistoryRef.current) {\n if (historyAdapter) {\n historyAdapter.goBack();\n return;\n }\n\n if (typeof window !== 'undefined') {\n window.history.back();\n }\n\n return;\n }\n\n hasIntraDashboardHistoryRef.current = false;\n writeCurrentView('dashboard', 'replace');\n updateView('dashboard');\n }, [currentView, historyAdapter, updateView, writeCurrentView]);\n\n const handleDateRangeChange = React.useCallback(\n (nextDateRange: DateRangeOption) => {\n setDateRange(nextDateRange);\n onDateRangeChange?.(nextDateRange);\n },\n [onDateRangeChange],\n );\n\n const handleMarketChange = React.useCallback(\n (nextMarket: MarketOption) => {\n setMarket(nextMarket);\n onMarketChange?.(nextMarket);\n },\n [onMarketChange],\n );\n\n const handleProductSortChange = React.useCallback(\n (nextProductSort: ProductSortOption) => {\n setProductSort(nextProductSort);\n onProductSortChange?.(nextProductSort);\n },\n [onProductSortChange],\n );\n\n const handleConversionFilterChange = React.useCallback(\n (nextFilter: ConversionFilterOption) => {\n setConversionFilter(nextFilter);\n onConversionFilterChange?.(nextFilter);\n },\n [onConversionFilterChange],\n );\n\n const handleOfferSortChange = React.useCallback(\n (nextSort: OfferSortOption) => {\n setOfferSort(nextSort);\n onOfferSortChange?.(nextSort);\n },\n [onOfferSortChange],\n );\n\n const handleProductsTitleClick = React.useCallback(() => {\n handleOpenFullView('products');\n }, [handleOpenFullView]);\n\n const handleConversionTitleClick = React.useCallback(() => {\n handleOpenFullView('conversion-rate');\n }, [handleOpenFullView]);\n\n const handleOffersTitleClick = React.useCallback(() => {\n handleOpenFullView('top-offers');\n }, [handleOpenFullView]);\n\n if (currentView === 'products') {\n return (\n <ProductsFullView\n products={resolvedAllProducts}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onProductSortChange={handleProductSortChange}\n />\n );\n }\n\n if (currentView === 'conversion-rate') {\n return (\n <ConversionRateFullView\n conversionData={conversionFullViewData ?? resolvedConversionData}\n orders={resolvedOrders}\n summaryRate={conversionFullViewRate ?? conversionSummaryRate}\n summaryChangePct={conversionFullViewChangePct ?? conversionSummaryChangePct}\n dateRange={dateRange}\n market={market}\n conversionFilter={conversionFilter}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onConversionFilterChange={handleConversionFilterChange}\n />\n );\n }\n\n if (currentView === 'top-offers') {\n return (\n <TopPerformingOffersFullView\n offers={resolvedAllOffers}\n dateRange={dateRange}\n market={market}\n offerSort={offerSort}\n markets={markets}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onOfferSortChange={handleOfferSortChange}\n />\n );\n }\n\n return (\n <ProductOfferDashboard\n stats={stats}\n topProducts={resolvedTopProducts}\n conversionData={resolvedConversionData}\n topOffers={resolvedTopOffers}\n isLoading={isLoading}\n error={error}\n dashboardTitle={dashboardTitle}\n className={className}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n conversionFilter={conversionFilter}\n offerSort={offerSort}\n conversionSummaryRate={conversionSummaryRate}\n conversionSummaryChangePct={conversionSummaryChangePct}\n markets={markets}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onProductSortChange={handleProductSortChange}\n onConversionFilterChange={handleConversionFilterChange}\n onOfferSortChange={handleOfferSortChange}\n onProductsTitleClick={handleProductsTitleClick}\n onConversionTitleClick={handleConversionTitleClick}\n onOffersTitleClick={handleOffersTitleClick}\n />\n );\n};\n\nexport default PoDashboardWithNavigation;\n","import React, { useState } from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type {\n TopPerformingOffer,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n OfferSortOption,\n} from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport { PageContainer, TableSection, ChartTitle, EmptyStateText } from '../FullViewComponents.styled';\nimport { SummaryItemRow } from '../TopCategories/CategoriesFullView.styled';\nimport {\n TopSection,\n ChartWrapper,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n SummaryContainer,\n SummaryItem,\n ColorDot,\n SummaryInfo,\n SummaryName,\n SummaryValue,\n SummaryPercentage,\n SummaryTrend,\n TableTrendCell,\n DesktopTableContainer,\n MobileOffersContainer,\n MobileOfferCard,\n MobileOfferHeader,\n MobileOfferName,\n MobileOfferMetricsGrid,\n MobileOfferMetricItem,\n MobileOfferMetricLabel,\n MobileOfferMetricValue,\n MobileOfferTrendValue,\n} from './TopPerformingOffersFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ProductOfferDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ProductOfferDashboardTranslationKeys';\nimport {\n getTrendIcon,\n parseTrendPercent,\n resolveTrendDirection,\n calculateWeightedRevenueTrend,\n} from '../../utils/trendUtils';\n\nexport interface TopPerformingOffersFullViewProps {\n readonly offers: TopPerformingOffer[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly offerSort: OfferSortOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\n readonly isLoading?: boolean;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onOfferSortChange?: (sort: OfferSortOption) => void;\n}\n\nexport const TopPerformingOffersFullView: React.FC<TopPerformingOffersFullViewProps> = ({\n offers,\n dateRange,\n market,\n offerSort,\n markets,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onOfferSortChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const marketOptions = useMarketOptions(markets);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'sort',\n label: getTranslation(Keys.filter.offerSort.byRevenue),\n value: offerSort,\n options: [\n { value: 'revenue', label: getTranslation(Keys.filter.offerSort.byRevenue) },\n { value: 'units', label: getTranslation(Keys.filter.offerSort.byUnits) },\n ],\n },\n ],\n [dateRange, market, marketOptions, offerSort],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value);\n else if (key === 'sort') {\n onOfferSortChange?.(value as OfferSortOption);\n setCurrentPage(1);\n }\n },\n [onOfferSortChange, onDateRangeChange, onMarketChange],\n );\n\n const sortedOffers = React.useMemo(\n () =>\n [...offers].sort((a, b) => {\n if (offerSort === 'revenue') return b.revenue - a.revenue;\n return b.percentage - a.percentage;\n }),\n [offers, offerSort],\n );\n\n const { totalRevenue, totalRevenueTrendDirection, totalRevenueTrend } = React.useMemo(() => {\n const nextTotalRevenue = sortedOffers.reduce((sum, offer) => sum + offer.revenue, 0);\n\n const { direction, formatted } = calculateWeightedRevenueTrend(\n sortedOffers,\n (offer) => offer.revenue,\n (offer) => offer.trend?.revenue,\n );\n\n return {\n totalRevenue: nextTotalRevenue,\n totalRevenueTrendDirection: direction,\n totalRevenueTrend: formatted,\n };\n }, [sortedOffers]);\n\n const topOffers = React.useMemo(() => sortedOffers.slice(0, 5), [sortedOffers]);\n\n const { totalPages, pageItems: paginatedOffers } = usePaginatedItems(sortedOffers, currentPage, itemsPerPage);\n\n const columns: ColumnDef<TopPerformingOffer>[] = React.useMemo(\n () => [\n {\n key: 'name',\n label: getTranslation(Keys.fullView.topOffers.columnName),\n sortable: true,\n render: (_: unknown, row: TopPerformingOffer) => (\n <SummaryItemRow>\n <ColorDot dotColor={row.color} />\n <span>{row.name}</span>\n </SummaryItemRow>\n ),\n },\n {\n key: 'revenue',\n label: getTranslation(Keys.fullView.topOffers.columnRevenue),\n sortable: true,\n render: (value: unknown, row: TopPerformingOffer) => formatMoney(Number(value), row.currencyCode),\n },\n {\n key: 'percentage',\n label: getTranslation(Keys.fullView.topOffers.columnPercentage),\n sortable: true,\n render: (value: unknown) => `${Number(value)}%`,\n },\n {\n key: 'trend',\n label: getTranslation(Keys.fullView.topOffers.columnTrend),\n render: (_: unknown, row: TopPerformingOffer) => {\n if (!row.trend?.revenue) return getTranslation(Keys.defaults.noData);\n const columnTrendDirection = resolveTrendDirection(row.trend.revenue);\n return (\n <TableTrendCell direction={columnTrendDirection}>\n {getTrendIcon(columnTrendDirection)}\n <span>{row.trend.revenue}</span>\n </TableTrendCell>\n );\n },\n },\n ],\n [],\n );\n\n const currencyCode = sortedOffers[0]?.currencyCode;\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"top-offers-full-view\">\n <PageHeader\n title={getTranslation(Keys.fullView.topOffers.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewChartSkeleton />\n </PageContainer>\n );\n }\n\n if (offers.length === 0) {\n return (\n <PageContainer data-testid=\"top-offers-full-view\">\n <PageHeader\n title={getTranslation(Keys.fullView.topOffers.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <EmptyStateText data-testid=\"top-offers-fullview-empty\">\n {getTranslation(Keys.widget.topPerformingOffers.emptyState)}\n </EmptyStateText>\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"top-offers-full-view\">\n <PageHeader\n title={getTranslation(Keys.fullView.topOffers.title)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <TopSection data-testid=\"top-offers-fullview-top-section\">\n <ChartWrapper data-testid=\"top-offers-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={sortedOffers}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius=\"50%\"\n outerRadius=\"85%\"\n dataKey=\"revenue\"\n nameKey=\"name\"\n paddingAngle={2}\n >\n {sortedOffers.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"top-offers-fullview-donut-center\">\n <DonutCenterLabel>\n {getTranslation(Keys.widget.topPerformingOffers.totalRevenue)}\n </DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</DonutCenterValue>\n <DonutCenterTrend direction={totalRevenueTrendDirection}>{totalRevenueTrend}</DonutCenterTrend>\n </DonutCenterOverlay>\n </ChartWrapper>\n\n <SummaryContainer data-testid=\"top-offers-fullview-summary\">\n {topOffers.map((offer) => {\n const summaryTrendDirection = resolveTrendDirection(offer.trend?.revenue);\n return (\n <SummaryItem key={offer.id}>\n <ColorDot dotColor={offer.color} />\n <SummaryInfo>\n <SummaryName>{offer.name}</SummaryName>\n <SummaryValue>{formatMoney(offer.revenue, offer.currencyCode)}</SummaryValue>\n </SummaryInfo>\n <SummaryPercentage>{offer.percentage}%</SummaryPercentage>\n {offer.trend?.revenue ? (\n <SummaryTrend direction={summaryTrendDirection} aria-label={offer.trend.revenue}>\n {getTrendIcon(summaryTrendDirection)}\n </SummaryTrend>\n ) : null}\n </SummaryItem>\n );\n })}\n </SummaryContainer>\n </TopSection>\n\n <TableSection data-testid=\"top-offers-table\">\n <ChartTitle data-testid=\"top-offers-fullview-table-title\">\n {getTranslation(Keys.fullView.topOffers.title)} ({sortedOffers.length})\n </ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer>\n <DataTable\n columns={columns}\n data={paginatedOffers}\n sortable\n getRowKey={(row: TopPerformingOffer) => row.id}\n />\n </DesktopTableContainer>\n ) : (\n <MobileOffersContainer>\n {paginatedOffers.map((offer) => {\n const trendPercent = parseTrendPercent(offer.trend?.revenue);\n let trendDirection: 'up' | 'down' | 'neutral' = 'neutral';\n if (trendPercent !== null && trendPercent > 0) trendDirection = 'up';\n else if (trendPercent !== null && trendPercent < 0) trendDirection = 'down';\n\n return (\n <MobileOfferCard key={offer.id}>\n <MobileOfferHeader>\n <ColorDot dotColor={offer.color} />\n <MobileOfferName>{offer.name}</MobileOfferName>\n </MobileOfferHeader>\n <MobileOfferMetricsGrid>\n <MobileOfferMetricItem>\n <MobileOfferMetricLabel>\n {getTranslation(Keys.fullView.topOffers.columnRevenue)}\n </MobileOfferMetricLabel>\n <MobileOfferMetricValue>\n {formatMoney(offer.revenue, offer.currencyCode)}\n </MobileOfferMetricValue>\n </MobileOfferMetricItem>\n <MobileOfferMetricItem>\n <MobileOfferMetricLabel>\n {getTranslation(Keys.fullView.topOffers.columnPercentage)}\n </MobileOfferMetricLabel>\n <MobileOfferMetricValue>{offer.percentage}%</MobileOfferMetricValue>\n </MobileOfferMetricItem>\n <MobileOfferMetricItem>\n <MobileOfferMetricLabel>\n {getTranslation(Keys.fullView.topOffers.columnTrend)}\n </MobileOfferMetricLabel>\n <MobileOfferTrendValue direction={trendDirection}>\n {offer.trend?.revenue ? (\n <>\n {getTrendIcon(trendDirection)}\n <span>{offer.trend.revenue}</span>\n </>\n ) : (\n getTranslation(Keys.defaults.noData)\n )}\n </MobileOfferTrendValue>\n </MobileOfferMetricItem>\n </MobileOfferMetricsGrid>\n </MobileOfferCard>\n );\n })}\n </MobileOffersContainer>\n )}\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={sortedOffers.length}\n data-testid=\"top-offers-pagination\"\n />\n )}\n </TableSection>\n </PageContainer>\n );\n};\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\nimport type { TrendDirection } from '../types';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const TopSection = styled(Box)`\n display: flex;\n gap: 24px;\n padding: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${({ theme }) => theme.shadows[1]};\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n }\n`;\n\nexport const ChartWrapper = styled(Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`;\n\nexport const DonutCenterOverlay = styled(Box)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 120px;\n`;\n\nexport const DonutCenterLabel = styled(Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const DonutCenterValue = styled(Typography)`\n margin-top: 2px;\n font-size: 1.25rem;\n line-height: 1.2;\n font-weight: 700;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const DonutCenterTrend = styled(Typography)<{ direction: TrendDirection }>`\n margin-top: 2px;\n font-size: 0.875rem;\n line-height: 1.2;\n font-weight: 600;\n color: ${({ direction, theme }) => {\n if (direction === 'up') return theme.palette.success.main;\n if (direction === 'down') return theme.palette.error.main;\n return theme.palette.text.secondary;\n }};\n`;\n\nexport const SummaryContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex: 1;\n`;\n\nexport const SummaryItem = styled(Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 12px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n`;\n\nexport const ColorDot = styled(Box)<{ dotColor: string }>`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ dotColor }) => dotColor};\n flex-shrink: 0;\n`;\n\nexport const SummaryInfo = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`;\n\nexport const SummaryName = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`;\n\nexport const SummaryValue = styled(Typography)`\n font-size: 0.75rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const SummaryPercentage = styled(Typography)`\n font-size: 1rem;\n font-weight: 600;\n flex-shrink: 0;\n`;\n\nexport const SummaryTrend = styled(Box)<{ direction: TrendDirection }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return theme.palette.success.main;\n if (direction === 'down') return theme.palette.error.main;\n return theme.palette.text.secondary;\n }};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`;\n\nexport const TableTrendCell = styled(Box)<{ direction: TrendDirection }>`\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-weight: 600;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return theme.palette.success.main;\n if (direction === 'down') return theme.palette.error.main;\n return theme.palette.text.secondary;\n }};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`;\n\nexport const DesktopTableContainer = styled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const MobileOffersContainer = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const MobileOfferCard = styled(Box)`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n`;\n\nexport const MobileOfferHeader = styled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const MobileOfferName = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.text.primary};\n word-break: break-word;\n`;\n\nexport const MobileOfferMetricsGrid = styled(Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({ theme }) => theme.palette.divider};\n`;\n\nexport const MobileOfferMetricItem = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`;\n\nexport const MobileOfferMetricLabel = styled(Typography)`\n font-size: 0.625rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n text-transform: uppercase;\n`;\n\nexport const MobileOfferMetricValue = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const MobileOfferTrendValue = styled(Typography)<{ direction: TrendDirection }>`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n font-size: 0.875rem;\n font-weight: 600;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return theme.palette.success.main;\n if (direction === 'down') return theme.palette.error.main;\n return theme.palette.text.secondary;\n }};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const FilterContainer = styled('div')`\n display: flex;\n gap: 12px;\n margin-bottom: 24px;\n flex-wrap: wrap;\n`;\n\nexport const FilterDropdown = styled('select')`\n min-width: 160px;\n height: 40px;\n padding: 8px 12px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 8px;\n font-size: 14px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n`;\n\nexport const FilterLabel = styled('label')`\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n","import React from 'react';\nimport { FilterContainer, FilterDropdown, FilterLabel } from './FilterBar.styled';\nimport type { FilterConfig } from './types';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface FilterBarProps {\n readonly filters: FilterConfig[];\n readonly onChange: (filterKey: string, value: string) => void;\n}\n\nexport const FilterBar: React.FC<FilterBarProps> = ({ filters, onChange }) => {\n return (\n <FilterContainer data-testid=\"filter-bar\">\n {filters.map((filter) => (\n <FilterLabel key={filter.key} htmlFor={`filter-${filter.key}`}>\n {filter.label}\n <FilterDropdown\n id={`filter-${filter.key}`}\n value={filter.value}\n onChange={(e) => onChange(filter.key, e.target.value)}\n disabled={filter.disabled}\n aria-label={`${filter.label} ${getTranslation(Keys.ariaLabel.filterSuffix)}`}\n data-testid={`filter-dropdown-${filter.key}`}\n >\n {filter.options.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </FilterDropdown>\n </FilterLabel>\n ))}\n </FilterContainer>\n );\n};\n","import type {\n DashboardStats,\n TopProduct,\n ConversionDataPoint,\n SignupDataPoint,\n CategoryRevenue,\n OrderHistory,\n SignupDetail,\n} from '../types.d';\n\nexport const mockStats: DashboardStats = {\n shopTitle: 'My NuSkin Shop',\n dateRange: {\n start: '2026-03-01',\n end: '2026-03-31',\n label: 'Mar 1 - Mar 31',\n },\n selectedMarket: 'all',\n metrics: {\n revenue: '$9,453',\n volume: '1,211',\n siteVisits: '17,935',\n conversionRate: '4.2%',\n },\n trend: {\n revenue: '+12.5%',\n volume: '+8.3%',\n siteVisits: '-2.1%',\n },\n};\n\nexport const mockTopProducts: TopProduct[] = [\n {\n id: 'prod-001',\n rank: 1,\n name: 'ageLOC LumiSpa',\n imageUrl: '',\n unitsSold: 342,\n revenue: 29580,\n volume: 245,\n trend: { units: '+15%', revenue: '+12%', volume: '+8%' },\n },\n {\n id: 'prod-002',\n rank: 2,\n name: 'Pharmanex LifePak',\n imageUrl: '',\n unitsSold: 287,\n revenue: 24395,\n volume: 198,\n trend: { units: '+8%', revenue: '+10%', volume: '+5%' },\n },\n {\n id: 'prod-003',\n rank: 3,\n name: 'ageLOC Meta',\n imageUrl: '',\n unitsSold: 256,\n revenue: 21760,\n volume: 176,\n trend: { units: '-3%', revenue: '-1%', volume: '-2%' },\n },\n {\n id: 'prod-004',\n rank: 4,\n name: 'Nu Skin 180 System',\n imageUrl: '',\n unitsSold: 198,\n revenue: 17820,\n volume: 142,\n trend: { units: '+22%', revenue: '+18%', volume: '+15%' },\n },\n {\n id: 'prod-005',\n rank: 5,\n name: 'Epoch Baobab Body Butter',\n imageUrl: '',\n unitsSold: 176,\n revenue: 8800,\n volume: 88,\n trend: { units: '+5%', revenue: '+3%', volume: '+2%' },\n },\n];\n\nexport const mockConversionData: ConversionDataPoint[] = Array.from({ length: 30 }, (_, i) => {\n const date = new Date('2026-03-01');\n date.setDate(date.getDate() + i);\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n return {\n date: `${months[date.getMonth()]} ${date.getDate()}`,\n rate: Number((4 + (i % 15) * 0.1).toFixed(2)),\n orders: 200 + ((i * 13) % 100),\n siteVisits: 4000 + ((i * 97) % 2000),\n };\n});\n\nexport const mockConversionDataStandard: ConversionDataPoint[] = mockConversionData.map((point) => ({\n ...point,\n rate: Number((point.rate * 1.35).toFixed(2)),\n orders: Math.round(point.orders * 0.7),\n}));\n\nexport const mockConversionDataSubscription: ConversionDataPoint[] = mockConversionData.map((point) => ({\n ...point,\n rate: Number((point.rate * 0.55).toFixed(2)),\n orders: Math.round(point.orders * 0.3),\n}));\n\nexport const mockSignupData: SignupDataPoint[] = Array.from({ length: 30 }, (_, i) => {\n const date = new Date('2026-03-01');\n date.setDate(date.getDate() + i);\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n const total = 80 + ((i * 11) % 40);\n const members = Math.floor(total * 0.4);\n const retail = Math.floor(total * 0.35);\n const brandAffiliates = total - members - retail;\n return {\n date: `${months[date.getMonth()]} ${date.getDate()}`,\n total,\n members,\n retail,\n brandAffiliates,\n };\n});\n\nexport const mockCategories: CategoryRevenue[] = [\n {\n id: 'cat-001',\n name: 'Favorites',\n revenue: 45200,\n percentage: 29,\n color: '#C95D63',\n trend: { revenue: '+8%', units: '+10%' },\n },\n {\n id: 'cat-002',\n name: 'Daily Routine',\n revenue: 42100,\n percentage: 27,\n color: '#6C7A9B',\n trend: { revenue: '+12%', units: '+15%' },\n },\n {\n id: 'cat-003',\n name: 'Fit & Trim Body',\n revenue: 34300,\n percentage: 22,\n color: '#E8975E',\n trend: { revenue: '-3%', units: '-1%' },\n },\n {\n id: 'cat-004',\n name: 'Dull Skin',\n revenue: 24900,\n percentage: 16,\n color: '#5F8FC4',\n trend: { revenue: '+5%', units: '+7%' },\n },\n {\n id: 'cat-005',\n name: 'Acne',\n revenue: 9400,\n percentage: 6,\n color: '#A2C3B3',\n trend: { revenue: '+2%', units: '+3%' },\n },\n];\n\nexport const mockOrders: OrderHistory[] = Array.from({ length: 50 }, (_, i) => {\n const firstNames = ['Sarah', 'John', 'Emma', 'Michael', 'Olivia', 'William', 'Ava', 'James'];\n const lastNames = ['Smith', 'Johnson', 'Williams', 'Brown', 'Jones', 'Garcia', 'Miller', 'Davis'];\n const date = new Date('2026-03-31');\n date.setDate(date.getDate() - (i % 30));\n return {\n orderId: `ORD-${String(10000 + i).padStart(5, '0')}`,\n date: date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }),\n customerName: `${firstNames[i % firstNames.length]} ${lastNames[i % lastNames.length]}`,\n customerType: i % 3 === 0 ? 'Subscription' : 'Standard',\n items: (i % 5) + 1,\n total: Number((50 + ((i * 17) % 200) + (i % 10) * 0.1).toFixed(2)),\n bv: 30 + ((i * 9) % 150),\n };\n});\n\nexport const mockSignupDetails: SignupDetail[] = Array.from({ length: 30 }, (_, i) => {\n const firstNames = ['Alice', 'Bob', 'Carol', 'David', 'Eva', 'Frank', 'Grace', 'Henry'];\n const lastNames = ['Anderson', 'Baker', 'Clark', 'Davis', 'Evans', 'Fisher', 'Grant', 'Hall'];\n const types: ('Member' | 'Retail' | 'Brand Affiliate')[] = ['Member', 'Retail', 'Brand Affiliate'];\n const date = new Date('2026-03-31');\n date.setDate(date.getDate() - (i % 30));\n return {\n id: `SU-${String(1000 + i).padStart(4, '0')}`,\n name: `${firstNames[i % firstNames.length]} ${lastNames[i % lastNames.length]}`,\n date: date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }),\n type: types[i % types.length],\n email: `${firstNames[i % firstNames.length].toLowerCase()}.${lastNames[i % lastNames.length].toLowerCase()}@example.com`,\n status: i % 4 === 0 ? 'Pending' : 'Active',\n };\n});\n","import type { ProductOfferDashboardStats, TopPerformingOffer } from '../types.d';\n\nexport { mockTopProducts, mockConversionData, mockOrders } from './mockDashboardData';\n\nexport const mockProductOfferStats: ProductOfferDashboardStats = {\n shopTitle: 'Performance Overview',\n dateRange: {\n start: '2026-03-01',\n end: '2026-03-31',\n label: 'Mar 1 - Mar 31',\n },\n selectedMarket: 'all',\n metrics: {\n revenue: '$5,208',\n offersPurchased: '285',\n conversionRate: '4.2%',\n },\n trend: {\n revenue: '+2.3%',\n offersPurchased: '+3.7%',\n },\n};\n\nexport const mockProductOfferStatsPositiveTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '+5.1%',\n offersPurchased: '+12.5%',\n },\n};\n\nexport const mockProductOfferStatsNegativeTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '-1.8%',\n offersPurchased: '-3.7%',\n },\n};\n\nexport const mockProductOfferStatsNeutralTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '+0%',\n offersPurchased: '+0%',\n },\n};\n\nexport const mockProductOfferStatsZeroOffers: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n metrics: {\n ...mockProductOfferStats.metrics,\n offersPurchased: '0',\n },\n trend: {\n revenue: '+0%',\n offersPurchased: '+0%',\n },\n};\n\nexport const mockTopOffers: TopPerformingOffer[] = [\n {\n id: 'offer-1',\n name: 'Winter Skincare Bundle',\n revenue: 2800,\n percentage: 29,\n color: '#6B8E7B',\n trend: { revenue: '-4.2%' },\n },\n {\n id: 'offer-2',\n name: 'Supplement Starter Pack',\n revenue: 2500,\n percentage: 27,\n color: '#E8915A',\n trend: { revenue: '+3.1%' },\n },\n {\n id: 'offer-3',\n name: 'Holiday Special Bundle',\n revenue: 2100,\n percentage: 22,\n color: '#C75B5B',\n trend: { revenue: '-1.5%' },\n },\n {\n id: 'offer-4',\n name: 'LumiSpa Cleansing Kit',\n revenue: 1500,\n percentage: 16,\n color: '#5B8EC7',\n trend: { revenue: '+2.8%' },\n },\n {\n id: 'offer-5',\n name: 'Daily Wellness Bundle',\n revenue: 529,\n percentage: 6,\n color: '#9B8EC7',\n trend: { revenue: '+7.2%' },\n },\n];\n"]}
|