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,EAAc,CAAC,IAAK,IAAK,MAAK,UAC9BxC,EAAY,OAEZ,MAAMyC,EAAS,CACb,CAACL,GAAc,GAAGC,IAAME,KAEpBG,GAAUJ,EAAMD,GAAOG,EAAYA,EAAYpU,OAAS,GAU9D,OATAoU,EAAYxV,SAAQ2V,IAClB,IAAIjY,EAAQ2X,EAAMK,EAASC,EACT,OAAd3C,IACFtV,EAAQsV,EAAUtV,IAEpB+X,EAAO,qBAAqBE,QAAmB,CAC7C,CAACP,GAAc,GAAGnM,KAAKgK,MAAc,IAARvV,GAAiB,MAAQ6X,IACvD,IAEIE,CACT,C","sources":["webpack:///./src/InsightsMessagingQueue/internal/InsightsFooter.tsx","webpack:///./src/InsightsMessagingQueue/internal/TopInsightDetails.tsx","webpack:///./src/InsightsMessagingQueue/internal/CategoryInsightsDetails.tsx","webpack:///./src/hooks/useInsights.ts","webpack:///./src/InsightsMessagingQueue/internal/InsightsQueryRequestBody.ts","webpack:///./src/InsightsMessagingQueue/internal/InsightsMessagingQueueSkeleton.tsx","webpack:///./src/InsightsMessagingQueue/internal/InsightsContent.tsx","webpack:///./src/hooks/use-productsummary.ts","webpack:///./src/InsightsMessagingQueue/InsightsMessagingQueue.tsx","webpack:///./src/utils/common.util.ts","webpack:///./node_modules/@mui/material/Skeleton/Skeleton.js","webpack:///./node_modules/@mui/material/Skeleton/skeletonClasses.js","webpack:///./node_modules/@mui/material/styles/cssUtils.js"],"sourcesContent":["import React, { useCallback } from 'react';\nimport Stack from '@mui/material/Stack';\nimport { styled } from '@mui/material/styles';\nimport Button from '@mui/material/Button';\nimport { useLocalization } from '@im/react-localization';\n\ntype Props = {\n dismissAllHandler?: () => void;\n onClickInsightsCenter?: () => void;\n showInsightsCenter?: boolean;\n};\n\nexport default function InsightsFooter(props: Props) {\n const { translate } = useLocalization();\n const {\n dismissAllHandler,\n onClickInsightsCenter,\n showInsightsCenter = true,\n } = props;\n\n const onClickInsightsButton = useCallback(() => {\n if (onClickInsightsCenter) onClickInsightsCenter();\n }, [onClickInsightsCenter]);\n\n return (\n \n \n Dismiss All\n \n {showInsightsCenter && (\n \n {translate('Insights.InsightsCenter')}\n \n )}\n \n );\n}\n\nconst StyledButton = styled(Button)(({ theme }) => ({\n textTransform: 'none',\n}));\n","import React from 'react';\nimport Stack from '@mui/material/Stack';\nimport Box from '@mui/material/Box';\nimport { styled } from '@mui/material/styles';\nimport InsightsIcon from '@mui/icons-material/Insights';\nimport Button from '@mui/material/Button';\nimport Typography from '@mui/material/Typography';\nimport { ObjectMap } from 'mf_core/query';\n\ntype Props = {\n insightData: ObjectMap;\n};\n\nexport default function TopInsightDetails(props: Props) {\n const { insightData } = props;\n return (\n <>\n \n \n \n \n \n \n {insightData?.title}\n \n \n Dismiss\n \n \n \n {insightData?.description}\n \n \n \n View all information\n \n \n \n \n \n \n );\n}\n\nconst StyledInsightDetailsStackWrapper = styled(Stack)(({ theme }) => ({\n '&: hover': {\n background: '#f4f4f4',\n },\n borderBottom: '1px solid #ececec',\n maxWidth: 650,\n padding: theme.spacing(1),\n paddingBottom: theme.spacing(2),\n}));\n","import React, { useEffect, useState } from 'react';\nimport Stack from '@mui/material/Stack';\nimport { styled } from '@mui/material/styles';\nimport TopInsightDetails from './TopInsightDetails';\nimport { ObjectMap } from 'mf_core/query';\n\ntype Props = {\n maxDropHeight?: number;\n topInsightsData: Array;\n};\n\nexport default function CategoryInsightsDetails(props: Props) {\n const { maxDropHeight, topInsightsData } = props;\n const offsetHeight = 245;\n const [maxHeight, setMaxHeight] = useState(window.innerHeight - offsetHeight);\n\n useEffect(() => {\n setMaxHeight(window.innerHeight - offsetHeight);\n\n const handleWindowResize = () => {\n setMaxHeight(window.innerHeight - offsetHeight);\n };\n\n window.addEventListener('resize', handleWindowResize);\n\n return () => {\n window.removeEventListener('resize', handleWindowResize);\n };\n }, []);\n\n return (\n \n {topInsightsData?.map((insightData: ObjectMap, index) => {\n return (\n \n );\n })}\n \n );\n}\n\nconst StyledCategoryWrapperStack = styled(Stack)(({ theme }) => ({\n '&::-webkit-scrollbar': {\n height: '8.86px',\n width: '8.86px',\n },\n '&::-webkit-scrollbar-thumb': {\n background: theme.palette.text.disabled,\n borderRadius: '6px',\n },\n '&::-webkit-scrollbar-thumb:hover': {\n background: theme.palette.primary.main,\n },\n '&::-webkit-scrollbar-track': {\n borderRadius: '6px',\n boxShadow: 'none',\n },\n '&::-webkit-scrollbar-track:hover': {\n boxShadow: 'inset 0 0 6px #C4C4C4',\n },\n marginTop: theme.spacing(2),\n maxHeight: 335,\n overflowY: 'auto',\n}));\n","import { useApiGet, useApiPost, useApiPostQuery } from 'mf_core/query';\nimport { useMutation } from '@tanstack/react-query';\n\nexport function useGetInsights() {\n const apiGet = useApiGet();\n\n return useMutation({\n mutationFn: () => {\n return apiGet(\n '/exp-looker_dummy_link/v1/insights/Insight_HomePageWidget?authorizedproducts=true'\n );\n },\n });\n}\n\nexport function useInsightQuery(reqBody: any) {\n let response: any = [];\n const currentInsightBodyParam = reqBody;\n response = useApiPostQuery(\n `/exp-looker/v1/run-inline-query-v2`,\n currentInsightBodyParam\n );\n return response;\n}\n\nexport function useInsightQueryMutation() {\n const apiPost = useApiPost();\n\n return useMutation({\n mutationFn: (reqBody?: any) => {\n const data = apiPost(`/exp-looker/v1/run-inline-query-v2`, reqBody);\n return data;\n },\n onError: (error) => {\n console.error(error);\n },\n });\n}\n\nexport type PlacementData = {\n category: string;\n id: string;\n product: string;\n sales: string;\n sku: string;\n vendor: string;\n};\n\nexport type InsightResponseTO = {\n placementId: string;\n response: any[];\n};\n\nexport const PLACEMENT_IDS = {\n TopCategoryGrowth: 'Insight_TopCategoryGrowthWithTopProductSales',\n TopProductGrowth: 'Insight_TopProductGrowthOnTopCategory',\n TopVendorGrowth: 'Insight_TopVendorGrowthWithTopProductSales',\n};\n","export const combinedInsights = {\n client_id: '',\n column_limit: '',\n dynamic_fields: '',\n fields: [\n 'x4c_insights_combined.okta_reseller_key',\n 'x4c_insights_combined.insight__top_product_growth_top_category',\n 'x4c_insights_combined.insight__missing_product_market_basket',\n 'x4c_insights_combined.insight__trending_searches_in_mdg_segment',\n 'x4c_insights_combined.insight__X4C_CUST_TOP_PRODUCT_SEARCH',\n 'x4c_insights_combined.insight__order_count_ytd',\n 'x4c_insights_combined.insight__top_vendor_growth_with_top_product_sales',\n 'x4c_insights_combined.insight__top_product_in_top_category',\n 'x4c_insights_combined.insight__top_category_growth_with_top_product_sales',\n 'x4c_insights_combined.insight__top_vendor_in_top_category',\n 'x4c_insights_combined.insights__top_categories_in_mdg_segment',\n 'x4c_insights_combined.insights__trending_products_growth',\n ],\n fill_fields: [],\n filter_config: {},\n filter_expression: '',\n filters: {},\n limit: '',\n model: 'sa_external',\n pivots: [],\n query_timezone: '',\n row_total: '',\n sorts: [],\n subtotals: [],\n total: false,\n view: 'x4c_insights_combined',\n vis_config: {},\n visible_ui_sections: '',\n};\n","import React from 'react';\nimport Box from '@mui/material/Box';\nimport Skeleton from '@mui/material/Skeleton';\nimport Stack from '@mui/material/Stack';\n\nexport function InsightsMessagingQueueSkeleton() {\n return (\n \n \n \n\n \n \n \n \n );\n}\n","/* eslint-disable max-lines */\nimport React, { useState, useCallback, useEffect, useMemo } from 'react';\nimport { setDigitalData } from 'mf_core/adobe';\nimport { useLocalization, useTranslate } from '@im/react-localization';\nimport { ObjectMap } from 'mf_core/query';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\nimport Chip from '@mui/material/Chip';\nimport Stack from '@mui/material/Stack';\nimport { styled } from '@mui/material/styles';\nimport CategoryInsightsDetails from './CategoryInsightsDetails';\nimport { useInsightQueryMutation } from '../../hooks/useInsights';\nimport { combinedInsights } from './InsightsQueryRequestBody';\nimport { useExtendedSummaryMutation } from '../../hooks/use-productsummary';\nimport { InsightsMessagingQueueSkeleton } from './InsightsMessagingQueueSkeleton';\nimport {\n GetUserRole,\n getSKUMap,\n sortJSONByNullValue,\n sortJSONListByBooleanKey,\n sortJSONListByKey,\n sortJSONListByTwoBooleanKey,\n userRoles,\n} from '../../utils/common.util';\nimport { useFeatureFlag } from 'mf_core/feature-flag';\n\ntype Props = {\n chipsDetails: ObjectMap[];\n currentPage: string;\n insightsDetails: ObjectMap | null;\n maxDropHeight?: number;\n setChipsDetails: (chipDetails: ObjectMap[]) => void;\n setInsightsDetails: (insightsDetails: ObjectMap | null) => void;\n toggleInsightsPopup?: () => void;\n};\n\ntype InsightCategories = {\n accountInfo: string;\n complementaryProducts: string;\n efficientTips: string;\n trendingCategory: string;\n trendingProduct: string;\n trendingProductCategory: string;\n trendingProductSearch: string;\n trendingProductVendor: string;\n trendingVendor: string;\n};\n\nexport default function InsightsContent(props: Props) {\n const {\n chipsDetails,\n currentPage,\n insightsDetails,\n maxDropHeight,\n setChipsDetails,\n setInsightsDetails,\n } = props;\n\n const [insightsMessages, setInsightsMessages] = useState();\n const [insightsMessagesLoading, setInsightsMessagesLoading] = useState(false);\n const insightsMutation = useInsightQueryMutation();\n\n const dataExtendedMutation = useExtendedSummaryMutation();\n const { translate } = useLocalization();\n const translateKey = useTranslate();\n const userRole = GetUserRole();\n const {\n isReady: enabledInsightsVersionIsReady,\n value: enabledInsightsVersion,\n } = useFeatureFlag('EnabledInsightsVersion');\n\n const {\n isReady: enableEfficiencyTipsInsightsIsReady,\n value: enableEfficiencyTipsInsights,\n } = useFeatureFlag('EnableEfficiencyTipsInsights');\n\n const { isReady: isConfigureToOrderUrlReady, value: configureToOrderUrl } =\n useFeatureFlag('ConfigureToOrderUrl');\n\n const {\n isReady: isConfigureToOrderQuestionsUrlReady,\n value: configureToOrderQuestionsUrl,\n } = useFeatureFlag('ConfigureToOrderQuestionsUrl');\n\n const { value: enableInsightsSearchURLRefinement } = useFeatureFlag(\n 'EnableInsightsSearchURLRefinement'\n );\n\n const { value: enableUserManagement } = useFeatureFlag(\n 'EnableUserManagement'\n );\n\n const categoryKeys: InsightCategories = useMemo(() => {\n return {\n accountInfo: 'Account Info',\n complementaryProducts: 'Complementary Products',\n efficientTips: 'Efficient Tips',\n trendingCategory: 'Trending Category',\n trendingProduct: 'Trending Product',\n trendingProductCategory: 'Trending Product Category',\n trendingProductSearch: 'Trending Product Search',\n trendingProductVendor: 'Trending Product Vendor',\n trendingVendor: 'Trending Vendor',\n };\n }, []);\n\n const [productSummaryDependentInsights, setProductSummaryDependentInsights] =\n useState({\n missingProductInsight: true,\n topCategoryInsight: true,\n topVendorInsight: true,\n trendingProductInsight: true,\n });\n const [allInsightsLoaded, setAllInsightsLoaded] = useState(false);\n\n const pageWiseCagetoriesDetails = useMemo(() => {\n return {\n 'Details Page': [\n categoryKeys.efficientTips,\n categoryKeys.trendingCategory,\n categoryKeys.complementaryProducts,\n ],\n 'Home Page': [\n categoryKeys.efficientTips,\n categoryKeys.trendingProduct,\n categoryKeys.trendingVendor,\n categoryKeys.accountInfo,\n categoryKeys.trendingCategory,\n categoryKeys.trendingProductSearch,\n categoryKeys.complementaryProducts,\n ],\n 'Insights Center': [\n categoryKeys.efficientTips,\n categoryKeys.trendingProduct,\n categoryKeys.trendingVendor,\n categoryKeys.accountInfo,\n categoryKeys.trendingCategory,\n categoryKeys.trendingProductSearch,\n categoryKeys.complementaryProducts,\n categoryKeys.trendingProductVendor,\n categoryKeys.trendingProductCategory,\n ],\n 'Product Category': [\n categoryKeys.efficientTips,\n categoryKeys.trendingVendor,\n categoryKeys.trendingCategory,\n ],\n 'Search Page': [\n categoryKeys.efficientTips,\n categoryKeys.trendingProduct,\n categoryKeys.trendingProductSearch,\n ],\n 'Vendor List': [categoryKeys.efficientTips, categoryKeys.trendingVendor],\n 'cart checkout': [categoryKeys.efficientTips, categoryKeys.accountInfo],\n } as ObjectMap;\n }, [categoryKeys]);\n\n const styledLink = `\n `;\n\n const tabContentView = useCallback(\n (categoryInsightData: Array) => {\n return (\n \n );\n },\n [maxDropHeight]\n );\n\n const getCategoryDetailsBasedOnPage = useCallback(\n (\n currentPage: string,\n insightCategoriesList: any[],\n insightsData: { [x: string]: any[] }\n ) => {\n const filteredCategoryWiseInsights: ObjectMap = {};\n\n insightCategoriesList?.forEach((category: any) => {\n let filteredInsights: ObjectMap[] = [];\n insightsData[category ?? '']?.forEach((insightData: any) => {\n if (insightData?.pages?.includes(currentPage))\n filteredInsights = [...filteredInsights, insightData];\n });\n\n filteredCategoryWiseInsights[category] = filteredInsights;\n });\n\n return filteredCategoryWiseInsights;\n },\n []\n );\n\n const getAllCategoriesInsights = useCallback(\n (insightCategoriesList: any[], insightsData: { [x: string]: any }) => {\n let allCategoriesInsights: Array = [];\n\n insightCategoriesList?.forEach((category: any) => {\n allCategoriesInsights = [\n ...allCategoriesInsights,\n ...[...(insightsData[category ?? ''] ?? [])],\n ];\n });\n\n return allCategoriesInsights;\n },\n []\n );\n\n const updateChipsDetails = useCallback(\n (\n navigatedPage: string,\n insightCategoriesList: string[],\n categoryWiseInsightsData: any\n ) => {\n const updatedCategoryInsights = getCategoryDetailsBasedOnPage(\n navigatedPage,\n insightCategoriesList,\n categoryWiseInsightsData\n );\n const allCategoriesInsights = getAllCategoriesInsights(\n insightCategoriesList,\n updatedCategoryInsights\n );\n\n const chipsList: Array = [\n {\n active: true,\n content: tabContentView(allCategoriesInsights),\n dataName: 'Quick-insights_Popup_View-All',\n digitalData: allCategoriesInsights?.map((insight: ObjectMap) => {\n return {\n InsightTab: 'View All',\n ...insight?.digitalData,\n };\n }),\n insightsCount: String(allCategoriesInsights?.length ?? 0),\n title: translate('Insights.ViewAll'),\n },\n ];\n\n insightCategoriesList?.forEach((category: string) => {\n if (\n updatedCategoryInsights?.[category] &&\n updatedCategoryInsights?.[category]?.length > 0\n ) {\n chipsList.push({\n active: false,\n content: tabContentView(updatedCategoryInsights?.[category] ?? []),\n dataName: `Quick-insights_Popup_${category?.replace(/\\s+/g, '-')}`,\n digitalData: updatedCategoryInsights?.[category]?.map(\n (insight: ObjectMap) => {\n return {\n InsightTab: category,\n ...insight?.digitalData,\n };\n }\n ),\n insightsCount: String(\n updatedCategoryInsights?.[category]?.length ?? '0'\n ),\n title: translate(`Insights.${category.replace(/\\s/g, '')}`),\n });\n }\n });\n\n setChipsDetails(chipsList);\n },\n [\n getCategoryDetailsBasedOnPage,\n getAllCategoriesInsights,\n tabContentView,\n translate,\n setChipsDetails,\n ]\n );\n\n const showContent = useCallback(\n (selectedChipDetails: ObjectMap) => {\n const tempChipDetails = chipsDetails?.map((chipDetails) => {\n if (selectedChipDetails?.title === chipDetails?.title) {\n return {\n ...chipDetails,\n active: true,\n };\n } else {\n return {\n ...chipDetails,\n active: false,\n };\n }\n });\n setChipsDetails(tempChipDetails);\n\n setDigitalData({\n QuickInsightsImpressions: selectedChipDetails.digitalData ?? [],\n });\n },\n [chipsDetails, setChipsDetails]\n );\n\n const onCountClick = useCallback(() => {\n // On count click handler\n }, []);\n\n const getSalesFrequencyInsight = useCallback(\n (orderDetails: ObjectMap) => {\n if (orderDetails?.order_count) {\n const orderHistory = `/cep/app/frame?url=${encodeURIComponent(\n '/spa/ostordersearchcep/#/orders'\n )}`;\n\n const heading = translate('InsightCharts.SalesTrend');\n const data = (\n <>\n {translate(\n 'Insights.OrderVolume_CardContent',\n {\n history: `${styledLink}${translateKey('Insights.History')}`,\n orderCount: `${styledLink}${orderDetails?.order_count ?? 0}\n `,\n },\n true\n )}\n \n );\n\n return {\n category: categoryKeys.accountInfo,\n description: data,\n digitalData: {\n InsightCategory: [],\n InsightName: 'Sales trend',\n InsightOrderhistory: orderDetails?.order_count,\n InsightProduct: [],\n InsightSearchTerms: [],\n InsightVendor: [],\n },\n pages: 'Home Page, Insights Center, cart checkout',\n title: heading,\n };\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [translate]\n );\n\n const getCategoryByVendorInsight = useCallback(\n (vendorDetails: ObjectMap) => {\n const categoryName = vendorDetails?.category ?? '';\n const category = toPascal(categoryName);\n const encodedCategoryName = encodeURIComponent(categoryName);\n\n const vendorName = vendorDetails?.vendor_name ?? '';\n const vendor = toPascal(vendorName);\n const encodedVendorName = encodeURIComponent(vendorName);\n\n if (categoryName && vendorName) {\n const vendorUrl =\n enableInsightsSearchURLRefinement === 'true'\n ? `/cep/app/product/productsearch?vendorname=VEN_REFINE||eq||${encodedVendorName}||false||&categories=CAT_REFINE||eq||${encodedCategoryName}||false||&displaytitle=${encodedVendorName}&keywords=${encodedVendorName}`\n : `/cep/app/product/productsearch?displaytitle=${encodedVendorName}&keywords=${encodedVendorName}`;\n\n const categoryUrl =\n enableInsightsSearchURLRefinement === 'true'\n ? `/cep/app/product/productsearch?categories=CAT_REFINE||eq||${encodedCategoryName}||false||&vendorname=VEN_REFINE||eq||${encodedVendorName}||false||&displaytitle=${encodedCategoryName}&keywords=${encodedCategoryName}`\n : `/cep/app/product/productsearch?displaytitle=${encodedCategoryName}&keywords=${encodedCategoryName}`;\n\n const heading = translate(\n enabledInsightsVersion === 'v4'\n ? 'Insights.VendorTrends'\n : 'InsightCharts.CategoriesByVendors'\n );\n const dataTagName =\n enabledInsightsVersion === 'v4'\n ? 'VendorTrends'\n : 'Categoriesbyvendors';\n const data = (\n <>\n {translate(\n enabledInsightsVersion === 'v4'\n ? 'Insights.VendorTrendsCard'\n : 'Insights.TopVendorInTopCategory_CardContent',\n {\n category: `${styledLink}${category} `,\n vendor: `${styledLink}${vendor}`,\n },\n true\n )}\n \n );\n\n return {\n category: categoryKeys.trendingVendor,\n description: data,\n digitalData: {\n InsightCategory: [vendorDetails?.category],\n InsightName:\n enabledInsightsVersion === 'v4'\n ? 'Vendor trends'\n : 'Categories by vendors',\n InsightOrderhistory: '',\n InsightProduct: [],\n InsightSearchTerms: [],\n InsightVendor: [vendorDetails?.vendor_name],\n },\n pages: 'Home Page, Insights Center, Vendor List, Product Category',\n title: heading,\n };\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [translate]\n );\n\n const updateTopVendorInsight = useCallback(\n (top10VendorsDetails: ObjectMap[]) => {\n if (\n Array.isArray(top10VendorsDetails) &&\n top10VendorsDetails?.length > 0\n ) {\n let partNumbers = '';\n\n top10VendorsDetails?.forEach((vendorDetails: ObjectMap) => {\n const partNumber = vendorDetails?.sku?.substring(2) ?? '';\n partNumbers += `{'partNumber':'${partNumber}'},`;\n });\n\n const skusList = `[${partNumbers.slice(0, -1)}]`;\n\n if (skusList === '[]') {\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingProductVendor]: [],\n };\n });\n\n return;\n }\n\n dataExtendedMutation\n .mutateAsync(skusList)\n .then((productSummaryResponse: any) => {\n const productSummaries = productSummaryResponse?.summaries;\n\n if (!productSummaries) {\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingProductVendor]: [],\n };\n });\n\n return;\n }\n\n const skusMap: ObjectMap = getSKUMap(productSummaries);\n const filteredProductDetails: Array = [];\n\n top10VendorsDetails?.forEach((vendorDetails: ObjectMap) => {\n const partNumber = vendorDetails?.sku\n ?.substring(2)\n .replace(/^0+/, '');\n\n if (Object.prototype.hasOwnProperty.call(skusMap, partNumber)) {\n filteredProductDetails.push({\n ...vendorDetails,\n isAuthorizedToBuy: skusMap[partNumber]?.authorizedToPurchase,\n productSummary: skusMap[partNumber],\n });\n }\n });\n\n const sortedCategoryDetailsByRank = sortJSONListByKey(\n filteredProductDetails,\n 'sku_rank'\n );\n const sortedDataByAuthorizationToBuy = sortJSONListByBooleanKey(\n sortedCategoryDetailsByRank,\n 'isAuthorizedToBuy',\n 'desc'\n );\n\n if (sortedDataByAuthorizationToBuy?.length === 0) {\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingProductVendor]: [],\n };\n });\n\n return;\n }\n\n const topVendorsDetails = sortedDataByAuthorizationToBuy?.[0] ?? {};\n const partNumber = topVendorsDetails?.productSummary?.partnumber;\n const heading =\n enabledInsightsVersion === 'v4'\n ? translate('Insights.ProductDemand')\n : translate('InsightCharts.TopVendors');\n const productDetailsLink = `/cep/app/product/productdetails?id=${partNumber}`;\n\n const vendorName = topVendorsDetails?.vendor_name ?? '';\n const vendor = toPascal(vendorName);\n const encodedVendorName = encodeURIComponent(vendorName);\n\n const searchLink = `/cep/app/product/productsearch?displaytitle=${encodedVendorName}&keywords=${encodedVendorName}`;\n\n const data = (\n \n \n {enabledInsightsVersion === 'v4' ? (\n \n {translate(\n 'Insights.TopVendorAndProduct_CardContent',\n {\n product: `${styledLink}${\n topVendorsDetails?.product_description\n }`,\n\n vendor: `${styledLink}${vendor} \n `,\n },\n true\n )}\n \n ) : (\n \n {translate('HomePage.InsightsVendorGrowth_last30Days')}{' '}\n {\n \n {topVendorsDetails?.vendor_name}\n \n }{' '}\n {translate(\n 'HomePage.InsightsVendorGrowth_SignificantDemand'\n )}{' '}\n {\n \n {topVendorsDetails?.product_description}\n \n }{' '}\n \n )}\n \n \n );\n\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingProductVendor]: [\n {\n category: categoryKeys.trendingProductVendor,\n description: data,\n digitalData: {\n InsightCategory: [],\n InsightName:\n enabledInsightsVersion === 'v4'\n ? 'Product demand'\n : 'Top vendors',\n InsightOrderhistory: '',\n InsightProduct: [topVendorsDetails?.product_description],\n InsightSearchTerms: [],\n InsightVendor: [topVendorsDetails?.vendor_name],\n },\n pages: 'Insights Center',\n title: heading,\n },\n ],\n };\n });\n })\n .finally(() => {\n setProductSummaryDependentInsights((prevData: any) => {\n return {\n ...prevData,\n topVendorInsight: false,\n };\n });\n });\n } else {\n setProductSummaryDependentInsights((prevData: any) => {\n return {\n ...prevData,\n topVendorInsight: false,\n };\n });\n }\n },\n [\n categoryKeys,\n translate,\n dataExtendedMutation,\n insightsMessages,\n enabledInsightsVersion,\n styledLink,\n setInsightsDetails,\n ]\n );\n\n const updateEmptyComplementaryProducts = useCallback(() => {\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.complementaryProducts]: [],\n };\n });\n }, [categoryKeys, setInsightsDetails]);\n\n const updateMissingProductInBasket = useCallback(\n (missingProductDetails: ObjectMap[]) => {\n if (\n Array.isArray(missingProductDetails) &&\n missingProductDetails?.length > 0\n ) {\n let partNumbers = '';\n\n missingProductDetails?.forEach((bundle: ObjectMap) => {\n const partNumberA = bundle?.SKUA?.substring(2) ?? '';\n const partNumberB = bundle?.SKUB?.substring(2) ?? '';\n\n partNumbers += `{'partNumber':'${partNumberA}'},{'partNumber':'${partNumberB}'},`;\n });\n\n const skusList = `[${partNumbers.slice(0, -1)}]`;\n let topBundle: ObjectMap = {};\n\n dataExtendedMutation\n .mutateAsync(skusList)\n .then((productSummaryResponse: any) => {\n const productSummaries = productSummaryResponse?.summaries;\n\n if (!productSummaries) {\n updateEmptyComplementaryProducts();\n return;\n }\n\n const skusMap: ObjectMap = getSKUMap(productSummaries);\n const filteredBundleDetails: Array = [];\n\n missingProductDetails?.forEach((bundleDetails: ObjectMap) => {\n const partNumberA = bundleDetails?.SKUA?.substring(2);\n const partNumberB = bundleDetails?.SKUB?.substring(2);\n\n if (\n Object.prototype.hasOwnProperty.call(skusMap, partNumberA) &&\n Object.prototype.hasOwnProperty.call(skusMap, partNumberB)\n ) {\n if (skusMap[partNumberA] && skusMap[partNumberB]) {\n filteredBundleDetails.push({\n ...bundleDetails,\n isAuthorizedToBuySKUA:\n skusMap[partNumberA]?.authorizedToPurchase,\n isAuthorizedToBuySKUB:\n skusMap[partNumberB]?.authorizedToPurchase,\n productSummaryA: skusMap[partNumberA],\n productSummaryB: skusMap[partNumberB],\n });\n }\n }\n });\n\n const sortedCategoryDetailsByRank = sortJSONListByKey(\n filteredBundleDetails,\n 'rank'\n );\n const sortedDataByAuthorizationToBuy = sortJSONListByTwoBooleanKey(\n sortedCategoryDetailsByRank,\n 'isAuthorizedToBuySKUA',\n 'isAuthorizedToBuySKUB',\n 'desc'\n );\n\n if (sortedDataByAuthorizationToBuy?.length === 0) {\n updateEmptyComplementaryProducts();\n return;\n }\n\n topBundle = sortedDataByAuthorizationToBuy?.[0] ?? {};\n\n const heading = translate('Insights.ComplementaryProducts');\n const productAUrl = `/cep/app/product/productdetails?id=${topBundle?.SKUA?.substring(\n 2\n )}`;\n const productBUrl = `/cep/app/product/productdetails?id=${topBundle?.SKUB?.substring(\n 2\n )}`;\n const data = translate(\n 'Insights.MissingProductMarketBasketText',\n {\n productA: productAUrl\n ? `${styledLink}${topBundle?.PRODA_DESCRIPTION}`\n : `${topBundle?.PRODA_DESCRIPTION}`,\n productB: productBUrl\n ? `${styledLink}${topBundle?.PRODB_DESCRIPTION}`\n : `${topBundle?.PRODB_DESCRIPTION}`,\n },\n true\n );\n\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.complementaryProducts]: [\n {\n category: categoryKeys.complementaryProducts,\n description: data,\n digitalData: {\n InsightCategory: [],\n InsightName: categoryKeys.complementaryProducts,\n InsightOrderhistory: '',\n InsightProduct: [\n topBundle?.PRODA_DESCRIPTION,\n topBundle?.PRODB_DESCRIPTION,\n ],\n InsightSearchTerms: [],\n InsightVendor: [],\n },\n pages: 'Home Page, Insights Center, Details Page',\n title: heading,\n },\n ],\n };\n });\n })\n .finally(() => {\n setProductSummaryDependentInsights((prevData: any) => {\n return {\n ...prevData,\n missingProductInsight: false,\n };\n });\n })\n .catch(() => {\n updateEmptyComplementaryProducts();\n });\n } else {\n setProductSummaryDependentInsights((prevData: any) => {\n return {\n ...prevData,\n missingProductInsight: false,\n };\n });\n }\n },\n [\n categoryKeys,\n dataExtendedMutation,\n styledLink,\n translate,\n updateEmptyComplementaryProducts,\n insightsMessages,\n setInsightsDetails,\n ]\n );\n\n const getTopCategoryInsight = useCallback(\n (categoryDetails: ObjectMap[]) => {\n if (Array.isArray(categoryDetails) && categoryDetails?.length > 0) {\n let topCategoryDetails: ObjectMap = categoryDetails[0];\n const heading = translate(\n enabledInsightsVersion === 'v4'\n ? 'Insights.CommunityTrends'\n : 'Insights.TopCategory'\n );\n categoryDetails?.forEach((vendorDetails: ObjectMap) => {\n if (\n topCategoryDetails?.mdg_segment_category_rank >\n vendorDetails?.mdg_segment_category_rank\n ) {\n topCategoryDetails = vendorDetails;\n }\n });\n\n const categoryName = topCategoryDetails?.category ?? '';\n const category = toPascal(categoryName);\n const encodedCategoryName = encodeURIComponent(categoryName);\n\n const categoryUrl = `/cep/app/product/productsearch?displaytitle=${encodedCategoryName}&keywords=${encodedCategoryName}`;\n const dataTagName =\n enabledInsightsVersion === 'v4' ? 'Community-Trends' : 'Top-Category';\n const data = (\n <>\n {translate(\n enabledInsightsVersion === 'v4'\n ? 'Insights.CommunityTrendsCard'\n : 'Insights.TopCategoryInsightCard',\n {\n category: `${styledLink}${category}`,\n },\n true\n )}\n \n );\n\n return {\n category: categoryKeys.trendingCategory,\n description: data,\n digitalData: {\n InsightCategory: [topCategoryDetails?.category],\n InsightName:\n enabledInsightsVersion === 'v4'\n ? 'Community trends'\n : 'Top Category',\n InsightOrderhistory: '',\n InsightProduct: [],\n InsightSearchTerms: [],\n InsightVendor: [],\n },\n pages: 'Home Page, Insights Center, Details Page, Product Category',\n title: heading,\n };\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [translate, styledLink, insightsMessages]\n );\n\n const updateTrendingSearches = useCallback(\n (trendingSearchList: ObjectMap[]) => {\n if (\n trendingSearchList &&\n Array.isArray(trendingSearchList) &&\n trendingSearchList?.length > 0\n ) {\n let navlinkData = '';\n const heading = translate(\n enabledInsightsVersion === 'v4'\n ? 'Insights.CommunityActivity'\n : 'Insights.TrendingProductSearchTerms'\n );\n let topTrendingProductDetails: ObjectMap = trendingSearchList[0];\n trendingSearchList?.forEach((product: ObjectMap) => {\n if (topTrendingProductDetails?.rank > product?.rank) {\n topTrendingProductDetails = product;\n }\n });\n\n const trendingTopSearchList =\n enabledInsightsVersion === 'v4'\n ? trendingSearchList?.slice(0, 2)\n : trendingSearchList;\n const trendingListLength = trendingTopSearchList?.length ?? 0;\n\n const dataTagName =\n enabledInsightsVersion === 'v4'\n ? 'Community-Activity'\n : 'Trending-Product-Search-Terms';\n\n const trendingSearchesDigitalData: ObjectMap = {\n InsightCategory: [],\n InsightName:\n enabledInsightsVersion === 'v4'\n ? 'Community activity'\n : 'Trending Product Search Terms',\n InsightOrderhistory: '',\n InsightProduct: [],\n InsightSearchTerms: [],\n InsightVendor: [],\n };\n\n trendingTopSearchList.forEach((item: ObjectMap, index: number) => {\n const trendingSearchTerm: string = item?.search_terms ?? '';\n\n trendingSearchesDigitalData.InsightSearchTerms?.push(\n trendingSearchTerm\n );\n\n const encodedTrendingSearchTerm =\n encodeURIComponent(trendingSearchTerm);\n const trendingSearchTermUrl = `/cep/app/product/productsearch?displaytitle=${encodedTrendingSearchTerm}&keywords=${encodedTrendingSearchTerm}`;\n let delimiter = '';\n\n if (index === trendingListLength - 2) {\n delimiter = ` ${translateKey('Insights.And')}`;\n } else if (index < trendingListLength - 2) {\n delimiter = ',';\n }\n\n navlinkData += `${styledLink}${trendingSearchTerm}${delimiter}`;\n });\n\n const trendingData = (\n <>\n {translate(\n enabledInsightsVersion === 'v4'\n ? 'Insights.CommunityActivityCard'\n : 'Insights.TopTrendingSearchesCard',\n { value: navlinkData },\n true\n )}\n \n );\n\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingProductSearch]: [\n {\n category: 'Trending Searches',\n description: trendingData,\n digitalData: trendingSearchesDigitalData,\n pages: 'Home Page, Insights Center, Search Page',\n title: heading,\n },\n ],\n };\n });\n }\n },\n\n [\n translate,\n translateKey,\n categoryKeys,\n enabledInsightsVersion,\n styledLink,\n insightsMessages,\n setInsightsDetails,\n ]\n );\n\n const getSalesPercentage = useCallback(\n (sales: number) => {\n if (Math.abs(sales) < 194.99) {\n return `${parseFloat(sales.toPrecision(2))}%`;\n } else if (Math.abs(sales) >= 195 && Math.abs(sales) < 1000) {\n return `${parseFloat((sales / 100).toPrecision(2))}X`;\n } else if (sales >= 1000) {\n return `${translateKey('Insights.MoreThanKey')} 1000X`;\n } else if (sales <= -1000) {\n return `${translateKey('Insights.LessThanKey')} -1000X`;\n }\n },\n [translateKey]\n );\n\n const updateTopCategoriesInsight = useCallback(\n (topCategoriesInsightDetails: ObjectMap[]) => {\n if (\n Array.isArray(topCategoriesInsightDetails) &&\n topCategoriesInsightDetails?.length > 0\n ) {\n let partNumbers = '';\n\n topCategoriesInsightDetails?.forEach((categoryDetails: ObjectMap) => {\n const partNumber = categoryDetails?.sku?.substring(2) ?? '';\n partNumbers += `{'partNumber':'${partNumber}'},`;\n });\n\n const skusList = `[${partNumbers.slice(0, -1)}]`;\n\n if (skusList === '[]') {\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingProductCategory]: [],\n };\n });\n\n return;\n }\n\n dataExtendedMutation\n .mutateAsync(skusList)\n .then((productSummaryResponse: any) => {\n const productSummaries = productSummaryResponse?.summaries;\n\n if (!productSummaries) {\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingProductCategory]: [],\n };\n });\n\n return;\n }\n\n const skusMap: ObjectMap = getSKUMap(productSummaries);\n const filteredProductDetails: Array = [];\n\n topCategoriesInsightDetails?.forEach(\n (categoryDetails: ObjectMap) => {\n const partNumber = categoryDetails?.sku\n ?.substring(2)\n .replace(/^0+/, '');\n\n if (Object.prototype.hasOwnProperty.call(skusMap, partNumber)) {\n filteredProductDetails.push({\n ...categoryDetails,\n isAuthorizedToBuy:\n skusMap[partNumber]?.authorizedToPurchase,\n productSummary: skusMap[partNumber],\n });\n }\n }\n );\n\n const sortedCategoryDetailsByRank = sortJSONListByKey(\n filteredProductDetails,\n 'sku_rank'\n );\n const sortedDataByAuthorizationToBuy = sortJSONListByBooleanKey(\n sortedCategoryDetailsByRank,\n 'isAuthorizedToBuy',\n 'desc'\n );\n\n if (sortedDataByAuthorizationToBuy?.length === 0) {\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingProductCategory]: [],\n };\n });\n\n return;\n }\n\n const topCategoryDetails =\n sortedDataByAuthorizationToBuy?.[0] ?? {};\n const heading = translate(\n enabledInsightsVersion === 'v4'\n ? 'Insights.MarketTrends'\n : 'Insights.TopCategories'\n );\n const partNumber = topCategoryDetails?.productSummary?.partnumber;\n\n const categoryName = topCategoryDetails?.category ?? '';\n const dataCategoryName = topCategoryDetails?.category?.replace(\n / /g,\n '-'\n );\n const category = toPascal(categoryName);\n const encodedDataCategoryName = encodeURIComponent(categoryName);\n\n const productdetailsLink = `/cep/app/product/productdetails?id=${partNumber}`;\n const searchLink = `/cep/app/product/productsearch?displaytitle=${encodedDataCategoryName}&keywords=${encodedDataCategoryName}`;\n const dataName =\n enabledInsightsVersion === 'v4'\n ? 'MarketTrends'\n : 'TopCategories';\n const insightType =\n enabledInsightsVersion === 'v4'\n ? 'Market trends'\n : 'Top categories';\n const data = (\n <>\n {translate(\n 'Insights.Card_TopProductGrowth_Text',\n {\n category: searchLink\n ? `${styledLink}${category}`\n : ` ${category}`,\n\n percentage:\n getSalesPercentage(\n topCategoryDetails?.sales_growth_ratio\n ) ?? '',\n\n product: productdetailsLink\n ? `${styledLink}${\n topCategoryDetails?.product_description\n }`\n : ` ${topCategoryDetails?.product_description}`,\n },\n true\n )}\n \n );\n\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingProductCategory]: [\n {\n category: categoryKeys.trendingProductCategory,\n description: data,\n digitalData: {\n InsightCategory: [],\n InsightName: dataName,\n InsightOrderhistory: '',\n InsightProduct: [topCategoryDetails?.product_description],\n InsightSearchTerms: [],\n InsightVendor: [],\n },\n pages: 'Insights Center',\n title: heading,\n },\n ],\n };\n });\n })\n .finally(() => {\n setProductSummaryDependentInsights((prevData: any) => {\n return {\n ...prevData,\n topCategoryInsight: false,\n };\n });\n });\n } else {\n setProductSummaryDependentInsights((prevData: any) => {\n return {\n ...prevData,\n topCategoryInsight: false,\n };\n });\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [translate, dataExtendedMutation, getSalesPercentage]\n );\n\n const getTopCategoryInLast30Days = useCallback(\n (topCategoriesInLast30DaysInsightDetails: ObjectMap[]) => {\n if (\n Array.isArray(topCategoriesInLast30DaysInsightDetails) &&\n topCategoriesInLast30DaysInsightDetails?.length > 0\n ) {\n const heading = translate(\n enabledInsightsVersion === 'v4'\n ? 'Insights.YourTrends'\n : 'Insights.TrendingCategory'\n );\n const categoryName =\n topCategoriesInLast30DaysInsightDetails?.[0]?.category ?? '';\n const dataCategoryName = categoryName?.replace(/ /g, '-');\n const category = toPascal(categoryName);\n const encodedDataCategory = encodeURIComponent(categoryName ?? '');\n const categoryLink = `/cep/app/product/productsearch?displaytitle=${encodedDataCategory}&keywords=${encodedDataCategory}`;\n const insightType =\n enabledInsightsVersion === 'v4' ? 'Your trends' : 'Trending category';\n const data = (\n <>\n {translate(\n enabledInsightsVersion === 'v4'\n ? 'Insights.TopCategoryGrowthAndProduct_CardContent'\n : 'Insights.TopCategoryGrowth_last30Days',\n {\n category: `${styledLink}${category}`,\n },\n true\n )}\n \n );\n\n return {\n category: categoryKeys.trendingCategory,\n description: data,\n digitalData: {\n InsightCategory: [categoryName],\n InsightName:\n enabledInsightsVersion === 'v4'\n ? 'Your trends'\n : categoryKeys.trendingCategory,\n InsightOrderhistory: '',\n InsightProduct: [],\n InsightSearchTerms: [],\n InsightVendor: [],\n },\n pages: 'Insights Center',\n title: heading,\n };\n }\n },\n [\n styledLink,\n categoryKeys,\n translate,\n insightsMessages,\n enabledInsightsVersion,\n ]\n );\n\n const updateTrendingProductsInsights = useCallback(\n (topTrendingProductsDetails: ObjectMap[]) => {\n if (\n Array.isArray(topTrendingProductsDetails) &&\n topTrendingProductsDetails?.length > 0\n ) {\n let partNumbers = '';\n\n topTrendingProductsDetails?.forEach((trendingDetails: ObjectMap) => {\n const partNumber = trendingDetails?.sku ?? '';\n partNumbers += `{'partNumber':'${partNumber}'},`;\n });\n\n const skusList = `[${partNumbers.slice(0, -1)}]`;\n\n if (skusList === '[]') {\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingProduct]: [],\n };\n });\n\n return;\n }\n\n dataExtendedMutation\n .mutateAsync(skusList)\n .then((productSummaryResponse: any) => {\n const productSummaries = productSummaryResponse?.summaries;\n\n if (!productSummaries) {\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingProduct]: [],\n };\n });\n\n return;\n }\n\n const skusMap: ObjectMap = getSKUMap(productSummaries);\n const filteredProductDetails: Array = [];\n\n topTrendingProductsDetails?.forEach(\n (trendingDetails: ObjectMap) => {\n const partNumber = trendingDetails?.sku;\n\n filteredProductDetails.push({\n ...trendingDetails,\n isAuthorizedToBuy: skusMap[partNumber]?.authorizedToPurchase,\n productSummary: skusMap[partNumber] ?? {},\n });\n }\n );\n\n const sortedDataByAuthorizationToBuy = sortJSONListByBooleanKey(\n filteredProductDetails,\n 'isAuthorizedToBuy',\n 'desc'\n );\n const sortedTrendingDetailsByRank = sortJSONListByKey(\n sortedDataByAuthorizationToBuy,\n 'sku_rank'\n );\n const sortbyNullArray = sortJSONByNullValue(\n sortedTrendingDetailsByRank,\n 'productSummary'\n );\n\n if (sortbyNullArray?.length === 0) {\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingProduct]: [],\n };\n });\n\n return;\n }\n\n const topTrendingDetails = sortbyNullArray?.[0] ?? {};\n const partNumber = topTrendingDetails?.productSummary?.partnumber;\n const topProductUrl = `/cep/app/product/productdetails?id=${partNumber}`;\n const heading = translate(\n enabledInsightsVersion === 'v4'\n ? 'Insights.CommunityTrends'\n : 'Insights.TrendingProducts'\n );\n const insightType =\n enabledInsightsVersion === 'v4'\n ? 'Community trends'\n : 'Trending products';\n const firstProduct = sortbyNullArray?.[0] ?? {};\n const firstProductSku = firstProduct?.productSummary?.partnumber;\n\n const firstProductUrl = firstProductSku\n ? `/cep/app/product/productdetails?id=${firstProductSku}`\n : undefined;\n\n const secondProduct = sortbyNullArray?.[1] ?? {};\n const secondProductSku = secondProduct?.productSummary?.partnumber;\n\n const secondProductUrl = secondProductSku\n ? `/cep/app/product/productdetails?id=${secondProductSku}`\n : undefined;\n\n const data = (\n <>\n {enabledInsightsVersion === 'v4'\n ? translate(\n 'Insights.Customer_HighGrowth_TrendingProducts',\n {\n highGrowth: firstProductUrl\n ? `${styledLink}${\n firstProduct?.product_description\n }`\n : `${firstProduct?.product_description}`,\n\n lowGrowth: secondProductUrl\n ? `${styledLink}${\n secondProduct?.product_description\n }`\n : `${secondProduct?.product_description}`,\n },\n true\n )\n : translate(\n 'Insights.Trending_Product_Top_Product_In_Top_Category',\n {\n topProduct: topProductUrl\n ? `${styledLink}${\n topTrendingDetails?.product_description\n }`\n : `${topTrendingDetails?.product_description}`,\n },\n true\n )}\n \n );\n\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingProduct]: [\n {\n category: categoryKeys.trendingProduct,\n description: data,\n digitalData: {\n InsightCategory: [],\n InsightName: 'Trending products',\n InsightOrderhistory: '',\n InsightProduct: [topTrendingDetails?.product_description],\n InsightSearchTerms: [],\n InsightVendor: [],\n },\n pages: 'Home Page, Insights Center, Search Page',\n title: heading,\n },\n ],\n };\n });\n })\n .finally(() => {\n setProductSummaryDependentInsights((prevData: any) => {\n return {\n ...prevData,\n trendingProductInsight: false,\n };\n });\n });\n } else {\n setProductSummaryDependentInsights((prevData: any) => {\n return {\n ...prevData,\n trendingProductInsight: false,\n };\n });\n }\n },\n [\n categoryKeys,\n enabledInsightsVersion,\n translate,\n dataExtendedMutation,\n styledLink,\n insightsMessages,\n setInsightsDetails,\n ]\n );\n\n const updateEfficientTipsInsight = useCallback(\n (isResellerWhitelistedForCTO: boolean) => {\n if (\n enableEfficiencyTipsInsightsIsReady &&\n enableEfficiencyTipsInsights === 'true' &&\n isResellerWhitelistedForCTO &&\n isConfigureToOrderUrlReady &&\n isConfigureToOrderQuestionsUrlReady\n ) {\n const heading = translate('Insights.EfficientTips');\n const configureToOrder = translateKey('Insights.ConfigureToOrder');\n const questions = translateKey('Insights.EfficientTipsQuestions');\n const data = (\n <>\n {translate(\n 'Insights.EfficientTipsInsight',\n {\n ctoLink: `${styledLink}${configureToOrder}`,\n questions: `${styledLink}${questions}`,\n },\n true\n )}\n \n );\n\n const InsightDetails = {\n category: categoryKeys.efficientTips,\n description: data,\n digitalData: {\n InsightCategory: [],\n InsightName: 'Efficieny Tips',\n InsightOrderhistory: '',\n InsightProduct: [],\n InsightSearchTerms: [],\n InsightVendor: [],\n },\n pages:\n 'Home Page, Insights Center, cart checkout, Search Page, Details Page, Product Category, Vendor List',\n title: heading,\n };\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.efficientTips]: [InsightDetails],\n };\n });\n }\n },\n [\n categoryKeys,\n configureToOrderQuestionsUrl,\n configureToOrderUrl,\n enableEfficiencyTipsInsights,\n enableEfficiencyTipsInsightsIsReady,\n insightsMessages?.recommendationRecordId,\n isConfigureToOrderQuestionsUrlReady,\n isConfigureToOrderUrlReady,\n setInsightsDetails,\n styledLink,\n translate,\n translateKey,\n ]\n );\n\n const updateInsightDetails = useCallback(\n (insightsMessages: { [x: string]: any }) => {\n updateEfficientTipsInsight(\n insightsMessages?.['IsResellerWhitelistedForCTOStaticInsights'] ?? false\n );\n if (\n userRole !== userRoles.BASIC ||\n !enableUserManagement ||\n enableUserManagement !== 'true'\n ) {\n const salesFrequencyInsight = getSalesFrequencyInsight(\n JSON.parse(\n insightsMessages?.[\n 'x4c_insights_combined.insight__order_count_ytd'\n ] ?? '{}'\n )\n );\n\n if (salesFrequencyInsight) {\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.accountInfo]: [salesFrequencyInsight],\n };\n });\n }\n }\n\n const categoryByVendorInsight = getCategoryByVendorInsight(\n JSON.parse(\n insightsMessages?.[\n 'x4c_insights_combined.insight__top_vendor_in_top_category'\n ] ?? '{}'\n )\n );\n\n const topCategoryInsight = getTopCategoryInsight(\n JSON.parse(\n insightsMessages?.[\n 'x4c_insights_combined.insights__top_categories_in_mdg_segment'\n ] ?? '[]'\n )\n );\n\n const topCategory_30Days = getTopCategoryInLast30Days(\n JSON.parse(\n insightsMessages?.[\n 'x4c_insights_combined.insight__top_category_growth_with_top_product_sales'\n ] ?? '[]'\n )\n );\n\n updateTopVendorInsight(\n JSON.parse(\n insightsMessages?.[\n 'x4c_insights_combined.insight__top_vendor_growth_with_top_product_sales'\n ] ?? '[]'\n )\n );\n\n updateMissingProductInBasket(\n JSON.parse(\n insightsMessages?.[\n 'x4c_insights_combined.insight__missing_product_market_basket'\n ] ?? '[]'\n )\n );\n\n updateTrendingSearches(\n JSON.parse(\n insightsMessages?.[\n 'x4c_insights_combined.insight__trending_searches_in_mdg_segment'\n ] ?? '[]'\n )\n );\n\n updateTopCategoriesInsight(\n JSON.parse(\n insightsMessages?.[\n 'x4c_insights_combined.insight__top_product_growth_top_category'\n ] ?? '[]'\n )\n );\n\n updateTrendingProductsInsights(\n JSON.parse(\n insightsMessages?.[\n 'x4c_insights_combined.insights__trending_products_growth'\n ] ?? '[]'\n )\n );\n\n if (categoryByVendorInsight) {\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingVendor]: [categoryByVendorInsight],\n };\n });\n }\n\n const trendingCategoryInsights: ObjectMap[] = [];\n [topCategoryInsight, topCategory_30Days]?.forEach((insight: any) => {\n if (insight) trendingCategoryInsights.push(insight);\n });\n\n if (trendingCategoryInsights?.length > 0) {\n setInsightsDetails((prevInsightsDetails: ObjectMap) => {\n return {\n ...prevInsightsDetails,\n [categoryKeys.trendingCategory]: trendingCategoryInsights,\n };\n });\n }\n },\n [\n updateEfficientTipsInsight,\n userRole,\n enableUserManagement,\n getCategoryByVendorInsight,\n getTopCategoryInsight,\n getTopCategoryInLast30Days,\n updateTopVendorInsight,\n updateMissingProductInBasket,\n updateTrendingSearches,\n updateTopCategoriesInsight,\n updateTrendingProductsInsights,\n getSalesFrequencyInsight,\n setInsightsDetails,\n categoryKeys,\n ]\n );\n\n useEffect(() => {\n if (!insightsMessagesLoading && allInsightsLoaded) {\n setDigitalData({\n QuickInsightsImpressions: chipsDetails?.[0]?.digitalData ?? [],\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allInsightsLoaded]);\n\n useEffect(() => {\n if (insightsDetails !== null) {\n updateChipsDetails(\n currentPage,\n pageWiseCagetoriesDetails?.[currentPage],\n insightsDetails\n );\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pageWiseCagetoriesDetails, insightsDetails, currentPage]);\n\n useEffect(() => {\n if (\n !productSummaryDependentInsights?.missingProductInsight &&\n !productSummaryDependentInsights?.topCategoryInsight &&\n !productSummaryDependentInsights?.topVendorInsight &&\n !productSummaryDependentInsights?.trendingProductInsight\n )\n setAllInsightsLoaded(true);\n }, [productSummaryDependentInsights]);\n\n useEffect(() => {\n if (insightsMessagesLoading) return;\n\n if (insightsMessages?.items?.length > 0) {\n updateInsightDetails(insightsMessages?.items?.[0]);\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [insightsMessagesLoading, insightsMessages?.items]);\n\n useEffect(() => {\n if (insightsDetails !== null) {\n setAllInsightsLoaded(true);\n return;\n }\n\n setInsightsMessagesLoading(true);\n insightsMutation.mutateAsync(combinedInsights).then((response) => {\n setInsightsMessagesLoading(false);\n setInsightsMessages(response);\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [insightsDetails]);\n\n return (\n \n {(insightsMessagesLoading || !allInsightsLoaded) && (\n \n )}\n \n {!insightsMessagesLoading &&\n allInsightsLoaded &&\n chipsDetails?.map((chipDetails: ObjectMap) => {\n return (\n \n {chipDetails?.insightsCount ?? 0}\n \n }\n key={chipDetails?.title}\n label={chipDetails?.title}\n onClick={() => showContent(chipDetails)}\n onDelete={onCountClick}\n variant=\"outlined\"\n />\n );\n })}\n \n {!insightsMessagesLoading &&\n chipsDetails?.length <= 1 &&\n allInsightsLoaded && (\n \n {translate('Insights.NoInsightsAvailable')}\n \n )}\n {!insightsMessagesLoading &&\n allInsightsLoaded &&\n enabledInsightsVersionIsReady && (\n \n {chipsDetails?.map((chipDetails: ObjectMap) => {\n return chipDetails?.active && <>{chipDetails?.content};\n })}\n \n )}\n \n );\n}\n\nfunction toPascal(string: string) {\n const convertedString = string.replace(/(\\w)(\\w*)/g, function (g0, g1, g2) {\n return g1.toUpperCase() + g2.toLowerCase();\n });\n return convertedString;\n}\n\nconst StyledStack = styled(Stack)(({ theme }) => ({\n '&::-webkit-scrollbar': {\n height: '8.86px',\n width: '8.86px',\n },\n '&::-webkit-scrollbar-thumb': {\n background: theme.palette.text.disabled,\n borderRadius: '6px',\n },\n '&::-webkit-scrollbar-thumb:hover': {\n background: theme.palette.primary.main,\n },\n '&::-webkit-scrollbar-track': {\n borderRadius: '6px',\n boxShadow: 'none',\n },\n '&::-webkit-scrollbar-track:hover': {\n boxShadow: 'inset 0 0 6px #C4C4C4',\n },\n height: 46,\n overflowX: 'auto',\n overflowY: 'hidden',\n}));\n\nconst StyledChip = styled(Chip)(({ theme }) => ({\n '&.active': {\n '.count-badge': {\n backgroundColor: 'rgba(1, 100, 176, 1)',\n color: '#fff',\n },\n backgroundColor: 'rgba(243, 250, 255, 1)',\n borderColor: 'rgba(0, 119, 212, 1)',\n marginBottom: theme.spacing(0.5),\n marginTop: theme.spacing(0.5),\n },\n}));\n\nconst CountBadge = styled(Box)(({ theme }) => ({\n '&.MuiChip-deleteIcon, &.MuiChip-deleteIcon:hover': {\n backgroundColor: '#eeeeee',\n borderRadius: 4,\n color: '#333333',\n fontSize: '12px !important',\n padding: theme.spacing(0, 1, 0, 1),\n },\n}));\n\ninterface TemporalEnableddProps {\n isDisabled: boolean;\n}\n\nconst StyledLinkTypography = styled('a')(\n ({ isDisabled }) => ({\n color: isDisabled ? '#424242' : '#0077D4',\n cursor: isDisabled ? 'default' : 'pointer',\n display: 'inline',\n fontSize: '16px',\n fontWeight: '600',\n minWidth: 0,\n overflow: 'hidden',\n textDecoration: 'none',\n textOverflow: 'ellipsis',\n })\n);\n","import { useApiGet } from 'mf_core/query';\nimport { useMutation } from '@tanstack/react-query';\n\nexport function useExtendedSummaryMutation() {\n const apiGet = useApiGet();\n\n return useMutation({\n mutationFn: (skulist: string) => {\n const data = apiGet(\n `/exp-looker/v1/insights/validateproducts?q={'productIdentifiers':${skulist}, 'webonly': true,'vendorAuthorization': true}`\n );\n\n return data;\n },\n });\n}\n\nexport interface Indicators {\n hasacopquantitybreak: boolean;\n hasacopspecialprice: boolean;\n hasacopwebdiscount: boolean;\n hasbundle: boolean;\n hascrosssell: boolean;\n hasreturnlimits: boolean;\n hasshipalong: boolean;\n hasspecialbid: boolean;\n hasstdquantitybreak: boolean;\n hasstdspecialprice: boolean;\n hasstdwebdiscount: boolean;\n hasstock: boolean;\n hasstockororder: boolean;\n haswarranty: boolean;\n iniSwitch: string;\n isBackOrderAllowed: boolean;\n isComponent: boolean;\n isNoReturnsAllowed: boolean;\n isNonTransactional: boolean;\n isNotOrderableOnline: boolean;\n isShippedFromPartner: boolean;\n isblowout: boolean;\n isclearanceproduct: boolean;\n iscustownproduct: boolean;\n isdigitaltype: boolean;\n isdirectship: boolean;\n isdirectshiporderable: boolean;\n isdiscontinued: boolean;\n isdownloadable: boolean;\n isenduserrequired: boolean;\n isexportabletocountry: boolean;\n isheavyweight: boolean;\n ishptopconfigproduct: boolean;\n islicenseproduct: boolean;\n islremodel: boolean;\n isltl: boolean;\n isoversizeproduct: boolean;\n ispreorderproduct: boolean;\n isrefurbished: boolean;\n isreplacementproduct: boolean;\n iswarranty: boolean;\n newproduct: boolean;\n replacementtype: string;\n skutype: string;\n}\n\nexport interface Images {\n imageurl: string;\n}\n\nexport interface Extrafee {\n feeamount: number;\n feename: string;\n}\n\nexport interface Pna {\n availablequantity: number;\n currency: string;\n dealerprice: number;\n extrafee: Extrafee;\n msrp: number;\n}\n\nexport interface CampaignInfo {\n promotioncode: string;\n promotionpoints: string;\n promotiontype: string;\n}\n\nexport interface FreeItem {\n expiredt: string;\n freeMaterial: string;\n freeqty: string;\n image: string;\n minqty: string;\n partdescription: string;\n upcEan: string;\n vpn: string;\n}\n\nexport interface CiscoFields {\n configurationindicator: string;\n globallistprice: string;\n internalbusinessentity: string;\n itemcatalogcategory: string;\n itemtype: string;\n productsubgroup: string;\n serviceprogramname: string;\n}\n\nexport type ProductSummary = {\n authorizedToPurchase: boolean;\n basecost: string;\n brand: string;\n bundleSkus: string[];\n campaign: CampaignInfo;\n category: string;\n categoryrankfactor: number;\n ciscoFields: CiscoFields;\n classCode: string;\n cmpFields: string;\n cpucd: string;\n customerpartnumber: string;\n digitalsku: string;\n directShipVendorCode: number;\n directshipvendorcodes: string;\n displaypartnumber: string;\n exManufacturerpartnumber: string;\n fiscalclass: string;\n freeItem: FreeItem;\n globalpartnumber: string;\n globalproducthierarchy: string;\n harmonizedCode: string;\n images: Images;\n incurrencycode: string;\n indicators: Indicators;\n isSapCountry: boolean;\n keywords: string;\n languagecode: string;\n layout: string;\n longdescription: string;\n manufacturerdescription: string;\n manufacturerpartnumber: string;\n materialtype: string;\n outcurrencycode: string;\n partOfBunddles: string[];\n partnumber: string;\n pna: Pna;\n productfamily: string;\n productmodel: string;\n producttype: string;\n restrictionCode: string;\n salesRank: string;\n score: number;\n scoringfactor: string;\n shortdescription: string;\n similarProducts: string[];\n stockStatus: string;\n subMaterial: string;\n subcategory: string;\n suggestedmaterial: string;\n thirdpartydescription: string;\n upcean: string;\n vendorCode: string;\n vendorSubRange: string;\n};\n\nexport type TotalField = {\n count: string;\n relation: string;\n};\n\nexport type ProductSummaryResponse = {\n isSuccess: boolean;\n summaries: ProductSummary[];\n total: TotalField;\n};\n","import React, { useEffect, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { ObjectMap } from 'mf_core/query/api-hooks';\nimport { useLocalization } from '@im/react-localization';\nimport Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Tooltip, { tooltipClasses, TooltipProps } from '@mui/material/Tooltip';\nimport InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';\nimport InsightsFooter from './internal/InsightsFooter';\nimport InsightsContent from './internal/InsightsContent';\nimport { InsightsMessagingQueueSkeleton } from './internal/InsightsMessagingQueueSkeleton';\n\ntype Props = {\n dismissAllHandler?: () => void;\n maxDropHeight?: number;\n onClickInsightsCenter?: () => void;\n};\n\nexport default function InsightsMessagingQueue(props: Props) {\n const location = useLocation();\n const { translate } = useLocalization();\n const { dismissAllHandler, maxDropHeight, onClickInsightsCenter } = props;\n const [loadInsightsData, setLoadInsightsData] = useState(false);\n const [currentPage, setCurrentPage] = useState('Home Page');\n const [chipsDetails, setChipsDetails] = useState([]);\n const [insightsDetails, setInsightsDetails] = useState(\n null\n );\n\n const pageNames: ObjectMap = {\n '/insight/insights-v2': 'Insights Center',\n '/my/cart': 'cart checkout',\n '/my/dashboard': 'Home Page',\n '/product/productdetails': 'Details Page',\n '/product/productsearch': 'Search Page',\n };\n const enableInsightsPaths = [\n '/insight/insights-v2',\n '/my/cart',\n '/my/dashboard',\n '/product/productsearch',\n '/product/productdetails',\n '/product/subscriptioncategories',\n ];\n\n useEffect(() => {\n const pathName = location?.pathname ?? '';\n let timer: any = null;\n setLoadInsightsData(false);\n\n if (enableInsightsPaths.includes(pathName)) {\n if (\n (pathName === '/product/productsearch' &&\n (location?.search?.includes('categories') ||\n location?.search?.includes('category'))) ||\n pathName === '/product/subscriptioncategories'\n ) {\n setCurrentPage('Product Category');\n } else if (\n pathName === '/product/productsearch' &&\n location?.search?.includes('vendor')\n ) {\n setCurrentPage('Vendor List');\n } else {\n setCurrentPage(pageNames[pathName]);\n }\n\n timer = setTimeout(() => {\n setLoadInsightsData(true);\n }, 100);\n }\n\n return () => {\n clearTimeout(timer);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [location]);\n\n return (\n \n \n \n \n \n {translate('Insights.Card_TitleText')}\n \n \n \n \n \n \n {translate(`Insights.${currentPage.replace(/\\s/g, '')}`)}\n \n {!loadInsightsData && }\n {loadInsightsData && (\n \n )}\n \n \n \n \n );\n}\n\nconst StyledBoxWrapper = styled(Box)(({ theme }) => ({\n backgroundColor: '#FFF',\n borderRadius: '4px',\n display: 'inline-block',\n height: '100%',\n minWidth: 350,\n padding: theme.spacing(2),\n}));\n\nconst StyledPageNameTypography = styled(Typography)(({ theme }) => ({\n color: '#a9a8a8',\n fontSize: '11px',\n fontWeight: 'bold',\n lineHeight: '10px',\n}));\n\nconst CustomWidthTooltip = styled(({ className, ...props }: TooltipProps) => (\n \n))({\n [`& .${tooltipClasses.tooltip}`]: {\n background: '#333333 !important',\n borderRadius: '4px',\n boxShadow: 'none',\n color: '#fff !important',\n fontSize: '12px !important',\n },\n});\n","import { useHasPermission } from 'mf_core/auth';\nimport { ObjectMap } from 'mf_core/query';\n\nexport function isEmpty(value: any): boolean {\n if (!value || value === null || value === undefined) return true;\n if (typeof value === 'string') {\n if (value?.trim() === '') return true;\n }\n if (typeof value === 'object') {\n if (!Object.keys(value) || Object.keys(value)?.length === 0) return true;\n if (Object.keys(value)?.length === 1 && Object.keys(value)?.includes('')) {\n return true;\n }\n }\n return false;\n}\n\nexport const userRoles: ObjectMap = {\n ADMIN: 'Admin',\n BASIC: 'Basic',\n PURCHASE: 'Purchase',\n SUPPORT: 'Support',\n};\n\nexport const GetUserRole = () => {\n const hasPermission = useHasPermission();\n if (hasPermission(['ResellerAdmin'])) return userRoles.ADMIN;\n else if (\n (hasPermission(['SeeResellerPriceAndStockOnCatalogue']) ||\n hasPermission(['CreateBaskets'])) &&\n (hasPermission(['PlaceOrders']) ||\n hasPermission(['FulfillmentOrdering']) ||\n hasPermission(['ViewOrderStatus']))\n )\n return userRoles.PURCHASE;\n else if (\n hasPermission(['ViewAccountStatements']) ||\n hasPermission(['ViewOrderStatus']) ||\n hasPermission(['CreateReturns'])\n )\n return userRoles.SUPPORT;\n else return userRoles.BASIC;\n};\n\nexport function getAmount(value?: number | string) {\n if (!value || isEmpty(value)) return 0;\n if (typeof value === 'string') return +value?.replace(/\\s+/g, '');\n return value;\n}\n\nexport function percentage(value: number, total: number) {\n if (value === 0 || total === 0) return 0;\n return getAmount(((value / total) * 100).toFixed(2));\n}\n\nexport function capitalizeFirstLetter(word: string) {\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n}\n\nexport function capitalizeSentence(sentence: string | undefined): string {\n if (!sentence) return '';\n const words = sentence.split(' ');\n const capitalizedWords = words.map((word) => capitalizeFirstLetter(word));\n const capitalizedSentence = capitalizedWords.join(' ');\n return capitalizedSentence;\n}\n\nexport function getSKUsMap(skus: any = []) {\n const skuMap: ObjectMap = {};\n\n skus.forEach((sku: ObjectMap) => {\n skuMap[sku?.partNumber ?? sku?.skuNumber] = sku;\n });\n\n return skuMap;\n}\n\nexport function getSKUMap(skus: any = []) {\n const skuMap: ObjectMap = {};\n\n skus.forEach((sku: ObjectMap) => {\n skuMap[sku?.partnumber ?? sku?.skuNumber] = sku;\n });\n\n return skuMap;\n}\n\nexport function sortJSONListByKey(jsonList: Array, key: string) {\n jsonList?.sort((productDetailsA: ObjectMap, productDetailsB: ObjectMap) => {\n if (productDetailsA[key] > productDetailsB[key]) return 1;\n else if (productDetailsA[key] < productDetailsB[key]) return -1;\n else return 0;\n });\n\n return jsonList;\n}\n\nexport function sortJSONByNullValue(jsonList: Array, key: string) {\n jsonList.sort((productA: ObjectMap, productB: ObjectMap) => {\n if (JSON.stringify(productA?.[key]) === '{}') {\n return 1;\n }\n\n if (JSON.stringify(productB?.[key]) === '{}') {\n return -1;\n }\n\n if (productA?.[key] === productB?.[key]) {\n return 0;\n }\n\n return productA?.[key] < productB?.[key] ? -1 : 1;\n });\n return jsonList;\n}\n\nexport function sortJSONListByBooleanKey(\n jsonList: Array,\n key: string,\n orderBy: string\n) {\n jsonList?.sort((productA: ObjectMap, productB: ObjectMap) => {\n if (orderBy === 'desc') {\n return Number(productB?.[key]) - Number(productA?.[key]);\n }\n\n return Number(productA?.[key]) - Number(productB?.[key]);\n });\n return jsonList;\n}\n\nexport function sortJSONListByTwoBooleanKey(\n jsonList: Array,\n key1: string,\n key2: string,\n orderBy: string\n) {\n sortJSONListByBooleanKey(jsonList, key1, orderBy).sort(\n (productA, productB) => {\n if (orderBy === 'desc') {\n return Number(productB[key2]) - Number(productA[key2]);\n }\n\n return Number(productA[key2]) - Number(productB[key2]);\n }\n );\n\n return jsonList;\n}\n\nexport function getFormattedNumber(\n num: number,\n currencySymbol = '$',\n zeroRequired = false\n): string {\n num = num * 1;\n\n if (num >= 1000000000) {\n return `${currencySymbol}${(num / 1000000000)\n .toFixed(1)\n .replace(/\\.0$/, '')}B`;\n }\n if (num >= 1000000) {\n return `${currencySymbol}${(num / 1000000)\n .toFixed(1)\n .replace(/\\.0$/, '')}M`;\n }\n if (num >= 1000) {\n return `${currencySymbol}${(num / 1000)?.toFixed(1)?.replace(/\\.0$/, '')}K`;\n }\n if (num === 0) {\n return zeroRequired ? `${currencySymbol}0` : '';\n }\n return `${currencySymbol}${num?.toFixed(1)?.replace(/\\.0$/, '')}`;\n}\n","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"animation\", \"className\", \"component\", \"height\", \"style\", \"variant\", \"width\"];\nlet _ = t => t,\n _t,\n _t2,\n _t3,\n _t4;\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { keyframes, css } from '@mui/system';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha, unstable_getUnit as getUnit, unstable_toUnitless as toUnitless } from '../styles';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getSkeletonUtilityClass } from './skeletonClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n animation,\n hasChildren,\n width,\n height\n } = ownerState;\n const slots = {\n root: ['root', variant, animation, hasChildren && 'withChildren', hasChildren && !width && 'fitContent', hasChildren && !height && 'heightAuto']\n };\n return composeClasses(slots, getSkeletonUtilityClass, classes);\n};\nconst pulseKeyframe = keyframes(_t || (_t = _`\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n`));\nconst waveKeyframe = keyframes(_t2 || (_t2 = _`\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n`));\nconst SkeletonRoot = styled('span', {\n name: 'MuiSkeleton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], ownerState.animation !== false && styles[ownerState.animation], ownerState.hasChildren && styles.withChildren, ownerState.hasChildren && !ownerState.width && styles.fitContent, ownerState.hasChildren && !ownerState.height && styles.heightAuto];\n }\n})(({\n theme,\n ownerState\n}) => {\n const radiusUnit = getUnit(theme.shape.borderRadius) || 'px';\n const radiusValue = toUnitless(theme.shape.borderRadius);\n return _extends({\n display: 'block',\n // Create a \"on paper\" color with sufficient contrast retaining the color\n backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),\n height: '1.2em'\n }, ownerState.variant === 'text' && {\n marginTop: 0,\n marginBottom: 0,\n height: 'auto',\n transformOrigin: '0 55%',\n transform: 'scale(1, 0.60)',\n borderRadius: `${radiusValue}${radiusUnit}/${Math.round(radiusValue / 0.6 * 10) / 10}${radiusUnit}`,\n '&:empty:before': {\n content: '\"\\\\00a0\"'\n }\n }, ownerState.variant === 'circular' && {\n borderRadius: '50%'\n }, ownerState.variant === 'rounded' && {\n borderRadius: (theme.vars || theme).shape.borderRadius\n }, ownerState.hasChildren && {\n '& > *': {\n visibility: 'hidden'\n }\n }, ownerState.hasChildren && !ownerState.width && {\n maxWidth: 'fit-content'\n }, ownerState.hasChildren && !ownerState.height && {\n height: 'auto'\n });\n}, ({\n ownerState\n}) => ownerState.animation === 'pulse' && css(_t3 || (_t3 = _`\n animation: ${0} 2s ease-in-out 0.5s infinite;\n `), pulseKeyframe), ({\n ownerState,\n theme\n}) => ownerState.animation === 'wave' && css(_t4 || (_t4 = _`\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: ${0} 2s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ${0},\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n `), waveKeyframe, (theme.vars || theme).palette.action.hover));\nconst Skeleton = /*#__PURE__*/React.forwardRef(function Skeleton(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiSkeleton'\n });\n const {\n animation = 'pulse',\n className,\n component = 'span',\n height,\n style,\n variant = 'text',\n width\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n animation,\n component,\n variant,\n hasChildren: Boolean(other.children)\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(SkeletonRoot, _extends({\n as: component,\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n style: _extends({\n width,\n height\n }, style)\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Skeleton.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The animation.\n * If `false` the animation effect is disabled.\n * @default 'pulse'\n */\n animation: PropTypes.oneOf(['pulse', 'wave', false]),\n /**\n * Optional children to infer width and height from.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Height of the skeleton.\n * Useful when you don't want to adapt the skeleton to a text element but for instance a card.\n */\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The type of content that will be rendered.\n * @default 'text'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['circular', 'rectangular', 'rounded', 'text']), PropTypes.string]),\n /**\n * Width of the skeleton.\n * Useful when the skeleton is inside an inline element with no width of its own.\n */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n} : void 0;\nexport default Skeleton;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSkeletonUtilityClass(slot) {\n return generateUtilityClass('MuiSkeleton', slot);\n}\nconst skeletonClasses = generateUtilityClasses('MuiSkeleton', ['root', 'text', 'rectangular', 'rounded', 'circular', 'pulse', 'wave', 'withChildren', 'fitContent', 'heightAuto']);\nexport default skeletonClasses;","export function isUnitless(value) {\n return String(parseFloat(value)).length === String(value).length;\n}\n\n// Ported from Compass\n// https://github.com/Compass/compass/blob/master/core/stylesheets/compass/typography/_units.scss\n// Emulate the sass function \"unit\"\nexport function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n}\n\n// Emulate the sass function \"unitless\"\nexport function toUnitless(length) {\n return parseFloat(length);\n}\n\n// Convert any CSS or value to any another.\n// From https://github.com/KyleAMathews/convert-css-length\nexport function convertLength(baseFontSize) {\n return (length, toUnit) => {\n const fromUnit = getUnit(length);\n\n // Optimize for cases where `from` and `to` units are accidentally the same.\n if (fromUnit === toUnit) {\n return length;\n }\n\n // Convert input length to pixels.\n let pxLength = toUnitless(length);\n if (fromUnit !== 'px') {\n if (fromUnit === 'em') {\n pxLength = toUnitless(length) * toUnitless(baseFontSize);\n } else if (fromUnit === 'rem') {\n pxLength = toUnitless(length) * toUnitless(baseFontSize);\n }\n }\n\n // Convert length in pixels to the output unit\n let outputLength = pxLength;\n if (toUnit !== 'px') {\n if (toUnit === 'em') {\n outputLength = pxLength / toUnitless(baseFontSize);\n } else if (toUnit === 'rem') {\n outputLength = pxLength / toUnitless(baseFontSize);\n } else {\n return length;\n }\n }\n return parseFloat(outputLength.toFixed(5)) + toUnit;\n };\n}\nexport function alignProperty({\n size,\n grid\n}) {\n const sizeBelow = size - size % grid;\n const sizeAbove = sizeBelow + grid;\n return size - sizeBelow < sizeAbove - size ? sizeBelow : sizeAbove;\n}\n\n// fontGrid finds a minimal grid (in rem) for the fontSize values so that the\n// lineHeight falls under a x pixels grid, 4px in the case of Material Design,\n// without changing the relative line height\nexport function fontGrid({\n lineHeight,\n pixels,\n htmlFontSize\n}) {\n return pixels / (lineHeight * htmlFontSize);\n}\n\n/**\n * generate a responsive version of a given CSS property\n * @example\n * responsiveProperty({\n * cssProperty: 'fontSize',\n * min: 15,\n * max: 20,\n * unit: 'px',\n * breakpoints: [300, 600],\n * })\n *\n * // this returns\n *\n * {\n * fontSize: '15px',\n * '@media (min-width:300px)': {\n * fontSize: '17.5px',\n * },\n * '@media (min-width:600px)': {\n * fontSize: '20px',\n * },\n * }\n * @param {Object} params\n * @param {string} params.cssProperty - The CSS property to be made responsive\n * @param {number} params.min - The smallest value of the CSS property\n * @param {number} params.max - The largest value of the CSS property\n * @param {string} [params.unit] - The unit to be used for the CSS property\n * @param {Array.number} [params.breakpoints] - An array of breakpoints\n * @param {number} [params.alignStep] - Round scaled value to fall under this grid\n * @returns {Object} responsive styles for {params.cssProperty}\n */\nexport function responsiveProperty({\n cssProperty,\n min,\n max,\n unit = 'rem',\n breakpoints = [600, 900, 1200],\n transform = null\n}) {\n const output = {\n [cssProperty]: `${min}${unit}`\n };\n const factor = (max - min) / breakpoints[breakpoints.length - 1];\n breakpoints.forEach(breakpoint => {\n let value = min + factor * breakpoint;\n if (transform !== null) {\n value = transform(value);\n }\n output[`@media (min-width:${breakpoint}px)`] = {\n [cssProperty]: `${Math.round(value * 10000) / 10000}${unit}`\n };\n });\n return output;\n}"],"names":["InsightsFooter","props","translate","useLocalization","dismissAllHandler","onClickInsightsCenter","showInsightsCenter","onClickInsightsButton","useCallback","React","Stack","direction","justifyContent","spacing","StyledButton","onClick","size","sx","display","variant","styled","Button","theme","textTransform","TopInsightDetails","insightData","StyledInsightDetailsStackWrapper","alignItems","width","InsightsIcon","Typography","fontWeight","pl","title","description","Box","component","background","borderBottom","maxWidth","padding","paddingBottom","CategoryInsightsDetails","maxDropHeight","topInsightsData","maxHeight","setMaxHeight","useState","window","innerHeight","useEffect","handleWindowResize","addEventListener","removeEventListener","StyledCategoryWrapperStack","map","index","key","height","palette","text","disabled","borderRadius","primary","main","boxShadow","marginTop","overflowY","combinedInsights","client_id","column_limit","dynamic_fields","fields","fill_fields","filter_config","filter_expression","filters","limit","model","pivots","query_timezone","row_total","sorts","subtotals","total","view","vis_config","visible_ui_sections","InsightsMessagingQueueSkeleton","backgroundColor","Skeleton","fontSize","InsightsContent","chipsDetails","currentPage","insightsDetails","setChipsDetails","setInsightsDetails","insightsMessages","setInsightsMessages","insightsMessagesLoading","setInsightsMessagesLoading","insightsMutation","apiPost","useApiPost","useMutation","mutationFn","reqBody","onError","error","console","useInsightQueryMutation","dataExtendedMutation","apiGet","useApiGet","skulist","useExtendedSummaryMutation","translateKey","useTranslate","userRole","GetUserRole","isReady","enabledInsightsVersionIsReady","value","enabledInsightsVersion","useFeatureFlag","enableEfficiencyTipsInsightsIsReady","enableEfficiencyTipsInsights","isConfigureToOrderUrlReady","configureToOrderUrl","isConfigureToOrderQuestionsUrlReady","configureToOrderQuestionsUrl","enableInsightsSearchURLRefinement","enableUserManagement","categoryKeys","useMemo","accountInfo","complementaryProducts","efficientTips","trendingCategory","trendingProduct","trendingProductCategory","trendingProductSearch","trendingProductVendor","trendingVendor","productSummaryDependentInsights","setProductSummaryDependentInsights","missingProductInsight","topCategoryInsight","topVendorInsight","trendingProductInsight","allInsightsLoaded","setAllInsightsLoaded","pageWiseCagetoriesDetails","styledLink","tabContentView","categoryInsightData","getCategoryDetailsBasedOnPage","insightCategoriesList","insightsData","filteredCategoryWiseInsights","forEach","category","filteredInsights","pages","includes","getAllCategoriesInsights","allCategoriesInsights","updateChipsDetails","navigatedPage","categoryWiseInsightsData","updatedCategoryInsights","chipsList","active","content","dataName","digitalData","insight","InsightTab","insightsCount","String","length","push","replace","showContent","selectedChipDetails","tempChipDetails","chipDetails","setDigitalData","QuickInsightsImpressions","onCountClick","getSalesFrequencyInsight","orderDetails","order_count","orderHistory","encodeURIComponent","heading","data","history","recommendationRecordId","orderCount","InsightCategory","InsightName","InsightOrderhistory","InsightProduct","InsightSearchTerms","InsightVendor","getCategoryByVendorInsight","vendorDetails","categoryName","toPascal","encodedCategoryName","vendorName","vendor_name","vendor","encodedVendorName","vendorUrl","categoryUrl","dataTagName","updateTopVendorInsight","top10VendorsDetails","Array","isArray","partNumbers","partNumber","sku","substring","skusList","slice","prevInsightsDetails","mutateAsync","then","productSummaryResponse","productSummaries","summaries","skusMap","getSKUMap","filteredProductDetails","Object","prototype","hasOwnProperty","call","isAuthorizedToBuy","authorizedToPurchase","productSummary","sortedCategoryDetailsByRank","sortJSONListByKey","sortedDataByAuthorizationToBuy","sortJSONListByBooleanKey","topVendorsDetails","partnumber","productDetailsLink","searchLink","lineHeight","overflow","product","product_description","StyledLinkTypography","href","isDisabled","finally","prevData","updateEmptyComplementaryProducts","updateMissingProductInBasket","missingProductDetails","bundle","partNumberA","SKUA","partNumberB","SKUB","topBundle","filteredBundleDetails","bundleDetails","isAuthorizedToBuySKUA","isAuthorizedToBuySKUB","productSummaryA","productSummaryB","sortJSONListByTwoBooleanKey","productAUrl","productBUrl","productA","PRODA_DESCRIPTION","productB","PRODB_DESCRIPTION","catch","getTopCategoryInsight","categoryDetails","topCategoryDetails","mdg_segment_category_rank","updateTrendingSearches","trendingSearchList","navlinkData","topTrendingProductDetails","rank","trendingTopSearchList","trendingListLength","trendingSearchesDigitalData","item","trendingSearchTerm","search_terms","encodedTrendingSearchTerm","trendingSearchTermUrl","delimiter","trendingData","getSalesPercentage","sales","Math","abs","parseFloat","toPrecision","updateTopCategoriesInsight","topCategoriesInsightDetails","dataCategoryName","encodedDataCategoryName","productdetailsLink","insightType","percentage","sales_growth_ratio","getTopCategoryInLast30Days","topCategoriesInLast30DaysInsightDetails","encodedDataCategory","categoryLink","updateTrendingProductsInsights","topTrendingProductsDetails","trendingDetails","sortedTrendingDetailsByRank","sortbyNullArray","sortJSONByNullValue","topTrendingDetails","topProductUrl","firstProduct","firstProductSku","firstProductUrl","undefined","secondProduct","secondProductSku","secondProductUrl","highGrowth","lowGrowth","topProduct","updateEfficientTipsInsight","isResellerWhitelistedForCTO","configureToOrder","questions","ctoLink","InsightDetails","updateInsightDetails","userRoles","BASIC","salesFrequencyInsight","JSON","parse","categoryByVendorInsight","topCategory_30Days","trendingCategoryInsights","items","response","py","StyledStack","flexWrap","StyledChip","className","deleteIcon","CountBadge","label","onDelete","pt","string","g0","g1","g2","toUpperCase","toLowerCase","overflowX","Chip","color","borderColor","marginBottom","cursor","minWidth","textDecoration","textOverflow","InsightsMessagingQueue","location","useLocation","loadInsightsData","setLoadInsightsData","setCurrentPage","pageNames","enableInsightsPaths","pathName","pathname","timer","search","setTimeout","clearTimeout","StyledBoxWrapper","CustomWidthTooltip","InfoOutlinedIcon","ml","StyledPageNameTypography","Tooltip","_extends","classes","popper","tooltipClasses","tooltip","isEmpty","trim","keys","ADMIN","PURCHASE","SUPPORT","hasPermission","useHasPermission","capitalizeFirstLetter","word","charAt","skus","skuMap","skuNumber","jsonList","sort","productDetailsA","productDetailsB","stringify","orderBy","Number","key1","key2","getFormattedNumber","num","currencySymbol","zeroRequired","toFixed","_excluded","_t","_t2","_t3","_t4","_","t","pulseKeyframe","keyframes","waveKeyframe","SkeletonRoot","name","slot","overridesResolver","styles","ownerState","root","animation","hasChildren","withChildren","fitContent","heightAuto","radiusUnit","shape","radiusValue","vars","bg","alpha","mode","transformOrigin","transform","round","visibility","css","action","hover","inProps","ref","style","other","Boolean","children","slots","useUtilityClasses","as","propTypes","getSkeletonUtilityClass","isUnitless","getUnit","input","match","toUnitless","convertLength","baseFontSize","toUnit","fromUnit","pxLength","outputLength","alignProperty","grid","sizeBelow","sizeAbove","fontGrid","pixels","htmlFontSize","responsiveProperty","cssProperty","min","max","unit","breakpoints","output","factor","breakpoint"],"sourceRoot":""}